Boa noite galera, eu gostaria de uma ajuda de um npc de task simples, sem rank e talz.
Voce fala com ele, ele fala pra voce matar 100 criaturas, por exemplo, cada vez que mata um, aparece na tela a quantidade para o player. depois que mata, ele vai até o npc e recebe a recompensa. gold, itens ou outfit.
Eu tenho uma script aqui, mas ele não esta funcionando a parte que mostra quantas criaturas foram mortas.
local monsters = {
--name = storage
["cyclops"] = 55004,
["cyclops smith"] = 55004,
["cyclops drone"] = 55004
}function onKill(cid, target)
local monster = monsters[getCreatureName(target):lower()]
if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 76669) == 2) then
if getPlayerStorageValue(cid, monster) < 200 then
local killedMonsters = getPlayerStorageValue(cid, monster)
if(killedMonsters == -1) then
killedMonsters = 1
end
setPlayerStorageValue(cid, monster, killedMonsters + 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have killed " .. killedMonsters .. " of 200 cyclops.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have killed enough cyclops.")
setPlayerStorageValue(cid, 76669, 3)
end
end
return TRUE
end