Postado Janeiro 5, 2016 9 anos Gente é porque tipo tem um pokemon no meu servidor de poketibia chamado typhlosion, que tem um ataque "Eruption" de fogo que ao usar so da hit nos pokemons que tão perto dele, ai queria que quando ele usar esse ataque IMEDIATAMENTE puche os pokemons que estão perto dele, pra cima dele, tendeu? igual pxg
Postado Janeiro 5, 2016 9 anos aee man bom aproveito e se ajudei manda o rep + isso você coloca em pokemon moves.lua na pasta lib Spoiler elseif spell == "Eruption" then local config = { outfit = xxx, --id da outfit do thyplosion time = {1, 200}, --{Duração da spell, intervalo entre cada "tick" de dano (em milésimos de segundos)}, storage = 93828, effects = { pullEffects = { distance = 3, --Distance effect do efeito de puxar pokémons. effect = 241, --Efeito do eruption(a exploçao). }, damageEffect = 5, --Efeito do fire que aplica dano }, } local time = os.time() + config.time[1] function Pull(cid, ret) local pos = getPosfromArea(cid, pullArea) if pos and #pos > 0 then for i = 1, #pos do local c = getTopCreature(pos).uid if c > 0 then if ehMonstro(c) then doTeleportThing(c, getClosestFreeTile(cid, getThingPos(cid))) doMoveDano2(cid, c, NORMALDAMAGE, 0, 0, ret, spell) elseif isSummon(c) then local master = getCreatureMaster(c) if isSummon(cid) then if getPlayerStorageValue(master, 52480) >= 1 and getPlayerStorageValue(master, 52481) >= 0 then local masterCid = getCreatureMaster(cid) if isDuelingAgainst(masterCid, master) then doTeleportThing(c, getClosestFreeTile(cid, getThingPos(cid))) doMoveDano2(cid, c, NORMALDAMAGE, 0, 0, ret, spell) end end else doTeleportThing(c, getClosestFreeTile(cid, getThingPos(cid))) doMoveDano2(cid, c, NORMALDAMAGE, 0, 0, ret, spell) end end end end end end function doSendTornado(cid, pos) if not isCreature(cid) then return true end if isWithFear(cid) and getPlayerStorageValue(cid, 3644587) >= 1 then return true end if isSleeping(cid) and getPlayerStorageValue(cid, 3644587) >= 1 then return true end doSendDistanceShoot(getThingPos(cid), pos, config.effects.pullEffects.distance) doSendMagicEffect(pos, config.effects.pullEffects.effect) end function vortexDamage(cid) if not isCreature(cid) then return true elseif time - os.time() < 0 then return true end doDanoWithProtect(cid, FLYINGDAMAGE, getThingPos(cid), damageArea, min, max, config.effects.damageEffect) addEvent(vortexDamage, config.time[2], cid) end local ret = {id = 0, cd = config.time[1], check = 0, cond = {"Sleep", "Miss"}} for b = 1, 3 do for a = 1, 20 do local pos = {x = getThingPos(cid).x + math.random(-4, 4), y = getThingPos(cid).y + math.random(-3, 3), z = getThingPos(cid).z} addEvent(doSendTornado, a * 75, cid, pos) end end Pull(cid, ret) vortexDamage(cid) doCreatureSetNoMove(cid, true) doChangeSpeed(cid, -getCreatureSpeed(cid)) doSetCreatureOutfit(cid, {lookType = config.outfit}, config.time[1] * 1000) setPlayerStorageValue(cid, config.storage, time) addEvent(function() if isCreature(cid) then doCreatureSetNoMove(cid, false) doRegainSpeed(cid) end end, config.time[1] * 1000) e em areas.lua você coloca isso Spoiler damageArea = createCombatArea{ --Área do dano da spell + redemoinhos. {1, 1, 1}, {1, 2, 1}, {1, 1, 1},}pullArea = { --Área onde os pokémons serão puxados. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},} Editado Janeiro 6, 2016 9 anos por wevertonvrb (veja o histórico de edições)
Postado Janeiro 10, 2016 9 anos Autor Eu nao consegui adicionar de jeito nenhum adiciona por mim? Porfavor pokemon moves.lua areas.lua Editado Janeiro 10, 2016 9 anos por Loouis (veja o histórico de edições)
Postado Março 12, 2016 9 anos Em 05/01/2016 14:47:06, wevertonvrb disse: aee man bom aproveito e se ajudei manda o rep + isso você coloca em pokemon moves.lua na pasta lib Mostrar conteúdo oculto elseif spell == "Eruption" then local config = { outfit = xxx, --id da outfit do thyplosion time = {1, 200}, --{Duração da spell, intervalo entre cada "tick" de dano (em milésimos de segundos)}, storage = 93828, effects = { pullEffects = { distance = 3, --Distance effect do efeito de puxar pokémons. effect = 241, --Efeito do eruption(a exploçao). }, damageEffect = 5, --Efeito do fire que aplica dano }, } local time = os.time() + config.time[1] function Pull(cid, ret) local pos = getPosfromArea(cid, pullArea) if pos and #pos > 0 then for i = 1, #pos do local c = getTopCreature(pos).uid if c > 0 then if ehMonstro(c) then doTeleportThing(c, getClosestFreeTile(cid, getThingPos(cid))) doMoveDano2(cid, c, NORMALDAMAGE, 0, 0, ret, spell) elseif isSummon(c) then local master = getCreatureMaster(c) if isSummon(cid) then if getPlayerStorageValue(master, 52480) >= 1 and getPlayerStorageValue(master, 52481) >= 0 then local masterCid = getCreatureMaster(cid) if isDuelingAgainst(masterCid, master) then doTeleportThing(c, getClosestFreeTile(cid, getThingPos(cid))) doMoveDano2(cid, c, NORMALDAMAGE, 0, 0, ret, spell) end end else doTeleportThing(c, getClosestFreeTile(cid, getThingPos(cid))) doMoveDano2(cid, c, NORMALDAMAGE, 0, 0, ret, spell) end end end end end end function doSendTornado(cid, pos) if not isCreature(cid) then return true end if isWithFear(cid) and getPlayerStorageValue(cid, 3644587) >= 1 then return true end if isSleeping(cid) and getPlayerStorageValue(cid, 3644587) >= 1 then return true end doSendDistanceShoot(getThingPos(cid), pos, config.effects.pullEffects.distance) doSendMagicEffect(pos, config.effects.pullEffects.effect) end function vortexDamage(cid) if not isCreature(cid) then return true elseif time - os.time() < 0 then return true end doDanoWithProtect(cid, FLYINGDAMAGE, getThingPos(cid), damageArea, min, max, config.effects.damageEffect) addEvent(vortexDamage, config.time[2], cid) end local ret = {id = 0, cd = config.time[1], check = 0, cond = {"Sleep", "Miss"}} for b = 1, 3 do for a = 1, 20 do local pos = {x = getThingPos(cid).x + math.random(-4, 4), y = getThingPos(cid).y + math.random(-3, 3), z = getThingPos(cid).z} addEvent(doSendTornado, a * 75, cid, pos) end end Pull(cid, ret) vortexDamage(cid) doCreatureSetNoMove(cid, true) doChangeSpeed(cid, -getCreatureSpeed(cid)) doSetCreatureOutfit(cid, {lookType = config.outfit}, config.time[1] * 1000) setPlayerStorageValue(cid, config.storage, time) addEvent(function() if isCreature(cid) then doCreatureSetNoMove(cid, false) doRegainSpeed(cid) end end, config.time[1] * 1000) e em areas.lua você coloca isso Mostrar conteúdo oculto damageArea = createCombatArea{ --Área do dano da spell + redemoinhos. {1, 1, 1}, {1, 2, 1}, {1, 1, 1},}pullArea = { --Área onde os pokémons serão puxados. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},} To com o mesmo problema, vou testar aqui man, vlw ae rep+ @edit ------ não ta puxando, qq será q deu ? Editado Março 12, 2016 9 anos por rafanasser (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.