andreelm 0 Postado Agosto 5, 2012 Share Postado Agosto 5, 2012 eu tava querendo fazer uma magia q invocasse um crystal protector tipo pbot, fiz tudinho e tals, mas quando uso a magia simplesmente disse que o mostro ja foi invocado mesmo não tendo aparecido nada... Spells.xml </instant> <instant name="utevo aura" words="utevo aura" lvl="300" mana="2000" casterTargetOrDirection="1" blockwalls="1" exhaustion="3000" needlearn="0" script="pbot/utevo aura.lua"> <vocation id="9"/> <vocation id="10"/> e script local removeTime = 1.0 --time to remove the clones local mana = 1000 local HAVE_CLONE = 65537 --storage to know if you have clones or not local arr = { { {0, 0, 0}, {0, 2, 0}, {0, 1, 0} } } local function removeCreatures(cid, creature) setPlayerStorageValue(cid, HAVE_CLONE, 0) if isCreature(creature) == TRUE then doRemoveCreature(creature) end end function onTargetTile(cid, pos) local creature = doSummonCreature("Protector", pos) doCreatureAddMana(cid, -1500) doCreatureSay(cid, "Utevo Aura", TALKTYPE_ORANGE_1) doConvinceCreature(cid, creature) addEvent(removeCreatures, removeTime * 30000, cid, creature) return TRUE end local combat = {} for i = 1, 1 do combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_POFF) setCombatArea(combat, createCombatArea(arr)) _G["onTargetTile" .. i] = onTargetTile setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile" .. i) end function onCastSpell(cid, var) local level = getPlayerLevel(cid) if getPlayerStorageValue(cid, HAVE_CLONE) < 1 then if level > 350 then doCombat(cid, combat[1], var) else doCombat(cid, combat[1], var) end setPlayerStorageValue(cid, HAVE_CLONE, 1) else doPlayerSendCancel(cid, "Voce ja fez o Crystal Protector.") end end Link para o comentário https://xtibia.com/forum/topic/191361-spell-de-invoca%C3%A7%C3%A3o-com-problema/ Compartilhar em outros sites More sharing options...
0 Newtonnotwen 80 Postado Agosto 5, 2012 Share Postado Agosto 5, 2012 (editado) Não entendi direito. Se você estiver querendo uma magia que sumona um monstro (apenas um) eu ti arranjo. Ex: -Player usa magia -Monstro sumonado -Player tenta sumonar de novo. não conssegue -Algum tempo depois o monstro some (tempo escolhido por você) -Player já pode sumona-lo novamente Se for isso que você quer eu ti arranjo. Editado Agosto 5, 2012 por Newtonnotwen Link para o comentário https://xtibia.com/forum/topic/191361-spell-de-invoca%C3%A7%C3%A3o-com-problema/#findComment-1309684 Compartilhar em outros sites More sharing options...
0 andreelm 0 Postado Agosto 5, 2012 Autor Share Postado Agosto 5, 2012 isso mesmo que eu quero...... Link para o comentário https://xtibia.com/forum/topic/191361-spell-de-invoca%C3%A7%C3%A3o-com-problema/#findComment-1309685 Compartilhar em outros sites More sharing options...
0 Newtonnotwen 80 Postado Agosto 5, 2012 Share Postado Agosto 5, 2012 (editado) Ok, vou arranjar aqui pra você. - - - - - - - - - - - - - Editado No caso está sumonando um wolf. local removeTime = 1.0 --time to remove the clones local mana = 1000 local HAVE_CLONE = 655370 --storage to know if you have clones or not local arr = { { {0, 0, 0}, {0, 2, 0}, {0, 1, 0} } } local function removeCreatures(cid, creature) setPlayerStorageValue(cid, HAVE_CLONE, 0) if isCreature(creature) == TRUE then doRemoveCreature(creature) end end function onTargetTile(cid, pos) local creature = doSummonCreature("wolf", pos) doCreatureAddMana(cid, -2000) doCreatureSay(cid, "Utevo Aura", TALKTYPE_ORANGE_1) doConvinceCreature(cid, creature) addEvent(removeCreatures, removeTime * 5000, cid, creature) return TRUE end local combat = {} for i = 1, 1 do combat[i] = createCombatObject() setCombatParam(combat[i], COMBAT_PARAM_EFFECT, CONST_ME_POFF) setCombatArea(combat[i], createCombatArea(arr[i])) _G["onTargetTile" .. i] = onTargetTile setCombatCallback(combat[i], CALLBACK_PARAM_TARGETTILE, "onTargetTile" .. i) end function onCastSpell(cid, var) local level = getPlayerLevel(cid) if getPlayerStorageValue(cid, HAVE_CLONE) < 1 then if level > 350 then doCombat(cid, combat[1], var) else doCombat(cid, combat[1], var) end setPlayerStorageValue(cid, HAVE_CLONE, 1) else doPlayerSendCancel(cid, "O wolf ja foi sumonado.") end end Editado Agosto 5, 2012 por Newtonnotwen Link para o comentário https://xtibia.com/forum/topic/191361-spell-de-invoca%C3%A7%C3%A3o-com-problema/#findComment-1309687 Compartilhar em outros sites More sharing options...
0 andreelm 0 Postado Agosto 5, 2012 Autor Share Postado Agosto 5, 2012 (editado) como altero para summonar uma crystal spider? e quando entro no servidor , fala que wolf ja foi invocado mais ele não aparece :@ Editado Agosto 5, 2012 por andreelm Link para o comentário https://xtibia.com/forum/topic/191361-spell-de-invoca%C3%A7%C3%A3o-com-problema/#findComment-1309696 Compartilhar em outros sites More sharing options...
0 Newtonnotwen 80 Postado Agosto 5, 2012 Share Postado Agosto 5, 2012 (editado) local removeTime = 1.0 --time to remove the clones local mana = 1000 local HAVE_CLONE = 655370 --storage to know if you have clones or not local arr = { { {0, 0, 0}, {0, 2, 0}, {0, 1, 0} } } local function removeCreatures(cid, creature) setPlayerStorageValue(cid, HAVE_CLONE, 0) if isCreature(creature) == TRUE then doRemoveCreature(creature) end end function onTargetTile(cid, pos) local creature = doSummonCreature("crystal spider", pos) doCreatureAddMana(cid, -2000) doCreatureSay(cid, "Utevo Aura", TALKTYPE_ORANGE_1) doConvinceCreature(cid, creature) addEvent(removeCreatures, removeTime * 5000, cid, creature) return TRUE end local combat = {} for i = 1, 1 do combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_POFF) setCombatArea(combat, createCombatArea(arr)) _G["onTargetTile" .. i] = onTargetTile setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile" .. i) end function onCastSpell(cid, var) local level = getPlayerLevel(cid) if getPlayerStorageValue(cid, HAVE_CLONE) < 1 then if level > 350 then doCombat(cid, combat[1], var) else doCombat(cid, combat[1], var) end setPlayerStorageValue(cid, HAVE_CLONE, 1) else doPlayerSendCancel(cid, "a crystal spider ja foi sumonada.") end end Laranja: nome do monstro Vermelho: altere de acordo com o(a) - - - - - - - - - - - - - - - - - - -Daqui pra baixo os créditos são totalmente de lordbug99 By: lordbug99 Vai em creaturescript/script abre login.lua e antes do ultimo end coloca: setPlayerStorageValue(cid, 655370, 0) Editado Agosto 5, 2012 por Newtonnotwen Link para o comentário https://xtibia.com/forum/topic/191361-spell-de-invoca%C3%A7%C3%A3o-com-problema/#findComment-1309699 Compartilhar em outros sites More sharing options...
0 Demonbholder 420 Postado Agosto 6, 2012 Share Postado Agosto 6, 2012 Vamos aguardar o feedback do membro que criou o tópico para mover para dúvidas sanadas. Link para o comentário https://xtibia.com/forum/topic/191361-spell-de-invoca%C3%A7%C3%A3o-com-problema/#findComment-1310831 Compartilhar em outros sites More sharing options...
0 andreelm 0 Postado Agosto 6, 2012 Autor Share Postado Agosto 6, 2012 Obrigado funcionou perfeitamente desculpa a demora pra falar, pq sabe não tenho tempo ... Link para o comentário https://xtibia.com/forum/topic/191361-spell-de-invoca%C3%A7%C3%A3o-com-problema/#findComment-1311110 Compartilhar em outros sites More sharing options...
0 Newtonnotwen 80 Postado Agosto 6, 2012 Share Postado Agosto 6, 2012 Ok. Duvida sanada. Link para o comentário https://xtibia.com/forum/topic/191361-spell-de-invoca%C3%A7%C3%A3o-com-problema/#findComment-1311136 Compartilhar em outros sites More sharing options...
Pergunta
andreelm 0
eu tava querendo fazer uma magia q invocasse um crystal protector tipo pbot, fiz tudinho e tals, mas quando uso a magia simplesmente disse que o mostro ja foi invocado mesmo não tendo aparecido nada...
Spells.xml
</instant>
<instant name="utevo aura" words="utevo aura" lvl="300" mana="2000" casterTargetOrDirection="1" blockwalls="1" exhaustion="3000" needlearn="0" script="pbot/utevo aura.lua">
<vocation id="9"/>
<vocation id="10"/>
e script
local removeTime = 1.0 --time to remove the clones
local mana = 1000
local HAVE_CLONE = 65537 --storage to know if you have clones or not
local arr = {
{
{0, 0, 0},
{0, 2, 0},
{0, 1, 0}
}
}
local function removeCreatures(cid, creature)
setPlayerStorageValue(cid, HAVE_CLONE, 0)
if isCreature(creature) == TRUE then
doRemoveCreature(creature)
end
end
function onTargetTile(cid, pos)
local creature = doSummonCreature("Protector", pos)
doCreatureAddMana(cid, -1500)
doCreatureSay(cid, "Utevo Aura", TALKTYPE_ORANGE_1)
doConvinceCreature(cid, creature)
addEvent(removeCreatures, removeTime * 30000, cid, creature)
return TRUE
end
local combat = {}
for i = 1, 1 do
combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_POFF)
setCombatArea(combat, createCombatArea(arr))
_G["onTargetTile" .. i] = onTargetTile
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile" .. i)
end
function onCastSpell(cid, var)
local level = getPlayerLevel(cid)
if getPlayerStorageValue(cid, HAVE_CLONE) < 1 then
if level > 350 then
doCombat(cid, combat[1], var)
else
doCombat(cid, combat[1], var)
end
setPlayerStorageValue(cid, HAVE_CLONE, 1)
else
doPlayerSendCancel(cid, "Voce ja fez o Crystal Protector.")
end
end
Link para o comentário
https://xtibia.com/forum/topic/191361-spell-de-invoca%C3%A7%C3%A3o-com-problema/Compartilhar em outros sites
8 respostass a esta questão
Posts Recomendados