Ae Galera Do XTibia só novo aqui então se não for área certa me avisem.
Quero adicionar no meu ot serv uma magia novo.
Descrição:É para mages aonde o mage com magia sumona 4 bixos eles atacam 1 sd cada 1 e some.
Agradeço desde ja.
Ae Galera Do XTibia só novo aqui então se não for área certa me avisem.
Quero adicionar no meu ot serv uma magia novo.
Descrição:É para mages aonde o mage com magia sumona 4 bixos eles atacam 1 sd cada 1 e some.
Agradeço desde ja.
tag :
<instant name="NOME DA MAGIA" words="FALA PRA ELA FAZER" lvl="16" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="10000" needlearn="0" event="script" value="NOME DO ARQUIVO LUA"> <vocation id="1"/> <vocation id="5"/> </instant>
spell :
local conf = { summon = {"Warlock", "Warlock", "Warlock", "Warlock"}, -- nome dos 4 monstros que irão aparecer. min = 100, -- dano minimo de cada SD max = 200, -- dano maximo de cada SD } local summon = { monster = function (cid, tab) for _, mid in pairs(tab) do s = doSummonCreature(mid, getThingPos(cid)) doConvinceCreature(cid, s) end end, attack = function (cid, target, min, max) for _, summon in pairs(getCreatureSummons(cid)) do doSendDistanceShoot(getThingPos(summon), getThingPos(target), CONST_ANI_SUDDENDEATH) doAreaCombatHealth(summon, COMBAT_DEATHDAMAGE, getThingPos(target), 0, -min, -max, CONST_ME_MORTAREA) end end, remove = function (cid) for _, summon in pairs(getCreatureSummons(cid)) do doRemoveCreature(summon) end end, } function onCastSpell(cid, var) local target = getCreatureTarget(cid) if target then summon.monster(cid, conf.summon) addEvent(summon.attack, 1000, cid, target, conf.min, conf.max) addEvent(summon.remove, 2000, cid) end return true end
configurações no arquivo,
obs: não testei, estou sem pc, qualquer coisa fala ai
CERTIFIQUE QUE OS MONSTRO QUE VC USAR, VÃO ESTAR CONVICIABLE.
mano so deu seguinte erro a magia deu certo.
[13/08/2011 12:40:22] Lua Script Error: [spell Interface] [13/08/2011 12:40:22] in a timer event called from: [13/08/2011 12:40:22] data/spells/scripts/mort utevo.lua:onCastSpell [13/08/2011 12:40:22] luaGetThingPos(). Thing not found [13/08/2011 12:40:22] Lua Script Error: [spell Interface] [13/08/2011 12:40:22] in a timer event called from: [13/08/2011 12:40:22] data/spells/scripts/mort utevo.lua:onCastSpell [13/08/2011 12:40:22] luaGetThingPos(). Thing not found [13/08/2011 12:40:22] Lua Script Error: [spell Interface] [13/08/2011 12:40:22] in a timer event called from: [13/08/2011 12:40:22] data/spells/scripts/mort utevo.lua:onCastSpell [13/08/2011 12:40:22] luaGetThingPos(). Thing not found [13/08/2011 12:40:22] Lua Script Error: [spell Interface] [13/08/2011 12:40:22] in a timer event called from: [13/08/2011 12:40:22] data/spells/scripts/mort utevo.lua:onCastSpell [13/08/2011 12:40:22] luaGetThingPos(). Thing not found
Vio Outra ajuda Como faz para eles soltarem +que 1 sd .
Vlw Pela grande ajuda.
ai atualizado, agora vc configura qntos hits vai dar, e creio que vai sumir aquele erro.
local conf = { summon = {"Warlock", "Warlock", "Warlock", "Warlock"}, -- nome dos 4 monstros que irão aparecer. min = 100, -- dano minimo de cada SD max = 200, -- dano maximo de cada SD hits = 2 -- qntos hits cada summon vai dar } local summon = { monster = function (cid, tab) for _, mid in pairs(tab) do s = doSummonCreature(mid, getThingPos(cid)) doSendMagicEffect(getThingPos(s), 10) doConvinceCreature(cid, s) end end, attack = function (cid, target, min, max) for _, summon in pairs(getCreatureSummons(cid)) do if isCreature(target) and isCreature(summon) then doSendDistanceShoot(getThingPos(summon), getThingPos(target), CONST_ANI_SUDDENDEATH) doAreaCombatHealth(summon, COMBAT_DEATHDAMAGE, getThingPos(target), 0, -min, -max, CONST_ME_MORTAREA) end end end, remove = function (cid) for _, summon in pairs(getCreatureSummons(cid)) do if isCreature(summon) then doRemoveCreature(summon) end end end, } function onCastSpell(cid, var) local target = getCreatureTarget(cid) if target then summon.monster(cid, conf.summon) for i = 1, conf.hits do addEvent(summon.attack, 1000 * i, cid, target, conf.min, conf.max) end addEvent(summon.remove, conf.hits * 1000 + 1000, cid) end return true end
Aew que sorte tava passando por aqui vi essa spell gostei dela e notei que você postou a 3 min..entaum se ainda tiver ai me ajude
A magia continua dando o erro listado a cima...
E se puder me ajude tambem em: http://www.xtibia.com/forum/topic/164817-fences-sumindo/
Obrigado
Em outra magia que eu estava editando para o meu server estava dando o mesmo erro e essa magia do meu ot era baseada nesse script aqui. Acabei resolvendo o erro restaurando as configurações do Summon que era utilizado na magia.
Tentem isso, talvez com vocês também de certo.
Abraços e espero ter ajudado.