Ajuda, meu sistema de TM, está com um problema, eu adiciono o TM a um pokemon, porém ai se um player adiciona 1 TM ninguém mais consegue adicionar um TM igual que o script se desativa sozinho, ai só da pra adicionar o TM novamente se der /reload actions.
Aqui meu script.
também não aparece mensagem se o pokemon não puder receber o TM.
This pokemon don\'t learn "..TM.tm.."!
e se tiver o TM, se for TM repetido também não aparece a mensagem.
This pokemon have learned this TM!
Em fim, se usa o item mesmo se não adiciona o TM, o item para de funcionar e só funciona se der reload.
local TM = {
[14665] = {tm = "Waterball"},
[14670] = {tm = "Dragon Claw"},
[14666] = {tm = "Water Pulse"},
[14660] = {tm = "Hypnosis"},
[14630] = {tm = "Scary Face"},
[14650] = {tm = "Poison Gas"},
[14671] = {tm = "Draco Meteor"},
[14675] = {tm = "Inferno"},
[14640] = {tm = "Bullet Seed"},
[14635] = {tm = "Rock Blast"},
[14652] = {tm = "Red Fury"},
[14651] = {tm = "Pin Missile"},
[14645] = {tm = "Ice Beam"},
[14646] = {tm = "Blizzard"},
[14655] = {tm = "Hyper Beam"},
[14636] = {tm = "Ancient Power"},
[14638] = {tm = "Power Gem"},
[14641] = {tm = "Aromateraphy"},
[14642] = {tm = "Giga Drain"},
[14682] = {tm = "Tornado"},
[14683] = {tm = "Air Slash"},
[14643] = {tm = "Leaf Blade"},
[14659] = {tm = "Meteor Smash"},
[14620] = {tm = "Thunder Bolt"},
[14621] = {tm = "Thunder"},
[14687] = {tm = "Earthquake"},
[14631] = {tm = "Dark Pulse"},
[14657] = {tm = "X-Scissor"},
[14661] = {tm = "Psychic"},
[14632] = {tm = "Shadow Ball"},
[14615] = {tm = "Rest"},
[14656] = {tm = "Tri-Attack"},
[14616] = {tm = "Reflect"},
[14617] = {tm = "Healarea"},
[14676] = {tm = "Magma Storm"},
[14677] = {tm = "Fire Blast"},
[14637] = {tm = "Rock Throw"},
[14693] = {tm = "War Dog"},
[14647] = {tm = "Icy Wind"},
[14648] = {tm = "Hydropump"},
[14662] = {tm = "Confusion"},
[14688] = {tm = "Stomp"},
[14618] = {tm = "Selfheal"},
[14619] = {tm = "Restore"},
[14692] = {tm = "Absorb"},
[14658] = {tm = "Metronome"},
[14644] = {tm = "Leaf Blade"},
[14633] = {tm = "Confuse Ray"},
[14678] = {tm = "Eruption"},
[14681] = {tm = "Razor Leaf"},
[14721] = {tm = "Aquarium"},
}
function onUse(cid, item, frompos, item2, topos)
if not TM[item.itemid] then return false end
if not isPokeball(item2.itemid) then return false end
TM = TM[item.itemid]
List = tmList[TM.tm]
if not isInArray(List.pokes, getItemAttribute(item2.uid, "poke")) then
doPlayerSendCancel(cid, "This pokemon don\'t learn "..TM.tm.."!")
return false
end
ID = 1
Have = "not"
Slot = ""
if haveFirstTM(item2) then
if getFirstTMName(item2) == TM.tm then
Have = "yes"
end
ID = ID + 1
end
if haveSecondTM(item2) then
if getSecondTMName(item2) == TM.tm then
Have = "yes"
end
ID = ID + 1
end
if haveThirdTM(item2) then
if getThirdTMName(item2) == TM.tm then
Have = "yes"
end
ID = ID + 1
end
if Have == "yes" then
doPlayerSendCancel(cid, "This pokemon have learned this TM!")
return false
end
if ID == 1 then
Slot = "First"
elseif ID == 2 then
Slot = "Second"
elseif ID == 3 then
Slot = "Third"
end
if haveAllTMs(item2) or ID == 4 or Slot == "" then
doPlayerSendCancel(cid, "This pokemon have number max of TMs!")
return false
end
addTM(item2, TM.tm, ID)
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid, 22, ""..getItemAttribute(item2.uid, "poke").." learn "..TM.tm.." on "..Slot.." Slot!")
return true
end
e essa aqui é a lib.
tmList = {
["Waterball"] = {number = 01, level = 1, cd = 20, dist = 5, target = 1, f = 65, t = "water", pokes = {"Wartortle", "Blastoise", "Golduck", "Tentacruel", "Slowbro", "Kingler", "Seadra", "Seaking", "Starmie", "Jynx", "Vaporeon", "Omastar", "Croconaw", "Feraligatr", "Azulmarill", "Politoed", "Mantine", "Sneasel", "Delibird", "Slugma", "Smoochum"}},
["Dragon Claw"] = {number = 02, level = 1, cd = 20, dist = 1, target = 1, f = 60, t = "dragon", pokes = {"Sandslash", "Nidoqueen", "Nidoking", "Rhydon", "Kangaskhan", "Magmar", "Croconaw", "Feraligatr", "Gligar", "Sneasel", "Ursaring", "Tyranitar"}},
["Water Pulse"] = {number = 03, level = 1, cd = 20, dist = 1, target = 1, f = 70, t = "dragon", pokes = {"Squirtle", "Wartortle", "Blastoise", "Nidoran Female", "Nidoqueen", "Nidoran Male", "Nidoking", "Clefairy", "Clefable", "Jigglypuff", "Wigglytuff", "Meowth", "Persian", "Psyduck", "Poliwag", "Poliwhirl", "Poliwharth", "Shiny Tentacool", "Shiny Tentacruel", "Kangaskhan", "Shiny Seadra", "Jynx", "Shiny Jynx", "Shiny Gyarados", "Gyarados", "Lapras", "Omastar", "Kabuto", "Kabutops", "Snorlax", "Shiny Snorlax", "Dratini", "Shiny Dratini", "Dragonair", "Shiny Dragonair", "Dragonite", "Shiny Dragonite", "Politoed", "Mantine", "Kingdra", "Blissey", "Miltank", "Tyranitar"}},
["Hypnosis"] = {number = 04, level = 1, cd = 20, dist = 8, target = 1, f = 0, t = "psychic", pokes = {"Golduck", "Mr.Mime", "Starmie", "Jynx", "Shiny Jynx", "Togetic", "Girafarig", "Porygon2", "Lapras"}},
["Scary Face"] = {number = 05, level = 1, cd = 20, dist = 5, target = 0, f = 0, t = "psychic", pokes = {"Venusaur", "Charizard", "Blastoise", "Raticate", "Nidoqueen", "Nidoking", "Golem", "Onix", "Rhydon", "Kangaskhan", "Vaporeon", "Jolteon", "Flareon", "Snorlax", "Dragonite", "Shiny Dragonite", "Shiny Snorlax", "Shiny Onix", "Steelix", "Ursaring", "Tyranitar", "Shiny Blastoise", "Shiny Vaporeon", "Shiny Jolteon", "Shiny Flareon"}},
["Poison Gas"] = {number = 06, level = 1, cd = 20, dist = 3, target = 0, f = 5, t = "poison", pokes = {"Ivysaur", "Venusaur", "Beedrill", "Victreebel", "Tentacrueel", "Shiny Tentacrueel", "Muk", "Shiny Muk", "Pinsir", "Shiny Pinsir", "Ariados", "Shiny Venusaur", "Shiny Beedril"}},
["Draco Meteor"] = {number = 07, level = 1, cd = 20, dist = 3, target = 0, f = 90, t = "dragon", pokes = {"Charizard", "Gyarados", "Aerodactyl", "Dragonair", "Dragonite", "Steelix", "Kingdra", "Shiny Charizard", "Shiny Gyarados", "Shiny Dragonair", "Shiny Dragonite"}},
["Inferno"] = {number = 08, level = 1, cd = 20, dist = 2, target = 1, f = 110, t = "fire", pokes = {"Charizard", "Nitetales", "Arcanine", "Rapidash", "Magmar", "Flareon", "Shiny Flareon", "Shiny Charizard"}},
["Bullet Seed"] = {number = 09, level = 1, cd = 20, dist = 3, target = 1, f = 95, t = "grass", pokes = {"Vileplume", "Parasect", "Victreebel", "Exeggutor", "Tangela", "bayleef", "Meganium", "Bellossom", "Shiny Vileplume", "Shiny Parasect", "Shiny Tanegela"}},
["Rock Blast"] = {number = 10, level = 1, cd = 20, dist = 2, target = 1, f = 90, t = "rock", pokes = {"Sandslash", "dugtrio", "Golem", "Onix", "Cubone", "Omastar", "Kabutops", "Aerodactyl", "Steelix", "Tyranitar", "sudowoodo", "Shiny Onix", "Shiny Cubone", "Marowak", "Shiny Marowak"}},
["Red Fury"] = {number = 11, level = 1, cd = 20, dist = 2, target = 0, f = 35, t = "bug", pokes = {"Raticate", "Shiny Raticate", "Arbok", "Tauros", "Hitmontop", "Shiny Fearow", "Fearow"}},
["Pin Missile"] = {number = 12, level = 1, cd = 20, dist = 2, target = 0, f = 80, t = "bug", pokes = {"Butterfree", "Beedril", "Parasect", "Venomoth", "Scyther", "Pinsir", "Ariados", "Pineco", "Scizor", "Heracross", "Shiny Butterfree", "Shiny Beedril", "Shiny Parasect", "Shiny Venomoth", "Shiny Scyther", "Shiny Pinsir"}},
["Ice Beam"] = {number = 13, level = 1, cd = 20, dist = 2, target = 0, f = 95, t = "ice", pokes = {"Wartortle", "Blastoise", "Clefable", "Wigglytuff", "Tentacruel", "Kingler", "Chansey", "Seadra", "Gyarados", "Vaporeon", "Porygon", "Omastar", "Kabutops", "Dratini", "Dragonair", "Dragonite", "Togetic", "Kingdra", "Jynx", "Shiny Jynx", "Miltank", "Blissey", "Tyranitar", "Shiny Blastoise", "Shiny Tentacruel", "Shiny Kingler", "Shiny Seadra", "Shiny Gyarados", "Shiny Vaporeon", "Shiny Dratini", "Shiny Dragonair", "Shiny Dragonite"}},
["Blizzard"] = {number = 14, level = 1, cd = 20, dist = 2, target = 0, f = 100, t = "ice", pokes = {"Wartortle", "Blastoise", "Clefable", "Wigglytuff", "Tentacruel", "Kingler", "Chansey", "Seadra", "Gyarados", "Vaporeon", "Porygon", "Omastar", "Kabutops", "Dratini", "Dragonair", "Dragonite", "Togetic", "Kingdra", "Jynx", "Shiny Jynx", "Miltank", "Blissey", "Tyranitar", "Shiny Blastoise", "Shiny Tentacruel", "Shiny Kingler", "Shiny Seadra", "Shiny Gyarados", "Shiny Vaporeon", "Shiny Dratini", "Shiny Dragonair", "Shiny Dragonite"}},
["Hyper Beam"] = {number = 15, level = 1, cd = 20, dist = 5, target = 0, f = 100, t = "normal", pokes = {"Venusaur", "Charizard", "Blastoise", "Raticate", "Nidoqueen", "Nidoking", "Golem", "Onix", "Rhydon", "Kangaskhan", "Vaporeon", "Jolteon", "Flareon", "Snorlax", "Dragonite", "Shiny Dragonite", "Shiny Snorlax", "Shiny Onix", "Steelix", "Ursaring", "Tyranitar", "Shiny Blastoise", "Shiny Vaporeon", "Shiny Jolteon", "Shiny Flareon", "Raichu", "Shiny Raichu", "Scizor", "Scyther", "Shiny Scyther", "Lapras", "Chansey", "Blissey", "Alakazam", "Shiny Alakazam", "Gengar", "Shiny Gengar", "Pidgeot", "Shiny Pidgeot"}},
["Ancient Power"] = {number = 16, level = 1, cd = 20, dist = 2, target = 0, f = 100, t = "rock", pokes = {"Sandslash", "dugtrio", "Golem", "Onix", "Cubone", "Omastar", "Kabutops", "Aerodactyl", "Steelix", "Tyranitar", "sudowoodo", "Shiny Onix", "Shiny Cubone", "Marowak", "Shiny Marowak", "Tyranitar", "Tangela", "Shiny Tangela"}},
["Power Gem"] = {number = 17, level = 1, cd = 20, dist = 2, target = 1, f = 90, t = "rock", pokes = {"Magneton", "Rhydon", "Omastar", "Steelix", "Scizor", "Tyranitar", "Electrode", "Shiny Electrode"}},
["Aromateraphy"] = {number = 18, level = 1, cd = 20, dist = 2, target = 1, f = 80, t = "grass", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank"}},
["Giga Drain"] = {number = 19, level = 1, cd = 20, dist = 2, target = 1, f = 80, t = "grass", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank"}},
["Tornado"] = {number = 20, level = 1, cd = 20, dist = 2, target = 0, f = 80, t = "grass", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Air Slash"] = {number = 21, level = 1, cd = 20, dist = 2, target = 1, f = 75, t = "flying", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Leaf Blade"] = {number = 22, level = 1, cd = 20, dist = 2, target = 0, f = 50, t = "gass", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Meteor Smash"] = {number = 23, level = 1, cd = 20, dist = 2, target = 0, f = 65, t = "normal", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Thunder Bolt"] = {number = 24, level = 1, cd = 20, dist = 2, target = 1, f = 33, t = "eletric", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Thunder"] = {number = 25, level = 1, cd = 20, dist = 2, target = 0, f = 100, t = "eletric", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Earthquake"] = {number = 26, level = 1, cd = 20, dist = 2, target = 1, f = 10, t = "ground", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Dark Pulse"] = {number = 27, level = 1, cd = 20, dist = 2, target = 1, f = 35, t = "dark", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["X-Scissor"] = {number = 28, level = 1, cd = 20, dist = 2, target = 0, f = 65, t = "bug", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Psychic"] = {number = 29, level = 1, cd = 20, dist = 2, target = 0, f = 90, t = "psychic", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Shadow Ball"] = {number = 30, level = 1, cd = 20, dist = 2, target = 1, f = 60, t = "ghost", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Rest"] = {number = 31, level = 1, cd = 120, dist = 2, target = 1, f = 0, t = "normal", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Tri-Attack"] = {number = 32, level = 1, cd = 20, dist = 2, target = 1, f = 25, t = "normal", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Reflect"] = {number = 33, level = 1, cd = 20, dist = 2, target = 0, f = 0, t = "psychic", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Healarea"] = {number = 34, level = 1, cd = 80, dist = 2, target = 1, f = 0, t = "normal", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Magma Storm"] = {number = 35, level = 1, cd = 20, dist = 2, target = 0, f = 95, t = "fire", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Fire Blast"] = {number = 36, level = 1, cd = 20, dist = 2, target = 0, f = 125, t = "fire", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Rock Throw"] = {number = 37, level = 1, cd = 20, dist = 2, target = 1, f = 55, t = "rock", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["War Dog"] = {number = 38, level = 1, cd = 20, dist = 2, target = 1, f = 0, t = "normal", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Icy Wind"] = {number = 39, level = 1, cd = 20, dist = 2, target = 1, f = 45, t = "ice", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Hydropump"] = {number = 40, level = 1, cd = 20, dist = 2, target = 0, f = 125, t = "water", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Confusion"] = {number = 41, level = 1, cd = 20, dist = 2, target = 0, f = 50, t = "psychic", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Stomp"] = {number = 42, level = 1, cd = 20, dist = 2, target = 1, f = 90, t = "ground", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Selfheal"] = {number = 43, level = 1, cd = 100, dist = 2, target = 0, f = 0, t = "normal", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Restore"] = {number = 44, level = 1, cd = 120, dist = 2, target = 0, f = 0, t = "normal", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Absorb"] = {number = 45, level = 1, cd = 20, dist = 2, target = 1, f = 40, t = "grass", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Metronome"] = {number = 46, level = 1, cd = 20, dist = 2, target = 0, f = 0, t = "normal", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Leaf Blade"] = {number = 47, level = 1, cd = 20, dist = 2, target = 0, f = 50, t = "grass", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Confuse Ray"] = {number = 48, level = 1, cd = 20, dist = 2, target = 1, f = 65, t = "ghost", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Eruption"] = {number = 49, level = 1, cd = 20, dist = 2, target = 1, f = 75, t = "fire", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
["Razor Leaf"] = {number = 50, level = 1, cd = 20, dist = 2, target = 0, f = 33, t = "grass", pokes = {"Venusaur", "Butterfree", "Arbok", "Golbat", "Vileplume", "Parasect", "Venomoth", "Victreebel", "Tentacruel", "Gengar", "Tangela", "Kabutosp", "Meganium", "Ariados", "Crobat", "Bellosom", "Miltank", "Scyther", "Shiny Scyther", "Alakazam", "Shiny Alakazam", "Jynx", "Shiny Jynx", "Shiny Dragonite", "Dragonite", "Dratini", "Shiny Dratini", "Gyarados", "Shiny Gyarados", "Pikachu", "Raichu", "Shiny Raichu", "Mew", "Shiny Mew", "Mewtwo", "Shiny Mewtwo", "Togetic", "Lapras", "Aerodactyl", "Scizor", "Mantine", "Blissey", "Chasey", "Blastoise", "Shiny Blastoise", "Arcanine", "Shiny Arcanine", "Lugia", "Magmar", "Ursaring", "Electabuzz", "Shiny Electabuzz"}},
}
function isTM(name)
if tmList[name] then
return true
end
return false
end
function haveFirstTM(item)
if not isPokeball(item.itemid) then return false end
if getItemAttribute(item.uid, "tm1") then
return true
end
return false
end
function getFirstTMName(item)
if haveFirstTM(item) then
return getItemAttribute(item.uid, "tm1")
end
return false
end
function haveSecondTM(item)
if not isPokeball(item.itemid) then return false end
if getItemAttribute(item.uid, "tm2") then
return true
end
return false
end
function getSecondTMName(item)
if haveSecondTM(item) then
return getItemAttribute(item.uid, "tm2")
end
return false
end
function haveThirdTM(item)
if not isPokeball(item.itemid) then return false end
if getItemAttribute(item.uid, "tm3") then
return true
end
return false
end
function getThirdTMName(item)
if haveThirdTM(item) then
return getItemAttribute(item.uid, "tm3")
end
return false
end
function haveAllTMs(item)
count = 0
if haveFirstTM(item) then
count = count + 1
end
if haveSecondTM(item) then
count = count + 1
end
if haveThirdTM(item) then
count = count + 3
end
if count == 3 then
return true
end
return false
end
function addTM(item, nameTM, id)
if not isPokeball(item.itemid) or not isTM(nameTM) then return false end
TM = ""
if id == 1 then
TM = "tm1"
elseif id == 2 then
TM = "tm2"
elseif id == 3 then
TM = "tm3"
end
if TM == "" then return false end
doItemSetAttribute(item.uid, TM, nameTM)
return true
end