Bem , aqui iremos fazer uma task automática , em que quando um player matar um certo número de monstros , irá aparecer um boss , com um loot muito bom.
Eu mesmo criei este script , portanto 100 % credit.
Para quem não sabe , meu nick name deveria ser Zero!
para começar , entre em (pasta do ot /data/creaturescripts/)creaturescripts.xml e adicione este tag
<event type="task" name="task" script="old window.lua"/>
Então vá em data e crie uma pasta chamada old window.lua
nela coloque o seguinte :
--[[Linha 1 ]] function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)--[[Linha 2 ]] registerCreatureEvent(cid, "giant spider")
--[[Linha 3 ]] local creaturename = getCreatureName(cid)
--[[Linha 4 ]] local Giant Spiders = getPlayerStorageValue(mostDamageKiller, 5570)
--[[Linha 5 ]] if creaturename == 'giant spider' or creaturename == 'tarantula' then
--[[Linha 6 ]] if Giant Spiders == 1000 then
--[[Linha 7 ]] doPlayerSendCancel(mostDamageKiller,'Voce conseguiu."byZero"')
--[[Linha 8 ]] position = getCreaturePosition(cid)
--[[Linha 9 ]] doSendMagicEffect(position, CONST_ME_TELEPORT)
--[[Linha 10]] doSummonCreature("The old window", position)
--[[Linha 11]] setPlayerStorageValue(mostDamageKiller,5570,-1)
--[[Linha 12]] setPlayerStorageValue(mostDamageKiller,5571,1)
--[[Linha 13]] elseif Giant Spiders >= 0 then
--[[Linha 14]] setPlayerStorageValue(mostDamageKiller,5570, Giant Spiders+1)
--[[Linha 15]] doPlayerSendCancel(mostDamageKiller,'Faltam '.. 1000-Giant Spiders..' Giant Spiders."ByZero"')
--[[Linha 16]] else
--[[Linha 17]] end
--[[Linha 18]] end
--[[Linha 19]] end
Este foi um exemplo de uma task de giant spiders , crie suas tasks e bom jogo.
Abraços , espero que gostem!