Essa é a action da wall, so configura as posições, nome, storage e tempo
local cfg = {
stor = 55555,
pos_player = {x = 130, y = 68, z = 7},
pos_mob = {x = 131, y = 69, z = 7},
name_mob = "Demon",
time = 10,
}
function teleportAndSpawn(cid)
doTeleportThing(cid, cfg.pos_player)
while cfg.time >= 1 do
addEvent(doSendAnimatedText, (cfg.time*1000), cfg.pos_mob, -(cfg.time-11), math.random(1,255))
cfg.time = cfg.time - 1
end
addEvent(doSummonCreature, 10000, cfg.name_mob, cfg.pos_mob)
end
function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid, cfg.stor) < 1 then
doPlayerSendTextMessage(cid, 22, "Você não tem permissão!")
return false
end
teleportAndSpawn(cid)
doPlayerSendTextMessage(cid, 22, "Em 10 segundos o Boss aparecera.")
return true
end
em creaturescripts.xml adiciona esse tag
<event type="death" name="DeathTaskBoss" event="script" value="nomedoscript.lua"/>
Em creaturescripts/scripts cria esse script e configura o nomedoscritps e stor e msgs.
local name_boss = "Demon"
local stor = 55555
function onDeath(cid, corpse, deathList)
if getCreatureName(cid) == name_boss then
if getPlayerStorageValue(deathList[1], stor) >= 1 then
setPlayerStorageValue(deathList[1], stor, 0)
doPlayerSendTextMessage(deathList[1], 22,"Você derrotou o Boss Parabéns!")
end
end
return true
end
por ultimo para funciona vai no boss e adiciona esse tag antes do </monster>
<script> <event name="DeathTaskBoss"/> </script>
Faça tudo correto que vai funcionar já testei.