Ir para conteúdo
  • 0

[PEDIDO] Spell Ressurect


Vorkhon

Pergunta

Ola eu me deparei com um creaturescript de que quando o player morre ele vira um zombie. Eu queria saber se é possivel transfromar isso em uma Spell que dure 30 segundos, ai se ele morrer nesse meio tempo ativa esse script.

 

local monsters = {"zombie", "ghoul", "ghost", "spectre"} --Aqui você configura os monstros

local storage = 325

 

function onDeath(cid, corpse, deathList)

 

local outfit = getCreatureOutfit(cid)

local health = getCreatureMaxHealth(cid)

local pos = getThingPos(cid)

local name = getCreatureName(cid)

local sex = getPlayerSex(cid)

local voc = getPlayerVocationName(cid)

 

 

doRemoveItem(corpse.uid)

x = doCreateMonster(monsters[math.random(#monsters)], pos)

doPlayerSetStorageValue(x, storage, name.."'s "..getCreatureName(x)..". "..(sex == 0 and "She" or "He").." was a "..voc)

setCreatureMaxHealth(x, health)

doCreatureAddHealth(x, health - getCreatureHealth(x))

doSendMagicEffect(pos, CONST_ME_SMALLCLOUDS)

doCreatureChangeOutfit(x, outfit)

 

return false

end

 

function onLook(cid, thing, position, lookDistance)

 

if (isMonster(thing.uid) and getPlayerStorageValue(thing.uid, storage) ~= -1) then

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see "..getPlayerStorageValue(thing.uid, storage))

return false

end

 

return true

end

 

Editado por Vorkhon
Link para o comentário
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...