Com a Potion multi healing você cura todos os players com profissões diferentes !
bom , eu usei a potion com id 8474 " "
você escolhe a cura de cada profissão ..
Ex :
Se você quer que druid cure mana é so coloca mana no script
mais se você quer que cure life é so colocar health no script ..
assim com todas as profissões !
vá em data / actions / scripts e crie um arquivo lua com o nome : potion_multi_healing.lua..
e cole isso dentro :
function onUse(cid, item, fromPosition, itemEx, toPosition) local sorc = {tipo = 'mana', min = 100, max = 200} -- tipo = tipo de cura 'mana' ou 'health'... local druid = {tipo = 'mana', min = 100, max = 200} -- min = minimo que vai curar... local pala = {tipo = 'health', min = 300, max = 400} -- max = máximo que vai curar... local kina = {tipo = 'health', min = 400, max = 600} -- configure todos com sua preferência. local storage = 12390 -- uma storage qualquer .. local time = 2 -- tempo em segundos para usar a potion novamente .. if isPlayer(itemEx.uid) then if getPlayerStorageValue(cid, storage) - os.time() <= 0 then if getPlayerVocation(itemEx.uid) == 1 then if sorc.tipo == 'mana' then doCreatureAddMana(itemEx.uid, math.random(sorc.min, sorc.max)) doSendMagicEffect(getCreaturePosition(itemEx.uid), 12) doCreatureSay(itemEx.uid, "Sobe Mana!", TALKTYPE_ORANGE_1) elseif sorc.tipo == 'health' then doCreatureAddHealth(itemEx.uid, math.random(sorc.min, sorc.max)) doSendMagicEffect(getCreaturePosition(itemEx.uid), 13) doCreatureSay(itemEx.uid, "Sobe Life!", TALKTYPE_ORANGE_1) end setPlayerStorageValue(cid, storage, os.time()+time*1) elseif getPlayerVocation(itemEx.uid) == 2 then if druid.tipo == 'mana' then doCreatureAddMana(itemEx.uid, math.random(druid.min, druid.max)) doSendMagicEffect(getCreaturePosition(itemEx.uid), 12) doCreatureSay(itemEx.uid, "Sobe Mana!", TALKTYPE_ORANGE_1) elseif druid.tipo == 'health' then doCreatureAddHealth(itemEx.uid, math.random(druid.min, druid.max)) doSendMagicEffect(getCreaturePosition(itemEx.uid), 1) doCreatureSay(itemEx.uid, "Sobe Life!", TALKTYPE_ORANGE_1) end setPlayerStorageValue(cid, storage, os.time()+time*1) elseif getPlayerVocation(itemEx.uid) == 3 then if pala.tipo == 'mana' then doCreatureAddMana(itemEx.uid, math.random(pala.min, pala.max)) doSendMagicEffect(getCreaturePosition(itemEx.uid), 12) doCreatureSay(itemEx.uid, "Sobe Mana!", TALKTYPE_ORANGE_1) elseif pala.tipo == 'health' then doCreatureAddHealth(itemEx.uid, math.random(pala.min, pala.max)) doSendMagicEffect(getCreaturePosition(itemEx.uid), 13) doCreatureSay(itemEx.uid, "Sobe Life!", TALKTYPE_ORANGE_1) end setPlayerStorageValue(cid, storage, os.time()+time*1) elseif getPlayerVocation(cid) == 4 then if kina.tipo == 'mana' then doCreatureAddMana(itemEx.uid, math.random(kina.min, kina.max)) doSendMagicEffect(getCreaturePosition(itemEx.uid), 12) doCreatureSay(itemEx.uid, "Sobe Mana!", TALKTYPE_ORANGE_1) elseif kina.tipo == 'health' then doCreatureAddHealth(itemEx.uid, math.random(kina.min, kina.max)) doSendMagicEffect(getCreaturePosition(itemEx.uid), 13) doCreatureSay(itemEx.uid, "Sobe Life!", TALKTYPE_ORANGE_1) end setPlayerStorageValue(cid, storage, os.time()+time*1) else doPlayerSendCancel(cid, "Apenas Sorceres, Druids, Paladins e Knight podem Usar essa Potion!") end
else doPlayerSendCancel(cid, "Você só pode usar essa potion a cada "..time.." segundos!") end else doPlayerSendCancel(cid, "Você só pode usar a potion em players.") end return true end
agora vá em data / actions / actions.xml ...
e coloque a tag :
<action itemid="8474" script="potion_multi_healing.lua" />
Creditos : Ao Criador
Pronto !!Espero que gostem++