diff --git a/PokeOne_Questing.lua.rar b/PokeOne_Questing.lua.rar new file mode 100644 index 0000000..8a43d0e Binary files /dev/null and b/PokeOne_Questing.lua.rar differ diff --git a/Quests/Kanto/BoulderBadgeQuest.lua b/Quests/Kanto/BoulderBadgeQuest.lua index 55cd0bc..2d542f1 100644 --- a/Quests/Kanto/BoulderBadgeQuest.lua +++ b/Quests/Kanto/BoulderBadgeQuest.lua @@ -93,7 +93,7 @@ function BoulderBadgeQuest:new() end function BoulderBadgeQuest:isDoable() - if self:hasMap() + if self:hasMap() and not hasItem("HM01") then return true end @@ -106,11 +106,11 @@ end -- in case of black out function BoulderBadgeQuest:ViridianPokémonCenter() - return moveToArea("Viridian City") + return moveToCell(9, 129) end function BoulderBadgeQuest:ViridianCity() - return moveToArea("Route 2") + return moveToCell(142,48) end function BoulderBadgeQuest:Route2() @@ -171,7 +171,9 @@ function BoulderBadgeQuest:Route2Stop2() end function BoulderBadgeQuest:route2Up() - if not dialogs.npcYoungsterJohn.state then + if not self:isTrainingOver() then + moveToGrass() + elseif not dialogs.npcYoungsterJohn.state then talkToNpcOnCell(26,78) else moveToCell(20,56) @@ -180,7 +182,9 @@ end function BoulderBadgeQuest:PewterCity() --if not hasBadge("Boulder Badge") then - if not dialogs.npcBrock.state then + if not self:isTrainingOver() then + moveToCell(21,63) + elseif not dialogs.npcBrock.state then if not dialogs.npcDavePewter.state then return talkToNpcOnCell(22,55) elseif not game.isTeamFullyHealed() then diff --git a/Quests/Kanto/CascadeBadgeQuest.lua b/Quests/Kanto/CascadeBadgeQuest.lua index cae5b48..cf4f05c 100644 --- a/Quests/Kanto/CascadeBadgeQuest.lua +++ b/Quests/Kanto/CascadeBadgeQuest.lua @@ -10,7 +10,7 @@ local Dialog = require "Quests/Dialog" local name = 'Cascade Badge Quest' local description = 'From Cerulean to Route 5' -local level = 10 +local level = 29 local dialogs = { npcMisty = Dialog:new({ @@ -38,14 +38,14 @@ function CascadeBadgeQuest:new() end function CascadeBadgeQuest:isDoable() - if self:hasMap() and not hasItem("HM01 - Cut") then + if self:hasMap() and not hasItem("HM09") then return true end return false end function CascadeBadgeQuest:isDone() - if getMapName() == "Route 5" then + if getAreaName() == "Route 5" then return true else return false @@ -54,12 +54,12 @@ end function CascadeBadgeQuest:CeruleanCity() - if self:needPokecenter() or not game.isTeamFullyHealed() then + if self:needPokecenter() or not game.isTeamFullyHealed() or self.registeredPokecenter != "Cerulean Pokémon Center" then return moveToCell(162,114) - --elseif self:needPokemart() then +-- elseif self:needPokemart() then -- return moveToCell(166,133) -- pokemart - elseif not self:isTrainingOver() then - return moveToCell(39,0)-- Route 24 Bridge' + elseif not self:isTrainingOver() or getPokemonLevel(1) < level then + return moveToCell(115,101)-- Route 24 Bridge' elseif not isTrainerInfoReceived() then log("getting trainer info") return askForTrainerInfo() @@ -68,7 +68,7 @@ function CascadeBadgeQuest:CeruleanCity() elseif not hasItem("S.S. Ticket") then return moveToCell(183,73) else - return moveToCell(155,138) -- Route 5 + return moveToCell(155,140) -- Route 5 end end @@ -80,16 +80,25 @@ function CascadeBadgeQuest:CeruleanHouse6() end end +function CascadeBadgeQuest:Route4() + if not self:isTrainingOver() or getPokemonLevel(1) < level then + return moveToGrass() + else + return moveToCell(130,101) + end +end + function CascadeBadgeQuest:CeruleanPokémonMart() self:pokemart(22,7) end function CascadeBadgeQuest:CeruleanPokémonCenter() - if not game.isTeamFullyHealed() then - return self:pokecenter("Cerulean City") - else - return moveToCell(61,26) - end +-- if not game.isTeamFullyHealed() then +-- return self:pokecenter("Cerulean City") + -- else + -- return moveToCell(61,26) +-- end +return self:pokecentercell(61,26) end @@ -124,18 +133,20 @@ end function CascadeBadgeQuest:CeruleanGym() -- get Cascade Badge - if not isTrainerInfoReceived() then + if not isTrainerInfoReceived() then log("getting trainer info") return askForTrainerInfo() - elseif not game.isTeamFullyHealed() then + else + if not game.isTeamFullyHealed() then return moveToCell(51,136) - elseif countBadges() <= 1 and ccountBadges() >= 0 then + elseif countBadges() <= 1 and countBadges() >= 0 then return talkToNpcOnCell(51, 109) elseif countBadges() == 2 and not dialogs.npcafterbeat.state then return talkToNpcOnCell(55, 131) else return moveToCell(51,136) end + end end return CascadeBadgeQuest diff --git a/Quests/Kanto/EarthBadgeQuest.lua b/Quests/Kanto/EarthBadgeQuest.lua new file mode 100644 index 0000000..f6d1dad --- /dev/null +++ b/Quests/Kanto/EarthBadgeQuest.lua @@ -0,0 +1,222 @@ +-- Copyright © 2016 g0ld +-- This work is free. You can redistribute it and/or modify it under the +-- terms of the Do What The Fuck You Want To Public License, Version 2, +-- as published by Sam Hocevar. See the COPYING file for more details. +-- Quest: @Rympex + + +local sys = require "Libs/syslib" +local game = require "Libs/gamelib" +local Quest = require "Quests/Quest" +local Dialog = require "Quests/Dialog" +local name = 'Earth Badge' +local description = ' Beat Giovanni' +local level = 48 +local dialogs = { + Lance = Dialog:new({ + "There is always someone better than you!", + }), + Gary = Dialog:new({ + "Ok ok, you are the champ, I'm the loser...", + }), +} +local EarthBadgeQuest = Quest:new() + +function EarthBadgeQuest:new() + local o = Quest.new(EarthBadgeQuest, name, description, level,dialogs) + o.statusrepel = false + return o +end + +function EarthBadgeQuest:isDoable() + if self:hasMap() then --Fixed DC on gym after win + return true + end + return false +end + +function EarthBadgeQuest:isDone() + if getMapName() == "Pallet House" then --Fixed DC on gym after win, and Blackout + return true + end + return false +end + +function EarthBadgeQuest:Route21() + if getPlayerY() < 70 then + moveToCell(84,27) + else + moveToCell(150,203) + end + +end + +function EarthBadgeQuest:Route22() + +moveToCell(39,89) +end + +function EarthBadgeQuest:PokémonLeagueReception() + +moveToCell(25,11) +end + +function EarthBadgeQuest:Route23() +if getPlayerX() <= 52 and getPlayerY() > 92 then +moveToCell(32,94) +else + if not self:isTrainingOver() then + moveToCell(53,94) + else +moveToCell(41,50) +end + +end +end + +function EarthBadgeQuest:IndigoPlateau() + if not self:isTrainingOver() then + moveToCell(41,53) + else +moveToCell(42,24) +end +end +function EarthBadgeQuest:VictoryRoad() + if not self:isTrainingOver() then + moveToRectangle(23,235,25,236) + else + moveToCell(23,240) + end +end +function EarthBadgeQuest:PokémonLeague() + if not self:isTrainingOver() then + moveToCell(40,55) + else + if isNpcOnCell(52,35) then + talkToNpcOnCell(52,35) + else + moveToCell(51,31) + end + end +end + +function EarthBadgeQuest:KantoLeague() + if game.inRectangle(15,5,35,30) then + moveToCell(25,7) + elseif game.inRectangle(15,58,35,84) then + moveToCell(25,60) + elseif game.inRectangle(67,5,87,32) then + moveToCell(77,7) + elseif game.inRectangle(66,60,100,97) then + if not dialogs.Lance.state then + + talkToNpcOnCell(76,72) + else + moveToCell(77,62) + end + end + +end + +function EarthBadgeQuest:KantoHallofFame() + if not dialogs.Gray.state then + talkToNpcOnCell(134,105) + end + +end + + +function EarthBadgeQuest:VictoryRoad1F() +if self.statusrepel == false and hasItem("Max Repel") then +self.statusrepel = true +return useItem("Max Repel") +else + return moveToCell(9,9) +end +-- end +end +function EarthBadgeQuest:VictoryRoad2F() + --if getPlayerY() > 24 then + moveToCell(11,96) +-- end +end + +function EarthBadgeQuest:VictoryRoad3F() + --if getPlayerY() > 24 then + + moveToCell(41,159) + +-- end +end +function EarthBadgeQuest:Route21Gate() + --if getPlayerY() > 24 then + moveToCell(11,10) +-- end +end + +function EarthBadgeQuest:PlayerBedroomPallet() + return moveToArea("Player House Pallet") +end + +function EarthBadgeQuest:PlayerHousePallet() + if getPlayerY() > 24 then + return moveToCell(4,10) + end +end + +function EarthBadgeQuest:PalletTown() +moveToCell(150,168) +end + +function EarthBadgeQuest:Route1() + moveToArea("Viridian City") +end + + +function EarthBadgeQuest:ViridianPokémonCenter() + self.statusrepel = false + self:pokecenter("Viridian City") +end + +function EarthBadgeQuest:ViridianPokémonMart() + self:pokemartrepel(10,68) +end + +function EarthBadgeQuest:ViridianCity() +self.statusrepel = false +if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() +else + if self:needPokecenter() or not game.isTeamFullyHealed() or self.registeredPokecenter ~= "Viridian Pokémon Center" then + moveToCell(146, 91) + elseif self:needPokemart() then + return moveToArea("Viridian Pokemart") + elseif countBadges() < 8 then + return moveToCell(159,68) +-- elseif not self:isTrainingOver() then + -- return fatal("Error This team can't beat Giovanni") + + else + return moveToArea("Route 22")--Cell(98,103) --Viridian Gym 2 + end +end +end + + +function EarthBadgeQuest:ViridianGym() +if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() +else + if countBadges() < 8 and getPlayerY() >= 60 then + return requestPathForQuestId(getMainQuestId()) + elseif countBadges() < 8 then + return talkToNpcOnCell(171,58) + else + return requestPathForQuestId(getMainQuestId()) + end +end +end + +return EarthBadgeQuest \ No newline at end of file diff --git a/Quests/Kanto/MarshBadgeQuest.lua b/Quests/Kanto/MarshBadgeQuest.lua new file mode 100644 index 0000000..607b9b7 --- /dev/null +++ b/Quests/Kanto/MarshBadgeQuest.lua @@ -0,0 +1,274 @@ +-- Copyright © 2016 g0ld +-- This work is free. You can redistribute it and/or modify it under the +-- terms of the Do What The Fuck You Want To Public License, Version 2, +-- as published by Sam Hocevar. See the COPYING file for more details. +-- Quest: @Rympex + + +local sys = require "Libs/syslib" +local game = require "Libs/gamelib" +local Quest = require "Quests/Quest" +local Dialog = require "Quests/Dialog" + +local name = 'Marsh Badge' +local description = 'Get Badge + Dojo Pokemon' +local level = 45 + +local dialogs = { + dojoSaffronDone = Dialog:new({ + "If you put water in a cup, it becomes the cup. Be water, my friend, be water!" + }), + dojoState = Dialog:new({ + "tomodachi" + }), +} + +local MarshBadgeQuest = Quest:new() + +function MarshBadgeQuest:new() + local o = Quest.new(MarshBadgeQuest, name, description, level, dialogs) + o.dojoState = false + o.status = false + return o +end + +function MarshBadgeQuest:isDoable() + if self:hasMap() then + return true + end + return false +end + +function MarshBadgeQuest:isDone() + if (self.status == true and getAreaName() == "Route 8") or getAreaName() == "Silph Co 1F" or getAreaName() == "Route 5" then + return true + else + return false + end +end + + +function MarshBadgeQuest:Route8() + if not isPokemonUsable(1) then + return moveToCell(11,123) + elseif not self:needPokecenter() and ( not self:isTrainingOver() or getPokemonLevel(1) < level ) then + return moveToGrass() + else + return moveToCell(11,123) + end +end + + +function MarshBadgeQuest:SaffronCityGate() + + if game.inRectangle(78,58,94,69) then + if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() + else + if ( hasItem("Marsh Badge") or not self:isTrainingOver() or getPokemonLevel(1) < level ) and countBadges() != 5 and isPokemonUsable(1) then + return moveToCell(92,63) + elseif countBadges() == 5 then + self.status = true + return moveToCell(92,63) + else + return moveToCell(79,63) + end + end + else + -- if hasItem("Tea") then + return moveToCell(16,26) + end + +end + + + +function MarshBadgeQuest:SaffronCity() +if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() +else + if self:needPokecenter() or not game.isTeamFullyHealed() or not self.registeredPokecenter == "Saffron Pokémon Center" then + return moveToCell(45,73) + elseif self:needPokemart() then + return moveToCell(68,42) -- pokemar + elseif not self:isTrainingOver() or getPokemonLevel(1) < level then + return moveToCell(95,64) + elseif not hasItem("Master Ball") and isNpcOnCell(60,57) then --Rocket on SaffronGym Entrance + pushDialogAnswer(2) + return moveToCell(58,56) + elseif not dialogs.dojoSaffronDone.state and not self.dojoState and countBadges() < 5 then --Need Check dojo + return moveToCell(69,23) -- Fixed no LINK name + elseif countBadges() < 5 then -- Need beat Gym + return moveToCell(83,24) + elseif countBadges() == 5 then + self.status = true + return moveToCell(95,64) + else + return moveToCell(95,64) + end +end +end + +function MarshBadgeQuest:SaffronPokémonCenter() + return self:pokecentercell(15,135) +end + + +function MarshBadgeQuest:SaffronPokémonMart() + self:pokemart(57,44)--//60,54) +end + +function MarshBadgeQuest:SilphCo() + if not hasItem("Master Ball") then + if game.inRectangle(13,2,47,25) then + moveToCell(44,4) + end + + else + if game.inRectangle(13,2,47,25) then + return moveToCell(23,24) + end + + end +end + +function MarshBadgeQuest:SilphCo2F() + if not hasItem("Master Ball") then + + + moveToCell(48,51) + else + return moveToCell(41,51) + + end +end + +function MarshBadgeQuest:SilphCo3F() + if not hasItem("Master Ball") then + + if not hasItem("Card Key III") then + moveToCell(45,99) + elseif isNpcOnCell(35,115) then + talkToNpcOnCell(35,115) + else + moveToCell(27,117) + end + else + return moveToCell(40,100) + + end +end + + +function MarshBadgeQuest:SilphCo4F() + if not hasItem("Master Ball") then + if not hasItem("Card Key III") then + moveToCell(45,153) + else + return moveToCell(41,153) + end + else + return moveToCell(41,153) + end +end + +function MarshBadgeQuest:SilphCo5F() + if not hasItem("Master Ball") then + if not hasItem("Card Key III") then + talkToNpcOnCell(15,217) + else + moveToCell(41,204) + end + else + return moveToCell(41,124) + end +end + +function MarshBadgeQuest:SilphCo7F() + if not hasItem("Master Ball") then + if not hasItem("Card Key III") then + moveToCell(18,306) + elseif isNpcOnCell(15,308) then + talkToNpcOnCell(15,308) + else + moveToCell(18,311) + end + else + return moveToCell(18,306) + end +end + +function MarshBadgeQuest:SilphCo11F() + if not hasItem("Master Ball") then + if not hasItem("Card Key III") then + moveToCell(15,494) + elseif isNpcOnCell(20,502) then + talkToNpcOnCell(20,502) + else + talkToNpcOnCell(23,499) + end + else + return moveToCell(15,494) + end +end + +function MarshBadgeQuest:SaffronFightingDojo() + if isNpcOnCell(103, 5) and isNpcOnCell(105,5) then + if dialogs.dojoSaffronDone.state then + if DOJO_POKEMON_ID == 1 then -- Hitmonchan + return talkToNpcOnCell(103, 5) + else -- Hitmonlee + return talkToNpcOnCell(105,5) + end + else + return talkToNpcOnCell(104,7) + end + else + self.dojoState = true + return moveToNearestLink() + end +end + + +function MarshBadgeQuest:SaffronGym() +if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() +else + if countBadges() < 5 then + if game.inRectangle(145,16,154,24) then + return moveToCell(152,18) + elseif game.inRectangle(154,16,163,24) then + return moveToCell(156,21) + elseif game.inRectangle(136,16,145,24) then + return moveToCell(138,18) + elseif game.inRectangle(154,2,163,9) then + return moveToCell(156,4) + elseif game.inRectangle(154,9,163,16) then + return moveToCell(156,14) + elseif game.inRectangle(145,2,154,9) then + return moveToCell(152,4) + elseif game.inRectangle(136,2,145,9) then + return moveToCell(138,7) + elseif game.inRectangle(145,9,154,16) then + return moveToCell(147,13) + elseif game.inRectangle(149,50,157,58) then + return talkToNpcOnCell(153,51) + else + error("MarshBadgeQuest:SaffronGym(): [" .. getPlayerX() .. "," .. getPlayerY() .. "] is not a known position") + end + else + if game.inRectangle(149,50,157,58) then + return moveToCell(155,56) + elseif game.inRectangle(145,16,154,24) then + return moveToCell(149,24) + else + error("MarshBadgeQuest:SaffronGym(): [" .. getPlayerX() .. "," .. getPlayerY() .. "] is not a known position") + end + end +end +end + +return MarshBadgeQuest diff --git a/Quests/Kanto/MoonFossilQuest.lua b/Quests/Kanto/MoonFossilQuest.lua index aff19df..4d47868 100644 --- a/Quests/Kanto/MoonFossilQuest.lua +++ b/Quests/Kanto/MoonFossilQuest.lua @@ -33,12 +33,11 @@ function MoonFossilQuest:isDoable() end function MoonFossilQuest:isDone() - return getAreaName() == "Cerulean City" + return getAreaName() == "Cerulean City" or getAreaName() == "Pewter Pokémon Center" end function MoonFossilQuest:Route3() if not game.isTeamFullyHealed() - then return moveToCell(178,48) else @@ -46,11 +45,12 @@ function MoonFossilQuest:Route3() end end -function MoonFossilQuest:MtMoon() - if not game.isTeamFullyHealed() - +function MoonFossilQuest:MtMoon() + if not game.isTeamFullyHealed() and self:isTrainingOver() then return moveToCell(105,49) + elseif not self:isTrainingOver() then + return moveToRectangle(98,39,103,40) else return moveToCell(95,16) -- Mt. Moon B1F end @@ -59,12 +59,12 @@ end function MoonFossilQuest:MtMoonB1F() if game.inRectangle(4, 128, 25, 147) then - if not game.isTeamFullyHealed()then - return moveToCell(6, 130) + --if not game.isTeamFullyHealed()then + --return moveToCell(6, 130) - else + --else return moveToCell(21, 145) -- Mt. Moon B2F (wrong way) - end + --end else return moveToCell(36,219) end @@ -72,9 +72,10 @@ end function MoonFossilQuest:MtMoonB2F() - if not game.isTeamFullyHealed() and isNpcOnCell(20,76) then - return moveToCell(35,86) - elseif isNpcOnCell(20,76) then + --if not game.isTeamFullyHealed() and isNpcOnCell(20,76) then + --return moveToCell(35,86) + --else + if isNpcOnCell(20,76) then return talkToNpcOnCell(20,76) else return moveToCell(11,75) diff --git a/Quests/Kanto/PokeFluteQuest.lua b/Quests/Kanto/PokeFluteQuest.lua new file mode 100644 index 0000000..0c0960b --- /dev/null +++ b/Quests/Kanto/PokeFluteQuest.lua @@ -0,0 +1,252 @@ +-- Copyright © 2016 g0ld +-- This work is free. You can redistribute it and/or modify it under the +-- terms of the Do What The Fuck You Want To Public License, Version 2, +-- as published by Sam Hocevar. See the COPYING file for more details. +-- Quest: @Rympex + + +local sys = require "Libs/syslib" +local game = require "Libs/gamelib" +local Quest = require "Quests/Quest" +local Dialog = require "Quests/Dialog" + +local name = 'Poké Flute' +local description = 'Lavender Town (get pokeflute ) and come saffron or fuchsia' +local level = 32 + +local dialogs = { + grandma = Dialog:new({ + "Meowth even brings money home!" + }), + checkFujiNote = Dialog:new({ + "go into that tower to check", + "already read this note" + }) +} + +local PokeFluteQuest = Quest:new() + +function PokeFluteQuest:new() + return Quest.new(PokeFluteQuest, name, description, level, dialogs) +end + +function PokeFluteQuest:isDoable() + if self:hasMap() and not hasItem("HM03") then + return true + end + return false +end + +function PokeFluteQuest:isDone() + if (hasItem("Poké Flute") and (getAreaName() == "Fuchsia City" + or getAreaName() == "Saffron City Gate" or getAreaName() == "Saffron Pokémon Center" )) then --FIX Blackout + return true + else + return false + end +end + +function PokeFluteQuest:LavenderPokémonCenter() + + self:pokecentercell(53,25) + +end +function PokeFluteQuest:LavenderTown() +if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() +else + if self:needPokecenter() or not game.isTeamFullyHealed() or self.registeredPokecenter ~= "Lavender Pokémon Center" + then + return moveToCell(115,116) + elseif not hasItem("Poké Flute") then + return moveToCell(126,117) + elseif countBadges() == 4 then + return moveToCell(90,122) + elseif countBadges() == 5 then + return moveToCell(119,160) + end +end +end + +function PokeFluteQuest:LavenderTownVolunteerHouse() + if not dialogs.checkFujiNote.state then + return talkToNpcOnCell(10,10) + else + return moveToArea("Lavender Town") + end +end + +function PokeFluteQuest:PokémonTower() + if hasItem("Poké Flute") then + return moveToCell(14,25) + else + return moveToCell(23,16) + end +end + +function PokeFluteQuest:PokémonTower2F() + if hasItem("Poké Flute") then + return moveToCell(58,17) + + else + return moveToCell(74,17) + end +end + +function PokeFluteQuest:PokémonTower3F() + if hasItem("Poké Flute") then + return moveToCell(119,17) + else + return moveToCell(135,17) + end +end + +function PokeFluteQuest:PokémonTower4F() + if hasItem("Poké Flute") then + return moveToCell(175,18) + else + return moveToCell(191,18) + end +end + +function PokeFluteQuest:PokémonTower5F() + if hasItem("Poké Flute") then + return moveToCell(9,69) + else + return moveToCell(25,70) + end +end + +function PokeFluteQuest:PokémonTower6F() + if hasItem("Poké Flute") then + return moveToCell(60,69) + else + if isNpcOnCell(72,67) then + talkToNpcOnCell(72,67) + else + return moveToCell(75,70) + end + end +end + +function PokeFluteQuest:PokémonTower7F() + if hasItem("Poké Flute") then + return moveToCell(120,70) + else + if isNpcOnCell(127,65) then + return talkToNpcOnCell(127,65) + + else + return talkToNpcOnCell(128,65) -- Fuji NPC - Give PokeFlute + end + end +end + + +function PokeFluteQuest:Route8() +if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() +else +if countBadges() == 5 then + return moveToCell(105,123) +elseif not hasItem("Tea") and countBadges() != 5 then + return moveToCell(26,119) + +else + return moveToCell(105,123)--return moveToCell(11,123) +end +end +end +function PokeFluteQuest:UndergroundPath() +if not hasItem("Tea") then +if game.inRectangle(105, 6,115, 14) then + return moveToCell(108,10) +elseif game.inRectangle(32, 4,88, 14) then + return moveToCell(33,9) +else + return moveToCell(8,11) +end +else + if game.inRectangle(105, 6,115, 14) then + return moveToCell(111,113) +elseif game.inRectangle(32, 4,88, 14) then + return moveToCell(87,9) +else + return moveToCell(11,7) +end +end +end +function PokeFluteQuest:Route7() +if not hasItem("Tea") and not dialogs.grandma.state then + if isNpcOnCell(198,104) then + return talkToNpcOnCell(198,104) + elseif isNpcOnCell(204,94) then + return talkToNpcOnCell(204,94) + else + return moveToCell(167,85) + end +else + return moveToCell(225,91) +end +end +function PokeFluteQuest:CeladonCity() +if not hasItem("Tea") and not dialogs.grandma.state then + return moveToCell(144,82) +else + return moveToCell(185,86) +end +end + +function PokeFluteQuest:CeladonCondominiums() +if not hasItem("Tea") and not dialogs.grandma.state then + return talkToNpcOnCell(11,13) +else + return moveToCell(21,26) +end +end +function PokeFluteQuest:LavenderTownGate() + return moveToCell(13,23) +end +function PokeFluteQuest:Route12() +if game.inRectangle(83,70,92,77) then +if not hasItem("Super Rod") then + talkToNpcOnCell(85,71) + else + moveToNearestLink() + end +else +if isNpcOnCell(262,133) then +pushDialogAnswer(getItemId("Poké Flute")) +talkToNpcOnCell(262,133) +elseif isNpcOnCell(257,147) then +return talkToNpcOnCell(257,147) +elseif not hasItem("Super Rod") then +return moveToCell(261,149) +else + return moveToCell(267,224) +end +end +end +function PokeFluteQuest:Route13() + + return moveToCell(137,236) + +end +function PokeFluteQuest:Route14() + + return moveToCell(108,260) + +end +function PokeFluteQuest:Route15() + + return moveToCell(42,263) + +end +function PokeFluteQuest:FuchsiaCityGate() + + return moveToCell(128,77) + +end +return PokeFluteQuest \ No newline at end of file diff --git a/Quests/Kanto/RainbowBadgeQuest.lua b/Quests/Kanto/RainbowBadgeQuest.lua new file mode 100644 index 0000000..331841d --- /dev/null +++ b/Quests/Kanto/RainbowBadgeQuest.lua @@ -0,0 +1,306 @@ +-- Copyright © 2016 g0ld +-- This work is free. You can redistribute it and/or modify it under the +-- terms of the Do What The Fuck You Want To Public License, Version 2, +-- as published by Sam Hocevar. See the COPYING file for more details. +-- Quest: @Rympex + + +local sys = require "Libs/syslib" +local game = require "Libs/gamelib" +local Quest = require "Quests/Quest" +local Dialog = require "Quests/Dialog" + +local name = 'Rainbow Badge' +local description = 'Beat Erika + Get Silph Scope for future quest' +local level = 36 + +local dialogs = { + martElevatorFloor1 = Dialog:new({ + "the first floor" + }), + martElevatorFloor5 = Dialog:new({ + "the fifth floor" + }), + martElevatorFloor3 = Dialog:new({ + "the third floor" + }), + martElevatorFloor2 = Dialog:new({ + "the second floor" + }), + grandma = Dialog:new({ + "Please find my friend, Mr. Fuji!" + }), + policegirl = Dialog:new({ + "Tea!", + "Okay. Get us some tea!" + }), +} + +local RainbowBadgeQuest = Quest:new() + +function RainbowBadgeQuest:new() + local o = Quest.new(RainbowBadgeQuest, name, description, level, dialogs) + o.pokemonId = 1 + return o +end + +function RainbowBadgeQuest:isDoable() + if self:hasMap() and not hasItem("Poké Flute") then + return true + end + return false +end + +function RainbowBadgeQuest:isDone() + if (hasItem("Silph Scope") and getAreaName() == "Lavender Town" ) then + return true + else + return false + end +end + +function RainbowBadgeQuest:CeladonCity() +if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() +else + if self:needPokecenter() or not game.isTeamFullyHealed() then + return moveToCell(165,82) + elseif not hasItem("Coin Case") then + return moveToCell(167,97) + elseif not game.hasPokemonWithMove("Cut") then + if self.pokemonId <= getTeamSize() then + useItemOnPokemon("HM01 - Cut", self.pokemonId) + log("Pokemon: " .. self.pokemonId .. " Try Learning: HM01 - Cut") + self.pokemonId = self.pokemonId + 1 + else + fatal("No pokemon in this team can learn - Cut") + end + elseif not self:isTrainingOver() and countBadges() < 4 then + return moveToCell(190,89) + elseif not hasItem("Silph Scope") then + return moveToCell(147,95) + + elseif countBadges() < 4 then + if not game.hasPokemonWithMove("Cut") then + if self.pokemonId <= getTeamSize() then + useItemOnPokemon("HM01 - Cut", self.pokemonId) + log("Pokemon: " .. self.pokemonId .. " Try Learning: HM01 - Cut") + self.pokemonId = self.pokemonId + 1 + else + fatal("No pokemon in this team can learn - Cut") + end + else + return moveToCell(122,122) + end + elseif countBadges() == 4 and dialogs.grandma.state == false then -- Buy Lemonade for Future Quest (Saffron Guard) + return moveToCell(144,82) + elseif countBadges() == 4 and dialogs.grandma.state == false then -- Buy Lemonade for Future Quest (Saffron Guard) + return moveToCell(144,82) + else + return moveToCell(193,93) + end +end +end + +function RainbowBadgeQuest:CeladonCondominiums() + if not dialogs.grandma.state then + return talkToNpcOnCell(11,13) + else + return moveToCell(21,26) + end + +end + +function RainbowBadgeQuest:CeladonRestaurant() + if not hasItem("Coin Case") then + return talkToNpcOnCell(161,38) + else + return moveToCell(166,43) + end + +end + +function RainbowBadgeQuest:CeladonGameCorner() +if game.inRectangle(118,64,137,79) then + if not hasItem("Silph Scope") then + if isNpcOnCell(133,67) then + talkToNpcOnCell(133,67) + else + return moveToCell(135,67) + end + else + return moveToCell(128,78) + end + end + +end + +function RainbowBadgeQuest:RocketHideoutB1F() +if game.inRectangle(3,5,31,40) then + if not hasItem("Silph Scope") then + if isNpcOnCell(16,24) then + talkToNpcOnCell(16,24) + elseif isNpcOnCell(8,23) then + return talkToNpcOnCell(8,23) + else + if not hasItem("Lift Key") then + return moveToCell(20,7) + else + return moveToCell(27,30) + end + end + else + return moveToCell(12,7) + end + elseif game.inRectangle(60,4,65,11) then + if not hasItem("Silph Scope") then + pushDialogAnswer("B4F") + return talkToNpcOnCell(61,5) + else + return moveToCell(63, 10) + end + end + +end +function RainbowBadgeQuest:RocketHideoutB2F() +--if game.inRectangle(3,5,31,40) then + if not hasItem("Lift Key") then + if getPlayerX() > 31 and getPlayerY() <= 73 then + moveToCell(31,74) + elseif getPlayerX() >= 31 and getPlayerY() > 73 then + moveToCell(26,74) + else + moveToCell(27,67) + end + else + return moveToCell(38,67) + end +-- end + +end +function RainbowBadgeQuest:RocketHideoutB3F() +--if game.inRectangle(3,5,31,40) then + if not hasItem("Lift Key") then + if isNpcOnCell(16,123) then + talkToNpcOnCell(16,123) + elseif isNpcOnCell(26,130) then + talkToNpcOnCell(26,130) + else + moveToCell(20,135) + end + else + return moveToCell(21,113) + end +-- end + +end + +function RainbowBadgeQuest:RocketHideoutB4F() +if game.inRectangle(3,172,18,191) then + if not hasItem("Lift Key") then + if isNpcOnCell(10,184) then + return talkToNpcOnCell(10,184) + elseif isNpcOnCell(8,175) then + return talkToNpcOnCell(8,175) + end + else + return moveToCell(18,187) + end + elseif game.inRectangle(60,173,65,180) then + if hasItem("Silph Scope") then + pushDialogAnswer("B1F") + talkToNpcOnCell(61,174) + else + return moveToCell(62,179) + end +else + if isNpcOnCell(25,170) then + return talkToNpcOnCell(25,170) + elseif hasItem("Silph Scope") then + return moveToCell(27,196) + else + return talkToNpcOnCell(24,178) + end + end + + +end + +function RainbowBadgeQuest:CeladonPokémonCenter() + if not game.isTeamFullyHealed() then + self:pokecenter("Celadon City") + else + + return moveToCell(12,84) + end +end + +function RainbowBadgeQuest:Route7() + if not self:isTrainingOver() then + + return moveToGrass() +else + if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() + else + if countBadges() == 4 then + if not dialogs.policegirl.state then + return moveToCell(225,90) + else + return moveToCell(191,106) + end + else + return moveToCell(170,87) + + end +end +end +end + +function RainbowBadgeQuest:SaffronCityGate() + if not dialogs.policegirl.state then + return talkToNpcOnCell(10,23) + else + return moveToCell(3,26) + + end + +end + +function RainbowBadgeQuest:CeladonGym() + if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() + else + if countBadges() < 4 then + if isNpcOnCell(45,46) then + return talkToNpcOnCell(45,46) + + else + return talkToNpcOnCell(45,11) --moveToCell(45,14) + + end + else + return moveToCell(44,53) + end + end +end + + +function RainbowBadgeQuest:UndergroundPath() +if game.inRectangle(105, 6,115, 14) then + return moveToCell(111,13) +elseif game.inRectangle(32, 4,88, 14) then + return moveToCell(87,9) +else + return moveToCell(11,7) +end +end + +function RainbowBadgeQuest:Route8() + return moveToCell(105,123) +end + +return RainbowBadgeQuest \ No newline at end of file diff --git a/Quests/Kanto/RockTunnelQuest.lua b/Quests/Kanto/RockTunnelQuest.lua new file mode 100644 index 0000000..3a8adfc --- /dev/null +++ b/Quests/Kanto/RockTunnelQuest.lua @@ -0,0 +1,163 @@ +-- Copyright © 2016 g0ld +-- This work is free. You can redistribute it and/or modify it under the +-- terms of the Do What The Fuck You Want To Public License, Version 2, +-- as published by Sam Hocevar. See the COPYING file for more details. +-- Quest: @Rympex + + +local sys = require "Libs/syslib" +local game = require "Libs/gamelib" +local Quest = require "Quests/Quest" +local Dialog = require "Quests/Dialog" + +local name = 'Rock Tunnel' +local description = 'Route 9 to Celadon' +local level = 15 + +local RockTunnelQuest = Quest:new() + +function RockTunnelQuest:new() + return Quest.new(RockTunnelQuest, name, description, level) +end + +function RockTunnelQuest:isDoable() + if self:hasMap() and not hasItem("Silph Scope") then + return true + end + return false +end + +function RockTunnelQuest:isDone() + if getAreaName() == "Celadon City" or getAreaName() == "Vermilion Pokémon Center" then --FIX Blackout if not Route10 or Lavander Pokecenter is Setup + return true + else + return false + end +end + +function RockTunnelQuest:Route9() +if game.inRectangle(204,104,215,109) and isNpcOnCell(212,109) then + return talkToNpcOnCell(212,109) + elseif isNpcOnCell(222,137) then + return talkToNpcOnCell(222,137) -- rare candy + elseif isNpcOnCell(222,142) then + return talkToNpcOnCell(222,142) -- super potion + elseif isNpcOnCell(267,137) then + return talkToNpcOnCell(267,137) -- chestos berry + elseif isNpcOnCell(309,139) then + return talkToNpcOnCell(309,139) -- persism berry + elseif isNpcOnCell(317,147) then + return talkToNpcOnCell(317,147) -- panab berry +else + return moveToCell(315,154) +end +end + +function RockTunnelQuest:Route10() + if game.inRectangle(297,151,322,170) then + if self:needPokecenter() or not game.isTeamFullyHealed() then + return moveToCell(308,161) + else + return moveToCell(301,157) + end + else + return moveToCell(120,110) + end +end + +function RockTunnelQuest:RockTunnelPokémonCenter() +if self:needPokecenter() or not game.isTeamFullyHealed() then + self:pokecenter("Route 10") +else + moveToCell(18,33) +end +end + +function RockTunnelQuest:RockTunnel() + if game.inRectangle(43,14,58,27) then + if self:needPokecenter() or not game.isTeamFullyHealed() then + return moveToCell(56,19) + --elseif isNpcOnCell(41,27) then + -- return talkToNpcOnCell(41,27) + else + return moveToCell(47,25) + end + elseif game.inRectangle(1,59,59,75) then + if isNpcOnCell(16,67) then + talkToNpcOnCell(16,67) + else + return moveToCell(17,62) + end + elseif game.inRectangle(15,14,42,30) then + if isNpcOnCell(42,19) then + return talkToNpcOnCell(42,19) + else + return moveToCell(20,26) + end + elseif game.inRectangle(14,72,38,93) then + return moveToCell(17,91) + else + moveToCell(33,46) + end +end + + + +function RockTunnelQuest:LavenderTown() + if self:needPokecenter() or not game.isTeamFullyHealed() then + return moveToCell(115,116) + + else + return moveToCell(97,122) + end +end + +function RockTunnelQuest:LavenderPokémonCenter() +if self:needPokecenter() or not game.isTeamFullyHealed() then + self:pokecenter("Lavender Town") +else + return moveToCell(53,25) +end +end + +function RockTunnelQuest:Route8() +--if self:needPokecenter() or not game.isTeamFullyHealed() then + + --return moveToCell(105,122) + +--else + --if isNpcOnCell(90,117) then -- Item: Leppa Berry + -- return talkToNpcOnCell(90,117) + --else + if isNpcOnCell(57,3) then -- Item: Leppa Berry + return talkToNpcOnCell(57,3) + elseif isNpcOnCell(52,9) then --Pokemon: Growlithe LvL 10 (BlueBall) + return talkToNpcOnCell(52,9) + else + return moveToCell(26,119) + end +--end +end + + +function RockTunnelQuest:UndergroundPath() +if game.inRectangle(105, 6,115, 14) then + return moveToCell(108,10) +elseif game.inRectangle(32, 4,88, 14) then + return moveToCell(33,9) +else + return moveToCell(8,11) +end +end + +function RockTunnelQuest:Route7() + if isNpcOnCell(198,104) then + return talkToNpcOnCell(198,104) + elseif isNpcOnCell(204,94) then + return talkToNpcOnCell(204,94) + else + return moveToCell(167,85) + end +end + +return RockTunnelQuest \ No newline at end of file diff --git a/Quests/Kanto/SoulBadgeQuest.lua b/Quests/Kanto/SoulBadgeQuest.lua new file mode 100644 index 0000000..e7c7ef2 --- /dev/null +++ b/Quests/Kanto/SoulBadgeQuest.lua @@ -0,0 +1,388 @@ +-- Copyright © 2016 g0ld +-- This work is free. You can redistribute it and/or modify it under the +-- terms of the Do What The Fuck You Want To Public License, Version 2, +-- as published by Sam Hocevar. See the COPYING file for more details. +-- Quest: @Rympex + + +local sys = require "Libs/syslib" +local game = require "Libs/gamelib" +local Quest = require "Quests/Quest" +local Dialog = require "Quests/Dialog" + +local name = 'Sould Badge' +local description = 'Fuchsia City' +local level = 48 + +local dialogs = { + questSurfAccept = Dialog:new({ + "There is something there I want you to take", + "Did you get the HM broseph" + }), + questRockSmash = Dialog:new({ + "Hif fuff hefifoo!", + "Ha lof ha feef ee hafahi ho." + }), +} + +local SoulBadgeQuest = Quest:new() + +function SoulBadgeQuest:new() + local o = Quest.new(SoulBadgeQuest, name, description, level, dialogs) + o.zoneExp = 1 + o.pokemonId = 1 + o.nosurf = false + return o +end + +function SoulBadgeQuest:isDoable() + if self:hasMap() and not hasItem("Secret Key III") then + if getMapName() == "Route 15" then + if hasItem("Soul Badge") and hasItem("HM03") then + return false + else + return true + end + else + return true + end + end + return false +end + +function SoulBadgeQuest:isDone() + if getAreaName()== "Cinnabar Pokémon Center" then + return true + else + return false + end +end + +function SoulBadgeQuest:pokemart_() + local pokeballCount = getItemQuantity("Pokeball") + local money = getMoney() + if money >= 200 and pokeballCount < 50 then + if not isShopOpen() then + return talkToNpcOnCell(9,8) + else + local pokeballToBuy = 50 - pokeballCount + local maximumBuyablePokeballs = money / 200 + if maximumBuyablePokeballs < pokeballToBuy then + pokeballToBuy = maximumBuyablePokeballs + end + return buyItem("Pokeball", pokeballToBuy) + end + else + return moveToArea("Fuchsia City") + end +end + +function SoulBadgeQuest:FuchsiaPokémonMart() + local pokeballCount = getItemQuantity("Poké Ball") + local money = getMoney() + if money >= 200 and pokeballCount < 50 then + if not isShopOpen() then + return talkToNpcOnCell(15,7) + else + local pokeballToBuy = 50 - pokeballCount + local maximumBuyablePokeballs = money / 200 + if maximumBuyablePokeballs < pokeballToBuy then + pokeballToBuy = maximumBuyablePokeballs + end + return buyItem("Poké Ball", pokeballToBuy) + end + else + return moveToCell(9,16) + end +end + +function SoulBadgeQuest:needPokemart_() + if getItemQuantity("Pokeball") < 50 and getMoney() >= 200 then + return true + end + return false +end + +function SoulBadgeQuest:canEnterSafari() + return getMoney() > 5000 +end + +function SoulBadgeQuest:randomZoneExp() + if self.zoneExp == 1 then + if game.inRectangle(51,18,55,22) then--Zone 1 + return moveToGrass() + else + return moveToCell(53,20) + end + elseif self.zoneExp == 2 then + if game.inRectangle(65,29,70,31) then--Zone 2 + return moveToGrass() + else + return moveToCell(68,30) + end + elseif self.zoneExp == 3 then + if game.inRectangle(62,14,66,15) then--Zone 3 + return moveToGrass() + else + return moveToCell(64,14) + end + else + if game.inRectangle(89,14,91,18) then--Zone 4 + return moveToGrass() + else + return moveToCell(90,16) + end + end +end + +function SoulBadgeQuest:FuchsiaPokémonCenter() + if hasItem("HM03") and getTeamSize() == 6 then + if not game.hasPokemonWithMove("Surf") then + if self.pokemonId <= getTeamSize() then + useItemOnPokemon("HM03", self.pokemonId) + log("Pokemon: " .. self.pokemonId .. " Try Learning: HM03 - Surf") + self.pokemonId = self.pokemonId + 1 + return + else + if isPCOpen() then + self.nosurf = true + return depositPokemonToPC(6) + else + return usePC() + end + end + else + self:pokecentercell(102,98) + end + else + self:pokecentercell(102,98) + end +end +function SoulBadgeQuest:Route18() + if self:canEnterSafari() then + return moveToArea("Fuchsia City") + else + return moveToRectangle(32,19,35,19) + end + +end + +function SoulBadgeQuest:FuchsiaCity() +self.pokemonId = 1 +if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() +else + if game.inRectangle(63,41,77,52) then + if (not dialogs.questRockSmash.state or hasItem("Gold Teeth")) and not hasItem("HM06") then + return talkToNpcOnCell(68,47) + else + return moveToNearestLink() + end + elseif game.inRectangle(95,43,107,54) then + if not hasItem("Good Rod") then + return talkToNpcOnCell(105,46) + else + return moveToCell(99,52) + end + else + if self:needPokecenter() or not game.isTeamFullyHealed() or self.registeredPokecenter ~= "Fuchsia Pokémon Center" then + return moveToCell(115,98) + elseif not hasItem("Good Rod") then + return moveToCell(141,93) + elseif countBadges() < 6 then + return moveToCell(97,98) + elseif not self:canEnterSafari() then + return moveToArea("Route 18") + elseif not hasItem("HM06") then + if not dialogs.questRockSmash.state or hasItem("Gold Teeth") then + return moveToCell(134,93) + else + return moveToCell(121,51) + end + elseif not game.hasPokemonWithMove("Surf") and getTeamSize() == 6 and hasItem("HM03") then + return moveToCell(115,98) + else + return moveToCell(108,118) + end + end +end +end +function SoulBadgeQuest:FuchsiaCityGate() + if not game.hasPokemonWithMove("Surf") and getTeamSize() == 6 and hasItem("HM03") then + return moveToCell(73,134) + else + return moveToCell(73,147) --73,134 + end +end +function SoulBadgeQuest:SafariGate() + + if getPlayerY() > 15 then + if not hasItem("HM03") and self:canEnterSafari() then + return talkToNpcOnCell(36,15) + else + return moveToCell(33,24) + end + else + if hasItem("HM03") and self:canEnterSafari() then + return talkToNpcOnCell(36,15) + else + return moveToCell(33,11) + end + end + end +function SoulBadgeQuest:KantoSafariZone() + if game.inRectangle(123,125,155,150) or game.inRectangle(144,112,155,124) or game.inRectangle(144,112,170,113) then + if not hasItem("HM03") then + return moveToCell(169,113) + else + return moveToCell(126,148) + end +end +end + +function SoulBadgeQuest:KantoSafariZoneEast() + if not hasItem("HM03") then + if getPlayerX() < 162 then + return moveToCell(182,113) + elseif game.inRectangle(178,104,194,118) then + return moveToCell(177,110) + elseif getPlayerY() > 100 then + return moveToCell(166,100) + else + return moveToCell(151,67) + end + + else + return moveToCell(160,113) + end +end + +function SoulBadgeQuest:CinnabarIsland() + moveToCell(102,119) +end + +function SoulBadgeQuest:KantoSafariZoneNorth() + if not hasItem("Gold Teeth") then + return moveToCell(83,73) + elseif not hasItem("HM03") then + if getPlayerX() > 76 and getPlayerY() > 40 then + return moveToCell(87,40) + else + return moveToCell(40,74) + end + else + return moveToCell(160,113) + end +end + +function SoulBadgeQuest:KantoSafariZoneWest() + if not hasItem("Gold Teeth") then + return talkToNpcOnCell(52,107) + elseif not hasItem("HM03") then + return moveToCell(40,74) + elseif hasItem("HM03") then + return moveToGrass() + else + return moveToCell(83,67) + end +end + +function SoulBadgeQuest:SecretHouse() + if not hasItem("HM03") then --isNpcOnCell(10,80) then + return talkToNpcOnCell(10,80) + + else + return moveToCell(10,85) + end +end + +function SoulBadgeQuest:FuchsiaCityStopHouse() + if not hasItem("HM03") then + return moveToCell(169,113) + elseif not hasItem("HM03") then + if dialogs.questSurfAccept.state then + return moveToArea("Fuchsia City") + else + return moveToArea("Route 19") + end + else + return moveToArea("Route 19") + end +end + +function SoulBadgeQuest:Route19() + +if not game.hasPokemonWithMove("Surf") then + if getTeamSize() < 6 then + if getPlayerX() != 284 and getPlayerY() != 90 then + return moveToCell(284,90) + else + return useItem("Super Rod") + end + else + return moveToCell(287,74) + end +else +moveToCell(263,111) +end + +end + +function SoulBadgeQuest:Route20() +if game.inRectangle(206,125,225,135) or game.inRectangle(184,128,206,141) or getPlayerX() < 183 then + moveToCell(110,125) +else + moveToCell(199,118) + end +end + +function SoulBadgeQuest:SeafoamIslands() +if game.inRectangle(27,290,40,303) then + + moveToCell(35,296) + else + moveToCell(10,256) + end +end +function SoulBadgeQuest:SeafoamIslandsB1F() +if not game.hasPokemonWithMove("Rock Smash") then + if self.pokemonId <= getTeamSize() then + useItemOnPokemon("HM06", self.pokemonId) + log("Pokemon: " .. self.pokemonId .. " Try Learning: HM06 - Rock Smash") + self.pokemonId = self.pokemonId + 1 + return + else + fatal("no pokemon can learn rock smash") + end +elseif isNpcOnCell(14,16) then + talkToNpcOnCell(14,16) + else + moveToCell(49,24) + end +end + +function SoulBadgeQuest:Route15() + if self:needPokecenter() or self:isTrainingOver() or not self.registeredPokecenter == "Pokecenter Fuchsia" then + return moveToArea("Route 15 Stop House") + else + moveToRectangle(13,24,17,24) + --return self:randomZoneExp() + end +end + +function SoulBadgeQuest:FuchsiaGym() +if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() +else + if countBadges() < 6 then + -- + return talkToNpcOnCell(9,84) + else + return moveToCell(9,98) + end +end +end + +return SoulBadgeQuest \ No newline at end of file diff --git a/Quests/Kanto/StartKantoQuest.lua b/Quests/Kanto/StartKantoQuest.lua index 2eff8fa..3a649aa 100644 --- a/Quests/Kanto/StartKantoQuest.lua +++ b/Quests/Kanto/StartKantoQuest.lua @@ -12,6 +12,7 @@ local name = 'StartKantoQuest' local description = 'Getting starter and finishing Viridian City quests!' local dialogs = { momTalk = Dialog:new({ + "Right. All girls leave home someday. It said so on TV.", "Right. All boys leave home someday.", "Oh good! You and your Pokémon are looking great! Take care now!" }), @@ -52,7 +53,7 @@ function StartKantoQuest:new() end function StartKantoQuest:isDoable() - if self:hasMap() + if self:hasMap() and not hasItem("Poké Flute") then return true end @@ -88,8 +89,14 @@ function StartKantoQuest:ViridianPokémonMart() end function StartKantoQuest:OaksLab() - if getTeamSize() == 0 then - pushDialogAnswer(starterName) + if getTeamSize() == 0 and KANTO_STARTER_ID == 1 then + pushDialogAnswer("Bulbasaur") + talkToNpcOnCell(22, 103) -- TODO : Choose you damn pokemon + elseif getTeamSize() == 0 and KANTO_STARTER_ID == 2 then + pushDialogAnswer("Charmander") + talkToNpcOnCell(22, 103) -- TODO : Choose you damn pokemon + elseif getTeamSize() == 0 and KANTO_STARTER_ID == 3 then + pushDialogAnswer("Squirtle") talkToNpcOnCell(22, 103) -- TODO : Choose you damn pokemon else moveToCell(22, 108) diff --git a/Quests/Kanto/ThunderBadgeQuest.lua b/Quests/Kanto/ThunderBadgeQuest.lua index cf51b21..775f896 100644 --- a/Quests/Kanto/ThunderBadgeQuest.lua +++ b/Quests/Kanto/ThunderBadgeQuest.lua @@ -9,7 +9,7 @@ local Quest = require "Quests/Quest" local Dialog = require "Quests/Dialog" local name = 'Thunder Badge Quest' -local description = 'From Route 5 to Route 6' +local description = 'Get Thunder Badge and HM05 and move to Pokecenter Route 10' local level = 10 @@ -54,14 +54,17 @@ function ThunderBadgeQuest:new() end function ThunderBadgeQuest:isDoable() - if self:hasMap() then + if self:hasMap() and not hasItem("Silph Scope") then return true end return false end function ThunderBadgeQuest:isDone() - if ( getMapName() == "Route 11" or getMapName() == "Route 5" ) then + if getAreaName() == "Route 9" or getAreaName() == "Cerulean Pokémon Center" + or (getAreaName() == "Underground Path" and (game.inRectangle(105, 6,115, 14) + or game.inRectangle(32, 4,88, 14) or game.inRectangle(4, 4,14, 12) )) + then return true else return false @@ -104,7 +107,7 @@ function ThunderBadgeQuest:Route5() if not isTrainerInfoReceived() then log("getting trainer info") return askForTrainerInfo() - elseif countBadges() == 3 and hasItem("HM05 - Flash") then + elseif countBadges() == 3 and hasItem("HM09") then return moveToCell(157,138) else return moveToCell(157,189) @@ -122,7 +125,7 @@ function ThunderBadgeQuest:UndergroundPath() return askForTrainerInfo() else if game.inRectangle(4, 2,14, 10) then - if countBadges() == 3 and hasItem("HM05 - Flash") then + if countBadges() == 3 and hasItem("HM09") then return moveToCell(8,9) else return moveToCell(11,5) @@ -130,13 +133,13 @@ function ThunderBadgeQuest:UndergroundPath() elseif game.inRectangle(1, 26,14, 70) then if isNpcOnCell(12,63) then return talkToNpcOnCell(12,63) -- Full Restore - elseif countBadges() == 3 and hasItem("HM05 - Flash") then + elseif countBadges() == 3 and hasItem("HM09") then return moveToCell(7,28) else return moveToCell(7,67) end else - if countBadges() == 3 and hasItem("HM05 - Flash") then + if countBadges() == 3 and hasItem("HM09") then return moveToCell(11,83) else return moveToCell(8,87) @@ -151,7 +154,7 @@ function ThunderBadgeQuest:Route6() if not isTrainerInfoReceived() then log("getting trainer info") return askForTrainerInfo() - elseif countBadges() == 3 and hasItem("HM05 - Flash") then + elseif countBadges() == 3 and hasItem("HM09") then return moveToCell(127,27) elseif not dialogs.Isa.state then return talkToNpcOnCell(124, 48) -- picnicker isa @@ -193,7 +196,7 @@ else return askForTrainerInfo() elseif self:needPokecenter() or not game.isTeamFullyHealed() then return moveToCell(107,105) - elseif countBadges() == 3 and hasItem("HM05 - Flash") then + elseif countBadges() == 3 and hasItem("HM09") then return moveToCell(120,84) elseif not dialogs.fishingbook3.state and not hasItem("Old Rod") then return moveToCell(99,103) @@ -224,19 +227,73 @@ else end elseif self:needPokemart() then return moveToCell(135,126) - elseif countBadges() == 3 then - return moveToCell(183,139) + --elseif countBadges() == 3 then--and getPokedexOwned() < 11 then + -- return moveToCell(183,139) + elseif countBadges() == 3 and not hasItem("HM09") then --and getPokedexOwned() >= 11 and not hasItem("HM09") then + return moveToCell(167,132) end end end function ThunderBadgeQuest:VermilionPokémonMart() - self:pokemart(10,17,9,9) + self:pokemart(9,9) end +function ThunderBadgeQuest:Route11() + if getPokemonHealthPercent(1) < 50 or self:needPokemart() then + return moveToCell(174,137) + --elseif getPokedexOwned() < 11 then + --return moveToGrass() + elseif not hasItem("HM09") then + return moveToCell(174,137) + end + +end + + +function ThunderBadgeQuest:CeruleanCity() + if not hasItem("HM09") then + return moveToCell(155,138) + else + return moveToCell(205,107) + end + +end + +function ThunderBadgeQuest:Route2() + if not hasItem("HM09") then + return talkToNpcOnCell(34,97) + else + return moveToCell(34,92) + end + +end +function ThunderBadgeQuest:DiglettsCave() +if game.inRectangle(38,87,51,96) then + if getPokemonHealthPercent(1) < 50 or self:needPokemart() then + return moveToCell(41,95) + elseif not hasItem("HM09") then + return moveToCell(48,91) + else + return moveToCell(41,95) + end +elseif game.inRectangle(12,5,45,62) then + if not hasItem("HM09") then + return moveToCell(15,9) + else + return moveToCell(42,58) + end +else + if not hasItem("HM09") then + return moveToCell(8,94) + else + return moveToCell(13,88) + end +end +end function ThunderBadgeQuest:puzzleBinPosition(binId) local xCount = 5 @@ -272,6 +329,10 @@ function ThunderBadgeQuest:solvePuzzle() end function ThunderBadgeQuest:VermilionGym() +if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() +else if not game.isTeamFullyHealed() or countBadges() == 3 then return moveToCell(87,90) else @@ -285,7 +346,7 @@ function ThunderBadgeQuest:VermilionGym() end end end - -- end +end end return ThunderBadgeQuest diff --git a/Quests/Kanto/VolcanoBadgeQuest.lua b/Quests/Kanto/VolcanoBadgeQuest.lua new file mode 100644 index 0000000..75c17b0 --- /dev/null +++ b/Quests/Kanto/VolcanoBadgeQuest.lua @@ -0,0 +1,266 @@ +-- Copyright © 2016 g0ld +-- This work is free. You can redistribute it and/or modify it under the +-- terms of the Do What The Fuck You Want To Public License, Version 2, +-- as published by Sam Hocevar. See the COPYING file for more details. +-- Quest: @Rympex + + +local sys = require "Libs/syslib" +local game = require "Libs/gamelib" +local Quest = require "Quests/Quest" +local Dialog = require "Quests/Dialog" + +local name = 'Volcano Badge' +local description = 'Revive Fossil + Secret Key III + Exp on Seafoam B4F' +local level = 49--49 +local dialogs = { + gymconfirm = Dialog:new({ + "Blaine is in the cave in Seafoam Island.", + "They are building a new gym there." + }), +} + + +local VolcanoBadgeQuest = Quest:new() + +function VolcanoBadgeQuest:new() + local o = Quest.new(VolcanoBadgeQuest, name, description, level, dialogs) + o.pokemonId = 1 + return o +end + +function VolcanoBadgeQuest:isDoable() + if self:hasMap() then + return true + end + return false +end + +function VolcanoBadgeQuest:isDone() + if getAreaName() == "Route 21" then + return true + end + return false +end + +function VolcanoBadgeQuest:CinnabarPokémonCenter() + return self:pokecenter("Cinnabar Island") +end + +function VolcanoBadgeQuest:CinnabarIsland() + --if not game.hasPokemonWithMove("Surf") then + -- if self.pokemonId <= getTeamSize() then + -- useItemOnPokemon("HM03 - Surf", self.pokemonId) + -- log("Pokemon: " .. self.pokemonId .. " Try Learning: HM03 - Surf") + -- self.pokemonId = self.pokemonId + 1 + -- return + -- end + --else +if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() +else + if self:needPokecenter() or self.registeredPokecenter ~= "Cinnabar Pokémon Center" then + -- if getPlayerX() > 105 then + -- return moveToCell(105,132) + --else + return moveToCell(102,119) + --end + +-- elseif ( getItemQuantity("Elixir") < 10 ) and getMoney() > 15000 then + -- return moveToArea("Cinnabar Pokemart") + elseif not hasItem("Secret Key III") then + --if isNpcOnCell(18,15) then + -- return talkToNpcOnCell(18,15) + --else + return moveToCell(94,93) + --end + elseif not self:isTrainingOver() then + return moveToCell(94,93) + elseif countBadges() < 7 and dialogs.gymconfirm.state == false then + -- if getPlayerX() < 125 then + -- return moveToCell(125,130) + -- else + if isNpcOnCell(128,81) then + return talkToNpcOnCell(128,81) + else + return moveToCell(128,81) + end + elseif countBadges() < 7 and dialogs.gymconfirm.state == true then + return moveToCell(160,130) + --elseif hasItem("Dome Fossil") or hasItem("Helix Fossil") then + --return moveToArea("Cinnabar Lab") + else + + return moveToArea("Route 21") + end +end +end + +function VolcanoBadgeQuest:PokémonMansion() + if not hasItem("Secret Key III") then + if game.inRectangle(3,12,16,37) then + moveToCell(14,14) + elseif game.inRectangle(19,19,40,37) then + moveToCell(28,29) + end + else + if not self:isTrainingOver() then + moveToRectangle(8,27,14,30) + else + if game.inRectangle(3,12,16,37) then + moveToCell(11,35) + elseif game.inRectangle(19,19,40,37) then + moveToCell(37,35) + end + end + end +end + +function VolcanoBadgeQuest:PokémonMansion2F() +if not hasItem("Secret Key III") then + if game.inRectangle(3,59,39,95) then + if isNpcOnCell(15,64) then + talkToNpcOnCell(5,72) + else + + moveToCell(13,61) + end + end +end +end +function VolcanoBadgeQuest:PokémonMansion3F() +if not hasItem("Secret Key III") then + if game.inRectangle(2,124,39,145) then + if isNpcOnCell(19,134) then + talkToNpcOnCell(14,128) + else + + moveToCell(20,140) + end + end +end +end + +function VolcanoBadgeQuest:PokémonMansionB1F() +if not hasItem("Secret Key III") then + if isNpcOnCell(15,184) then + talkToNpcOnCell(30,178) + else + + talkToNpcOnCell(5,182) + end +else + if not isNpcOnCell(15,184) then + talkToNpcOnCell(30,178) + else + + moveToCell(42,203) + end +end +end +function VolcanoBadgeQuest:CinnabarPokemart() + if (getItemQuantity("Elixir") < 10 ) and getMoney() > 7500 then + if not isShopOpen() then + return talkToNpcOnCell(3,5) + else + return buyItem("Elixir", 10) + end + else + return moveToArea("Cinnabar Island") +end +end +function VolcanoBadgeQuest:CinnabarGym() + if dialogs.gymconfirm.state == false then + if isNpcOnCell(95,9) then + return talkToNpcOnCell(92,10) + elseif isNpcOnCell(86,12) then + return talkToNpcOnCell(84,2) + elseif isNpcOnCell(86,21) then + return talkToNpcOnCell(84,13) + -- elseif isNpcOnCell(82,28) then + -- return talkToNpcOnCell(83,22) + elseif isNpcOnCell(74,21) then + return talkToNpcOnCell(71,22) + elseif isNpcOnCell(74,12) then + return talkToNpcOnCell(71,13) + else + return talkToNpcOnCell(74,5) + end + else + return moveToCell(94,35) + end +end + +function VolcanoBadgeQuest:CinnabarGymB1F() + if not hasItem("Volcano Badge") and game.isTeamFullyHealed() then + return talkToNpcOnCell(18,16) + else + return moveToArea("Cinnabar Gym") + end +end + +--** EXP SECTION ** + +function VolcanoBadgeQuest:canUseNurse() + return getMoney() > 1500 +end + + + +function VolcanoBadgeQuest:Route20() + -- if ( hasItem('Good Rod') or hasItem("Old Rod")) and not hasPokemonInTeam("Magikarp") then + -- return useItem('Good Rod') or useItem('Old Rod') + --else + -- return moveToArea("Cinnabar Island") + --end +if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() +else + if countBadges() < 7 then + return moveToCell(214,125) + else + return moveToCell(119,129) + end +end +end + + +function VolcanoBadgeQuest:SeafoamIslands() +if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() +else + if countBadges() < 7 then + return moveToCell(14,251) + else + return moveToCell(10,256) + end +end +end + +function VolcanoBadgeQuest:SeafoamGym() +if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() +else + if countBadges() < 7 then + if isNpcOnCell(17,353) then + return talkToNpcOnCell(17,353) + elseif isNpcOnCell(10,353) then + return talkToNpcOnCell(10,353) + elseif isNpcOnCell(11,348) then + return talkToNpcOnCell(11,348) + else + return talkToNpcOnCell(15,348) + end + else + return moveToCell(16,360) + end +end +end + + + +return VolcanoBadgeQuest diff --git a/Quests/Quest.lua b/Quests/Quest.lua index efceb94..e406a03 100644 --- a/Quests/Quest.lua +++ b/Quests/Quest.lua @@ -1,4 +1,4 @@ - -- Copyright © 2016 g0ld + -- Copyright © 2016 g0ld -- Copyright © 2016 g0ld -- Copyright © 2016 g0ld -- This work is free. You can redistribute it and/or modify it under the @@ -68,12 +68,22 @@ function Quest:evolvePokemon() end end function Quest:pokecenter(exitMapName) -- idealy make it work without exitMapName + self.registeredPokecenter = getAreaName() + sys.todo("add a moveDown() or moveToNearestLink() or getLinks() to PROShine") + if not game.isTeamFullyHealed() then + return usePokecenter() + else + return moveToNearestLink() + end +end + +function Quest:pokecentercell(cellX,cellY) -- idealy make it work without exitMapName self.registeredPokecenter = getAreaName() sys.todo("add a moveDown() or moveToNearestLink() or getLinks() to PROShine") if not game.isTeamFullyHealed() then return usePokecenter() else - return moveToArea(exitMapName) + return moveToCell(cellX,cellY) end end @@ -101,7 +111,49 @@ function Quest:pokemart(x,y,npcx,npcy) end end +function Quest:pokemart(npcx,npcy) + local pokeballCount = getItemQuantity("Poké Ball") + local money = getMoney() + if money >= 200 and pokeballCount < 10 then + if not isShopOpen() then + return talkToNpcOnCell(npcx,npcy) + else + local pokeballToBuy = 20 - pokeballCount + local maximumBuyablePokeballs = money / 200 + if maximumBuyablePokeballs < pokeballToBuy then + pokeballToBuy = maximumBuyablePokeballs + end + return buyItem("Poké Ball", pokeballToBuy) + + end + elseif isShopOpen() then + return closeShop() + else + return moveToNearestLink() + end +end +function Quest:pokemartrepel(npcx,npcy) + local pokeballCount = getItemQuantity("Max Repel") + local money = getMoney() + if money >= 200 and pokeballCount < 1 then + if not isShopOpen() then + return talkToNpcOnCell(npcx,npcy) + else + local pokeballToBuy = 1 - pokeballCount + local maximumBuyablePokeballs = money / 700 + if maximumBuyablePokeballs < pokeballToBuy then + pokeballToBuy = maximumBuyablePokeballs + end + return buyItem("Max Repel", pokeballToBuy) + + end + elseif isShopOpen() then + return closeShop() + else + return moveToNearestLink() + end +end function Quest:isTrainingOver() if game.maxTeamLevel() >= self.level then if self.training then -- end the training @@ -131,12 +183,23 @@ function Quest:needPokemart() end - -function Quest:useBikeAndOtherStuffs() - if not isTrainerInfoReceived() then +function Quest:askPlayerStats() + if not isTrainerInfoReceived() then log("getting trainer info") return askForTrainerInfo() + end + -- body +end +function Quest:useBikeAndOtherStuffs() + for i=1,getTeamSize() do + if getPokemonName(i) == "Blastoise" and getPokemonCollectedEffortValue(i, "Def") > 0 + and getPokemonEffortValue(i,"Def") ~= getPokemonCollectedEffortValue(i, "Def") then + return setCollectedEffortValue(i, "Def", getPokemonCollectedEffortValue(i, "Def")) + elseif getPokemonName(i) == "Blastoise" and getPokemonCollectedEffortValue(i, "Spdef") > 0 + and getPokemonEffortValue(i,"Spdef") ~= getPokemonCollectedEffortValue(i, "Spdef") then + return setCollectedEffortValue(i, "Spdef", getPokemonCollectedEffortValue(i, "Spdef")) end + end end @@ -170,17 +233,7 @@ end function Quest:advanceSorting() local pokemonsUsable = game.getTotalUsablePokemonCount() - for pokemonId=1, pokemonsUsable, 1 do - if not isPokemonUsable(pokemonId) then --Move it at bottom of the Team - for pokemonId_ = pokemonsUsable + 1, getTeamSize(), 1 do - if isPokemonUsable(pokemonId_) then - swapPokemon(pokemonId, pokemonId_) - return true - end - end - - end - end + if hasPokemonInTeam("Squirtle") and not hasItem("Soul Badge") and not hasItem("HM03 - Surf") then for i=1,getTeamSize() do @@ -205,7 +258,12 @@ function Quest:advanceSorting() end end end + if getTeamSize() > 1 then + if game.maxTeamLevel() - game.minTeamLevel() > 15 and game.maxTeamLevel() < self.level then + return sortTeamRangeByLevelAscending(1, pokemonsUsable) + end return sortTeamRangeByLevelDescending(1, pokemonsUsable) + end end @@ -214,7 +272,10 @@ function Quest:path() self.inBattle = false self:battleEnd() end - if self:advanceSorting() then + if self:useBikeAndOtherStuffs() then + return true + end + if self:advanceSorting() then --or self:askPlayerStats() then return true end local mapFunction = self:mapToFunction() @@ -276,70 +337,78 @@ local blackListTargets = { --it will kill this targets instead catch function Quest:wildBattle() if getTeamSize() >0 then - -if getAreaName() == "Mt. Moon B2F" or getAreaName() == "Mt. Moon" - or getAreaName() == "Mt. Moon B1F" or getAreaName() == "Route 7" or getAreaName() == "Seafoam B4F" then - return run() or sendUsablePokemon() or sendAnyPokemon() +if getAreaName() == "Mt. Moon" and game.inRectangle(98,39,103,40) then -- we need to train if lose jessie and james so that's it +return attack() or sendUsablePokemon() or sendAnyPokemon() or run() +end +if hasItem("Safari Ball") then +if useItem("Safari Ball") or useItem("Great Ball") or useItem("Poké Ball") or useItem("Luxury Ball") or sendUsablePokemon() or run() or sendAnyPokemon() then + return true + end +end +if ( getAreaName() == "Rock Tunnel" or getAreaName() == "Mt. Moon" + or getAreaName() == "Mt. Moon B1F" or getAreaName() == "Diglett's Cave" + or getAreaName() == "Seafoam B4F" or getAreaName() == "Route 23" +or getAreaName() == "Victory Road 1F" ) and getPokemonLevel(1) == game.maxTeamLevel() then + return run() or sendUsablePokemon() or sendAnyPokemon() or attack() end if isOpponentShiny() then -- formal catch - if useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") or sendUsablePokemon() or run() or sendAnyPokemon() then + if useItem("Ultra Ball") or useItem("Great Ball") or useItem("Poké Ball") or useItem("Luxury Ball") or sendUsablePokemon() or run() or sendAnyPokemon() then return true - end end ---if -- not hasItem("HM05 - Flash") - --and not sys.tableHasValue(blackListTargets, getOpponentName()) - --and - --getPokedexOwned() < 11 - --then - --and getAreaName() ~= "Route 22" then - if not isAlreadyCaught() and getPokedexOwned() < 11 then - return useItem("Poké Ball") or useItem("Repeat Ball") or sendUsablePokemon() or run() or sendAnyPokemon() - else - return attack() or useAnyMove() or run() or sendUsablePokemon() or sendAnyPokemon() - end ---end + if not isAlreadyCaught() and getTeamSize() < 6--and getPokedexOwned() < 11 + and getOpponentLevel() > 5 + and not sys.tableHasValue(blackListTargets, getOpponentName()) and hasItem("Poké Ball") then + return useItem("Poké Ball") or sendUsablePokemon() or run() or sendAnyPokemon() + -- else + -- return attack() or useAnyMove() or sendAnyPokemon() or run() + end + -if (getPokemonLevel(1) - 55 < getOpponentLevel() ) and getPokemonName(1) == "Magikarp" then - local opponentLevel = getOpponentLevel() - local myPokemonLvl = getPokemonLevel(getActivePokemonNumber()) - if opponentLevel >= (myPokemonLvl - 55) and getPokemonName(getActivePokemonNumber()) == "Magikarp" then - local requestedId, requestedLevel = game.getMaxLevelUsablePokemon() - if requestedId ~= nil and (requestedLevel > (myPokemonLvl - 55) ) then - return sendPokemon(requestedId) - end - end -end +--if (getPokemonLevel(1) - 55 < getOpponentLevel() ) and getPokemonName(1) == "Magikarp" then + -- local opponentLevel = getOpponentLevel() + -- local myPokemonLvl = getPokemonLevel(getActivePokemonNumber()) + --- if opponentLevel >= (myPokemonLvl - 55) and getPokemonName(getActivePokemonNumber()) == "Magikarp" then + -- local requestedId, requestedLevel = game.getMaxLevelUsablePokemon() + --- if requestedId ~= nil and (requestedLevel > (myPokemonLvl - 55) ) then + --- return sendPokemon(requestedId) + -- end + -- end +--end if getPokemonLevel(1) < getOpponentLevel() then local opponentLevel = getOpponentLevel() local myPokemonLvl = getPokemonLevel(getActivePokemonNumber()) if opponentLevel >= myPokemonLvl then - local requestedId, requestedLevel = game.getMaxLevelUsablePokemon() - if requestedId ~= nil and requestedLevel > myPokemonLvl then - return sendPokemon(requestedId) + local requestedId, requestedLevel = game.getMaxLevelUsablePokemon() + if requestedId ~= nil and requestedLevel > myPokemonLvl then + return sendPokemon(requestedId) end + else + return attack() or useAnyMove() or sendAnyPokemon() or run() end end -else +--else -return attack() or useAnyMove() or sendAnyPokemon() or run() +return attack() or useAnyMove() or run() or sendUsablePokemon() or sendAnyPokemon() end end function Quest:trainerBattle() - + -- if getAreaName() == "Saffron Gym" and game.inRectangle(149,50,157,58) then + --return useMove("Dragon Rage") or attack() or useAnyMove() or sendUsablePokemon() or sendAnyPokemon() + --end if sys.canSwitch == false then return game.useAnyMove() end if not self.canRun then -- trying to switch while a pokemon is squeezed end up in an infinity loop - return useMove("Acrobatics") or attack() or game.useAnyMove() + return attack() or game.useAnyMove() else - return useMove("Dragon Rage") or useMove("Acrobatics") or attack() or sendUsablePokemon() or sendAnyPokemon() + return attack() or sendUsablePokemon() or useAnyMove() or sendAnyPokemon() end end @@ -349,6 +418,9 @@ function Quest:battle() self.inBattle = true self:battleBegin() end +-- if self:askPlayerStats() then + -- return true +--- end if isWildBattle() then return self:wildBattle() else @@ -382,7 +454,7 @@ sys.slakingSleep = false self.forceCaught = true return true end - elseif sys.stringContains(message, "black out") and self.level < 97 and self:isTrainingOver() then + elseif sys.stringContains(message, "You have lost the battle!") and self.level < 97 and self:isTrainingOver() then self.level = self.level + 1 self:startTraining() log("Increasing " .. self.name .. " quest level to " .. self.level .. ". Training time!") @@ -404,137 +476,15 @@ local hmMoves = { } function Quest:learningMove(moveName, pokemonIndex) if getTeamSize() > 0 then -if getPokemonName(1) == "Eevee" then - return forgetAnyMoveExcept({"Swift","Quick Attack"}) -elseif getPokemonName(1) == "Espeon" then - return forgetAnyMoveExcept({"Psychic","Psybeam","Confusion"}) - elseif getPokemonName(1) == "Butterfree" then - return forgetAnyMoveExcept({"Sleep Powder"}) - elseif getPokemonName(1) == "Charmander" then - return forgetAnyMoveExcept({"Dragon Rage","Fire Fang","Flamethrower","Slash"}) - elseif getPokemonName(1) == "Gyarados" and (hasMove(1,"Flail") or hasMove(1,"Tackle") or hasMove(1,"Splash")) then - return forgetMove("Flail") or forgetMove("Tackle") or forgetMove("Splash") or forgetMove("Nightmare") - elseif getPokemonName(1) == "Mankey" then - return forgetAnyMoveExcept({"Karate Chop","Thunderbolt","Dig","Assurance"}) - elseif getPokemonName(1) == "Primeape" then - return forgetAnyMoveExcept({"Assurance","Close Combat","Thunderbolt","Dig"}) -elseif getPokemonName(1) == "Houndour" then - return forgetAnyMoveExcept({"Crunch","Flamethrower","Faint Attack","Feint Attack","Fire Fang"}) - elseif getPokemonName(1) == "Roggenrola" then - return forgetAnyMoveExcept({"Stone Edge","Rock Slide","Smack Down","Headbutt"}) - elseif getPokemonName(1) == "Donphan" then - return forgetAnyMoveExcept({"Earthquake","Knock Off","Assurance","Thunder Fang"}) - elseif getPokemonName(1) == "Venomoth" then - return forgetAnyMoveExcept({"Bug Buzz","Poison Fang","Psychic","Zen Headbutt"}) - elseif getPokemonName(1) == "Pikachu" then - return forgetAnyMoveExcept({"Quick Attack","Electro Ball","Feint","Thunderbolt"}) - elseif getPokemonName(1) == "Kadabra" then - return forgetAnyMoveExcept({"Psychic","Psybeam","Confusion","Psycho Cut"}) - elseif getPokemonName(1) == "Poochyena" then - return forgetAnyMoveExcept({"Sucker Punch","Rock Smash","Crunch","Bite"}) -elseif getPokemonName(1) == "Totodile" then - return forgetAnyMoveExcept({"Cut","Surf","Ice Fang","Crunch"}) - elseif getPokemonName(1) == "Croconaw" then - return forgetAnyMoveExcept({"Cut","Surf","Ice Fang","Crunch"}) - elseif getPokemonName(1) == "Feraligatr" then - return forgetAnyMoveExcept({"Cut","Surf","Ice Fang","Crunch"}) -elseif getPokemonName(1) == "Umbreon" then - return forgetAnyMoveExcept({"Pursuit","Feint Attack","Assurance"}) -elseif getPokemonName(1) == "Growlithe" then - return forgetAnyMoveExcept({"Flame Wheel","Flamethrower","Crunch","Bite"}) -elseif getPokemonName(1) == "Psyduck" then - return forgetAnyMoveExcept({"Aqua Tail","Confusion","Zen Headbutt","Surf"}) -elseif getPokemonName(1) == "Krabby" then - return forgetAnyMoveExcept({"Crabhammer","Brine","Stomp","Surf"}) -elseif getPokemonName(1) == "Snorlax" then - return forgetAnyMoveExcept({"Crunch","Body Slam","Chip Away"}) -elseif getPokemonName(1) == "Tentacool" then - return forgetAnyMoveExcept({"Cut","Water Pulse","Water Gun","Sludge Wave","Surf","Bubble Beam","Brine"}) -elseif getPokemonName(1) == "Hitmonlee" then - return forgetAnyMoveExcept({"Mega Kick","Brick Break","Jump Kick","Double Kick"}) - elseif getPokemonName(1) == "Ursaring" then - return forgetAnyMoveExcept({"Feint Attack","Slash","Jump Kick","Double Kick"}) -elseif getPokemonName(1) == "Hitmonchan" then - return forgetAnyMoveExcept({"Fire Punch","Ice Punch","Thunder Punch","Sky Uppercut"}) -elseif getPokemonName(1) == "Kabuto" then - return forgetAnyMoveExcept({"Ancient Power","Mud Shot","Aqua Jet","Mega Drain"}) -elseif getPokemonName(1) == "Omanyte" then - return forgetAnyMoveExcept({"Ancient Power","Mud Shot","Brine","Bite"}) -elseif getPokemonName(1) == "Snubbull" then - return forgetAnyMoveExcept({"Thunder Fang","Fire Fang","Ice Fang"}) -elseif getPokemonName(1) == "Bulbasaur" then - return forgetAnyMoveExcept({"Vine Whip","Razor Leaf","Seed Bomb","Cut"}) -elseif getPokemonName(1) == "Dratini" then - return forgetAnyMoveExcept({"Dragon Tail","Aqua Tail","Dragon Rage","Dragon Rush"}) - elseif getPokemonName(1) == "Diglett" then - return forgetAnyMoveExcept({"Sucker Punch","Slash","Earthquake","Earth Power"}) - elseif getPokemonName(1) == "Budew" then - return forgetAnyMoveExcept({"Mega Drain","Cut"," Absorb"}) - elseif getPokemonName(1) == "Rattata" then - return forgetAnyMoveExcept({"Bite","Cut","Crunch","Quick Attack","Assurance","Pursuit"}) - elseif getPokemonName(1) == "Sentret" then - return forgetAnyMoveExcept({"Sucker Punch","Quick Attack","Cut","Surf"}) - elseif getPokemonName(1) == "Ekans" then - return forgetAnyMoveExcept({"Acid Spray","Mud Bomb","Bite"}) - elseif getPokemonName(1) == "Spearow" then - return forgetAnyMoveExcept({"Assurance","Pursuit","Aerial Ace"}) - elseif getPokemonName(1) == "Drowzee" then - return forgetAnyMoveExcept({"Psybeam","Headbutt","Psychic","Psyshock"}) - elseif getPokemonName(1) == "Paras" then - return forgetAnyMoveExcept({"Cut","Giga Drain","Fury Cutter"}) - elseif getPokemonName(1) == "Sandshrew" then - return forgetAnyMoveExcept({"Cut","Dig","Gyro Ball"}) - elseif getPokemonName(1) == "Squirtle" then - return forgetAnyMoveExcept({"Bite","Aqua Tail","Skull Bash"}) - elseif getPokemonName(1) == "Bronzor" then - return forgetAnyMoveExcept({"Extrasensory","Confusion","Payback","Feint Attack","Payback"}) - elseif getPokemonName(1) == "Totodile" then - return forgetAnyMoveExcept({"Cut","Surf","Ice Fang","Crunch"}) - elseif getPokemonName(1) == "Machop" then - return forgetAnyMoveExcept({"Cross Chop","Wake-Up Slap","Low Sweep","Submission"}) - elseif getPokemonName(1) == "Bellsprout" then - return forgetAnyMoveExcept({"Razor Leaf","Poison Jab","Knock Off","Acid"}) - elseif getPokemonName(1) == "Meowth" then - return forgetAnyMoveExcept({"Night Slash","Slash","Assurance"}) - elseif getPokemonName(1) == "Clefairy" then - return forgetAnyMoveExcept({"Wake-Up Slap","Meteor Mash","Moonblast","Body Slam"}) - elseif getPokemonName(1) == "Pidgey" then - return forgetAnyMoveExcept({"Air Slash","Wing Attack","Hurricane","Quick Attack"}) - elseif getPokemonName(1) == "Wingull" then - return forgetAnyMoveExcept({"Air Slash","Pursuit","Hurricane","Water Pulse"}) - elseif getPokemonName(1) == "Clamperl" then - return forgetAnyMoveExcept({"Clamp","Water Gun","Whirlpool"}) - elseif getPokemonName(1) == "Oddish" then - return forgetAnyMoveExcept({"Moon Blast","Giga Drain","Petal Dance","Sleep Powder"}) - elseif getPokemonName(1) == "Onix" then - return forgetAnyMoveExcept({"Dig","Dragon Breath","Rock Tomb","Smack Down"}) - elseif getPokemonName(1) == "Geodude" then - return forgetAnyMoveExcept({"Earthquake","Smack Down","Rock Throw","Bulldoze"}) - elseif getPokemonName(1) == "Pineco" then - return forgetAnyMoveExcept({"Bug Bite","Payback","Rapid Spin","Gyro Ball"}) - elseif getPokemonName(1) == "Gastly" then - return forgetAnyMoveExcept({"Thunderbolt","Sucker Punch","Shadow Ball","Dark Pulse","Shadow Punch"}) - elseif getPokemonName(getTeamSize()) == "Haunter" and getAreaName() == "Saffron City" then - return forgetAnyMoveExcept({"Thunderbolt","Sucker Punch","Shadow Ball","Dark Pulse","Shadow Punch"}) - elseif getPokemonName(1) == "Haunter" then - return forgetAnyMoveExcept({"Thunderbolt","Sucker Punch","Shadow Ball","Dark Pulse","Shadow Punch","Surf"}) - elseif getPokemonName(1) == "Gyarados" and getAreaName() ~="Elite Four Lance Room" then - return forgetAnyMoveExcept({"Ice Fang","Crunch","Dragon Dance","Aqua Tail"}) - elseif getPokemonName(1) == "Gyarados" and getAreaName() =="Elite Four Lance Room" then - return forgetAnyMoveExcept({"Ice Fang","Crunch","Dragon Dance","Aqua Tail"}) - elseif getPokemonName(1) == "Marshtomp" and getPokemonLevel(1) >=70 then - return forgetAnyMoveExcept({"Ice Beam","Dig","Dive","Surf"}) - elseif getPokemonName(1) == "Swampert" and getPokemonLevel(1) >=70 then - return forgetAnyMoveExcept({"Ice Beam","Dig","Dive","Earthquake"}) - else - return forgetAnyMoveExcept({"Dig", "Shadow Ball", "Dark Pulse", "Surf", "Hex", "Air Slash", "Cut", "Acrobatics", "Poison Fang", "Thunderbolt", - "Sleep Powder", "Petal Dance","Dragon Rage","Spark","Signal Beam","Ice Fang", - "Discharge","Electro Ball","Rock Smash","Surf","Dig","Dive","Sucker Punch","Play Rough","Earthquake","Sleep Powder", - "Cut","Flamethrower","Fire Fang","Covet", "Shadow Ball", "Shadow Claw", "Blaze Kick", "Dragon Claw", "Psychic", "Night Slash", - "X-Scissor", "Razor Wind", "Earthquake", "Ice Beam", "Megahorn", "Wild charge", "Crunch", "Air Slash", "FlameThrower", "Poison Jab", + + return forgetAnyMoveExcept({"Dig","Aqua Tail","Headbutt","Confusion", "Shadow Ball","Water Pulse", + "Dark Pulse", "Surf", "Hex", "Air Slash", "Cut", "Acrobatics", "Poison Fang","Thunder Fang", "Thunderbolt", + "Sleep Powder", "Petal Dance","Dragon Rage","Spark","Signal Beam","Ice Fang","Earthquake","Water Gun","Slash","Scald", + "Discharge","Electro Ball","Rock Smash","Surf","Dig","Dive","Sucker Punch","Play Rough","Earthquake", + "Covet", "Shadow Ball", "Shadow Claw", "Blaze Kick", "Dragon Claw", "Psychic", "Night Slash", + "X-Scissor", "Razor Wind", "Ice Beam", "Megahorn", "Wild charge", "Crunch", "Air Slash", "FlameThrower", "Poison Jab", "Ice Fang", "Thunder Fang", "Fire Fang", "Play Rough", "Bite", "Covet", "Low Kick", "Quick Attack", "Ice Punch", "Thunder Punch", "Fire Punch", "Sky Uppercut", "Thunderbolt", "Thunder", "Thrash", "Horn Attack", "Nuzzle", "HeadButt", "False Swipe", "Fire Blast","Rock Smash"}) end -end end return Quest diff --git a/Quests/QuestManager.lua b/Quests/QuestManager.lua index 5a9a953..af1ec3a 100644 --- a/Quests/QuestManager.lua +++ b/Quests/QuestManager.lua @@ -11,10 +11,13 @@ local BoulderBadgeQuest = require('Quests/Kanto/BoulderBadgeQuest') local MoonFossilQuest = require('Quests/Kanto/MoonFossilQuest') local CascadeBadgeQuest = require('Quests/Kanto/CascadeBadgeQuest') local ThunderBadgeQuest = require('Quests/Kanto/ThunderBadgeQuest') - - - - +local RockTunnelQuest = require('Quests/Kanto/RockTunnelQuest') +local RainbowBadgeQuest = require('Quests/Kanto/RainbowBadgeQuest') +local PokeFluteQuest = require('Quests/Kanto/PokeFluteQuest') +local SoulBadgeQuest = require('Quests/Kanto/SoulBadgeQuest') +local MarshBadgeQuest = require('Quests/Kanto/MarshBadgeQuest') +local VolcanoBadgeQuest = require('Quests/Kanto/VolcanoBadgeQuest') +local EarthBadgeQuest = require('Quests/Kanto/EarthBadgeQuest') local quests = { -- Kanto Quests StartKantoQuest:new(), @@ -22,6 +25,13 @@ local quests = { MoonFossilQuest:new(), CascadeBadgeQuest:new(), ThunderBadgeQuest:new(), + RockTunnelQuest:new(), + RainbowBadgeQuest:new(), + PokeFluteQuest:new(), + SoulBadgeQuest:new(), + MarshBadgeQuest:new(), + VolcanoBadgeQuest:new(), + EarthBadgeQuest:new(), } function QuestManager:new(o) diff --git a/Quests/new 1.txt b/Quests/new 1.txt new file mode 100644 index 0000000..9701d1a --- /dev/null +++ b/Quests/new 1.txt @@ -0,0 +1,123 @@ +if getPokemonName(1) == "Eevee" then + return forgetAnyMoveExcept({"Swift","Quick Attack"}) +elseif getPokemonName(1) == "Espeon" then + return forgetAnyMoveExcept({"Psychic","Psybeam","Confusion"}) + elseif getPokemonName(1) == "Butterfree" then + return forgetAnyMoveExcept({"Sleep Powder"}) + elseif getPokemonName(1) == "Charmander" then + return forgetAnyMoveExcept({"Dragon Rage","Fire Fang","Flamethrower","Slash"}) + elseif getPokemonName(1) == "Gyarados" and (hasMove(1,"Flail") or hasMove(1,"Tackle") or hasMove(1,"Splash")) then + return forgetMove("Flail") or forgetMove("Tackle") or forgetMove("Splash") or forgetMove("Nightmare") + elseif getPokemonName(1) == "Mankey" then + return forgetAnyMoveExcept({"Karate Chop","Thunderbolt","Dig","Assurance"}) + elseif getPokemonName(1) == "Primeape" then + return forgetAnyMoveExcept({"Assurance","Close Combat","Thunderbolt","Dig"}) +elseif getPokemonName(1) == "Houndour" then + return forgetAnyMoveExcept({"Crunch","Flamethrower","Faint Attack","Feint Attack","Fire Fang"}) + elseif getPokemonName(1) == "Roggenrola" then + return forgetAnyMoveExcept({"Stone Edge","Rock Slide","Smack Down","Headbutt"}) + elseif getPokemonName(1) == "Donphan" then + return forgetAnyMoveExcept({"Earthquake","Knock Off","Assurance","Thunder Fang"}) + elseif getPokemonName(1) == "Venomoth" then + return forgetAnyMoveExcept({"Bug Buzz","Poison Fang","Psychic","Zen Headbutt"}) + elseif getPokemonName(1) == "Pikachu" then + return forgetAnyMoveExcept({"Quick Attack","Electro Ball","Feint","Thunderbolt"}) + elseif getPokemonName(1) == "Kadabra" then + return forgetAnyMoveExcept({"Psychic","Psybeam","Confusion","Psycho Cut"}) + elseif getPokemonName(1) == "Poochyena" then + return forgetAnyMoveExcept({"Sucker Punch","Rock Smash","Crunch","Bite"}) +elseif getPokemonName(1) == "Totodile" then + return forgetAnyMoveExcept({"Cut","Surf","Ice Fang","Crunch"}) + elseif getPokemonName(1) == "Croconaw" then + return forgetAnyMoveExcept({"Cut","Surf","Ice Fang","Crunch"}) + elseif getPokemonName(1) == "Feraligatr" then + return forgetAnyMoveExcept({"Cut","Surf","Ice Fang","Crunch"}) +elseif getPokemonName(1) == "Umbreon" then + return forgetAnyMoveExcept({"Pursuit","Feint Attack","Assurance"}) +elseif getPokemonName(1) == "Growlithe" then + return forgetAnyMoveExcept({"Flame Wheel","Flamethrower","Crunch","Bite"}) +elseif getPokemonName(1) == "Psyduck" then + return forgetAnyMoveExcept({"Aqua Tail","Confusion","Zen Headbutt","Surf"}) +elseif getPokemonName(1) == "Krabby" then + return forgetAnyMoveExcept({"Crabhammer","Brine","Stomp","Surf"}) +elseif getPokemonName(1) == "Snorlax" then + return forgetAnyMoveExcept({"Crunch","Body Slam","Chip Away"}) +elseif getPokemonName(1) == "Tentacool" then + return forgetAnyMoveExcept({"Cut","Water Pulse","Water Gun","Sludge Wave","Surf","Bubble Beam","Brine"}) +elseif getPokemonName(1) == "Hitmonlee" then + return forgetAnyMoveExcept({"Mega Kick","Brick Break","Jump Kick","Double Kick"}) + elseif getPokemonName(1) == "Ursaring" then + return forgetAnyMoveExcept({"Feint Attack","Slash","Jump Kick","Double Kick"}) +elseif getPokemonName(1) == "Hitmonchan" then + return forgetAnyMoveExcept({"Fire Punch","Ice Punch","Thunder Punch","Sky Uppercut"}) +elseif getPokemonName(1) == "Kabuto" then + return forgetAnyMoveExcept({"Ancient Power","Mud Shot","Aqua Jet","Mega Drain"}) +elseif getPokemonName(1) == "Omanyte" then + return forgetAnyMoveExcept({"Ancient Power","Mud Shot","Brine","Bite"}) +elseif getPokemonName(1) == "Snubbull" then + return forgetAnyMoveExcept({"Thunder Fang","Fire Fang","Ice Fang"}) +elseif getPokemonName(1) == "Bulbasaur" then + return forgetAnyMoveExcept({"Vine Whip","Razor Leaf","Seed Bomb","Cut"}) +elseif getPokemonName(1) == "Dratini" then + return forgetAnyMoveExcept({"Dragon Tail","Aqua Tail","Dragon Rage","Dragon Rush"}) + elseif getPokemonName(1) == "Diglett" then + return forgetAnyMoveExcept({"Sucker Punch","Slash","Earthquake","Earth Power"}) + elseif getPokemonName(1) == "Budew" then + return forgetAnyMoveExcept({"Mega Drain","Cut"," Absorb"}) + elseif getPokemonName(1) == "Rattata" then + return forgetAnyMoveExcept({"Bite","Cut","Crunch","Quick Attack","Assurance","Pursuit"}) + elseif getPokemonName(1) == "Sentret" then + return forgetAnyMoveExcept({"Sucker Punch","Quick Attack","Cut","Surf"}) + elseif getPokemonName(1) == "Ekans" then + return forgetAnyMoveExcept({"Acid Spray","Mud Bomb","Bite"}) + elseif getPokemonName(1) == "Spearow" then + return forgetAnyMoveExcept({"Assurance","Pursuit","Aerial Ace"}) + elseif getPokemonName(1) == "Drowzee" then + return forgetAnyMoveExcept({"Psybeam","Headbutt","Psychic","Psyshock"}) + elseif getPokemonName(1) == "Paras" then + return forgetAnyMoveExcept({"Cut","Giga Drain","Fury Cutter"}) + elseif getPokemonName(1) == "Sandshrew" then + return forgetAnyMoveExcept({"Cut","Dig","Gyro Ball"}) + elseif getPokemonName(1) == "Squirtle" then + return forgetAnyMoveExcept({"Bite","Aqua Tail","Skull Bash"}) + elseif getPokemonName(1) == "Bronzor" then + return forgetAnyMoveExcept({"Extrasensory","Confusion","Payback","Feint Attack","Payback"}) + elseif getPokemonName(1) == "Totodile" then + return forgetAnyMoveExcept({"Cut","Surf","Ice Fang","Crunch"}) + elseif getPokemonName(1) == "Machop" then + return forgetAnyMoveExcept({"Cross Chop","Wake-Up Slap","Low Sweep","Submission"}) + elseif getPokemonName(1) == "Bellsprout" then + return forgetAnyMoveExcept({"Razor Leaf","Poison Jab","Knock Off","Acid"}) + elseif getPokemonName(1) == "Meowth" then + return forgetAnyMoveExcept({"Night Slash","Slash","Assurance"}) + elseif getPokemonName(1) == "Clefairy" then + return forgetAnyMoveExcept({"Wake-Up Slap","Meteor Mash","Moonblast","Body Slam"}) + elseif getPokemonName(1) == "Pidgey" then + return forgetAnyMoveExcept({"Air Slash","Wing Attack","Hurricane","Quick Attack"}) + elseif getPokemonName(1) == "Wingull" then + return forgetAnyMoveExcept({"Air Slash","Pursuit","Hurricane","Water Pulse"}) + elseif getPokemonName(1) == "Clamperl" then + return forgetAnyMoveExcept({"Clamp","Water Gun","Whirlpool"}) + elseif getPokemonName(1) == "Oddish" then + return forgetAnyMoveExcept({"Moon Blast","Giga Drain","Petal Dance","Sleep Powder"}) + elseif getPokemonName(1) == "Onix" then + return forgetAnyMoveExcept({"Dig","Dragon Breath","Rock Tomb","Smack Down"}) + elseif getPokemonName(1) == "Geodude" then + return forgetAnyMoveExcept({"Earthquake","Smack Down","Rock Throw","Bulldoze"}) + elseif getPokemonName(1) == "Pineco" then + return forgetAnyMoveExcept({"Bug Bite","Payback","Rapid Spin","Gyro Ball"}) + elseif getPokemonName(1) == "Gastly" then + return forgetAnyMoveExcept({"Thunderbolt","Sucker Punch","Shadow Ball","Dark Pulse","Shadow Punch"}) + elseif getPokemonName(getTeamSize()) == "Haunter" and getAreaName() == "Saffron City" then + return forgetAnyMoveExcept({"Thunderbolt","Sucker Punch","Shadow Ball","Dark Pulse","Shadow Punch"}) + elseif getPokemonName(1) == "Haunter" then + return forgetAnyMoveExcept({"Thunderbolt","Sucker Punch","Shadow Ball","Dark Pulse","Shadow Punch","Surf"}) + elseif getPokemonName(1) == "Gyarados" and getAreaName() ~="Elite Four Lance Room" then + return forgetAnyMoveExcept({"Ice Fang","Crunch","Dragon Dance","Aqua Tail"}) + elseif getPokemonName(1) == "Gyarados" and getAreaName() =="Elite Four Lance Room" then + return forgetAnyMoveExcept({"Ice Fang","Crunch","Dragon Dance","Aqua Tail"}) + elseif getPokemonName(1) == "Marshtomp" and getPokemonLevel(1) >=70 then + return forgetAnyMoveExcept({"Ice Beam","Dig","Dive","Surf"}) + elseif getPokemonName(1) == "Swampert" and getPokemonLevel(1) >=70 then + return forgetAnyMoveExcept({"Ice Beam","Dig","Dive","Earthquake"}) + else \ No newline at end of file diff --git a/Quests/new 2.txt b/Quests/new 2.txt new file mode 100644 index 0000000..cbae910 --- /dev/null +++ b/Quests/new 2.txt @@ -0,0 +1,11 @@ +for pokemonId=1, pokemonsUsable, 1 do + if not isPokemonUsable(pokemonId) then --Move it at bottom of the Team + for pokemonId_ = pokemonsUsable + 1, getTeamSize(), 1 do + if isPokemonUsable(pokemonId_) then + swapPokemon(pokemonId, pokemonId_) + return true + end + end + + end + end \ No newline at end of file diff --git a/config.lua b/config.lua index 76e7d27..a4bad01 100644 --- a/config.lua +++ b/config.lua @@ -1,5 +1,5 @@ -KANTO_STARTER_ID = math.random(1,3) -- 1: Fatvegan, 2: Salamender, 3: Aquaturtle, 4: Mickeychu -- do not edit this +KANTO_STARTER_ID = math.random(1,3) -- 1: BulBa, 2 : chamander, 3: squirtle, 4: Mickeychu -- do not edit this KANTO_FOSSIL_ID =math.random(1,2) -- 1: Helix, 2: Dome DOJO_POKEMON_ID =math.random(1,2) -- 1: Hitmonchan, 2: Hitmonlee BIKE_COLOR_ID =math.random(1,4) -- 1:red 2:blue 3:green 4:yellow -starterName = "Squirtle" \ No newline at end of file +--starterName = math.random(1,3) - \ No newline at end of file