Ir para conteúdo
  • 0

Spell Que Quando Usada Visualiza A Mana Do Player...


juan500

Pergunta

2 respostass a esta questão

Posts Recomendados

  • 0

Script:

 

function onCastSpell(cid, var)
   local text = var.string:len() > 0 and var.string or false
   if not text then doPlayerSendCancel(cid, "Spell requires a player name!") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return false end
   local player = getPlayerByNameWildcard(text)
   if not player then
    doPlayerSendCancel(cid, "A player with the name "..text:sub(1, 1):upper() .. text:sub(2, text:len()):lower().." is not online.")
   doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
   return false
   end
   doPlayerSendTextMessage(cid, 22, "Player "..getCreatureName(player).." has "..getCreatureMana(player).."/"..getCreatureMaxMana(player).." mana.")
   doSendMagicEffect(getThingPos(cid), 12)
return true
end

 

Lembrando que na tag não pode ter selfTarget nem needTarget e nem casterTargetOrDirection, e precisa escrever isso na tag também:

 

param="1"

 

Exemplo de tag:

 

    <instant name="Get Mana" words="exiva mana" lvl="1" mana="0" prem="0" param="1" exhaustion="2000" needlearn="0" event="script" value="exivamana.lua">
   </instant>

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...