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())