• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
Resource icon

[NPC] Demonguard - Pits of Inferno 2024-09-12

No permission to download
Nothing to do, so...
LUA:
-- Author:         Rodrigo (Nottinghster) - (OTLand, OTFans, XTibia, OTServBR)
-- Country:        Brazil
-- From:         Tibia World RPG OldSchool

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
function onCreatureAppear(cid)              npcHandler:onCreatureAppear(cid)            end
function onCreatureDisappear(cid)           npcHandler:onCreatureDisappear(cid)         end
-- OTServ event handling functions end

local condition = Condition(CONDITION_FIRE)
condition:setParameter(CONDITION_PARAM_DELAYED, 1)
condition:addDamage(10, 1000, -10)

function onThink() 
    npcHandler:onThink()
    local specs = Game.getSpectators(Npc():getPosition(), false, true, 5, 5, 5, 5)
    for i = 1, #specs do
        if math.random(1, 5) == 1 then
            local creature = specs[i]
            local npc = Npc()
            creature:addCondition(condition)
            npc:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED)
            creature:getPosition():sendMagicEffect(CONST_ME_HITBYFIRE)
            npc:say("Die, intruder!", TALKTYPE_SAY)
        end    
    end
end    

npcHandler:addModule(FocusModule:new())
Author
Nottinghster
Downloads
2
Views
784
First release
Last update

Ratings

0.00 star(s) 0 ratings
Back
Top