Download - Poke Moves

Transcript
  • 7/25/2019 Poke Moves

    1/128

    const_distance_delay = 56

    RollOuts = {["Voltorb"] = {lookType = 638},["Electrode"] = {lookType = 637},["Sandshrew"] = {lookType = 635},["Sandslash"] = {lookType = 636},["Phanpy"] = {lookType = 1005},["Donphan"] = {lookType = 1007},["Miltank"] = {lookType = 1006},["Golem"] = {lookType = 639},["Omastar"] = {lookType = 1579},["Shiny Electrode"] = {lookType = 1387},["Shiny Golem"] = {lookType = 1403},["Shiny Voltorb"] = {lookType = 1388},["Shiny Sandslash"] = {lookType = 1506},["Shiny Donphan"] = {lookType = 1905},["Shiny Miltank"] = {lookType = 1913},["Shiny Ninetales"] = {lookType = 1581},}

    --//////////////////////////////////////////////////////////////////////////////////////////////////////////--local function getSubName(cid, target)

    if not isCreature(cid) then return "" endif getCreatureName(cid) == "Ditto" and pokes[getPlayerStorageValue(cid, 1010)] and getPlayerStorageValue(cid, 1010) ~= "Ditto" then return getPlayerStorageValue(cid, 1010)elseif pokeHaveReflect(cid) and isCreature(target) then return getCreatureName(target)else --alterado v1.6.1 return getCreatureName(cid)endend

    local function getThingName(cid)

    if not isCreature(cid) then return "" end --alterado v1.6return getCreatureName(cid)end

    function getTableMove(cid, move) --alterado v1.6local backup = {f = 0, t = ""}if getThingName(cid) == "Ditto" and pokes[getPlayerStorageValue(cid, 1010)] andgetPlayerStorageValue(cid, 1010) ~= "Ditto" then name = getPlayerStorageValue(cid, 1010)else name = getThingName(cid)endif not isCreature(cid) or name == "" or not move then return backup end

    local x = movestable[name]if not x then return "" endlocal z = {x.move1, x.move2, x.move3, x.move4, x.move5, x.move6, x.move7, x.move8, x.move9, x.move10, x.move11, x.move12, x.passive1, x.passive2, x.passive3}if getPlayerStorageValue(cid, 21103) ~= -1 then local sto = getPlayerStorageValue(cid, 21103)

    setPlayerStorageValue(cid, 21103, -1)return {f = sto, t = ""}

    endfor j = 1, 15 do

  • 7/25/2019 Poke Moves

    2/128

    if z[j] and z[j].name == move then return z[j] endendreturn movesinfo[move]end

    function getMasterTarget(cid)if isCreature(cid) and getPlayerStorageValue(cid, 21101) ~= -1 then return getPlayerStorageValue(cid, 21101) --alterado v1.6end if isSummon(cid) then

    return getCreatureTarget(getCreatureMaster(cid))else return getCreatureTarget(cid)

    endend--////////////////////////////////////////////////////////////////////////////////////////////////////////--

    function docastspell(cid, spell, mina, maxa)

    local target = 0local getDistDelay = 0

    if not isCreature(cid) or getCreatureHealth(cid)

  • 7/25/2019 Poke Moves

    3/128

    doSendMagicEffect(getThingPosWithDebug(target), 211) doSendAnimatedText(getThingPosWithDebug(target), "TOO BAD", 215)

    doTeleportThing(target, getClosestFreeTile(target, getThingPosWithDebug(cid)), false) doSendMagicEffect(getThingPosWithDebug(target), 211) doFaceCreature(target, getThingPosWithDebug(cid))

    return false --alterado v1.8 end endend

    --- FEAR / ROAR / SILENCE ---if (isWithFear(cid) or isSilence(cid)) and getPlayerStorageValue(cid, 21100) = 0 and table ~= "" and table.f ~= 0 then--alterado v1.6

    min = min * 2max = max * 2setPlayerStorageValue(cid, 253, -1)

    end--- Shredder Team -------------------------------if getPlayerStorageValue(cid, 637501) >= 1 then

  • 7/25/2019 Poke Moves

    4/128

    if #getCreatureSummons(cid) == 1 then docastspell(getCreatureSummons(cid)[1], spell) elseif #getCreatureSummons(cid) == 2 then docastspell(getCreatureSummons(cid)[1], spell) docastspell(getCreatureSummons(cid)[2], spell) end

    elseif getPlayerStorageValue(cid, 637500) >= 1 then min = 0 max = 0end------------------Miss System--------------------------local cd = getPlayerStorageValue(cid, conds["Miss"])local cd2 = getPlayerStorageValue(cid, conds["Confusion"]) --alterado v1.5local cd3 = getPlayerStorageValue(cid, conds["Stun"])if cd >= 0 or cd2 >= 0 or cd3 >= 0 then

    --alterado v1.7 if not isInArray({"Shock-Counter", "Lava-Counter", "Counter Helix", "Demon Puncher", "Demon Kicker", "Stunning Confusion", "Electric Charge", "Melody", "Mirror Coat", "Mega Drain","Aromateraphy", "Heal Bell", "Emergency Call", "Magical Leaf", "Sunny Day", "Taunt", "Skull Bash", "Safeguard", "Rain Dance", "Spores Reaction", "Giroball", "Counter Claw", "Counter Spin", "Dragon Fury","Amnesia", "Healing Wish", "Zen Mind", "Bone Spin", "Thick Fat", "Meteor Mash"},

    spell) and getPlayerStorageValue(cid, 21100) 30 then--alterado v1.6

    doSendAnimatedText(getThingPosWithDebug(cid), "MISS", 215) return false end endend---------------GHOST DAMAGE-----------------------ghostDmg = GHOSTDAMAGEpsyDmg = PSYCHICDAMAGE

    if getPlayerStorageValue(cid, 999457) >= 1 and table ~= "" and table.f ~= 0 then

    --alterado v1.6 psyDmg = MIRACLEDAMAGE

    ghostDmg = DARK_EYEDAMAGE addEvent(setPlayerStorageValue, 50, cid, 999457, -1)end--------------------REFLECT----------------------setPlayerStorageValue(cid, 21100, -1) --alterado v1.6if not isInArray({"Psybeam", "Sand Attack", "Flamethrower", "Heal Bell"}, spell)then --alterado v1.8 setPlayerStorageValue(cid, 21101, -1)endsetPlayerStorageValue(cid, 21102, spell)

    ---------------------------------------------------

    if spell == "Reflect" or spell == "Mimic" or spell == "Magic Coat" then

    if spell == "Magic Coat" then eff = 11 else eff = 135

  • 7/25/2019 Poke Moves

    5/128

    end

    doSendMagicEffect(getThingPosWithDebug(cid), eff)setPlayerStorageValue(cid, 21099, 1)

    elseif spell == "Quick Attack" then

    doDanoWithProtect(cid, NORMALDAMAGE, getThingPosWithDebug(target), 0, -min, -max, 111)

    elseif spell == "Razor Leaf" or spell == "Magical Leaf" then

    local eff = spell == "Razor Leaf" and 8 or 21

    local function throw(cid, target)if not isCreature(cid) or not isCreature(target) then return false end doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target),eff)

    doDanoInTargetWithDelay(cid, target, GRASSDAMAGE, min, max, 245) --alterado v1.7end

    addEvent(throw, 0, cid, target)

    addEvent(throw, 100, cid, target) --alterado v1.7elseif spell == "Vine Whip" then

    local area = getThingPosWithDebug(cid)local dano = {}local effect = 255

    if mydir == 0 thenarea.x = area.x + 1area.y = area.y - 1dano = whipneffect = 80

    elseif mydir == 1 thenarea.x = area.x + 2area.y = area.y + 1dano = whipeeffect = 83

    elseif mydir == 2 thenarea.x = area.x + 1area.y = area.y + 2dano = whipseffect = 81

    elseif mydir == 3 thenarea.x = area.x - 1area.y = area.y + 1

    dano = whipweffect = 82end

    doSendMagicEffect(area, effect)doAreaCombatHealth(cid, GRASSDAMAGE, getThingPosWithDebug(cid),

    dano, -min, -max, 255)

    elseif spell == "Headbutt" then

  • 7/25/2019 Poke Moves

    6/128

    doAreaCombatHealth(cid, NORMALDAMAGE, getThingPosWithDebug(target), 0, -min, -max, 118)elseif spell == "Leech Seed" then

    local ret = {} ret.id = target ret.attacker = cid ret.cd = 5 ret.check = getPlayerStorageValue(target, conds["Leech"]) ret.damage = isSummon(cid) and getMasterLevel(cid)+getPokemonBoost(cid) or getPokemonLevel(cid) ret.cond = "Leech"

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 1)

    addEvent(doMoveDano2, 1000, cid, target, GRASSDAMAGE, 0, 0, ret, spell)

    elseif spell == "Leech Life" then

    local ret = {} ret.id = target ret.attacker = cid ret.cd = 5

    ret.check = getPlayerStorageValue(target, conds["Leech"]) ret.damage = isSummon(cid) and getMasterLevel(cid)+getPokemonBoost(cid) or getPokemonLevel(cid) ret.cond = "Leech"

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 1)

    addEvent(doMoveDano2, 1000, cid, target, GRASSDAMAGE, 0, 0, ret, spell)

    elseif spell == "Protection" then

    local pos = getPosfromArea(cid, heal)

    local n = 0while n < #pos do

    n = n+1 thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253} local pid = getThingFromPosWithProtect(thing) local pospid = getThingPosWithDebug(pid) local poscid = getThingPosWithDebug(cid)

    doSendMagicEffect(pos[n], 12) for i = 0, 9 do if isCreature(pid) then if isSummon(cid) and (isSummon(pid) or isPlayer(pid)) then

    if canAttackOther(cid, pid) == "Cant" then doCreatureSetNoMove(pid, true) doCreatureSetNoMove(cid, true) setPlayerStorageValue(pid, 9658783, 1) setPlayerStorageValue(cid, 9658783, 1) addEvent(doSendMagicEffect, i*800, pospid, 117) addEvent(doSendMagicEffect, i*800, poscid, 117) addEvent(setPlayerStorageValue, 8000, pid, 9658783, -1) addEvent(setPlayerStorageValue, 8000, cid, 9658783, -1) addEvent(doCreatureSetNoMove, 8000, pid, false)

  • 7/25/2019 Poke Moves

    7/128

    addEvent(doCreatureSetNoMove, 8000, cid, false) end elseif ehMonstro(cid) and ehMonstro(pid) then doCreatureSetNoMove(pid, true) doCreatureSetNoMove(cid, true) setPlayerStorageValue(pid, 9658783, 1) setPlayerStorageValue(cid, 9658783, 1) addEvent(doSendMagicEffect, i*800, pospid, 117) addEvent(doSendMagicEffect, i*800, poscid, 117) addEvent(setPlayerStorageValue, 8000, pid, 9658783, -1) addEvent(setPlayerStorageValue, 8000, cid, 9658783, -1) addEvent(doCreatureSetNoMove, 8000, pid, false) addEvent(doCreatureSetNoMove, 8000, cid, false) end end end end

    elseif spell == "Solar Beam" then

    local a = isCreature(target) and getCreatureDirectionToTarget(cid, target) or getCreatureLookDir(cid)local p = getThingPosWithDebug(cid)local t = {

    [0] = {36, {x=p.x+1, y=p.y-1, z=p.z}},[1] = {4, {x=p.x+6, y=p.y+1, z=p.z}}, --alterado v1.6[2] = {36, {x=p.x+1, y=p.y+6, z=p.z}},[3] = {4, {x=p.x-1, y=p.y+1, z=p.z}}, --alterado v1.6}

    doMoveInArea2(cid, 0, triplo6, GRASSDAMAGE, min, max, spell)doSendMagicEffect(t[a][2], t[a][1])

    elseif spell == "XDMoonblast" thendoDanoWithProtect(cid, psyDmg, getThingPosWithDebug(cid), selfarea2, 400000, 800000, 2)

    local ret = {}ret.id = 0ret.cd = 9ret.check = 0ret.eff = 1ret.cond = "Silence"----local p = getThingPosWithDebug(cid)doSendMagicEffect({x=p.x+1, y=p.y, z=p.z}, 9)---if isSummon(cid) then

    doCureBallStatus(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "all")end

    doCureStatus(cid, "all")setPlayerStorageValue(cid, 253, 1) --focusdoMoveInArea2(cid, 0, moon, PSYCHICDAMAGE, 0, 0, spell, ret)

    elseif spell == "Moonblast" thendoDanoWithProtect(cid, psyDmg, getThingPosWithDebug(cid), selfArea2, min, max, 2)local ret = {}ret.id = 0

  • 7/25/2019 Poke Moves

    8/128

    ret.cd = 9ret.check = 0ret.eff = 1ret.cond = "Silence"----local p = getThingPosWithDebug(cid)doSendMagicEffect({x=p.x+1, y=p.y, z=p.z}, 9)---if isSummon(cid) then

    doCureBallStatus(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "all")enddoCureStatus(cid, "all")setPlayerStorageValue(cid, 253, 1) --focusdoMoveInArea2(cid, 0, electro, FAIRYDAMAGE, 0, 0, spell, ret)

    elseif spell == "Healing Wish" then

    local min = (getCreatureMaxHealth(cid) * 80) / 100local max = (getCreatureMaxHealth(cid) * 99) / 100

    local function doHealArea(cid, min, max)

    local amount = math.random(min, max) if (getCreatureHealth(cid) + amount) >= getCreatureMaxHealth(cid) then amount = -(getCreatureHealth(cid)-getCreatureMaxHealth(cid))

    end if getCreatureHealth(cid) ~= getCreatureMaxHealth(cid) then doCreatureAddHealth(cid, amount) doSendAnimatedText(getThingPosWithDebug(cid), "+"..amount.."", 65) end endif isSummon(cid) then

    doCureBallStatus(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "all")enddoCureStatus(cid, "all")

    local pos = getPosfromArea(cid, heal) local n = 0 doHealArea(cid, min, max)

    while n < #pos do n = n+1 thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253} local pid = getThingFromPosWithProtect(thing)

    doSendMagicEffect(pos[n], 14) doSendMagicEffect(pos[n], 13) if isCreature(pid) then if isSummon(cid) and (isSummon(pid) or isPlayer(pid)) then if canAttackOther(cid, pid) == "Cant" then doHealArea(pid, min, max) end

    elseif ehMonstro(cid) and ehMonstro(pid) then doHealArea(pid, min, max) end end

    end

    elseif spell == "Dragon Tail" then

    local function rebackSpd(cid, sss)if not isCreature(cid) then return true end

  • 7/25/2019 Poke Moves

    9/128

    doChangeSpeed(cid, sss)setPlayerStorageValue(cid, 446, -1)

    end

    local x = getCreatureSpeed(cid)doFaceOpposite(cid)doChangeSpeed(cid, -x)addEvent(rebackSpd, 400, cid, x)setPlayerStorageValue(cid, 446, 1)doAreaCombatHealth(cid, DRAGONDAMAGE, getThingPosWithDebug(target), 0, -

    min, -max, 104)

    elseif spell == "Outrage" then local config = { outfit = { --["pokemon_name"] = outfit, ["Salamence"] = 2043,

    ["Shiny Salamence"] = 2043, ["Super Salamence"] = 2043,

    ["Mega Sceptile"] = 2434,["Dark Mega Sceptile"] = 2434,["Mega Charizard X"] = 2451,["Dark Mega Charizard"] = 2451,

    }, AOE = { times = 2, --Quantas vezes o golpe AOE ser usado. interval = 3000, --Intervalo de tempo, em milsimos de segundo, entre cada golpe AOE. combat = DRAGONDAMAGE, --Elemento. spell = { --Uma tabela dever ser configurada com a rea e efeito da parte comsocos, e a outra com a parte do efeito do Draco Meteor. {area = OutrageArea1, effect = 112}, --{area = rea do dano AOE,effect = efeito} {area = OutrageArea2, effect = 248}

    },} }

    local function doOutrage(cid, times) if not isCreature(cid) then return true end for i = 1, #config.AOE.spell do doMoveInArea2(cid, config.AOE.spell[i].effect, config.AOE.spell[i].area, config.AOE.combat, min, max, spell) end times = times - 1 if times

  • 7/25/2019 Poke Moves

    10/128

    end

    local ret = {} ret.id = cid ret.cd = config.AOE.interval / 1000 * config.AOE.times ret.eff = 0 ret.check = 0 ret.buff = spell ret.first = true doCondition2(ret) doSetCreatureOutfit(cid, {lookType = config.outfit[getCreatureName(cid)]}, config.AOE.interval * config.AOE.times) addEvent(doOutrage, config.AOE.interval, cid, config.AOE.times)

    elseif spell == "Sleep Powder" then

    local ret = {}ret.id = 0ret.cd = math.random(6, 9)ret.check = 0ret.first = true --alterado v1.6ret.cond = "Sleep"

    doMoveInArea2(cid, 27, confusion, NORMALDAMAGE, 0, 0, spell, ret)

    elseif spell == "Stun Spore" then

    local ret = {} ret.id = 0 ret.cd = 9 ret.eff = 0 ret.check = 0 ret.spell = spell ret.cond = "Stun"

    doMoveInArea2(cid, 85, confusion, GRASSDAMAGE, 0, 0, spell, ret)

    elseif spell == "Poison Powder" then

    local ret = {}ret.id = 0ret.cd = math.random(6, 15) --alterado v1.6ret.check = 0local lvl = isSummon(cid) and getMasterLevel(cid) or getPokemonLevel(cid)ret.damage = math.floor((getPokemonLevel(cid)+lvl * 3)/2)ret.cond = "Poison"

    doMoveInArea2(cid, 84, confusion, NORMALDAMAGE, 0, 0, spell, ret)

    elseif spell == "Bullet Seed" then

    --cid, effDist, effDano, areaEff, areaDano, element, min, maxdoMoveInAreaMulti(cid, 1, 45, bullet, bulletDano, GRASSDAMAGE, min, max)

    elseif spell == "Body Slam" then

    doAreaCombatHealth(cid, NORMALDAMAGE, getThingPosWithDebug(target), 0, -min, -max, 118)elseif spell == "Leaf Storm" or tonumber(spell) == 73 then

  • 7/25/2019 Poke Moves

    11/128

    addEvent(doDanoWithProtect, 150, cid, GRASSDAMAGE, getThingPosWithDebug(cid), grassarea, -min, -max, 0)

    local pos = getThingPosWithDebug(cid)

    local function doSendLeafStorm(cid, pos) --alterado!!if not isCreature(cid) then return true end

    doSendDistanceShoot(getThingPosWithDebug(cid), pos, 8)end

    for a = 1, 100 dolocal lugar = {x = pos.x + math.random(-6, 6), y = pos.y + math.

    random(-5, 5), z = pos.z}addEvent(doSendLeafStorm, a * 2, cid, lugar)

    endelseif spell == "Scratch" then

    doDanoWithProtect(cid, NORMALDAMAGE, getThingPosWithDebug(target), 0, -min, -max, 142)elseif spell == "Iron Head" then

    doDanoWithProtect(cid, NORMALDAMAGE, getThingPosWithDebug(target), 0, -m

    in, -max, 77)elseif spell == "Ember" then

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 3)

    doDanoInTargetWithDelay(cid, target, FIREDAMAGE, min, max, 15)--alterado v1.7

    elseif spell == "Flamethrower" then

    local flamepos = getThingPosWithDebug(cid)local flamepos1 = getThingPosWithDebug(cid)

    local flamepos2 = getThingPosWithDebug(cid) local effect = 255 local a = isCreature(target) and getCreatureDirectionToTarget(cid, target) or getCreatureLookDir(cid)if a == 0 then---Magmortar--flamepos1.x = flamepos1.x+2

    flamepos1.y = flamepos1.y-1 flamepos2.x = flamepos2.x-1 flamepos2.y = flamepos2.y-1 ---Magmortar-- flamepos.x = flamepos.x+1 flamepos.y = flamepos.y-1

    effect = 106elseif a == 1 then---Magmortar--flamepos1.x = flamepos1.x+3

    flamepos1.y = flamepos1.y+2 flamepos2.x = flamepos2.x+3 flamepos2.y = flamepos2.y ---Magmortar-- flamepos.x = flamepos.x+3 flamepos.y = flamepos.y+1

  • 7/25/2019 Poke Moves

    12/128

    effect = 109elseif a == 2 then---Magmortar--flamepos1.x = flamepos1.x+2

    flamepos1.y = flamepos1.y+3 flamepos2.x = flamepos2.x flamepos2.y = flamepos2.y+3 ---Magmortar-- flamepos.x = flamepos.x+1 flamepos.y = flamepos.y+3 effect = 107elseif a == 3 then---Magmortar--flamepos1.x = flamepos1.x-1

    flamepos1.y = flamepos1.y+2 flamepos2.x = flamepos2.x-1 flamepos2.y = flamepos2.y ---Magmortar-- flamepos.x = flamepos.x-1 flamepos.y = flamepos.y+1 effect = 108end

    if getCreatureName(cid) == "Magmortar" or getCreatureName(cid) == "Shiny Magmo

    rtar" thendoMoveInArea2(cid, 0, flamek, FIREDAMAGE, min, max, spell) doSendMagicEffect(flamepos1, effect)doSendMagicEffect(flamepos2, effect)else

    doMoveInArea2(cid, 0, flamek, FIREDAMAGE, min, max, spell) doSendMagicEffect(flamepos, effect)end

    elseif spell == "Fireball" then

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(targ

    et), 3) addEvent(doDanoWithProtect, 200, cid, FIREDAMAGE, getThingPosWithDebug(target), waba, min, max, 5)

    elseif spell == "Lightning Hell" then

    local function doDivine(cid, min, max, spell, rounds, area)if not isCreature(cid) then return true endlocal ret = {}ret.id = 0ret.check = 0ret.cd = roundsret.cond = "Stun"

    for i = 1, 9 do addEvent(doMoveInArea2, i*500, cid, 207, area[i], ELECTRICDAMAGE, min, max,spell, ret) addEvent(doMoveInArea2, 1000, cid, 47, electro, ELECTRICDAMAGE, 0, 0, spell,ret)

    addEvent(doMoveInArea2, 1000, cid, 207, electro, ELECTRICDAMAGE, 0, 0, spell, ret)

    local pos = getThingPosWithDebug(cid)local areas = {rock1, rock2, rock3, rock4, rock5, rock1, rock2, rock3, rock4, ro

  • 7/25/2019 Poke Moves

    13/128

    ck5}local ret = {}ret.id = 0ret.cd = 5ret.eff = 48ret.check = 0ret.spell = spellret.cond = "Miss"for i = 0, 8 do addEvent(doMoveInArea2, i*400, cid, 47, areas[i+1], ELECTRICDAMAGE, min, max, spell, ret) addEvent(doMoveInArea2, i*410, cid, 171, areas[i+1], ELECTRICAMAGE, 0, 0, spell)endendend

    local rounds = math.random(9, 12) local area = {punish1, punish2, punish3, punish1, punish2, punish3, punish1, punish2, punish3}

    local posi = getThingPosWithDebug(cid)posi.x = posi.x+1

    posi.y = posi.y+1

    setPlayerStorageValue(cid, 2365487, 1) addEvent(setPlayerStorageValue, 6450, cid, 2365487, -1) --alterado v1.4 doDisapear(cid) doChangeSpeed(cid, -getCreatureSpeed(cid)) doSendMagicEffect(posi, 163)

    addEvent(doAppear, 6450, cid) addEvent(doRegainSpeed, 6450, cid)

    local uid = checkAreaUid(getCreaturePosition(cid), check, 1, 1) for _,pid in pairs(uid) do if isSummon(cid) and (isMonster(pid) or (isSummon(pid) and canAttackOther(cid, pid) == "Can") or (isPlayer(pid) and canAttackOther(cid, pid) ==

    "Can")) and pid ~= cid then doChangeSpeed(pid, -getCreatureSpeed(pid)) elseif isMonster(cid) and (isSummon(pid) or (isPlayer(pid) and#getCreatureSummons(pid)

  • 7/25/2019 Poke Moves

    14/128

    ret.spell = spell ret.cond = "Slow"

    addEvent(doMoveDano2, 100, cid, target, NORMALDAMAGE, 0, 0, ret, spell)doSendMagicEffect(getThingPosWithDebug(target), 223)

    doSendMagicEffect(getThingPosWithDebug(target), 224)doDanoInTargetWithDelay(cid, target, DRAGONDAMAGE, min, max, 253) --alterado

    v1.7for i = 0, 1 do

    addEvent(doDualDualChop, i * 900, cid)end

    elseif spell == "Grass Knot" then

    local function throw(cid, target)if not isCreature(cid) or not isCreature(target) then return false end doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target),eff)

    doDanoInTargetWithDelay(cid, target, GRASSDAMAGE, min, max, 245)doSendMagicEffect(getThingPosWithDebug(target), 240)doSendMagicEffect(getThingPosWithDebug(target), 240)

    end

    addEvent(throw, 0, cid, target)

    addEvent(throw, 100, cid, target)

    elseif spell == "Ground Colapse" then

    local p = getThingPosWithDebug(cid)local d = isCreature(target) and getCreatureDirectionToTarget(cid, target) or getCreatureLookDir(cid)

    function sendAtk(cid, area, areaEff, eff)if isCreature(cid) then if not isSightClear(p, area, false) then return true end

    --testar o atk!!

    doAreaCombatHealth(cid, GROUNDDAMAGE, areaEff, 0, 0, 0, eff)doAreaCombatHealth(cid, GROUNDDAMAGE, area, whirl3, -min, -max, 255)endend

    for a = 0, 5 do

    local t = {[0] = {178, {x=p.x, y=p.y-(a+1), z=p.z}, {x=p.x+1, y=p.y-(a+1), z=p.z}},

    [1] = {178, {x=p.x+(a+1), y=p.y, z=p.z}, {x=p.x+(a+1), y=p.y+1, z=p.z}},[2] = {178, {x=p.x, y=p.y+(a+1), z=p.z}, {x=p.x+1, y=p.y+(a+1), z=p.z}},[3] = {178, {x=p.x-(a+1), y=p.y, z=p.z}, {x=p.x-(a+1), y=p.y+1, z=p.z}}

    }addEvent(sendAtk, 325*a, cid, t[d][2], t[d][3], t[d][1])end

    elseif spell == "Wood Hammer" thenlocal function doPulse(cid, eff)if not isCreature(cid) then return true end doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target),10)

  • 7/25/2019 Poke Moves

    15/128

    doDanoInTargetWithDelay(cid, target, GRASSDAMAGE, min, max, 37) --alterado pokemon TESend addEvent(doPulse, 0, cid, 37)

    elseif spell == "Fire Blast" then

    local p = getThingPosWithDebug(cid)local p1 = getThingPosWithDebug(cid)local d = isCreature(target) and getCreatureDirectionToTarget(cid, target) or getCreatureLookDir(cid)

    function sendAtk(cid, area, eff)if isCreature(cid) then if not isSightClear(p, area, false) then return true endif getCreatureName(cid) == "Magmortar" then doAreaCombatHealth(cid, BURNEDDAMAGE, area, 0, 0, 0, eff) doAreaCombatHealth(cid, BURNEDDAMAGE, area, whirl4, -min, -max, 35) else doAreaCombatHealth(cid, BURNEDDAMAGE, area, 0, 0, 0, eff) doAreaCombatHealth(cid, BURNEDDAMAGE, area, whirl3, -min, -max, 35) endend

    endfor a = 0, 4 do

    local t = {[0] = {60, {x=p.x, y=p.y-(a+1), z=p.z}}, --alterado v1.4[1] = {61, {x=p.x+(a+1), y=p.y, z=p.z}},[2] = {62, {x=p.x, y=p.y+(a+1), z=p.z}},[3] = {63, {x=p.x-(a+1), y=p.y, z=p.z}}}local m = {[0] = {60, {x=p.x+1, y=p.y-(a+1), z=p.z}}, --alterado v1.4[1] = {61, {x=p.x+(a+1), y=p.y+1, z=p.z}},

    [2] = {62, {x=p.x+1, y=p.y+(a+1), z=p.z}},[3] = {63, {x=p.x-(a+1), y=p.y+1, z=p.z}}}local n = {[0] = {60, {x=p.x-1, y=p.y-(a+1), z=p.z}}, --alterado v1.4[1] = {61, {x=p.x+(a+1), y=p.y-1, z=p.z}},[2] = {62, {x=p.x-1, y=p.y+(a+1), z=p.z}},[3] = {63, {x=p.x-(a+1), y=p.y-1, z=p.z}}}if getCreatureName(cid) == "Magmortar" or getCreatureName(cid) == "Shiny Magmortar" thenaddEvent(sendAtk, 300*a, cid, m[d][2], m[d][1])addEvent(sendAtk, 300*a, cid, n[d][2], n[d][1])

    elseaddEvent(sendAtk, 300*a, cid, t[d][2], t[d][1])endend

    elseif spell == "Dual Fire Blast" thenlocal function doDualFireBlast(cid)

    if not isCreature(cid) then return false endlocal p = getThingPosWithDebug(cid)local d = isCreature(target) and getCreatureDirectionToTarget(cid, target) or ge

  • 7/25/2019 Poke Moves

    16/128

    tCreatureLookDir(cid)

    function sendAtk(cid, area, eff)if isCreature(cid) then if not isSightClear(p, area, false) then return true end

    doAreaCombatHealth(cid, FIREDAMAGE, area, 0, 0, 0, eff) doAreaCombatHealth(cid, FIREDAMAGE, area, whirl3, -min, -max, 35)endend

    for a = 0, 4 do

    local t = {[0] = {60, {x=p.x, y=p.y-(a+1), z=p.z}}, --alterado v1.4[1] = {61, {x=p.x+(a+1), y=p.y, z=p.z}},[2] = {62, {x=p.x, y=p.y+(a+1), z=p.z}},[3] = {63, {x=p.x-(a+1), y=p.y, z=p.z}}}addEvent(sendAtk, 300*a, cid, t[d][2], t[d][1])endreturn trueend

    for i = 0, 1 do

    addEvent(doDualFireBlast, 900 * i, cid)enddoSetCreatureOutfit(cid, {lookType = 2045}, 1000)

    elseif spell == "Rage" then

    local ret = {} ret.id = cid ret.cd = 15 ret.eff = 13 ret.check = 0 ret.buff = spell ret.first = true

    doCondition2(ret)elseif spell == "Raging Blast" then

    --cid, effDist, effDano, areaEff, areaDano, element, min, max doMoveInAreaMulti(cid, 3, 6, bullet, bulletDano, FIREDAMAGE, min, max)

    elseif spell == "Dragon Claw" then

    doDanoWithProtect(cid, DRAGONDAMAGE, getThingPosWithDebug(target), 0, -min, -max, 141)

    elseif spell == "Wing Attack" or spell == "Steel Wing" then

    local effectpos = getThingPosWithDebug(cid)local effect = 255local a = isCreature(target) and getCreatureDirectionToTarget(cid, target) or getCreatureLookDir(cid)

    if a == 0 theneffect = spell == "Steel Wing" and 251 or 128effectpos.x = effectpos.x + 1

  • 7/25/2019 Poke Moves

    17/128

    effectpos.y = effectpos.y - 1 --alterado v1.4elseif a == 1 then

    effectpos.x = effectpos.x + 2effectpos.y = effectpos.y + 1effect = spell == "Steel Wing" and 253 or 129

    elseif a == 2 theneffectpos.x = effectpos.x + 1effectpos.y = effectpos.y + 2effect = spell == "Steel Wing" and 252 or 131

    elseif a == 3 theneffectpos.x = effectpos.x - 1effectpos.y = effectpos.y + 1effect = spell == "Steel Wing" and 254 or 130

    end

    doSendMagicEffect(effectpos, effect)doMoveInArea2(cid, 0, wingatk, FLYINGDAMAGE, min, max, spell)

    elseif spell == "Dragon Flight" then

    sendDistanceShootWithProtect(cid, getThingPosWithDebug(cid), getThingPosWithDebug(target), 53)doDanoInTargetWithDelay(cid, target, DRAGONDAMAGE, min, max, 143) --alterado v1

    .7doSendMagicEffect(getThingPosWithDebug(cid), 211)

    local x = getClosestFreeTile(cid, getThingPosWithDebug(target))doTeleportThing(cid, x, false)doFaceCreature(cid, getThingPosWithDebug(target))doAreaCombatHealth(cid, DRAGONDAMAGE, getThingPosWithDebug(target), 0, -

    min, -max, 143)

    elseif spell == "Magma Storm" then

    local eff = {6, 35, 35, 6}local area = {flames1, flames2, flames3, flames4}

    addEvent(doMoveInArea2, 2*450, cid, 2, flames0, FIREDAMAGE, min, max, spell)for i = 0, 3 do addEvent(doMoveInArea2, i*450, cid, eff[i+1], area[i+1], FIREDAMAGE, min, max, spell)end

    elseif spell == "Magma Storm" then

    elseif spell == "Bubbles" then

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(targ

    et), 2) doDanoInTargetWithDelay(cid, target, WATERDAMAGE, min, max, 68) --alterado v1.7

    elseif spell == "Clamp" then

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 2)

    doDanoInTargetWithDelay(cid, target, WATERDAMAGE, min, max, 53) --alterado v1.7

  • 7/25/2019 Poke Moves

    18/128

    elseif spell == "Water Gun" then

    local a = isCreature(target) and getCreatureDirectionToTarget(cid, target) or getCreatureLookDir(cid)local p = getThingPosWithDebug(cid)local t = {[0] = {69, {x=p.x, y=p.y-1, z=p.z}},[1] = {70, {x=p.x+6, y=p.y, z=p.z}}, --alterado v1.8[2] = {69, {x=p.x, y=p.y+6, z=p.z}},[3] = {70, {x=p.x-1, y=p.y, z=p.z}},}

    doMoveInArea2(cid, 0, triplo6, WATERDAMAGE, min, max, spell)doSendMagicEffect(t[a][2], t[a][1])

    elseif spell == "Waterball" then

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target),2) doDanoWithProtectWithDelay(cid, target, WATERDAMAGE, min, max, 68, waba)

    elseif spell == "Aqua Tail" then

    local function rebackSpd(cid, sss)if not isCreature(cid) then return true enddoChangeSpeed(cid, sss)setPlayerStorageValue(cid, 446, -1)

    end

    local x = getCreatureSpeed(cid)doFaceOpposite(cid)doChangeSpeed(cid, -x)addEvent(rebackSpd, 400, cid, x)setPlayerStorageValue(cid, 446, 1)doAreaCombatHealth(cid, WATERDAMAGE, getThingPosWithDebug(target), 0, -m

    in, -max, 68)

    elseif spell == "Hydro Cannon" then

    local p = getThingPosWithDebug(cid)local d = isCreature(target) and getCreatureDirectionToTarget(cid, target) or getCreatureLookDir(cid)

    function sendAtk(cid, area, eff)if isCreature(cid) then if not isSightClear(p, area, false) then return true endif getCreatureName(cid) == "Mega Blastoise" then

    doAreaCombatHealth(cid, WATERDAMAGE, area, 0, 0, 0, eff) doAreaCombatHealth(cid, WATERDAMAGE, area, whirl3, -min, -max, 68) else doAreaCombatHealth(cid, WATERDAMAGE, area, 0, 0, 0, eff) doAreaCombatHealth(cid, WATERDAMAGE, area, whirl3, -min, -max, 68)endendend

  • 7/25/2019 Poke Moves

    19/128

    for a = 0, 4 do

    local t = { --alterado v1.4[0] = {64, {x=p.x, y=p.y-(a+1), z=p.z}},[1] = {65, {x=p.x+(a+1), y=p.y, z=p.z}},[2] = {66, {x=p.x, y=p.y+(a+1), z=p.z}},[3] = {67, {x=p.x-(a+1), y=p.y, z=p.z}}}local m = {[0] = {64, {x=p.x+1, y=p.y-(a+1), z=p.z}}, --alterado v1.4[1] = {65, {x=p.x+(a+1), y=p.y+1, z=p.z}},[2] = {66, {x=p.x+1, y=p.y+(a+1), z=p.z}},[3] = {67, {x=p.x-(a+1), y=p.y+1, z=p.z}}}local n = {[0] = {64, {x=p.x-1, y=p.y-(a+1), z=p.z}}, --alterado v1.4[1] = {65, {x=p.x+(a+1), y=p.y-1, z=p.z}},[2] = {66, {x=p.x-1, y=p.y+(a+1), z=p.z}},[3] = {67, {x=p.x-(a+1), y=p.y-1, z=p.z}}}

    if getCreatureName(cid) == "Mega Blastoise" thenaddEvent(sendAtk, 300*a, cid, m[d][2], m[d][1])addEvent(sendAtk, 300*a, cid, n[d][2], n[d][1])

    elseaddEvent(sendAtk, 300*a, cid, t[d][2], t[d][1])endend

    elseif spell == "Thick Fat" then

    local ret = {}ret.id = 0ret.cd = 9ret.eff = 8

    ret.check = 0ret.spell = spellret.cond = "Paralyze"local ret2 = {}ret2.id = 0ret2.cd = 8ret2.check = 0ret2.eff = -1ret2.cond = "Silence"

    doMoveInArea2(cid, 182, muddy, NORMALDAMAGE, min, max, spell, ret)

    doMoveInArea2(cid, 182, muddy, NORMALDAMAGE, 0, 0, spell, ret2)

    elseif spell == "Mamaragan" then

    local eff = getSubName(cid, target) == "Shiny Electabuzz" and 29 or 207 --alterado v1.6.1local eff = getSubName(cid, target) == "Shiny Electivire" and 29 or 207

    local pos = getThingPosWithDebug(cid)local areas = {rock1, rock2, rock3, rock4, rock5, rock1, rock2, rock3, rock4, ro

  • 7/25/2019 Poke Moves

    20/128

    ck5}local ret = {}ret.id = 0ret.cd = 12ret.eff = 48ret.check = 0ret.spell = spellret.cond = "Stun"for i = 0, 8 do addEvent(doMoveInArea2, i*400, cid, eff, areas[i+1], ELECTRICDAMAGE, min, max, spell, ret) addEvent(doMoveInArea2, i*410, cid, eff, areas[i+1], ELECTRICAMAGE, 0, 0, spell)end

    elseif spell == "Harden" or spell == "Calm Mind" or spell == "Defense Curl" or spell == "Charm" then --alterado v1.4 if spell == "Calm Mind" then eff = 133 elseif spell == "Charm" then eff = 147 --efeito n eh esse.. e n sei se eh soh bonus de

    def, ou sp.def tb.. ;x elseeff = 144

    end

    local ret = {} ret.id = cid ret.cd = 8 ret.eff = eff ret.check = 0 ret.buff = spell ret.first = true

    doCondition2(ret)

    elseif spell == "Bubble Blast" then

    --cid, effDist, effDano, areaEff, areaDano, element, min, max doMoveInAreaMulti(cid, 2, 68, bullet, bulletDano, WATERDAMAGE, min, max)elseif spell == "Skull Bash" thenlocal ret = {}ret.id = 0ret.cd = 8 --alterado v1.6ret.eff = 89ret.check = 0

    ret.first = trueret.cond = "Paralyze"local ret2 = {}ret2.id = 0ret2.cd = 8ret2.check = 0ret2.eff = -1ret2.cond = "Silence"

    doMoveInArea2(cid, 118, reto5, NORMALDAMAGE, min, max, spell, ret)

  • 7/25/2019 Poke Moves

    21/128

    doMoveInArea2(cid, 118, reto5, NORMALDAMAGE, 0, 0, spell, ret2)

    elseif spell == "Hydropump" then

    local pos = getThingPosWithDebug(cid)

    local function doSendBubble(cid, pos)if not isCreature(cid) then return true endif isWithFear(cid) and getPlayerStorageValue(cid, 3644587) >= 1

    then return true endif isSleeping(cid) and getPlayerStorageValue(cid, 3644587) >= 1

    then return true enddoSendDistanceShoot(getThingPosWithDebug(cid), pos, 2)doSendMagicEffect(pos, 53)

    end --alterado!!for a = 1, 20 do local lugar = {x = pos.x + math.random(-4, 4), y = pos.y + math.rand

    om(-3, 3), z = pos.z} addEvent(doSendBubble, a * 25, cid, lugar)endaddEvent(doDanoWithProtect, 150, cid, WATERDAMAGE, pos, waterarea, -min,

    -max, 0)elseif spell == "Giga Impact" then

    local tempo = 3 --Tempo, em segundos.local a = {}local ret1 = {} ret1.id = 0 ret1.cd = 5 ret1.eff = 0 ret1.check = 0 ret1.first = true ret1.cond = "Slow"

    local ret2 = {} ret2.id = 0 ret2.cd = 5

    ret2.eff = 0 ret2.check = 0 ret2.first = true ret2.cond = "Miss" a.speed = getCreatureSpeed(cid) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, a.speed*2) addEvent(function() if not isCreature(cid) then return true end doRegainSpeed(cid)

    doMoveInArea2(cid, 118, quake, NORMALDAMAGE, min, max, spell, ret1) doMoveInArea2(cid, 118, quake, NORMALDAMAGE, 0, 0, spell, ret2) end, tempo*1000)

    elseif spell == "String Shot" then

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target),23)

    local ret = {}

  • 7/25/2019 Poke Moves

    22/128

    ret.id = target ret.cd = 6 ret.eff = 137 ret.check = getPlayerStorageValue(target, conds["Stun"]) ret.spell = spell ret.cond = "Stun"

    addEvent(doMoveDano2, 100, cid, target, BUGDAMAGE, 0, 0, ret, spell)

    elseif spell == "Bug Bite" then

    doSendMagicEffect(getThingPosWithDebug(target), 2) doDanoInTargetWithDelay(cid, target, BUGDAMAGE, min, max, 8) --alterado v1.7

    elseif spell == "Super Sonic" then

    local rounds = math.random(4, 7)rounds = rounds + math.floor(getPokemonLevel(cid) / 35)

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 32)

    local ret = {}ret.id = targetret.cd = rounds

    ret.check = getPlayerStorageValue(target, conds["Confusion"])ret.cond = "Confusion"

    addEvent(doMoveDano2, 100, cid, target, NORMALDAMAGE, 0, 0, ret, spell)

    elseif spell == "Whirlwind" then

    area = {SL1, SL2, SL3, SL4}

    for i = 0, 3 do addEvent(doMoveInArea2, i*300, cid, 42, area[i+1], FLYINGDAMAGE, min, max, spell)end

    elseif spell == "Razor Wind" then

    area = {SL1, SL2, SL3, SL4}

    for i = 0, 3 do addEvent(doMoveInArea2, i*300, cid, 131, area[i+1], NORMALDAMAGE, min, max,spell)end

    elseif spell == "Psybeam" then

    local a = isCreature(target) and getCreatureDirectionToTarget(cid, target) or ge

    tCreatureLookDir(cid)local t = {[0] = 58, --alterado v1.6[1] = 234,[2] = 58,[3] = 209,}

    doMoveInArea2(cid, t[a], reto4, psyDmg, min, max, spell) --alterado v1.4

  • 7/25/2019 Poke Moves

    23/128

    elseif spell == "Sand Attack" then

    local a = isCreature(target) and getCreatureDirectionToTarget(cid, target) or getCreatureLookDir(cid)local t = {[0] = 120,[1] = 121,[2] = 122,[3] = 119,}

    local ret = {}ret.id = 0ret.cd = 9ret.eff = 34ret.check = 0ret.spell = spellret.cond = "Miss"

    doCreatureSetLookDir(cid, a) --sera? '-'stopNow(cid, 1000)doMoveInArea2(cid, t[a], reto5, GROUNDDAMAGE, 0, 0, spell, ret)

    elseif spell == "Confusion" or spell == "Night Shade" then

    local rounds = math.random(4, 7) --rever area... rounds = rounds + math.floor(getPokemonLevel(cid) / 35)

    if spell == "Confusion" then dano = psyDmg --alterado v1.4 else dano = ghostDmg end

    local ret = {} ret.id = 0 ret.check = 0

    ret.cd = rounds ret.cond = "Confusion"

    doMoveInArea2(cid, 136, selfArea1, dano, min, max, spell, ret)

    elseif spell == "Horn Attack" then

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 15) doDanoInTargetWithDelay(cid, target, NORMALDAMAGE, min, max, 3) --alterado v1.7

    elseif spell == "Poison Sting" then

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 15) doDanoInTargetWithDelay(cid, target, POISONDAMAGE, min, max, 8) --alterado v1.7

    elseif spell == "Fury Cutter" or spell == "Red Fury" then

    local effectpos = getThingPosWithDebug(cid) local effect = 255

  • 7/25/2019 Poke Moves

    24/128

    local a = isCreature(target) and getCreatureDirectionToTarget(cid, target) or getCreatureLookDir(cid)

    if a == 0 then if getSubName(cid, target) == "Scizor" then --alterado v1.6.1 effect = 236 else

    effect = 128 end

    effectpos.x = effectpos.x + 1effectpos.y = effectpos.y - 1

    elseif a == 1 theneffectpos.x = effectpos.x + 2effectpos.y = effectpos.y + 1if getSubName(cid, target) == "Scizor" then --alterado v1.6.1

    effect = 232 else

    effect = 129 endelseif a == 2 then

    effectpos.x = effectpos.x + 1effectpos.y = effectpos.y + 2if getSubName(cid, target) == "Scizor" then --alterado v1.6.1

    effect = 233

    else effect = 131 endelseif a == 3 then

    effectpos.x = effectpos.x - 1effectpos.y = effectpos.y + 1if getSubName(cid, target) == "Scizor" then --alterado v1.6.1

    effect = 224 else

    effect = 130 endend

    local function doFury(cid, effect)

    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

    doSendMagicEffect(effectpos, effect) doMoveInArea2(cid, 2, wingatk, BUGDAMAGE, min, max, spell)

    end

    addEvent(doFury, 0, cid, effect) addEvent(doFury, 350, cid, effect)elseif spell == "Pin Missile" then

    doMoveInAreaMulti(cid, 13, 7, bullet, bulletDano, BUGDAMAGE, min, max)elseif spell == "Strafe" or spell == "Agility" then

    local ret = {} ret.id = cid ret.cd = 15 ret.eff = 14 ret.check = 0

  • 7/25/2019 Poke Moves

    25/128

    ret.buff = spell ret.first = true

    doCondition2(ret)elseif spell == "Gust" then

    doMoveInArea2(cid, 42, reto5, FLYINGDAMAGE, min, max, spell)

    elseif spell == "Drill Peck" then

    doDanoWithProtect(cid, FLYINGDAMAGE, getThingPosWithDebug(target), 0, -min, -max, 148)

    elseif spell == "Tornado" then

    local pos = getThingPosWithDebug(cid)

    local function doSendTornado(cid, pos)if not isCreature(cid) then return true endif isWithFear(cid) and getPlayerStorageValue(cid, 3644587) >= 1

    then return true endif isSleeping(cid) and getPlayerStorageValue(cid, 3644587) >= 1

    then return true end

    doSendDistanceShoot(getThingPosWithDebug(cid), pos, 22)doSendMagicEffect(pos, 42)end

    for b = 1, 3 dofor a = 1, 20 do

    local lugar = {x = pos.x + math.random(-4, 4), y = pos.y+ math.random(-3, 3), z = pos.z}

    addEvent(doSendTornado, a * 75, cid, lugar)end

    enddoDanoWithProtect(cid, FLYINGDAMAGE, pos, waterarea, -min, -max, 0)

    elseif spell == "Sky Attack" then

    local pos = getThingPosWithDebug(cid)

    local function doSendTornado(cid, pos)if not isCreature(cid) then return true endif isWithFear(cid) and getPlayerStorageValue(cid, 3644587) >= 1

    then return true endif isSleeping(cid) and getPlayerStorageValue(cid, 3644587) >= 1

    then return true enddoSendDistanceShoot(getThingPosWithDebug(cid), pos, 22)doSendMagicEffect(pos, 78)

    end

    for b = 1, 3 dofor a = 1, 20 do

    local lugar = {x = pos.x + math.random(-4, 4), y = pos.y+ math.random(-3, 3), z = pos.z}

    addEvent(doSendTornado, a * 75, cid, lugar)end

    enddoDanoWithProtect(cid, FLYINGDAMAGE, pos, waterarea, -min, -max, 0)

  • 7/25/2019 Poke Moves

    26/128

    elseif spell == "Bite" or tonumber(spell) == 5 then

    doDanoWithProtect(cid, DARKDAMAGE, getThingPosWithDebug(target), 0, -min, -max, 146)

    elseif spell == "Super Fang" then

    doDanoWithProtect(cid, NORMALDAMAGE, getThingPosWithDebug(target), 0, -min, -max, 2)

    elseif spell == "Poison Fang" then

    doSendMagicEffect(getThingPosWithDebug(target), 2) doDanoInTargetWithDelay(cid, target, POISONDAMAGE, min, max, 114) --alteradov1.7

    elseif spell == "Sting Gun" then

    local function doGun(cid, target) if not isCreature(cid) or not isCreature(target) then return true end--alterado v1.7 doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 13) doDanoInTargetWithDelay(cid, target, POISONDAMAGE, min, max, 8) --alt

    erado v1.7 end

    setPlayerStorageValue(cid, 3644587, 1) addEvent(setPlayerStorageValue, 200, cid, 3644587, 1) for i = 0, 2 do

    addEvent(doGun, i*100, cid, target) end

    elseif spell == "Acid" then

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 14)

    doDanoInTargetWithDelay(cid, target, POISONDAMAGE, min, max, 20) --alterado v1.7

    elseif spell == "Fear" or spell == "Roar" then

    local ret = {} ret.id = 0 ret.cd = 5 ret.check = 0 ret.skill = spell ret.cond = "Fear"

    doMoveInArea2(cid, 0, confusion, DARKDAMAGE, 0, 0, spell, ret)

    elseif spell == "Iron Tail" then

    local function rebackSpd(cid, sss)if not isCreature(cid) then return true enddoChangeSpeed(cid, sss)setPlayerStorageValue(cid, 446, -1)

    end

    local x = getCreatureSpeed(cid)

  • 7/25/2019 Poke Moves

    27/128

    doFaceOpposite(cid)doChangeSpeed(cid, -x)addEvent(rebackSpd, 400, cid, x)setPlayerStorageValue(cid, 446, 1)doDanoWithProtect(cid, STEELDAMAGE, getThingPosWithDebug(target), 0, -mi

    n, -max, 160)

    elseif spell == "Thunder Shock" then

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 40)

    doDanoInTargetWithDelay(cid, target, ELECTRICDAMAGE, min, max, 48) --alterado v1.7

    elseif spell == "Thunder Bolt" then

    --alterado v1.7local function doThunderFall(cid, frompos, target)

    if not isCreature(target) or not isCreature(cid) then return true end

    local pos = getThingPosWithDebug(target)local ry = math.abs(frompos.y - pos.y)doSendDistanceShoot(frompos, getThingPosWithDebug(target), 41)addEvent(doDanoInTarget, ry * 11, cid, target, ELECTRICDAMAGE, m

    in, max, 48) --alterado v1.7end

    local function doThunderUp(cid, target)if not isCreature(target) or not isCreature(cid) then re

    turn true endlocal pos = getThingPosWithDebug(target)local mps = getThingPosWithDebug(cid)local xrg = math.floor((pos.x - mps.x) / 2)local topos = mpstopos.x = topos.x + xrglocal rd = 7topos.y = topos.y - rd

    doSendDistanceShoot(getThingPosWithDebug(cid), topos, 41)addEvent(doThunderFall, rd * 49, cid, topos, target)end

    setPlayerStorageValue(cid, 3644587, 1)addEvent(setPlayerStorageValue, 350, cid, 3644587, -1)

    for thnds = 1, 2 doaddEvent(doThunderUp, thnds * 155, cid, target)

    end

    elseif spell == "Thunder Wave" then

    local ret = {}

    ret.id = 0ret.cd = 9ret.check = 0ret.eff = 48ret.spell = spellret.cond = "Stun"

    doMoveInArea2(cid, 48, db1, ELECTRICDAMAGE, min, max, spell, ret) --alterado v1.8

  • 7/25/2019 Poke Moves

    28/128

    elseif spell == "Disarming Voice" then

    local ret = {}ret.id = 0ret.cd = 9ret.check = 0ret.eff = 46ret.spell = spellret.cond = "Stun"

    doMoveInArea2(cid, 46, db1, FAIRYDAMAGE, min, max, spell, ret) --alterado v1.8

    elseif spell == "Dragon Breath2" then

    local ret = {}ret.id = 0ret.cd = 9ret.check = 0ret.eff = 10ret.spell = spellret.cond = "Stun"

    doMoveInArea2(cid, 10, db1, DRAGONDAMAGE, min, max, spell, ret) --alterado v1.8

    elseif spell == "Thunder" thenlocal ret = {}ret.id = 0ret.cd = 9ret.check = 0ret.eff = 48ret.spell = spellret.cond = "Stun"

    doMoveInArea2(cid, 48, thunderr, ELECTRICDAMAGE, min, max, spell, ret)

    elseif spell == "Web Shot" then

    local ret = {}ret.id = targetret.cd = 9ret.eff = 26ret.check = 0ret.spell = spellret.cond = "Paralyze"

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 23)

    addEvent(doMoveDano2, 100, cid, target, BUGDAMAGE, -min, -max, ret, spell)

    elseif spell == "Mega Kick" then

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target),39)

    doDanoInTargetWithDelay(cid, target, FIGHTINGDAMAGE, min, max, 113) --alterado v1.7

    elseif spell == "Thunder Punch" then

  • 7/25/2019 Poke Moves

    29/128

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 39) doSendMagicEffect(getThingPosWithDebug(target), 112) doDanoInTargetWithDelay(cid, target, ELECTRICDAMAGE, min, max, 48) --alterado v1.7

    elseif spell == "Electric Storm" then

    local master = isSummon(cid) and getCreatureMaster(cid) or cid

    local function doFall(cid)for rocks = 1, 42 do addEvent(fall, rocks*35, cid, master, ELECTRICDAMAGE, 41, 48)endend

    for up = 1, 10 do addEvent(upEffect, up*75, cid, 41)endaddEvent(doFall, 450, cid)

    local ret = {}ret.id = 0ret.cd = 9

    ret.check = 0ret.eff = 48ret.spell = spellret.cond = "Stun"

    addEvent(doMoveInArea2, 1400, cid, 0, BigArea2, ELECTRICDAMAGE, min, max, spell,ret)

    elseif spell == "Grass Knot bugedo" thenlocal p = getThingPosWithDebug(cid)local d = isCreature(target) and getCreatureDirectionToTarget(cid, target) or getCreatureLookDir(cid)

    function sendAtk(cid, area, eff, area2)if isCreature(cid) thenif not isSightClear(p, area, false) then return true end

    if not isWalkable(area) then return true end if isInArray(waters, getTileInfo(area).itemid) then return true end doAreaCombatHealth(cid, GRASSDAMAGE, area, whirl3, -min, -max, 37) doTeleportThing(cid, area)endend

    for a = 0, 5 do

    local t = {

    [0] = {0, {x=p.x, y=p.y-(a+1), z=p.z}, {x=p.x + 1,y=p.y-(a+1), z=p.z}},[1] = {0, {x=p.x+(a+1), y=p.y, z=p.z}, {x=p.x+(a+1) + 1, y=p.y + 1, z=p.z}},[2] = {0, {x=p.x, y=p.y+(a+1), z=p.z}, {x=p.x + 1, y=p.y+(a+1) + 1, z=p.z}},[3] = {0, {x=p.x-(a+1), y=p.y, z=p.z}, {x=p.x-(a+1), y=p.y + 1, z=p.z}}}doCreatureSetNoMove(cid, true)addEvent(sendAtk, 200*a, cid, t[d][2], t[d][1], t[d][3])addEvent(doCreatureSetNoMove, 1000, cid, false)end

  • 7/25/2019 Poke Moves

    30/128

    elseif spell == "Frenzy Plant" then

    local master = isSummon(cid) and getCreatureMaster(cid) or cid

    local function doFall(cid)for rocks = 1, 42 do addEvent(fall, rocks*35, cid, master, GRASSDAMAGE, 99, 71)endend

    for up = 1, 10 do addEvent(upEffect, up*75, cid, 99)endaddEvent(doFall, 450, cid)

    local ret = {}ret.id = 0ret.cd = 9ret.check = 0ret.eff = 71ret.spell = spellret.cond = "Sleep"

    addEvent(doMoveInArea2, 1400, cid, 0, BigArea2, GRASSDAMAGE, min, max, spell, re

    t)elseif spell == "Web Rain" then

    local master = isSummon(cid) and getCreatureMaster(cid) or cid

    local function doFall(cid)for rocks = 1, 42 do addEvent(fall, rocks*35, cid, master, BUGDAMAGE, 23)endend

    for up = 1, 10 do

    addEvent(upEffect, up*75, cid, 23)endaddEvent(doFall, 450, cid)

    local ret = {}ret.id = 0ret.cd = 9ret.check = 0ret.eff = 26ret.spell = spellret.cond = "Silence"

    addEvent(doMoveInArea2, 1400, cid, 0, BigArea2, BUGDAMAGE, min, max, spell, ret)

    elseif spell == "Spider Web" then

    local ret = {}ret.id = 0ret.cd = 9ret.check = 0ret.eff = 26ret.cond = "Silence"

  • 7/25/2019 Poke Moves

    31/128

    doMoveInAreaMulti(cid, 23, 26, multi, multiDano, BUGDAMAGE, min, max)doMoveInArea2(cid, 0, multiDano, BUGDAMAGE, 0, 0, spell, ret)

    elseif spell == "Mud Shot" or spell == "Mud Slap" then

    if isCreature(target) then --alterado v1.8local contudion = spell == "Mud Shot" and "Miss" or "Stun"

    local ret = {}ret.id = targetret.cd = 9ret.eff = 34ret.check = getPlayerStorageValue(target, conds[contudion])ret.spell = spellret.cond = contudion

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 6)

    addEvent(doMoveDano2, 100, cid, target, GROUNDDAMAGE, -min, -max, ret, spell)end

    elseif spell == "Vines Grap" then

    local ret = {} ret.id = 0 ret.cd = 40 --Durao do silence, em milesimosdesegundos. ret.check = 0 ret.eff = 104 --Efeito do silence. ret.cond = "Silence"

    doDanoWithProtect(cid, psyDmg, getThingPosWithDebug(cid), selfArea2, min, max, 45)

    stopNow(cid, 200) --alterado v1.6 doCreatureSetLookDir(cid, 2)

    local effect = 0local pos = getThingPosWithDebug(cid)pos.x = pos.x + 1pos.y = pos.y + 1

    local effect = getSubName(cid, target) == "Mega Tangrowth" and 229 or 229 local effect = getSubName(cid, target) == "Shiny Tangela" and 213 or 229--alterado v1.6.1

    doSendMagicEffect(pos, effect)doDanoWithProtect(cid, GRASSDAMAGE, getThingPosWithDebug(cid), splash, -

    min, -max, 0)

    elseif spell == "Power Whipe" thenlocal pos = getThingPosWithDebug(cid)local areas = {rock1, rock2, rock3, rock4, rock5}local ret = {}ret.id = 0ret.cd = 3ret.eff = 7ret.check = 0ret.first = true

  • 7/25/2019 Poke Moves

    32/128

    ret.cond = "Paralyze"local ret2 = {}ret2.id = 0ret2.cd = 3ret2.check = 0ret2.eff = -1ret2.cond = "Silence" local config = { outfit = 1685, --Outfit. time = {3 , 500}, --{Durao da spell, intervalo entre cada"tick" de dano (em milsimos de segundos)}, storage = 93828, effects = { pullEffects = { distance = 167, --Distance effect do efeito de puxar pokmons. effect = 7, --Efeito de tornado. }, damageEffect = 45, --Efeito do redemoinho 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[i]).uid if c > 0 then

    legendarios = { "Blue Tower 1", "Blue Tower 2","Blue Tower 3", "Red Tower 1", "Red Tower 2", "Red Tower 3", "Entei", "Moltres","Zapdos", "Articuno", "Celebi"} if ehMonstro(c) and not isInArray(legendarios, getCreatureName(c))then doTeleportThing(c, getClosestFreeTile(cid, getThingPos(cid))) doMoveDano2(cid, c, NORMALDAMAGE, 0, 0, ret, spell) doMoveDano2(cid, c, NORMALDAMAGE, 0, 0, ret2, 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) doMoveDano2(cid, c, NORMALDAMAGE, 0, 0, ret2, spell) end

    end else doTeleportThing(c, getClosestFreeTile(cid, getThingPos(cid))) doMoveDano2(cid, c, NORMALDAMAGE, 0, 0, ret, spell) doMoveDano2(cid, c, NORMALDAMAGE, 0, 0, ret2, spell) end end

    end -- end

  • 7/25/2019 Poke Moves

    33/128

    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, GRASS, getThingPos(cid), damageArea, min, max, config.effects.damageEffect) addEvent(vortexDamage, config.time[2], cid) end 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)

    elseif spell == "Mud Rain" then

    local ret = {} ret.id = 0 ret.cd = 200 --Durao do silence, em milesimosdesegundos. ret.check = 0 ret.eff = 34 --Efeito do silence.

    ret.cond = "Silence"doDanoWithProtect(cid, psyDmg, getThingPosWithDebug(cid), selfArea2, min, max, 34)local eff = getSubName(cid, target) == "Shiny Onix" and 179 or 127 --alterado v1.6.1

    doAreaCombatHealth(cid, GROUNDDAMAGE, getThingPosWithDebug(cid), splash,-min, -max, 255)

    local sps = getThingPosWithDebug(cid)

  • 7/25/2019 Poke Moves

    34/128

    sps.x = sps.x+1sps.y = sps.y+1doSendMagicEffect(sps, eff)

    elseif spell == "Rollout" then

    local function setOutfit(cid, outfit) if isCreature(cid) and getCreatureCondition(cid, CONDITION_OUTFIT) ==true then if getCreatureOutfit(cid).lookType == outfit then doRemoveCondition(cid, CONDITION_OUTFIT) if getCreatureName(cid) == "Ditto" and pokes[getPlayerStorageValue(cid, 1010)] and getPlayerStorageValue(cid, 1010) ~= "Ditto" then if isSummon(cid) then local item = getPlayerSlotItem(getCreatureMaster(cid), 8) doSetCreatureOutfit(cid, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1) --alterado v1.8 end end

    end end end

    if RollOuts[getSubName(cid, target)] thendoSetCreatureOutfit(cid, RollOuts[getSubName(cid, target)], -1)--alterado v1.6.1

    end

    local outfit = getCreatureOutfit(cid).lookType

    local function roll(cid, outfit) if not isCreature(cid) then return true end if isSleeping(cid) then return true end if RollOuts[getSubName(cid, target)] then doSetCreatureOutfit(cid, RollOuts[getSubName(cid, target)], -1) --alterado v1.6.1

    end doDanoWithProtect(cid, ROCKDAMAGE, getThingPosWithDebug(cid), splash, -min, -max, 0) end

    setPlayerStorageValue(cid, 3644587, 1) addEvent(setPlayerStorageValue, 9000, cid, 3644587, -1) for r = 1, 11 do --8 addEvent(roll, 750 * r, cid, outfit) end addEvent(setOutfit, 9050, cid, outfit)elseif spell == "Shockwave" then

    local p = getThingPosWithDebug(cid)local d = isCreature(target) and getCreatureDirectionToTarget(cid, target) or getCreatureLookDir(cid)

    function sendAtk(cid, area, areaEff, eff)if isCreature(cid) then if not isSightClear(p, area, false) then return true end

    --testar o atk!! doAreaCombatHealth(cid, GROUNDDAMAGE, areaEff, 0, 0, 0, eff)

  • 7/25/2019 Poke Moves

    35/128

    doAreaCombatHealth(cid, GROUNDDAMAGE, area, whirl3, -min, -max, 255)endend

    for a = 0, 5 do

    local t = {[0] = {126, {x=p.x, y=p.y-(a+1), z=p.z}, {x=p.x+1, y=p.y-(a+1), z=p.z}},

    [1] = {124, {x=p.x+(a+1), y=p.y, z=p.z}, {x=p.x+(a+1), y=p.y+1, z=p.z}},[2] = {125, {x=p.x, y=p.y+(a+1), z=p.z}, {x=p.x+1, y=p.y+(a+1), z=p.z}},[3] = {123, {x=p.x-(a+1), y=p.y, z=p.z}, {x=p.x-(a+1), y=p.y+1, z=p.z}}}addEvent(sendAtk, 325*a, cid, t[d][2], t[d][3], t[d][1])end

    elseif spell == "Earth Power" then

    local eff = getSubName(cid, target) == "Shiny Onix" and 179 or 127 --alterado v1.6.1local eff = getSubName(cid, target) == "Crystal Steelix" and 179 or 127

    doAreaCombatHealth(cid, GROUNDDAMAGE, getThingPosWithDebug(cid), splash,-min, -max, 255)

    local sps = getThingPosWithDebug(cid)sps.x = sps.x+1sps.y = sps.y+1doSendMagicEffect(sps, eff)

    elseif spell == "Frost Power" then

    local eff = getSubName(cid, target) == "Shiny Onix" and 179 or 179 --alterado v1.6.1

    doAreaCombatHealth(cid, GROUNDDAMAGE, getThingPosWithDebug(cid), splash,

    -min, -max, 255)

    local sps = getThingPosWithDebug(cid)sps.x = sps.x+1sps.y = sps.y+1doSendMagicEffect(sps, eff)

    elseif spell == "Sheer Cold" then

    local ret = {}ret.id = 0ret.cd = 4

    ret.eff = 43ret.check = 0ret.first = trueret.cond = "Paralyze"

    local function sendAtk(cid)if isCreature(cid) thendoRemoveCondition(cid, CONDITION_OUTFIT)setPlayerStorageValue(cid, 9658783, -1)for i = 0, 4 do

  • 7/25/2019 Poke Moves

    36/128

    addEvent(doMoveInArea2, i*400, cid, 43, areas[i+1], ICEDAMAGE, min, max, spell, ret) addEvent(doMoveInArea2, i*410, cid, 43, areas[i+1], ICEDAMAGE, 0, 0, spell)endendend

    setPlayerStorageValue(cid, 9658783, 1)addEvent(sendAtk, 2000, cid)

    elseif spell == "Earthquake" then

    local eff = getSubName(cid, target) == "Shiny Onix" and 175 or 118 --alterado v1.6.1local eff = getSubName(cid, target) == "Crystal Steelix" and 175 or 118local function doQuake(cid)if not isCreature(cid) then return false endif isSleeping(cid) and getPlayerStorageValue(cid, 3644587) >= 1 then return false endif isWithFear(cid) and getPlayerStorageValue(cid, 3644587) >= 1 then return trueend doMoveInArea2(cid, eff, confusion, GROUNDDAMAGE, min, max, spell)

    endtimes = {0, 500, 1000, 1500, 2300, 2800, 3300, 3800, 4600, 5100, 5600, 6100, 6900, 7400, 7900, 8400, 9200, 10000}

    setPlayerStorageValue(cid, 3644587, 1)addEvent(setPlayerStorageValue, 10000, cid, 3644587, -1)for i = 1, #times do --alterado v1.4 addEvent(doQuake, times[i], cid)end

    elseif spell == "Stomp" then

    local ret = {} ret.id = 0 ret.cd = 9 ret.check = 0 ret.eff = 34 ret.spell = spell ret.cond = "Stun"

    doMoveInArea2(cid, 118, stomp, GROUNDDAMAGE, min, max, spell, ret)elseif spell == "Toxic Spikes" then

    local function doToxic(cid, target) if not isCreature(cid) or not isCreature(target) then return true end --alterado v1.7 doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 15) doDanoInTargetWithDelay(cid, target, POISONDAMAGE, min, max, 114) --alterado v1.7 end

    setPlayerStorageValue(cid, 3644587, 1)

  • 7/25/2019 Poke Moves

    37/128

    addEvent(setPlayerStorageValue, 300, cid, 3644587, -1) addEvent(doToxic, 0, cid, target)

    addEvent(doToxic, 300, cid, target)elseif spell == "Horn Drill" then

    local function doHorn(cid, target) if not isCreature(cid) or not isCreature(target) then return true end --alterado v1.7 doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 25) doDanoInTargetWithDelay(cid, target, NORMALDAMAGE, min, max, 3) --alterado v1.7 end

    setPlayerStorageValue(cid, 3644587, 1) addEvent(setPlayerStorageValue, 300, cid, 3644587, -1)

    addEvent(doHorn, 0, cid, target) addEvent(doHorn, 300, cid, target)elseif spell == "Doubleslap" then

    doAreaCombatHealth(cid, NORMALDAMAGE, getThingPosWithDebug(target), 0, -min, -max, 148)

    elseif spell == "Lovely Kiss" then

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 16)

    local ret = {} ret.id = target ret.cd = 9 ret.check = getPlayerStorageValue(target, conds["Stun"]) ret.eff = 147 ret.spell = spell ret.cond = "Stun"

    addEvent(doMoveDano2, 100, cid, target, NORMALDAMAGE, 0, 0, ret, spell)elseif spell == "Sing" then

    local ret = {}ret.id = 0ret.cd = math.random(6, 10)ret.check = 0ret.first = trueret.cond = "Sleep" --alterado v1.6

    doMoveInArea2(cid, 33, selfArea1, NORMALDAMAGE, 0, 0, spell, ret)

    elseif spell == "Multislap" then

    doAreaCombatHealth(cid, NORMALDAMAGE, getThingPosWithDebug(cid), splash,-min, -max, 3)elseif spell == "Metronome" then

    local spells = {"Shadow Storm", "Electric Storm", "Magma Storm", "Blizzard", "Meteor Mash", "Leaf Storm", "Hydropump", "Falling Rocks"}

  • 7/25/2019 Poke Moves

    38/128

    local random = math.random(1, #spells)

    local randommove = spells[random]local pos = getThingPosWithDebug(cid)pos.y = pos.y - 1

    doSendMagicEffect(pos, 161)

    local function doMetronome(cid, skill)if not isCreature(cid) then return true end

    docastspell(cid, skill) end

    addEvent(doMetronome, 200, cid, randommove)elseif spell == "Sketch 1" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 1) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) elselocal spells = {"Psy Pulse", "Shadow Ball", "Thunder Bolt", "Ember", "Rock Throw", "Razor Leaf", "Bubbles", "Ice Shards", "Egg Bomb", "Poison Bomb"}

    local random = math.random(1, #spells)

    local randommove = spells[random]local pos = getThingPosWithDebug(cid)pos.y = pos.y - 1

    doSendMagicEffect(pos, 0)

    local function doMetronome(cid, skill)if not isCreature(cid) then return true end

    docastspell(cid, skill) end

    addEvent(doMetronome, 200, cid, randommove)

    endelseif spell == "Sketch 2" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 2) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) elselocal spells = {"Mud Bomb", "Cyber Pulse", "Dark Pulse", "Rock Slide", "MagicalLeaf", "Fireball", "Waterball", "Feather Dance"}

    local random = math.random(1, #spells)

    local randommove = spells[random]local pos = getThingPosWithDebug(cid)pos.y = pos.y - 1

    doSendMagicEffect(pos, 0)

    local function doMetronome(cid, skill)if not isCreature(cid) then return true end

  • 7/25/2019 Poke Moves

    39/128

    docastspell(cid, skill) end

    addEvent(doMetronome, 200, cid, randommove)endelseif spell == "Sketch 3" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 3) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) elselocal spells = {"Poison Gas", "Earthquake", "Petal Tornado", "Electro Field", "Flame Circle"}

    local random = math.random(1, #spells)

    local randommove = spells[random]local pos = getThingPosWithDebug(cid)pos.y = pos.y - 1

    doSendMagicEffect(pos, 0)

    local function doMetronome(cid, skill)if not isCreature(cid) then return true end

    docastspell(cid, skill) end

    addEvent(doMetronome, 200, cid, randommove)endelseif spell == "Sketch 4" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 4) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) elselocal spells = {"Thunder", "Night Slash", "Confusion", "Air Slash", "Confusion","Night Shade"}

    local random = math.random(1, #spells)

    local randommove = spells[random]local pos = getThingPosWithDebug(cid)pos.y = pos.y - 1

    doSendMagicEffect(pos, 0)

    local function doMetronome(cid, skill)if not isCreature(cid) then return true end

    docastspell(cid, skill) end

    addEvent(doMetronome, 200, cid, randommove)endelseif spell == "Sketch 5" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 5) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) elselocal spells = {"Solar Beam", "Bullet Seed", "Raging Blast", "Fire Blast", "Bubb

  • 7/25/2019 Poke Moves

    40/128

    le Blast", "Hydro Cannon", "Pin Missile"}

    local random = math.random(1, #spells)

    local randommove = spells[random]local pos = getThingPosWithDebug(cid)pos.y = pos.y - 1

    doSendMagicEffect(pos, 0)

    local function doMetronome(cid, skill)if not isCreature(cid) then return true end

    docastspell(cid, skill) end

    addEvent(doMetronome, 200, cid, randommove)end

    elseif spell == "Sketch 6" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 6) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) elselocal spells = {"Shockwave", "Petal Dance", "Hyper Beam", "Zap Cannon", "Aurora

    Beam", "Ice Beam", "Ground Chop"} local random = math.random(1, #spells)

    local randommove = spells[random]local pos = getThingPosWithDebug(cid)pos.y = pos.y - 1

    doSendMagicEffect(pos, 0)

    local function doMetronome(cid, skill)if not isCreature(cid) then return true end

    docastspell(cid, skill)

    endaddEvent(doMetronome, 200, cid, randommove)

    endelseif spell == "Sketch 7" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 7) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) elselocal spells = {"Fear", "Sunny Day", "Scary Face", "Skull Bash", "Cotton Spore","Sleep Powder","Healing Wish"}

    local random = math.random(1, #spells)

    local randommove = spells[random]local pos = getThingPosWithDebug(cid)pos.y = pos.y - 1

    doSendMagicEffect(pos, 0)

    local function doMetronome(cid, skill)if not isCreature(cid) then return true end

  • 7/25/2019 Poke Moves

    41/128

    docastspell(cid, skill) end

    addEvent(doMetronome, 200, cid, randommove)endelseif spell == "Sketch 8" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 8) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) elselocal spells = {"Reflect", "Charm", "Agility", "Safeguard", "Synthesis", "Emergency Call", "Healarea", "Sing", "Moonblast"}

    local random = math.random(1, #spells)

    local randommove = spells[random]local pos = getThingPosWithDebug(cid)pos.y = pos.y - 1

    doSendMagicEffect(pos, 0)

    local function doMetronome(cid, skill)if not isCreature(cid) then return true end

    docastspell(cid, skill) end

    addEvent(doMetronome, 200, cid, randommove)end

    elseif spell == "Sketch 9" then

    local spells = {"Psychic", "Epicenter", "Mortal Gas", "Hydropump", "Muddy Water"}

    local random = math.random(1, #spells)

    local randommove = spells[random]local pos = getThingPosWithDebug(cid)pos.y = pos.y - 1

    doSendMagicEffect(pos, 0)

    local function doMetronome(cid, skill)if not isCreature(cid) then return true end

    docastspell(cid, skill) end

    addEvent(doMetronome, 200, cid, randommove)

    elseif spell == "Sketch 10" then

    local spells = {"Focus Blast", "Blizzard", "Shadow Storm", "Falling Rocks", "Meteor Mash", "Electric Storm", "Hydro Dance", "Magma Storm", "Draco Meteor", "PsyImpact"}

    local random = math.random(1, #spells)

    local randommove = spells[random]local pos = getThingPosWithDebug(cid)

  • 7/25/2019 Poke Moves

    42/128

    pos.y = pos.y - 1

    doSendMagicEffect(pos, 0)

    local function doMetronome(cid, skill)if not isCreature(cid) then return true end

    docastspell(cid, skill) end

    addEvent(doMetronome, 200, cid, randommove)elseif spell == "Focus" or spell == "Charge" or spell == "Swords Dance" then --alterado v1.4 if spell == "Charge" then doSendAnimatedText(getThingPosWithDebug(cid), "CHARGE", 168) doSendMagicEffect(getThingPosWithDebug(cid), 177) elseif spell == "Swords Dance" then doSendMagicEffect(getThingPosWithDebug(cid), 132)

    else doSendAnimatedText(getThingPosWithDebug(cid), "FOCUS", 144) doSendMagicEffect(getThingPosWithDebug(cid), 132) end setPlayerStorageValue(cid, 253, 1)

    elseif spell == "Growth" then --alterado v1.4 if spell == "Growth" then doSendAnimatedText(getThingPosWithDebug(cid), "Growth", 168) doSendMagicEffect(getThingPosWithDebug(cid), 177) end setPlayerStorageValue(cid, 253, 1)

    --[[elseif spell == "Flame Wheel" then --alterado v1.8 o atk ta lapra baixo agora...

    local function sendFireEff(cid, dir) if not isCreature(cid) then return true end if isSleeping(cid) and getPlayerStorageValue(cid, 3644587) >= 1 then returnfalse end if isWithFear(cid) and getPlayerStorageValue(cid, 3644587) >= 1 then returntrue end doDanoWithProtect(cid, FIREDAMAGE, getPosByDir(getThingPosWithDebug(cid),dir), 0, -min, -max, 15)

    end

    local function doWheel(cid)if not isCreature(cid) then return true endlocal t = {

    [1] = SOUTH, [2] = SOUTHEAST, [3] = EAST, [4] = NORTHEAST, [5] = NORTH, --alterado! [6] = NORTHWEST, [7] = WEST, [8] = SOUTHWEST,

    }for a = 1, 8 do

  • 7/25/2019 Poke Moves

    43/128

    addEvent(sendFireEff, a * 140, cid, t[a])end

    end

    doWheel(cid, false, cid) ]]elseif spell == "Hyper Voice" then

    local ret = {} ret.id = 0 ret.cd = 9 ret.check = 0 ret.eff = 22 ret.spell = spell ret.cond = "Stun"

    doMoveInArea2(cid, 22, tw1, NORMALDAMAGE, min, max, spell, ret)

    elseif spell == "Restore" or spell == "Selfheal" then

    local min = (getCreatureMaxHealth(cid) * 75) / 100local max = (getCreatureMaxHealth(cid) * 85) / 100

    local function doHealArea(cid, min, max)

    local amount = math.random(min, max) if (getCreatureHealth(cid) + amount) >= getCreatureMaxHealth(cid) then amount = -(getCreatureHealth(cid)-getCreatureMaxHealth(cid)) end if getCreatureHealth(cid) ~= getCreatureMaxHealth(cid) then doCreatureAddHealth(cid, amount) doSendAnimatedText(getThingPosWithDebug(cid), "+"..amount.."", 65) end end

    doSendMagicEffect(getThingPosWithDebug(cid), 132) doHealArea(cid, min, max)

    elseif spell == "Aqua Ring" then

    local min = (getCreatureMaxHealth(cid) * 5) / 100local max = (getCreatureMaxHealth(cid) * 7) / 100

    local function doHealOverTime(cid) local amount = math.random(min, max) if (getCreatureHealth(cid) + amount) >= getCreatureMaxHealth(cid) then amount = -(getCreatureHealth(cid)-getCreatureMaxHealth(cid))

    return false end if getCreatureHealth(cid) < getCreatureMaxHealth(cid) then doCreatureAddHealth(cid, amount)

    doSendAnimatedText(getThingPosWithDebug(cid), "+"..amount.."", 65)doSendMagicEffect(getThingPosWithDebug(cid), 132) end end

    for a = 0, 24 doaddEvent(doHealOverTime, 500*a, cid) end

  • 7/25/2019 Poke Moves

    44/128

    elseif spell == "Healarea" then

    local min = (getCreatureMaxHealth(cid) * 50) / 100local max = (getCreatureMaxHealth(cid) * 60) / 100

    local function doHealArea(cid, min, max)

    local amount = math.random(min, max) if (getCreatureHealth(cid) + amount) >= getCreatureMaxHealth(cid) then amount = -(getCreatureHealth(cid)-getCreatureMaxHealth(cid)) end if getCreatureHealth(cid) ~= getCreatureMaxHealth(cid) then doCreatureAddHealth(cid, amount) doSendAnimatedText(getThingPosWithDebug(cid), "+"..amount.."", 65) end end

    local pos = getPosfromArea(cid, heal) local n = 0 doHealArea(cid, min, max)

    while n < #pos do n = n+1 thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253}

    local pid = getThingFromPosWithProtect(thing)doSendMagicEffect(pos[n], 12)

    if isCreature(pid) then if isSummon(cid) and (isSummon(pid) or isPlayer(pid)) then if canAttackOther(cid, pid) == "Cant" then doHealArea(pid, min, max) end

    elseif ehMonstro(cid) and ehMonstro(pid) then doHealArea(pid, min, max) end end

    end

    elseif spell == "Milk Drink" then

    local min = (getCreatureMaxHealth(cid) * 50) / 100local max = (getCreatureMaxHealth(cid) * 60) / 100

    local function doHealArea(cid, min, max)

    local amount = math.random(min, max) if (getCreatureHealth(cid) + amount) >= getCreatureMaxHealth(cid) then amount = -(getCreatureHealth(cid)-getCreatureMaxHealth(cid)) end if getCreatureHealth(cid) ~= getCreatureMaxHealth(cid) then doCreatureAddHealth(cid, amount)

    doSendAnimatedText(getThingPosWithDebug(cid), "+"..amount.."", 65) end end

    local pos = getPosfromArea(cid, heal) local n = 0 doHealArea(cid, min, max)

    while n < #pos do n = n+1

  • 7/25/2019 Poke Moves

    45/128

    thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253} local pid = getThingFromPosWithProtect(thing)

    doSendMagicEffect(pos[n], 12) if isCreature(pid) then if isSummon(cid) and (isSummon(pid) or isPlayer(pid)) then if canAttackOther(cid, pid) == "Cant" then doHealArea(pid, min, max) end

    elseif ehMonstro(cid) and ehMonstro(pid) then doHealArea(pid, min, max) end end

    endelseif spell == "Toxic" thendoMoveInArea2(cid, 114, reto5, POISONDAMAGE, min, max, spell)

    elseif spell == "Absorb" then

    local life = getCreatureHealth(target)

    doAreaCombatHealth(cid, GRASSDAMAGE, getThingPosWithDebug(target), 0, -m

    in, -max, 14)local newlife = life - getCreatureHealth(target)

    doSendMagicEffect(getThingPosWithDebug(cid), 14)if newlife >= 1 then doCreatureAddHealth(cid, newlife)

    doSendAnimatedText(getThingPosWithDebug(cid), "+"..newlife.."", 32)end

    elseif spell == "Poison Bomb" then

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target),

    14) doDanoWithProtectWithDelay(cid, target, POISONDAMAGE, min, max, 20, bombWee2)

    elseif spell == "Poison Gas" then

    local dmg = isSummon(cid) and getMasterLevel(cid)+getPokemonBoost(cid) or getPokemonLevel(cid)

    local ret = {id = 0, cd = 13, eff = 34, check = 0, spell = spell, cond = "Miss"}local ret2 = {id = 0, cd = 13, check = 0, damage = dmg, cond = "Poison"}

    --rever isso ainda!!

    local function gas(cid) doMoveInArea2(cid, 114, confusion, POISONDAMAGE, 0, 0, spell, ret) doMoveInArea2(cid, 0, confusion, POISONDAMAGE, min, max, spel

    l)end

    times = {0, 500, 1000, 1500, 2300, 2800, 3300, 3800, 4600, 5100, 5600, 6100, 6900, 7400, 7900, 8400, 9200, 10000}

    for i = 1, #times do

  • 7/25/2019 Poke Moves

    46/128

    addEvent(gas, times[i], cid)end

    elseif spell == "Petal Dance" then

    doMoveInAreaMulti(cid, 21, 245, bullet, bulletDano, GRASSDAMAGE, min, max)

    elseif spell == "Dynamic Punch" then

    local pos = getThingPosWithDebug(cid)local areas = {rock5, rock4, rock3, rock2, rock1, rock5, rock4, rock3, rock2, rock1}

    for i = 0, 9 do addEvent(doMoveInArea2, i*400, cid, 112, areas[i+1], FIGHTINGDAMAGE, min, max, spell) addEvent(doMoveInArea2, i*410, cid, 112, areas[i+1], FIGHTINGDAMAGE, 0, 0, spell)end

    elseif spell == "Revenge" then

    local function doRevenge(cid)if not isCreature(cid) then return false endif isSleeping(cid) and getPlayerStorageValue(cid, 3644587) >= 1 then return false endif isWithFear(cid) and getPlayerStorageValue(cid, 3644587) >= 1 then return trueendlocal rev = getThingPosWithDebug(cid)rev.x = rev.x+1rev.y = rev.y+1doSendMagicEffect(rev, 99)

    doAreaCombatHealth(cid, FIGHTINGDAMAGE, getThingPosWithDebug(cid), splash, -min, -max, 255)

    end

    times = {0, 500, 1000, 1500, 2300}

    setPlayerStorageValue(cid, 3644587, 1)addEvent(setPlayerStorageValue, 10000, cid, 3644587, -1)for i = 1, #times do --alterado v1.4addEvent(doRevenge, times[i], cid)end

    elseif spell == "Close Combat" then

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 26)doDanoInTargetWithDelay(cid, target, FIGHTINGDAMAGE, -min, -max, 237) -

    -alterado v1.7doSendAnimatedText(getThingPosWithDebug(cid), "FOCUS", 144)setPlayerStorageValue(cid, 253, 1)

    elseif spell == "Sand Storm" then

    local master = isSummon(cid) and getCreatureMaster(cid) or cid

  • 7/25/2019 Poke Moves

    47/128

    ------------local ret = {}ret.id = 0ret.cd = 9ret.check = 0ret.eff = 34ret.cond = "Silence"---local function doFall(cid)for rocks = 1, 42 do --62 addEvent(fall, rocks*35, cid, master, GROUNDDAMAGE, 22, 158)endend---local function doRain(cid)if isSummon(cid) then

    doCureBallStatus(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "all")end --cura statusdoCureStatus(cid, "all")---setPlayerStorageValue(cid, 253, 1) --focusdoSendMagicEffect(getThingPosWithDebug(cid), 132)---doMoveInArea2(cid, 0, confusion, GROUNDDAMAGE, 0, 0, spell, ret)

    end---addEvent(doFall, 200, cid)addEvent(doRain, 1000, cid)

    elseif spell == "Powder Snow" thensnowP = getThingPosWithDebug(cid)

    local ret = {} ret.id = 0 ret.cd = 10 ret.check = 0

    ret.eff = 43 ret.spell = spell ret.cond = "Slow"

    doMoveInArea2(cid, 0, check, ICEDAMAGE, min, max, spell, ret) doSendMagicEffect({x = snowP.x + 1, y = snowP.y, z = snowP.z}, 206)

    elseif spell == "Slash" then

    doAreaCombatHealth(cid, NORMALDAMAGE, getThingPosWithDebug(target), 0, -min, -max, 159)

    elseif spell == "X-Scissor" then

    local a = getThingPosWithDebug(cid)local X = {{{x = a.x+1, y = a.y, z = a.z}, 16}, --norte{{x = a.x+2, y = a.y+1, z = a.z}, 221}, --leste{{x = a.x+1, y = a.y+2, z = a.z}, 223}, --sul{{x = a.x, y = a.y+1, z = a.z}, 243}, --oeste}

  • 7/25/2019 Poke Moves

    48/128

    local pos = X[mydir+1]

    for b = 1, 3 do addEvent(doSendMagicEffect, b * 70, pos[1], pos[2])end

    doMoveInArea2(cid, 2, xScissor, BUGDAMAGE, min, max, spell)

    elseif spell == "Psychic" then

    doDanoWithProtect(cid, psyDmg, getThingPosWithDebug(cid), selfArea2, min, max, 133)

    elseif spell == "Pay Day" then

    --alterado v1.7local function doThunderFall(cid, frompos, target)

    if not isCreature(target) or not isCreature(cid) then return true end

    local pos = getThingPosWithDebug(target)local ry = math.abs(frompos.y - pos.y)doSendDistanceShoot(frompos, getThingPosWithDebug(target), 39)addEvent(doDanoInTarget, ry * 11, cid, target, NORMALDAMAGE, min

    , max, 28) --alterado v1.7

    endlocal function doThunderUp(cid, target)

    if not isCreature(target) or not isCreature(cid) then return true end

    local pos = getThingPosWithDebug(target)local mps = getThingPosWithDebug(cid)local xrg = math.floor((pos.x - mps.x) / 2)local topos = mpstopos.x = topos.x + xrglocal rd = 7topos.y = topos.y - rddoSendDistanceShoot(getThingPosWithDebug(cid), topos, 39)

    addEvent(doThunderFall, rd * 49, cid, topos, target)end

    setPlayerStorageValue(cid, 3644587, 1)addEvent(setPlayerStorageValue, 350, cid, 3644587, -1)

    for thnds = 1, 2 doaddEvent(doThunderUp, thnds * 155, cid, target)

    end

    elseif spell == "Psywave" then

    doMoveInArea2(cid, 133, db1, psyDmg, min, max, spell)

    elseif spell == "Triple Kick" or spell == "Triple Kick Lee" then

    doDanoWithProtect(cid, FIGHTINGDAMAGE, getThingPosWithDebug(target), 0,-min, -max, 110)

    elseif spell == "Karate Chop" then

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target),39)

    doDanoInTargetWithDelay(cid, target, FIGHTINGDAMAGE, -min, -max, 113) -

  • 7/25/2019 Poke Moves

    49/128

    -alterado v1.7

    elseif spell == "Ground Chop" then

    local p = getThingPosWithDebug(cid)local d = isCreature(target) and getCreatureDirectionToTarget(cid, target) or getCreatureLookDir(cid)

    function sendAtk(cid, area, area2, eff) --alterado v1.6if isCreature(cid) then if not isSightClear(p, area, false) then return true end doAreaCombatHealth(cid, FIGHTINGDAMAGE, area, 0, 0, 0, eff)

    doAreaCombatHealth(cid, FIGHTINGDAMAGE, area2, whirl3, -min, -max, 255) --alterado v1.6endend

    for a = 0, 4 do

    local t = {[0] = {99, {x=p.x+1, y=p.y-(a+1), z=p.z}, {x=p.x, y=p.y-(a+1), z=p.z}},--alterado v1.6

    [1] = {99, {x=p.x+(a+2), y=p.y+1, z=p.z}, {x=p.x+(a+1), y=p.y, z=p.z}},[2] = {99, {x=p.x+1, y=p.y+(a+2), z=p.z}, {x=p.x, y=p.y+(a+1), z=p.z}},

    [3] = {99, {x=p.x-(a+1), y=p.y+1, z=p.z}, {x=p.x-(a+1), y=p.y, z=p.z}}}addEvent(sendAtk, 270*a, cid, t[d][2], t[d][3], t[d][1]) --alterado v1.6end

    elseif spell == "Mega Punch" then

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 39)

    doDanoInTargetWithDelay(cid, target, FIGHTINGDAMAGE, -min, -max, 112) --alterado v1.7elseif spell == "Tri Flames" then

    local ret = {}ret.id = 0ret.cd = 9ret.check = 0ret.eff = 39ret.cond = "Silence"

    doMoveInArea2(cid, 6, triflames, FIREDAMAGE, min, max, spell, ret)elseif spell == "War Dog" then

    local ret = {}

    ret.id = cid ret.cd = 15 ret.eff = 28 ret.check = 0 ret.buff = spell ret.first = true

    doCondition2(ret)elseif spell == "Hypnosis" then

  • 7/25/2019 Poke Moves

    50/128

    local ret = {}ret.id = targetret.cd = math.random(6, 9)ret.check = getPlayerStorageValue(target, conds["Sleep"])ret.first = trueret.cond = "Sleep"

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target),24) addEvent(doMoveDano2, 150, cid, target, PSYCHICDAMAGE, 0, 0, ret, spell)

    elseif spell == "Dizzy Punch" then

    local rounds = getPokemonLevel(cid) / 12 rounds = rounds + 2

    local ret = {} ret.id = target ret.check = getPlayerStorageValue(target, conds["Confusion"]) ret.cd = rounds ret.cond = "Confusion"

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target),

    26) doDanoWithProtect(cid, FIGHTINGDAMAGE, getThingPosWithDebug(target), 0, -min,-max, 112) addEvent(doMoveDano2, 50, cid, target, NORMALDAMAGE, 0, 0, ret, spell)

    elseif spell == "Ice Punch" thenlocal ret = {}ret.id = targetret.cd = 9ret.eff = 43ret.check = getPlayerStorageValue(target, conds["Slow"])ret.first = true

    ret.cond = "Slow"

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target),28) doSendMagicEffect(getThingPosWithDebug(target), 112) doDanoWithProtectWithDelay(cid, target, ICEDAMAGE, min, max, 43) addEvent(doMoveDano2, 50, cid, target, ICEDAMAGE, 0, 0, ret, spell)

    elseif spell == "Ice Beam" then

    local a = isCreature(target) and getCreatureDirectionToTarget(cid, target) or getCreatureLookDir(cid)local p = getThingPosWithDebug(cid)

    local t = {[0] = {97, {x=p.x+1, y=p.y-1, z=p.z}},[1] = {96, {x=p.x+6, y=p.y+1, z=p.z}},[2] = {97, {x=p.x+1, y=p.y+6, z=p.z}},[3] = {96, {x=p.x-1, y=p.y+1, z=p.z}},}

    local ret = {}ret.id = 0ret.cd = 9

  • 7/25/2019 Poke Moves

    51/128

    ret.eff = 43ret.check = 0ret.first = trueret.cond = "Slow"

    doMoveInArea2(cid, 0, triplo6, ICEDAMAGE, min, max, spell, ret)doSendMagicEffect(t[a][2], t[a][1])

    elseif spell == "Psy Pulse" or spell == "Cyber Pulse" or spell == "Dark Pulse" then

    damage = skill == "Dark Pulse" and DARKDAMAGE or psyDmg

    local function doPulse(cid, eff)if not isCreature(cid) then return true end doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target),3) doDanoInTargetWithDelay(cid, target, damage, min, max, eff) --alterado v1.7end

    if spell == "Cyber Pulse" then eff = 11

    elseif spell == "Dark Pulse" then eff = 222 --efeito n eh esse mas... ;p else eff = 133 end

    addEvent(doPulse, 0, cid, eff)addEvent(doPulse, 250, cid, eff)

    elseif spell == "Psyusion" then

    local rounds = math.random(4, 7) rounds = rounds + math.floor(getPokemonLevel(cid) / 35)

    local eff = {136, 133, 136, 133, 137} local area = {psy1, psy2, psy3, psy4, psy5}

    local ret = {} ret.id = 0 ret.check = 0 ret.cd = rounds ret.cond = "Confusion"

    setPlayerStorageValue(cid, 3644587, 1) addEvent(setPlayerStorageValue, 4*400, cid, 3644587, -1) for i = 0, 4 do addEvent(doMoveInArea2, i*400, cid, eff[i+1], area[i+1], psyDmg, min,

    max, spell, ret) endelseif spell == "Triple Punch" then

    doDanoWithProtect(cid, FIGHTINGDAMAGE, getThingPosWithDebug(target), 0,-min, -max, 110)

    elseif spell == "Fist Machine" then

  • 7/25/2019 Poke Moves

    52/128

    local mpos = getThingPosWithDebug(cid)local b = isCreature(target) and getCreatureDirectionToTarget(cid, targe

    t) or getCreatureLookDir(cid)local effect = 0local xvar = 0local yvar = 0

    if b == SOUTH theneffect = 218yvar = 2

    elseif b == NORTH theneffect = 217

    elseif b == WEST theneffect = 216

    elseif b == EAST theneffect = 215xvar = 2

    end

    mpos.x = mpos.x + xvarmpos.y = mpos.y + yvar

    doSendMagicEffect(mpos, effect)doMoveInArea2(cid, 0, machine, FIGHTINGDAMAGE, min, max, spell)

    elseif spell == "Destroyer Hand" then

    doMoveInAreaMulti(cid, 26, 111, bullet, bulletDano, FIGHTINGDAMAGE, min,max)elseif spell == "Rock Throw" then

    local effD = getSubName(cid, target) == "Shiny Onix" and 0 or 11local eff = getSubName(cid, target) == "Shiny Onix" and 176 or 44 --alterado v1.6.1local eff = getSubName(cid, target) == "Crystal Steelix" and 176 or 44

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), effD)doDanoInTargetWithDelay(cid, target, ROCKDAMAGE, min, max, eff) --altera

    do v1.7

    elseif spell == "Rock Slide" or spell == "Stone Edge" then

    atk = {["Rock Slide"] = {11, 44, 0, 176},["Stone Edge"] = {11, 239}}

    local effD = getSubName(cid, target) == "Shiny Onix" and atk[spell][3] or atk[sp

    ell][1]local eff = getSubName(cid, target) == "Shiny Onix" and atk[spell][4] or atk[spell][2]local eff = getSubName(cid, target) == "Crystal Steelix" and atk[spell][5] or atk[spell][3] --alterado v1.6.1

    --alterado v1.7local function doRockFall(cid, frompos, target)

    if not isCreature(target) or not isCreature(cid) then return true end

  • 7/25/2019 Poke Moves

    53/128

    local pos = getThingPosWithDebug(target)local ry = math.abs(frompos.y - pos.y)doSendDistanceShoot(frompos, getThingPosWithDebug(target), effD)addEvent(doDanoInTarget, ry * 11, cid, target, ROCKDAMAGE, min,

    max, eff) --alterado v1.7end

    local function doRockUp(cid, target)if not isCreature(target) or not isCreature(cid) then re

    turn true endlocal pos = getThingPosWithDebug(target)local mps = getThingPosWithDebug(cid)local xrg = math.floor((pos.x - mps.x) / 2)local topos = mpstopos.x = topos.x + xrglocal rd = 7topos.y = topos.y - rddoSendDistanceShoot(getThingPosWithDebug(cid), topos, effD)addEvent(doRockFall, rd * 49, cid, topos, target)end

    setPlayerStorageValue(cid, 3644587, 1) addEvent(setPlayerStorageValue, 350, cid, 3644587, -1)

    for thnds = 1, 2 do

    addEvent(doRockUp, thnds * 155, cid, target)end

    elseif spell == "Falling Rocks" then

    local effD = getSubName(cid, target) == "Shiny Onix" and 0 or 11local eff = getSubName(cid, target) == "Shiny Onix" and 176 or 44local eff = getSubName(cid, target) == "Crystal Steelix" and 176 or 44

    local master = isSummon(cid) and getCreatureMaster(cid) or cid------------

    local function doFall(cid)

    for rocks = 1, 62 do addEvent(fall, rocks*35, cid, master, ROCKDAMAGE, effD, eff)endend

    for up = 1, 10 doaddEvent(upEffect, up*75, cid, effD)

    endaddEvent(doFall, 450, cid)addEvent(doDanoWithProtect, 1400, cid, ROCKDAMAGE, getThingPosWithDebug(cid), waterarea, -min, -max, 0)

    elseif spell == "Selfdestruct" then

    local function death(cid)if isCreature(cid) then if pokeHaveReflect(cid) then return true end --alt

    erado v1.6 doCreatureAddHealth(cid, -getCreatureMaxHealth(cid))end

    end

    doMoveInArea2(cid, 5, selfArea1, NORMALDAMAGE, min, max, spell) --alt

  • 7/25/2019 Poke Moves

    54/128

    erado v1.6 addEvent(death, 300, cid)

    elseif spell == "Crusher Stomp" thenlocal pL = getThingPosWithDebug(cid)pL.x = pL.x+5pL.y = pL.y+1-----------------local pO = getThingPosWithDebug(cid)pO.x = pO.x-3pO.y = pO.y+1------------------local pN = getThingPosWithDebug(cid)pN.x = pN.x+1pN.y = pN.y+5-----------------local pS = getThingPosWithDebug(cid)pS.x = pS.x+1pS.y = pS.y-3

    local po = {pL, pO, pN, pS}local po2 = {{x = pL.x, y = pL.y-1, z = pL.z},

    {x = pO.x, y = pO.y-1, z = pO.z},{x = pN.x-1, y = pN.y, z = pN.z},{x = pS.x-1, y = pS.y, z = pS.z},}

    local ret = {}ret.id = 0ret.cd = 9ret.check = 0ret.eff = 34ret.spell = spellret.cond = "Stun"

    for i = 1, 4 do doSendMagicEffect(po[i], 127) doAreaCombatHealth(cid, GROUNDDAMAGE, po2[i], crusher, -min, -max, 255)enddoMoveInArea2(cid, 118, stomp, GROUNDDAMAGE, min, max, spell, ret)

    elseif spell == "Water Pulse" then

    doDanoWithProtect(cid, WATERDAMAGE, getThingPosWithDebug(cid), selfArea2, min, max, 155)

    elseif spell == "Sonicboom" then

    local function doBoom(cid)if not isCreature(cid) then return true end doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target),33) doDanoInTargetWithDelay(cid, target, NORMALDAMAGE, min, max, 3) --alteradov1.7end

    addEvent(doBoom, 0, cid) addEvent(doBoom, 250, cid)

  • 7/25/2019 Poke Moves

    55/128

    elseif spell == "Stickmerang" then

    doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target),34) doDanoInTargetWithDelay(cid, target, FLYINGDAMAGE, min, max, 212) --alteradov1.7

    elseif spell == "Stickslash" then

    local function sendStickEff(cid, dir) if not isCreature(cid) then return true end doAreaCombatHealth(cid, FLYINGDAMAGE, getPosByDir(getThingPosWithDebug(cid), dir), 0, -min, -max, 212)

    end

    local function doStick(cid)if not isCreature(cid) then return true endlocal t = { [1] = SOUTHWEST, [2] = SOUTH, [3] = SOUTHEAST, [4] = EAST, [5] = NORTHEAST,

    [6] = NORTH, [7] = NORTHWEST, [8] = WEST, [9] = SOUTHWEST,

    }for a = 1, 9 do

    addEvent(sendStickEff, a * 140, cid, t[a])end

    end

    doStick(cid, false, cid)elseif spell == "Stick Throw" then

    local area = {Throw01, Throw02, Throw03, Throw04, Throw03, Throw02, Throw01}

    for i = 0, 6 do addEvent(doMoveInArea2, i*400, cid, 212, area[i+1], FLYINGDAMAGE, min, max,spell)end

    elseif spell == "Cannon Ball" then

    local area = {Throw01, Throw02, Throw03, Throw04, Throw03, Throw02, Throw01}

    for i = 0, 6 do

    addEvent(doMoveInArea2, i*400, cid, 100, area[i+1], GROUNDDAMAGE, min, max,spell)end

    elseif spell == "Pluck" then

    doSendDistanceShoot(getThingPosWithDebug(cid), get


Top Related