Em 2 linguagens para ficar mais fácil de me ajudarem.
In two languages to make it easier to help me.
PORTUGUES:
INGLES
In two languages to make it easier to help me.
PORTUGUES:
Tipo do script: SPELL
Protocolo (versão do Tibia): 8.60
Servidor utilizado: TFS
Nível de experiência: MÉDIO
Adicionais/Informações:
Bom, abaixo irei mostrar o Script da Spell, ela é uma spell de summon, é arrumadinha e tal, mas tem um problema, pode summonar mais de um.
Eu queria que assim, enquanto o monstro tiver vivo, nao possa summonar outro, assim que o mosntro desaparecer, o player ja pode voltar a summonar.
Se puder colocar a seguinte mensagem: Você já fez seu Cyber Protector.
Conto com a colaboração de vocês meus amigos.
INGLES
Type of script: SPELL
Protocol (Tibia version): 8.60
Server used: TFS
Experience Level: MEDIUM
Additional / Info:
Well, the script below will show the spell, it is a spell to summon, is neat and all, but has a problem, you can summon more than one.
I wanted so, as the monster you live, can not summon another, so the monster disappears, the player can already re-summon.
If you can put the following message: You've done your Cyber Protector.
I count on the cooperation of you my friends.
function onTargetTile(cid, position)
position.stackpos = 255
doConvinceCreature(cid, doCreateMonster("protector", position, false))
doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
return true
end
local arr = {
{0, 0, 0},
{0, 2, 0},
{0, 1, 0},
}
local removeTime = 30.0 --time to remove the clones
local function removeCreatures(cid, creature)
if isCreature(creature) == TRUE then
doRemoveCreature(creature)
end
end
function onTargetTile(cid, pos)
local creature = doSummonCreature("Protector", pos)
doCreatureAddMana(cid, -1500)
doConvinceCreature(cid, creature)
addEvent(removeCreatures, removeTime * 3000, cid, creature)
return TRUE
end
local area, combat = createCombatArea(arr), createCombatObject()
setCombatArea(combat, area)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end