meubk 257 Postado Janeiro 23, 2012 Share Postado Janeiro 23, 2012 (editado) Extreme Speeed Spell muito interessante aonde o alvo recebe varios danos por todos os lados, bem legalzinha arquivo em lua: local config = { efeitoTele = 10, -- efeito q ira aparacer a cada teleport. efeitoDamage = 1, -- efeito q ira aparecer ao hitar no alvo hits = 5, -- quantos hits vai dar delay = 200, -- intervalo de tempo a cada hit min = 100, -- dano minimo max = 150, -- dano maximo damage = COMBAT_PHYSICALDAMAGE -- tipo do dano } function isWalkable(pos, creature, pz, proj) -- nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and not pz then return false end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function getPosDirs(p, dir) -- mkalo return dir == 1 and {x=p.x-1, y=p.y, z=p.z} or dir == 2 and {x=p.x-1, y=p.y+1, z=p.z} or dir == 3 and {x=p.x, y=p.y+1, z=p.z} or dir == 4 and {x=p.x+1, y=p.y+1, z=p.z} or dir == 5 and {x=p.x+1, y=p.y, z=p.z} or dir == 6 and {x=p.x+1, y=p.y-1, z=p.z} or dir == 7 and {x=p.x, y=p.y-1, z=p.z} or dir == 8 and {x=p.x-1, y=p.y-1, z=p.z} end function validPos(pos) tb = {} for i = 1, 8 do newpos = getPosDirs(pos, i) if isWalkable(newpos) then table.insert(tb, newpos) end end table.insert(tb, pos) return tb end spell = { start = function (cid, target, markpos, hits) if not isCreature(cid) then return true end if not isCreature(target) or hits < 1 then doTeleportThing(cid, markpos) doSendMagicEffect(getThingPos(cid), config.efeitoTele) return true end posAv = validPos(getThingPos(target)) rand = #posAv == 1 and 1 or #posAv - 1 doSendMagicEffect(getThingPos(cid), config.efeitoTele) doTeleportThing(cid, posAv[math.random(1, rand)]) doAreaCombatHealth(cid, config.damage, getThingPos(target), 0, -config.min, -config.max, config.efeitoDamage) addEvent(spell.start, config.delay, cid, target, markpos, hits - 1) end } function onCastSpell(cid) target = getCreatureTarget(cid) if target then spell.start(cid, target, getThingPos(cid), config.hits) end return true end tag: <instant name="Extreme speed" words="extreme speed" lvl="65" mana="580" prem="0" exhaustion="2000" needtarget="1" range = "4" needlearn="0" script="arquivo.lua"> Não vou postar ss ou video pq estou sem tempo, se querer ver como esta vai ter q testar. Editado Janeiro 24, 2012 por xotservx Link para o comentário https://xtibia.com/forum/topic/178919-spells-extreme-speed/ Compartilhar em outros sites More sharing options...
Demonbholder 420 Postado Janeiro 24, 2012 Share Postado Janeiro 24, 2012 Corrigindo: local config = { efeitoTele = 10, -- efeito q ira aparacer a cada teleport. efeitoDamage = 1, -- efeito q ira aparecer ao hitar no alvo hits = 5, -- quantos hits vai dar delay = 200, -- intervalo de tempo a cada hit min = 100, -- dano minimo max = 150, -- dano maximo damage = COMBAT_PHYSICALDAMAGE -- tipo do dano } function isWalkable(pos, creature, pz, proj) -- nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and not pz then return false end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function getPosDirs(p, dir) -- mkalo return dir == 1 and {x=p.x-1, y=p.y, z=p.z} or dir == 2 and {x=p.x-1, y=p.y+1, z=p.z} or dir == 3 and {x=p.x, y=p.y+1, z=p.z} or dir == 4 and {x=p.x+1, y=p.y+1, z=p.z} or dir == 5 and {x=p.x+1, y=p.y, z=p.z} or dir == 6 and {x=p.x+1, y=p.y-1, z=p.z} or dir == 7 and {x=p.x, y=p.y-1, z=p.z} or dir == 8 and {x=p.x-1, y=p.y-1, z=p.z} end function validPos(pos) tb = {} for i = 1, 8 do newpos = getPosDirs(pos, i) if isWalkable(newpos) then table.insert(tb, newpos) end end table.insert(tb, pos) return tb end spell = { start = function (cid, target, markpos, hits) if not isCreature(cid) then return true end if not isCreature(target) or hits < 1 then doTeleportThing(cid, markpos) doSendMagicEffect(getThingPos(cid), config.efeitoTele) return true end posAv = validPos(getThingPos(target)) rand = #posAv == 1 and 1 or #posAv - 1 doSendMagicEffect(getThingPos(cid), config.efeitoTele) doTeleportThing(cid, posAv[math.random(1, rand)]) doAreaCombatHealth(cid, config.damage, getThingPos(target), 0, -config.min, -config.max, config.efeitoDamage) addEvent(spell.start, config.delay, cid, target, markpos, hits - 1) end } function onCastSpell(cid) target = getCreatureTarget(cid) if target then spell.start(cid, target, getThingPos(cid), config.hits) end return true end faltou declarar o parâmetro cid no addEvent. Link para o comentário https://xtibia.com/forum/topic/178919-spells-extreme-speed/#findComment-1184341 Compartilhar em outros sites More sharing options...
meubk 257 Postado Janeiro 24, 2012 Autor Share Postado Janeiro 24, 2012 obrigado, nem editei o tópico ainda pois, estava sem tempo ai só colei a spell vou editar agr. Link para o comentário https://xtibia.com/forum/topic/178919-spells-extreme-speed/#findComment-1184467 Compartilhar em outros sites More sharing options...
vipstyle 21 Postado Janeiro 24, 2012 Share Postado Janeiro 24, 2012 VOU TESTAR TOMARA QUE DE CERTO =) EU POSTO AKIE SE DAR CERTO =) EU TENTEI ENTENDER OQUE TAVA ESCRITO AMS NAUM CONSEGUI LA NO FIANL LOL Link para o comentário https://xtibia.com/forum/topic/178919-spells-extreme-speed/#findComment-1184469 Compartilhar em outros sites More sharing options...
meubk 257 Postado Janeiro 25, 2012 Autor Share Postado Janeiro 25, 2012 ok, aguardo resposta Link para o comentário https://xtibia.com/forum/topic/178919-spells-extreme-speed/#findComment-1185446 Compartilhar em outros sites More sharing options...
nari 1 Postado Março 16, 2012 Share Postado Março 16, 2012 spell muito loka cara, gostei mt, ganhou meu rep Link para o comentário https://xtibia.com/forum/topic/178919-spells-extreme-speed/#findComment-1218261 Compartilhar em outros sites More sharing options...
coyotestark 25 Postado Março 20, 2012 Share Postado Março 20, 2012 carakaaaaaaaaaa Spell muito loko, so nao dei rep pq ja dei um hoje. mas amanhan tera pq gostei muuuuuuuuuuuuito Link para o comentário https://xtibia.com/forum/topic/178919-spells-extreme-speed/#findComment-1220902 Compartilhar em outros sites More sharing options...
JeanCristian 7 Postado Abril 28, 2012 Share Postado Abril 28, 2012 nossa manim vc realmente merece o meu rep++ dou com muito orgulho esse rep Link para o comentário https://xtibia.com/forum/topic/178919-spells-extreme-speed/#findComment-1250334 Compartilhar em outros sites More sharing options...
Vilden 137 Postado Abril 28, 2012 Share Postado Abril 28, 2012 Amigo você reviveu um tópico parado a mais de 1 mês, mais atenção. Alertado via mp. Link para o comentário https://xtibia.com/forum/topic/178919-spells-extreme-speed/#findComment-1250337 Compartilhar em outros sites More sharing options...
Flash001 2 Postado Maio 25, 2013 Share Postado Maio 25, 2013 Vlw muito irado ajudou bastante tava precisando disso !!! REP+++ pra voce !!! Link para o comentário https://xtibia.com/forum/topic/178919-spells-extreme-speed/#findComment-1524616 Compartilhar em outros sites More sharing options...
jhonysavio 0 Postado Julho 18, 2016 Share Postado Julho 18, 2016 boa mesmo! rep + deixa eu perguntar, poderia me ajudar em duas spells? talves simples, uma de sumon com duração ( sumona 3 monstros por x seg) e uma que aumente a velocidade de ataque Link para o comentário https://xtibia.com/forum/topic/178919-spells-extreme-speed/#findComment-1699645 Compartilhar em outros sites More sharing options...
lordbim 0 Postado Junho 4, 2018 Share Postado Junho 4, 2018 muito top! parabens! Link para o comentário https://xtibia.com/forum/topic/178919-spells-extreme-speed/#findComment-1741134 Compartilhar em outros sites More sharing options...
Vorkhon 0 Postado Setembro 7, 2020 Share Postado Setembro 7, 2020 Muito boa a spell. Mas alguem sabe se tem como não passar paredes? Isso pode fazer com que players consigam chegar em areas "proibidas" Link para o comentário https://xtibia.com/forum/topic/178919-spells-extreme-speed/#findComment-1762530 Compartilhar em outros sites More sharing options...
Posts Recomendados