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>




info
Grupo: Barão
Registrado: 02/06/11
Posts: 209
Reputação: +5
Char no Tibia: [ADM] Juan
quero uma spell que ao ser usada pode por exemplo: spell "nome do player
vais com que possa ver a mana do player
flw