jeferson350z 0 Postado Agosto 11, 2011 Share Postado Agosto 11, 2011 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. Link para o comentário Compartilhar em outros sites More sharing options...
meubk 257 Postado Agosto 12, 2011 Share Postado Agosto 12, 2011 (editado) 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. Editado Agosto 12, 2011 por xotservx Link para o comentário Compartilhar em outros sites More sharing options...
jeferson350z 0 Postado Agosto 13, 2011 Autor Share Postado Agosto 13, 2011 (editado) 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. Editado Agosto 13, 2011 por SUpremoRoxxxx Link para o comentário Compartilhar em outros sites More sharing options...
meubk 257 Postado Agosto 14, 2011 Share Postado Agosto 14, 2011 (editado) 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 Editado Agosto 14, 2011 por xotservx Link para o comentário Compartilhar em outros sites More sharing options...
sparta11 2 Postado Agosto 14, 2011 Share Postado Agosto 14, 2011 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 Link para o comentário Compartilhar em outros sites More sharing options...
RubemAlvesCitou 0 Postado Janeiro 6, 2012 Share Postado Janeiro 6, 2012 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. Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados