Ir para conteúdo
Faça parte da equipe! (2024) ×
Conheça nossa Beta Zone! Novas áreas a caminho! ×
  • Quem está por aqui   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.

[Talkactions] Sistema do M1 até o M6 + Tutorial de Edição


~FreeGeels'~™
 Compartilhar

Posts Recomendados

Bom, hoje eu resolvi postar aqui na Web Cheats, para que vocês coloquem nos seus Otservers de pokemon.

Desculpe se fiz alguma bobagem ou copiei de alguém, pois não copiei, se tiver existente o tópico pode fechar, deletar..

Do m4 até m6 decidir fazer diferente, dessa vez quem irá colocar as magias , combat e level necessário será vocês.

 

Estou fazendo isso para que vocês entendam melhor o comando, e caso precisarem editar que não precisem e ajuda.

 

No final do Tópico estará os tutoriais.

 

 

M1

 

 

----------------NORMAL Quick Attack------------------------------

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 111)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

---------------- Wirlwind -------------------------------

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 42)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

 

 

arr2 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0},

{0, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0},

{0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

}

 

local area2 = createCombatArea(arr2)

setCombatArea(combat2, area2)

----------------------------normal Scratch -------------------------

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 142)

setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

--------------------------- Dragon Claw-----------------------------

local combat4 = createCombatObject()

setCombatParam(combat4, COMBAT_PARAM_EFFECT, 141)

setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

-------------------------- HeadButt -----------------------------

local combat5 = createCombatObject()

setCombatParam(combat5, COMBAT_PARAM_EFFECT, 16)

setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

-------------------------- String Shot -----------------------------

local combat6 = createCombatObject()

setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat6, COMBAT_PARAM_EFFECT, 137)

setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

------------------------- Horn Attack ------------------------------

local combat7 = createCombatObject()

setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat7, COMBAT_PARAM_EFFECT, 59)

setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

--------------------------- Bite ------------------------------

local combat8 = createCombatObject()

setCombatParam(combat8, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat8, COMBAT_PARAM_EFFECT, 138)

setCombatParam(combat8, COMBAT_PARAM_DISTANCEEFFECT, 138)

setCombatFormula(combat8, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

-------------------------- Mega Kick --------------------------

local combat9 = createCombatObject()

setCombatParam(combat9, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat9, COMBAT_PARAM_EFFECT, 112)

setCombatFormula(combat9, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

-------------------------- Razor Leaf -----------------------

local combat10 = createCombatObject()

setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat10, COMBAT_PARAM_EFFECT, 79)

setCombatParam(combat10, COMBAT_PARAM_DISTANCEEFFECT, 5)

setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

------------------------- Bubbles----------------------------

local combat11 = createCombatObject()

setCombatParam(combat11, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat11, COMBAT_PARAM_EFFECT, 68)

setCombatParam(combat11, COMBAT_PARAM_DISTANCEEFFECT, 2)

setCombatFormula(combat11, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

------------------------ String Shot ------------------------

local combat12 = createCombatObject()

setCombatParam(combat12, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat12, COMBAT_PARAM_EFFECT, 137)

setCombatParam(combat12, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat12, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

------------------------ Horn Attack -----------------------

local combat13 = createCombatObject()

setCombatParam(combat13, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat13, COMBAT_PARAM_EFFECT, 9)

setCombatParam(combat13, COMBAT_PARAM_DISTANCEEFFECT, 25)

setCombatFormula(combat13, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

------------------------ Super Sonic -----------------------

local combat14 = createCombatObject()

setCombatParam(combat14, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat14, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat14, COMBAT_PARAM_DISTANCEEFFECT, 24)

setCombatFormula(combat14, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

----------------------- Sand Attack -----------------------

local combat15 = createCombatObject()

setCombatParam(combat15, COMBAT_PARAM_EFFECT, 122)

setCombatParam(combat15, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat15, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

 

 

arr15 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

}

 

local area15 = createCombatArea(arr15)

setCombatArea(combat15, area15)

 

 

 

 

local c = {

["Bulbasaur"] = {x = {

m1 = combat1,

spell = "Quick Attack",

minLv = 20,

distance = 3

}

},

["Ivysaur"] = {x = {

m1 = combat1,

spell = "Quick Attack",

minLv = 40,

distance = 3

}

},

["Venusaur"] = {x = {

m1 = combat1,

spell = "Quick Attack",

minLv = 85,

distance = 3

}

},

["Charmander"] = {x = {

m1 = combat3,

spell = "Scratch",

minLv = 20,

distance = 3

}

},

["Charmeleon"] = {x = {

m1 = combat3,

spell = "Scratch",

minLv = 40,

distance = 3

}

},

["Charizard"] = {x = {

m1 = combat4,

spell = "Dragon Claw",

minLv = 85,

distance = 3

}

},

["Squirtle"] = {x = {

m1 = combat1,

spell = "Headbutt",

minLv = 20,

distance = 3

}

},

["Wartortle"] = {x = {

m1 = combat1,

spell = "Headbutt",

minLv = 40,

distance = 3

}

},

["Blastoise"] = {x = {

m1 = combat1,

spell = "Headbutt",

minLv = 85,

distance = 3

}

},

["Caterpie"] = {x = {

m1 = combat1,

spell = "Headbutt",

minLv = 1,

distance = 3

}

},

["Metapod"] = {x = {

m1 = combat12,

spell = "String Shot",

minLv = 15,

distance = 3

}

},

["Butterfree"] = {x = {

m1 = combat12,

spell = "String Shot",

minLv = 30,

distance = 3

}

},

["Weedle"] = {x = {

m1 = combat7,

spell = "Horn Attack",

minLv = 1,

distance = 3

}

},

["Kakuna"] = {x = {

m1 = combat12,

spell = "String Shot",

minLv = 15,

distance = 3

}

},

["Beedrill"] = {x = {

m1 = combat12,

spell = "String Shot",

minLv = 25,

distance = 3

}

},

["Pidgey"] = {x = {

m1 = combat1,

spell = "Quick Attack",

minLv = 1,

distance = 3

}

},

["Pidgeotto"] = {x = {

m1 = combat1,

spell = "Quick Attack",

minLv = 20,

distance = 3

}

},

["Pidgeot"] = {x = {

m1 = combat1,

spell = "Quick Attack",

minLv = 65,

distance = 3

}

},

["Rattata"] = {x = {

m1 = combat1,

spell = "Quick Attack",

minLv = 1,

distance = 3

}

},

["Raticate"] = {x = {

m1 = combat1,

spell = "Quick Attack",

minLv = 25,

distance = 3

}

},

["Spearow"] = {x = {

m1 = combat1,

spell = "Quick Attack",

minLv = 10,

distance = 3

}

},

["Fearow"] = {x = {

m1 = combat1,

spell = "Quick Attack",

minLv = 50,

distance = 3

}

},

["Ekans"] = {x = {

m1 = combat8,

spell = "Bite",

minLv = 15,

distance = 3

}

},

["Arbok"] = {x = {

m1 = combat8,

spell = "Bite",

minLv = 35,

distance = 3

}

},

["Pikachu"] = {x = {

m1 = combat1,

spell = "Quick Attack",

minLv = 20,

distance = 3

}

},

["Raichu"] = {x = {

m1 = combat9,

spell = "Mega Kick",

minLv = 50,

distance = 3

}

},

["Sandshrew"] = {x = {

m1 = combat15,

spell = "Sand Attack",

minLv = 20,

distance = 3

}

},

["Sandslash"] = {x = {

m1 = combat15,

spell = "Sand Attack",

minLv = 55,

distance = 3

}

}

}

 

 

function onSay(cid, var)

local summ = getCreatureSummons(cid)

if #summ == 0 then

return doPlayerSendCancel(cid, "Sorry, but you need a pokemon.")

end

 

for i = 1, #summ do

for name, _ in pairs© do

if getCreatureName(summ):lower() == name:lower() then

local con = c[name].x

if getPlayerLevel(cid) < con.minLv then

return doPlayerSendCancel(cid, "Sorry, but you must be level " .. con.minLv .. " or higher to cast.") and doSendMagicEffect(getThingPos(cid), 2)

end

local distance = (not con.distance) and 1 or con.distance

 

if not isCreature(getCreatureTarget(cid)) or getCreatureTarget(cid) == summ then

return doPlayerSendCancel(cid, "Invalid target.") and doSendMagicEffect(getThingPos(cid), 2)

end

 

if getDistanceBetween(getThingPos(summ), getThingPos(getCreatureTarget(cid))) > distance then

return doPlayerSendCancel(cid, "Sorry, your pokemon is too far away.") and doSendMagicEffect(getThingPos(cid), 2)

end

 

if getPlayerStorageValue(cid, 20000) <= os.time() then

doPlayerSetStorageValue(cid, 20000, os.time()+5)

doCombat(summ, con.m1, numberToVariant(getCreatureTarget(cid)))

doCreatureSay(cid, name .. ", " .. con.spell .. ".")

end

 

doPlayerSendTextMessage(cid,26,"Tempo para usar M1 denovo: "..(getPlayerStorageValue(cid, 23000)-os.time()).." sec.")

doSendMagicEffect(getThingPos(cid), 2)

end

end

end

 

return true

end

 

 

M2

 

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 111)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 42)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

 

 

arr2 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0},

{0, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0},

{0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

}

 

local area2 = createCombatArea(arr2)

setCombatArea(combat2, area2)

 

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 142)

setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

 

local combat4 = createCombatObject()

setCombatParam(combat4, COMBAT_PARAM_EFFECT, 141)

setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

 

local combat5 = createCombatObject()

setCombatParam(combat5, COMBAT_PARAM_EFFECT, 16)

setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

 

local combat6 = createCombatObject()

setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat6, COMBAT_PARAM_EFFECT, 137)

setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

 

local combat7 = createCombatObject()

setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat7, COMBAT_PARAM_EFFECT, 59)

setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

 

local combat8 = createCombatObject()

setCombatParam(combat8, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat8, COMBAT_PARAM_EFFECT, 138)

setCombatParam(combat8, COMBAT_PARAM_DISTANCEEFFECT, 138)

setCombatFormula(combat8, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

 

local combat9 = createCombatObject()

setCombatParam(combat9, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat9, COMBAT_PARAM_EFFECT, 112)

setCombatFormula(combat9, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

 

local combat10 = createCombatObject()

setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat10, COMBAT_PARAM_EFFECT, 79)

setCombatParam(combat10, COMBAT_PARAM_DISTANCEEFFECT, 5)

setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

 

local combat11 = createCombatObject()

setCombatParam(combat11, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat11, COMBAT_PARAM_EFFECT, 68)

setCombatParam(combat11, COMBAT_PARAM_DISTANCEEFFECT, 2)

setCombatFormula(combat11, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

 

local combat12 = createCombatObject()

setCombatParam(combat12, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat12, COMBAT_PARAM_EFFECT, 137)

setCombatParam(combat12, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat12, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

 

local combat13 = createCombatObject()

setCombatParam(combat13, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat13, COMBAT_PARAM_EFFECT, 9)

setCombatParam(combat13, COMBAT_PARAM_DISTANCEEFFECT, 25)

setCombatFormula(combat13, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

 

local combat14 = createCombatObject()

setCombatParam(combat14, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat14, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat14, COMBAT_PARAM_DISTANCEEFFECT, 24)

setCombatFormula(combat14, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

 

local combat15 = createCombatObject()

setCombatParam(combat15, COMBAT_PARAM_EFFECT, 122)

setCombatParam(combat15, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat15, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -5.5, 0)

 

 

arr15 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

}

 

local area15 = createCombatArea(arr15)

setCombatArea(combat15, area15)

 

 

 

local c = {

["Bulbasaur"] = {x = {

m2 = combat10,

spell = "Razor Leaf",

minLv = 20,

distance = 3

}

},

["Ivysaur"] = {x = {

m2 = combat10,

spell = "Razor Leaf",

minLv = 40,

distance = 3

}

},

["Venusaur"] = {x = {

m2 = combat10,

spell = "Razor Leaf",

minLv = 85,

distance = 3

}

},

["Charmander"] = {x = {

m2 = combat4,

spell = "Ember",

minLv = 20,

distance = 3

}

},

["Charmeleon"] = {x = {

m2 = combat4,

spell = "Ember",

minLv = 40,

distance = 3

}

},

["Charizard"] = {x = {

m2 = combat4,

spell = "Ember",

minLv = 85,

distance = 3

}

},

["Squirtle"] = {x = {

m2 = combat1,

spell = "Bubbles",

minLv = 20,

distance = 3

}

},

["Wartortle"] = {x = {

m2 = combat1,

spell = "Bubbles",

minLv = 40,

distance = 3

}

},

["Blastoise"] = {x = {

m2 = combat1,

spell = "Bubbles",

minLv = 85,

distance = 3

}

},

["Caterpie"] = {x = {

m2 = combat6,

spell = "String Shot",

minLv = 1,

distance = 3

}

},

["Metapod"] = {x = {

m2 = combat5,

spell = "Headbutt",

minLv = 15,

distance = 3

}

},

["Butterfree"] = {x = {

m2 = combat14,

spell = "Super Sonic",

minLv = 30,

distance = 3

}

},

["Weedle"] = {x = {

m2 = combat6,

spell = "String Shot",

minLv = 1,

distance = 3

}

},

["Kakuna"] = {x = {

m2 = combat5,

spell = "Headbutt",

minLv = 15,

distance = 3

}

},

["Beedrill"] = {x = {

m2 = combat5,

spell = "Poison Sting",

minLv = 25,

distance = 3

}

},

["Pidgey"] = {x = {

m2 = combat15,

spell = "Sand Attack",

minLv = 1,

distance = 3

}

},

["Pidgeotto"] = {x = {

m2 = combat15,

spell = "Sand Attack",

minLv = 20,

distance = 3

}

},

["Pidgeot"] = {x = {

m2 = combat15,

spell = "Sand Attack",

minLv = 65,

distance = 3

}

},

["Rattata"] = {x = {

m2 = combat8,

spell = "Bite",

minLv = 1,

distance = 3

}

},

["Raticate"] = {x = {

m2 = combat8,

spell = "Bite",

minLv = 25,

distance = 3

}

},

["Spearow"] = {x = {

m2 = combat15,

spell = "Sand Attack",

minLv = 10,

distance = 3

}

},

["Fearow"] = {x = {

m2 = combat15,

spell = "Sand Attack",

minLv = 50,

distance = 3

}

},

["Ekans"] = {x = {

m2 = combat5,

spell = "Poison Fang",

minLv = 15,

distance = 3

}

},

["Arbok"] = {x = {

m2 = combat5,

spell = "Poison Fang",

minLv = 35,

distance = 3

}

},

["Pikachu"] = {x = {

m2 = combat9,

spell = "******* Shock",

minLv = 20,

distance = 3

}

},

["Raichu"] = {x = {

m2 = combat9,

spell = "******* Shock",

minLv = 50,

distance = 3

}

},

["Sandshrew"] = {x = {

m2 = combat15,

spell = "Mud Shot",

minLv = 20,

distance = 3

}

},

["Sandslash"] = {x = {

m2 = combat15,

spell = "Mud Shot",

minLv = 55,

distance = 3

}

}

}

function onSay(cid, var)

local summ = getCreatureSummons(cid)

if #summ == 0 then

return doPlayerSendCancel(cid, "Sorry, but you need a pokemon.")

end

 

for j = 1, #summ do

for name, _ in pairs© do

if getCreatureName(summ[j]):lower() == name:lower() then

local con = c[name].x

if getPlayerLevel(cid) < con.minLv then

return doPlayerSendCancel(cid, "Sorry, but you must be level " .. con.minLv .. " or higher to cast.") and doSendMagicEffect(getThingPos(cid), 2)

end

local distance = (not con.distance) and 1 or con.distance

 

if not isCreature(getCreatureTarget(cid)) or getCreatureTarget(cid) == summ[j] then

return doPlayerSendCancel(cid, "Invalid target.") and doSendMagicEffect(getThingPos(cid), 2)

end

 

if getDistanceBetween(getThingPos(summ[j]), getThingPos(getCreatureTarget(cid))) > distance then

return doPlayerSendCancel(cid, "Sorry, your pokemon is too far away.") and doSendMagicEffect(getThingPos(cid), 2)

end

 

if getPlayerStorageValue(cid, 21000) <= os.time() then

doPlayerSetStorageValue(cid, 21000, os.time()+5)

doCombat(summ[j], con.m2, numberToVariant(getCreatureTarget(cid)))

doCreatureSay(cid, name .. ", " .. con.spell .. ".")

end

 

doPlayerSendTextMessage(cid,26,"Tempo para usar M2 denovo: "..(getPlayerStorageValue(cid, 23000)-os.time()).." sec.")

doSendMagicEffect(getThingPos(cid), 2)

end

end

end

 

return true

end

 

 

M3

 

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 111)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 42)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

 

arr2 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0},

{0, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0},

{0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

}

 

local area2 = createCombatArea(arr2)

setCombatArea(combat2, area2)

 

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 142)

setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

local combat4 = createCombatObject()

setCombatParam(combat4, COMBAT_PARAM_EFFECT, 141)

setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

local combat5 = createCombatObject()

setCombatParam(combat5, COMBAT_PARAM_EFFECT, 16)

setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

local combat6 = createCombatObject()

setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat6, COMBAT_PARAM_EFFECT, 137)

setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

local combat7 = createCombatObject()

setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat7, COMBAT_PARAM_EFFECT, 59)

setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

local combat8 = createCombatObject()

setCombatParam(combat8, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat8, COMBAT_PARAM_EFFECT, 138)

setCombatParam(combat8, COMBAT_PARAM_DISTANCEEFFECT, 138)

setCombatFormula(combat8, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

local combat9 = createCombatObject()

setCombatParam(combat9, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat9, COMBAT_PARAM_EFFECT, 112)

setCombatFormula(combat9, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

local combat10 = createCombatObject()

setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat10, COMBAT_PARAM_EFFECT, 79)

setCombatParam(combat10, COMBAT_PARAM_DISTANCEEFFECT, 5)

setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

local combat11 = createCombatObject()

setCombatParam(combat11, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat11, COMBAT_PARAM_EFFECT, 68)

setCombatParam(combat11, COMBAT_PARAM_DISTANCEEFFECT, 2)

setCombatFormula(combat11, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

local combat12 = createCombatObject()

setCombatParam(combat12, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat12, COMBAT_PARAM_EFFECT, 137)

setCombatParam(combat12, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat12, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

local combat13 = createCombatObject()

setCombatParam(combat13, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat13, COMBAT_PARAM_EFFECT, 9)

setCombatParam(combat13, COMBAT_PARAM_DISTANCEEFFECT, 25)

setCombatFormula(combat13, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

local combat14 = createCombatObject()

setCombatParam(combat14, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat14, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat14, COMBAT_PARAM_DISTANCEEFFECT, 24)

setCombatFormula(combat14, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

local combat15 = createCombatObject()

setCombatParam(combat15, COMBAT_PARAM_EFFECT, 122)

setCombatParam(combat15, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat15, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

 

arr15 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

}

 

local area15 = createCombatArea(arr15)

setCombatArea(combat15, area15)

 

 

 

local c = {

["Bulbasaur"] = {x = {

m3 = combat10,

spell = "Vine Whip",

minLv = 20,

distance = 3

}

},

["Ivysaur"] = {x = {

m3 = combat10,

spell = "Vine Whip",

minLv = 40,

distance = 3

}

},

["Venusaur"] = {x = {

m3 = combat10,

spell = "Vine Whip",

minLv = 85,

distance = 3

}

},

["Charmander"] = {x = {

m3 = combat4,

spell = "Flamethrower",

minLv = 20,

distance = 3

}

},

["Charmeleon"] = {x = {

m3 = combat4,

spell = "Flamethrower",

minLv = 40,

distance = 3

}

},

["Charizard"] = {x = {

m3 = combat4,

spell = "Flamethrower",

minLv = 85,

distance = 3

}

},

["Squirtle"] = {x = {

m3 = combat1,

spell = "Water Gun",

minLv = 20,

distance = 3

}

},

["Wartortle"] = {x = {

m3 = combat1,

spell = "Water Gun",

minLv = 40,

distance = 3

}

},

["Blastoise"] = {x = {

m3 = combat1,

spell = "Water Gun",

minLv = 85,

distance = 3

}

},

["Caterpie"] = {x = {

m3 = combat6,

spell = "Bug Bite",

minLv = 1,

distance = 3

}

},

["Metapod"] = {x = {

m3 = combat5,

spell = "Harden",

minLv = 15,

distance = 3

}

},

["Butterfree"] = {x = {

m3 = combat14,

spell = "Headbutt",

minLv = 30,

distance = 3

}

},

["Weedle"] = {x = {

m3 = combat5,

spell = "Poison Sting",

minLv = 1,

distance = 3

}

},

["Kakuna"] = {x = {

m3 = combat12,

spell = "Harden",

minLv = 15,

distance = 3

}

},

["Beedrill"] = {x = {

m3 = combat12,

spell = "Fury Cutter",

minLv = 25,

distance = 3

}

},

["Pidgey"] = {x = {

m3 = combat15,

spell = "Gust",

minLv = 1,

distance = 3

}

},

["Pidgeotto"] = {x = {

m3 = combat15,

spell = "Whirlwind",

minLv = 20,

distance = 3

}

},

["Pidgeot"] = {x = {

m3 = combat15,

spell = "Whirlwind",

minLv = 65,

distance = 3

}

},

["Rattata"] = {x = {

m3 = combat3,

spell = "Scratch",

minLv = 1,

distance = 3

}

},

["Raticate"] = {x = {

m3 = combat3,

spell = "Scratch",

minLv = 25,

distance = 3

}

},

["Spearow"] = {x = {

m3 = combat15,

spell = "Sand Attack",

minLv = 10,

distance = 3

}

},

["Fearow"] = {x = {

m3 = combat15,

spell = "Gust",

minLv = 50,

distance = 3

}

},

["Ekans"] = {x = {

m3 = combat5,

spell = "Sting Gun",

minLv = 15,

distance = 3

}

},

["Arbok"] = {x = {

m3 = combat5,

spell = "Sting Gun",

minLv = 35,

distance = 3

}

},

["Pikachu"] = {x = {

m3 = combat9,

spell = "******* Bolt",

minLv = 20,

distance = 3

}

},

["Raichu"] = {x = {

m3 = combat9,

spell = "******* Bolt",

minLv = 50,

distance = 3

}

},

["Sandshrew"] = {x = {

m3 = combat3,

spell = "Scratch",

minLv = 20,

distance = 3

}

},

["Sandslash"] = {x = {

m3 = combat3,

spell = "Scratch",

minLv = 55,

distance = 3

}

}

}

 

function onSay(cid, var)

local summ = getCreatureSummons(cid)

if #summ == 0 then

return doPlayerSendCancel(cid, "Sorry, but you need a pokemon.")

end

 

for k = 1, #summ do

for name, _ in pairs© do

if getCreatureName(summ[k]):lower() == name:lower() then

local con = c[name].x

if getPlayerLevel(cid) < con.minLv then

return doPlayerSendCancel(cid, "Sorry, but you must be level " .. con.minLv .. " or higher to cast.") and doSendMagicEffect(getThingPos(cid), 2)

end

local distance = (not con.distance) and 1 or con.distance

 

if not isCreature(getCreatureTarget(cid)) or getCreatureTarget(cid) == summ[k] then

return doPlayerSendCancel(cid, "Invalid target.") and doSendMagicEffect(getThingPos(cid), 2)

end

 

if getDistanceBetween(getThingPos(summ[k]), getThingPos(getCreatureTarget(cid))) > distance then

return doPlayerSendCancel(cid, "Sorry, your pokemon is too far away.") and doSendMagicEffect(getThingPos(cid), 2)

end

 

if getPlayerStorageValue(cid, 23000) <= os.time() then

doPlayerSetStorageValue(cid, 23000, os.time()+5)

doCombat(summ[k], con.m3, numberToVariant(getCreatureTarget(cid)))

doCreatureSay(cid, name .. ", " .. con.spell .. ".")

end

 

doPlayerSendTextMessage(cid,26,"Tempo para usar M3 denovo: "..(getPlayerStorageValue(cid, 23000)-os.time()).." sec.")

doSendMagicEffect(getThingPos(cid), 2)

end

end

end

 

return true

end

 

A partir de agora, vocês que irão colocar o attack !

 

 

M4

 

 

-----------------NORMAL Quick Attack------------------------------

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 111)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

---------------- Wirlwind -------------------------------

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 42)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

 

arr2 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0},

{0, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0},

{0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

}

 

local area2 = createCombatArea(arr2)

setCombatArea(combat2, area2)

----------------------------normal Scratch -------------------------

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 142)

setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

--------------------------- Dragon Claw-----------------------------

local combat4 = createCombatObject()

setCombatParam(combat4, COMBAT_PARAM_EFFECT, 141)

setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

-------------------------- HeadButt -----------------------------

local combat5 = createCombatObject()

setCombatParam(combat5, COMBAT_PARAM_EFFECT, 16)

setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

-------------------------- String Shot -----------------------------

local combat6 = createCombatObject()

setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat6, COMBAT_PARAM_EFFECT, 137)

setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

------------------------- Horn Attack ------------------------------

local combat7 = createCombatObject()

setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat7, COMBAT_PARAM_EFFECT, 59)

setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

--------------------------- Bite -----------------------------

local combat8 = createCombatObject()

setCombatParam(combat8, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat8, COMBAT_PARAM_EFFECT, 138)

setCombatParam(combat8, COMBAT_PARAM_DISTANCEEFFECT, 138)

setCombatFormula(combat8, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

-------------------------- Mega Kick --------------------------

local combat9 = createCombatObject()

setCombatParam(combat9, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat9, COMBAT_PARAM_EFFECT, 112)

setCombatFormula(combat9, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

-------------------------- Razor Leaf -----------------------

local combat10 = createCombatObject()

setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat10, COMBAT_PARAM_EFFECT, 79)

setCombatParam(combat10, COMBAT_PARAM_DISTANCEEFFECT, 5)

setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

------------------------- Bubbles----------------------------

local combat11 = createCombatObject()

setCombatParam(combat11, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat11, COMBAT_PARAM_EFFECT, 68)

setCombatParam(combat11, COMBAT_PARAM_DISTANCEEFFECT, 2)

setCombatFormula(combat11, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

------------------------ String Shot ------------------------

local combat12 = createCombatObject()

setCombatParam(combat12, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat12, COMBAT_PARAM_EFFECT, 137)

setCombatParam(combat12, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat12, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

------------------------ Horn Attack -----------------------

local combat13 = createCombatObject()

setCombatParam(combat13, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat13, COMBAT_PARAM_EFFECT, 9)

setCombatParam(combat13, COMBAT_PARAM_DISTANCEEFFECT, 25)

setCombatFormula(combat13, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

------------------------ Super Sonic -----------------------

local combat14 = createCombatObject()

setCombatParam(combat14, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat14, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat14, COMBAT_PARAM_DISTANCEEFFECT, 24)

setCombatFormula(combat14, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

----------------------- Sand Attack -----------------------

local combat15 = createCombatObject()

setCombatParam(combat15, COMBAT_PARAM_EFFECT, 122)

setCombatParam(combat15, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat15, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

 

arr15 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

}

 

local area15 = createCombatArea(arr15)

setCombatArea(combat15, area15)

 

 

 

local c = {

["Bulbasaur"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Ivysaur"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Venusaur"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Charmander"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Charmeleon"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Charizard"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Squirtle"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Wartortle"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Blastoise"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Caterpie"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Metapod"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Butterfree"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Weedle"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Kakuna"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Beedrill"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Pidgey"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Pidgeotto"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Pidgeot"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Rattata"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Raticate"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Spearow"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Fearow"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Ekans"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Arbok"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Pikachu"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Raichu"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Sandshrew"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Sandslash"] = {x = {

m4 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

}

}

 

function onSay(cid, var)

local summ = getCreatureSummons(cid)

if #summ == 0 then

return doPlayerSendCancel(cid, "Sorry, but you need a pokemon.")

end

 

for l = 1, #summ do

for name, _ in pairs© do

if getCreatureName(summ[l]):lower() == name:lower() then

local con = c[name].x

if getPlayerLevel(cid) < con.minLv then

return doPlayerSendCancel(cid, "Sorry, but you must be level " .. con.minLv .. " or higher to cast.") and doSendMagicEffect(getThingPos(cid), 2)

end

local distance = (not con.distance) and 1 or con.distance

 

if not isCreature(getCreatureTarget(cid)) or getCreatureTarget(cid) == summ[l] then

return doPlayerSendCancel(cid, "Invalid target.") and doSendMagicEffect(getThingPos(cid), 2)

end

 

if getDistanceBetween(getThingPos(summ[l]), getThingPos(getCreatureTarget(cid))) > distance then

return doPlayerSendCancel(cid, "Sorry, your pokemon is too far away.") and doSendMagicEffect(getThingPos(cid), 2)

end

 

if getPlayerStorageValue(cid, 21500) <= os.time() then

doPlayerSetStorageValue(cid, 21500, os.time()+5)

doCombat(summ[l], con.m4, numberToVariant(getCreatureTarget(cid)))

doCreatureSay(cid, name .. ", " .. con.spell .. ".")

end

 

doPlayerSendTextMessage(cid,26,"Tempo para usar M4 denovo: "..(getPlayerStorageValue(cid, 21500)-os.time()).." sec.")

doSendMagicEffect(getThingPos(cid), 2)

end

end

end

 

return true

end

 

 

M5

 

 

-----------------NORMAL Quick Attack------------------------------

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 111)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

---------------- Wirlwind -------------------------------

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 42)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

 

arr2 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0},

{0, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0},

{0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

}

 

local area2 = createCombatArea(arr2)

setCombatArea(combat2, area2)

----------------------------normal Scratch -------------------------

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 142)

setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

--------------------------- Dragon Claw-----------------------------

local combat4 = createCombatObject()

setCombatParam(combat4, COMBAT_PARAM_EFFECT, 141)

setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

-------------------------- HeadButt -----------------------------

local combat5 = createCombatObject()

setCombatParam(combat5, COMBAT_PARAM_EFFECT, 16)

setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

-------------------------- String Shot -----------------------------

local combat6 = createCombatObject()

setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat6, COMBAT_PARAM_EFFECT, 137)

setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

------------------------- Horn Attack ------------------------------

local combat7 = createCombatObject()

setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat7, COMBAT_PARAM_EFFECT, 59)

setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

--------------------------- Bite -----------------------------

local combat8 = createCombatObject()

setCombatParam(combat8, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat8, COMBAT_PARAM_EFFECT, 138)

setCombatParam(combat8, COMBAT_PARAM_DISTANCEEFFECT, 138)

setCombatFormula(combat8, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

-------------------------- Mega Kick --------------------------

local combat9 = createCombatObject()

setCombatParam(combat9, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat9, COMBAT_PARAM_EFFECT, 112)

setCombatFormula(combat9, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

-------------------------- Razor Leaf -----------------------

local combat10 = createCombatObject()

setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat10, COMBAT_PARAM_EFFECT, 79)

setCombatParam(combat10, COMBAT_PARAM_DISTANCEEFFECT, 5)

setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

------------------------- Bubbles----------------------------

local combat11 = createCombatObject()

setCombatParam(combat11, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat11, COMBAT_PARAM_EFFECT, 68)

setCombatParam(combat11, COMBAT_PARAM_DISTANCEEFFECT, 2)

setCombatFormula(combat11, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

------------------------ String Shot ------------------------

local combat12 = createCombatObject()

setCombatParam(combat12, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat12, COMBAT_PARAM_EFFECT, 137)

setCombatParam(combat12, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat12, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

------------------------ Horn Attack -----------------------

local combat13 = createCombatObject()

setCombatParam(combat13, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat13, COMBAT_PARAM_EFFECT, 9)

setCombatParam(combat13, COMBAT_PARAM_DISTANCEEFFECT, 25)

setCombatFormula(combat13, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

------------------------ Super Sonic -----------------------

local combat14 = createCombatObject()

setCombatParam(combat14, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat14, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat14, COMBAT_PARAM_DISTANCEEFFECT, 24)

setCombatFormula(combat14, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

----------------------- Sand Attack -----------------------

local combat15 = createCombatObject()

setCombatParam(combat15, COMBAT_PARAM_EFFECT, 122)

setCombatParam(combat15, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat15, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

 

arr15 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

}

 

local area15 = createCombatArea(arr15)

setCombatArea(combat15, area15)

 

 

 

local c = {

["Bulbasaur"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Ivysaur"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Venusaur"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Charmander"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Charmeleon"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Charizard"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Squirtle"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Wartortle"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Blastoise"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Caterpie"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Metapod"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Butterfree"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Weedle"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Kakuna"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Beedrill"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Pidgey"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Pidgeotto"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Pidgeot"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Rattata"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Raticate"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Spearow"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Fearow"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Ekans"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Arbok"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Pikachu"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Raichu"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Sandshrew"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Sandslash"] = {x = {

m5 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

}

}

 

function onSay(cid, var)

local summ = getCreatureSummons(cid)

if #summ == 0 then

return doPlayerSendCancel(cid, "Sorry, but you need a pokemon.")

end

 

for m = 1, #summ do

for name, _ in pairs© do

if getCreatureName(summ[m]):lower() == name:lower() then

local con = c[name].x

if getPlayerLevel(cid) < con.minLv then

return doPlayerSendCancel(cid, "Sorry, but you must be level " .. con.minLv .. " or higher to cast.") and doSendMagicEffect(getThingPos(cid), 2)

end

local distance = (not con.distance) and 1 or con.distance

 

if not isCreature(getCreatureTarget(cid)) or getCreatureTarget(cid) == summ[m] then

return doPlayerSendCancel(cid, "Invalid target.") and doSendMagicEffect(getThingPos(cid), 2)

end

 

if getDistanceBetween(getThingPos(summ[m]), getThingPos(getCreatureTarget(cid))) > distance then

return doPlayerSendCancel(cid, "Sorry, your pokemon is too far away.") and doSendMagicEffect(getThingPos(cid), 2)

end

 

if getPlayerStorageValue(cid, 22000) <= os.time() then

doPlayerSetStorageValue(cid, 22000, os.time()+5)

doCombat(summ[m], con.m5, numberToVariant(getCreatureTarget(cid)))

doCreatureSay(cid, name .. ", " .. con.spell .. ".")

end

 

doPlayerSendTextMessage(cid,26,"Tempo para usar M5 denovo: "..(getPlayerStorageValue(cid, 22000)-os.time()).." sec.")

doSendMagicEffect(getThingPos(cid), 2)

end

end

end

 

return true

end

 

 

M6

 

 

-----------------NORMAL Quick Attack------------------------------

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 111)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

---------------- Wirlwind -------------------------------

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 42)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

 

arr2 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0},

{0, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0},

{0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

}

 

local area2 = createCombatArea(arr2)

setCombatArea(combat2, area2)

----------------------------normal Scratch -------------------------

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 142)

setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

--------------------------- Dragon Claw-----------------------------

local combat4 = createCombatObject()

setCombatParam(combat4, COMBAT_PARAM_EFFECT, 141)

setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

-------------------------- HeadButt -----------------------------

local combat5 = createCombatObject()

setCombatParam(combat5, COMBAT_PARAM_EFFECT, 16)

setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

-------------------------- String Shot -----------------------------

local combat6 = createCombatObject()

setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat6, COMBAT_PARAM_EFFECT, 137)

setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

------------------------- Horn Attack ------------------------------

local combat7 = createCombatObject()

setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat7, COMBAT_PARAM_EFFECT, 59)

setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

--------------------------- Bite -----------------------------

local combat8 = createCombatObject()

setCombatParam(combat8, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat8, COMBAT_PARAM_EFFECT, 138)

setCombatParam(combat8, COMBAT_PARAM_DISTANCEEFFECT, 138)

setCombatFormula(combat8, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

-------------------------- Mega Kick --------------------------

local combat9 = createCombatObject()

setCombatParam(combat9, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat9, COMBAT_PARAM_EFFECT, 112)

setCombatFormula(combat9, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

-------------------------- Razor Leaf -----------------------

local combat10 = createCombatObject()

setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat10, COMBAT_PARAM_EFFECT, 79)

setCombatParam(combat10, COMBAT_PARAM_DISTANCEEFFECT, 5)

setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

------------------------- Bubbles----------------------------

local combat11 = createCombatObject()

setCombatParam(combat11, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat11, COMBAT_PARAM_EFFECT, 68)

setCombatParam(combat11, COMBAT_PARAM_DISTANCEEFFECT, 2)

setCombatFormula(combat11, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

------------------------ String Shot ------------------------

local combat12 = createCombatObject()

setCombatParam(combat12, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat12, COMBAT_PARAM_EFFECT, 137)

setCombatParam(combat12, COMBAT_PARAM_DISTANCEEFFECT, 23)

setCombatFormula(combat12, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

------------------------ Horn Attack -----------------------

local combat13 = createCombatObject()

setCombatParam(combat13, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat13, COMBAT_PARAM_EFFECT, 9)

setCombatParam(combat13, COMBAT_PARAM_DISTANCEEFFECT, 25)

setCombatFormula(combat13, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

------------------------ Super Sonic -----------------------

local combat14 = createCombatObject()

setCombatParam(combat14, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat14, COMBAT_PARAM_EFFECT, 22)

setCombatParam(combat14, COMBAT_PARAM_DISTANCEEFFECT, 24)

setCombatFormula(combat14, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

----------------------- Sand Attack -----------------------

local combat15 = createCombatObject()

setCombatParam(combat15, COMBAT_PARAM_EFFECT, 122)

setCombatParam(combat15, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat15, COMBAT_FORMULA_LEVELMAGIC, -6.6, 0, -5.7, 0)

 

 

arr15 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

}

 

local area15 = createCombatArea(arr15)

setCombatArea(combat15, area15)

 

 

 

local c = {

["Bulbasaur"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Ivysaur"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Venusaur"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Charmander"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Charmeleon"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Charizard"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Squirtle"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Wartortle"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Blastoise"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Caterpie"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Metapod"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Butterfree"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Weedle"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Kakuna"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Beedrill"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Pidgey"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Pidgeotto"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Pidgeot"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Rattata"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Raticate"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Spearow"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Fearow"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Ekans"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Arbok"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Pikachu"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Raichu"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Sandshrew"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

},

["Sandslash"] = {x = {

m6 = combat??,

spell = "??",

minLv = ??,

distance = 3

}

}

}

 

function onSay(cid, var)

local summ = getCreatureSummons(cid)

if #summ == 0 then

return doPlayerSendCancel(cid, "Sorry, but you need a pokemon.")

end

 

for n = 1, #summ do

for name, _ in pairs© do

if getCreatureName(summ[n]):lower() == name:lower() then

local con = c[name].x

if getPlayerLevel(cid) < con.minLv then

return doPlayerSendCancel(cid, "Sorry, but you must be level " .. con.minLv .. " or higher to cast.") and doSendMagicEffect(getThingPos(cid), 2)

end

local distance = (not con.distance) and 1 or con.distance

 

if not isCreature(getCreatureTarget(cid)) or getCreatureTarget(cid) == summ[n] then

return doPlayerSendCancel(cid, "Invalid target.") and doSendMagicEffect(getThingPos(cid), 2)

end

 

if getDistanceBetween(getThingPos(summ[n]), getThingPos(getCreatureTarget(cid))) > distance then

return doPlayerSendCancel(cid, "Sorry, your pokemon is too far away.") and doSendMagicEffect(getThingPos(cid), 2)

end

 

if getPlayerStorageValue(cid, 22500) <= os.time() then

doPlayerSetStorageValue(cid, 22500, os.time()+5)

doCombat(summ[n], con.m6, numberToVariant(getCreatureTarget(cid)))

doCreatureSay(cid, name .. ", " .. con.spell .. ".")

end

 

doPlayerSendTextMessage(cid,26,"Tempo para usar M6 denovo: "..(getPlayerStorageValue(cid, 22500)-os.time()).." sec.")

doSendMagicEffect(getThingPos(cid), 2)

end

end

end

 

return true

end

 

 

Tags

 

 

<talkaction words="m1" event="script" value="SistemaM1.lua"/>

<talkaction words="m2" event="script" value="SistemaM2.lua"/>

<talkaction words="m3" event="script" value="SistemaM3.lua"/>

<talkaction words="m4" event="script" value="SistemaM4.lua"/>

<talkaction words="m5" event="script" value="SistemaM5.lua"/>

<talkaction words="m6" event="script" value="SistemaM6.lua"/>

 

 

 

Obs. QUANDO SALVAR OS COMANDOS COLOQUE O NOME DE SistemaM... [Nos pontos bote numero da magia.

 

Tutorial Como Adicionar Magia , Combat e Level.

 

 

Exemplo:

 

["Pikachu"] = {x = {

m1 = combat1, ----[1]

spell = "Quick Attack", ---[2]

minLv = 20, ---- [3]

distance = 3 --- [4]

}

},

 

[1]combat é efeito da magia, no inicio do código tem exemplo de cada ataque.

[2]Nome da magia que será usada pelo pokemon

[3]Será o level mínimo para que o ataque possa ocorrer.

[4]Será a distancia em que o pokemon poderá soltar seu ataque.[/spoiler

 

 

Como adicionar novos M.

 

Na parte após os pokemon adicionados com suas magias procure essas partes das linhas.

 

 

for n = 1, #summ do [1]

 

if getCreatureName(summ[n]):lower() == name:lower() then [2]

 

if not isCreature(getCreatureTarget(cid)) or getCreatureTarget(cid) == summ[n] then [3]

 

if getDistanceBetween(getThingPos(summ[n]), getThingPos(getCreatureTarget(cid))) > distance then [4]

 

[1] for n = 1, cada M tem uma letra diferente que foi colocada, paa que se possa usar magia sem erros. Nunca repita mesma letra.

 

[2] if getCreatureName(summ[n]): coloque a letra que você colocou no for ? = 1.

 

[3] summ[n] mesma coisa das outras se bota letra que você colocou no for.

 

[4] (summ[n]) mesma coisa das outras, se coloca a letra que se colocou no for.[/spoiler

 

Tempo das Magias

 

Logo abaixo após as linhas que citei acima , se tem o tempo usado das magias.

 

 

if getPlayerStorageValue(cid, 22500) <= os.time() then [1]

doPlayerSetStorageValue(cid, 22500, os.time()+5) [2]

doCombat(summ[n], con.m6, numberToVariant(getCreatureTarget(cid))) [3]

doCreatureSay(cid, name .. ", " .. con.spell .. ".")

end

 

[1] (cid, 22500) tempo que leva para magia ser caregada e solta.

[2] (cid, 22500, os.time()+5) mesma coisa, o +5 não presisa mudar, caso queira mude.

[3] “(summ[n]” coloca oque você colocou no if “con.m6”será o nome do M usado para soltar a magia.

 

 

 

 

Bom é isso, caso falei alguma besteira me falem que irei arrumar, qualquer duvida me adicione no msn ou poste no tópico.

 

Não esqueça de AGRADEÇER

 

Crédits: Jake.Harper~* fez o topico e bagunçou tudo.

Link para o comentário
Compartilhar em outros sites

Este tópico está impedido de receber novos posts.
 Compartilhar

×
×
  • Criar Novo...

Informação Importante

Nós fazemos uso de cookies no seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies , caso contrário, vamos supor que você está bem para continuar.