function onCastSpell(cid)
local target = getCreatureTarget(cid)
if not isCreature(target) then
return not doPlayerSendCancel(cid, "You don't have any target.")
end
if not isMonster(target) or getCreatureMaster(target) ~= target then
return not doPlayerSendCancel(cid, "You can't control that creature.")
end
if #getCreatureSummons(cid) >= 1 then
return not doPlayerSendCancel(cid, "You can't have more summons.")
end
if not isInArray({"Demon", "Rat"}, getCreatureName(target)) then
return not doPlayerSendCancel(cid, "You can't control that monster.")
end
doConvinceCreature(cid, target)
doSendMagicEffect(getCreaturePosition(cid), 35)
doPlayerAddSkillTry(cid, 3, 1)
return true
end




info
Grupo: Visconde
Registrado: 06/04/11
Posts: 350
Reputação: +8
Char no Tibia: Mulekepirado
galera eu estava fazendo uma spell que convencia uma criatura estando no target, mais eu queria que a spell só convence-se uma certa criatura identificando ela pelo nome, mais não to conseguindo já tentei varias funções para isso como:
e não deu certo ¬¬, ai o script: