From b594eef8dd304a5c1c2148e8f9f51ed525ab0db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Thu, 1 Nov 2018 05:47:52 +0700 Subject: [PATCH 01/32] fix bug - fix bug thunder badge quest , start kanto quest - fix bug battle --- Quests/Kanto/StartKantoQuest.lua | 1 + Quests/Kanto/ThunderBadgeQuest.lua | 63 ++++++++++++++++++++++---- Quests/Quest.lua | 71 ++++++++++++++---------------- 3 files changed, 88 insertions(+), 47 deletions(-) diff --git a/Quests/Kanto/StartKantoQuest.lua b/Quests/Kanto/StartKantoQuest.lua index 2eff8fa..fab398a 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!" }), diff --git a/Quests/Kanto/ThunderBadgeQuest.lua b/Quests/Kanto/ThunderBadgeQuest.lua index cf51b21..15c421a 100644 --- a/Quests/Kanto/ThunderBadgeQuest.lua +++ b/Quests/Kanto/ThunderBadgeQuest.lua @@ -61,7 +61,7 @@ function ThunderBadgeQuest:isDoable() end function ThunderBadgeQuest:isDone() - if ( getMapName() == "Route 11" or getMapName() == "Route 5" ) then + if ( getMapName() == "Route 10" ) then return true else return false @@ -104,7 +104,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 +122,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 +130,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 +151,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 +193,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,8 +224,10 @@ 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 @@ -235,8 +237,51 @@ function ThunderBadgeQuest:VermilionPokémonMart() 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: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 diff --git a/Quests/Quest.lua b/Quests/Quest.lua index efceb94..083f7ee 100644 --- a/Quests/Quest.lua +++ b/Quests/Quest.lua @@ -278,57 +278,52 @@ 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() + or getAreaName() == "Mt. Moon B1F" or getAreaName() == "Diglett's Cave" or getAreaName() == "Seafoam B4F" 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 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 getPokedexOwned() < 11 + --and not sys.tableHasValue(blackListTargets, getOpponentName()) 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) < 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) - 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) + --- end + -- 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() From 1c90e0097bbc1f7400172b5e1d39a3a9d47f1db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Sat, 3 Nov 2018 15:32:20 +0700 Subject: [PATCH 02/32] fixed bug --- Quests/Kanto/BoulderBadgeQuest.lua | 6 +- Quests/Kanto/CascadeBadgeQuest.lua | 2 +- Quests/Kanto/MoonFossilQuest.lua | 15 +-- Quests/Kanto/RockTunnelQuest.lua | 157 +++++++++++++++++++++++++++++ Quests/Kanto/ThunderBadgeQuest.lua | 13 ++- Quests/Quest.lua | 14 +-- Quests/QuestManager.lua | 3 +- 7 files changed, 189 insertions(+), 21 deletions(-) create mode 100644 Quests/Kanto/RockTunnelQuest.lua diff --git a/Quests/Kanto/BoulderBadgeQuest.lua b/Quests/Kanto/BoulderBadgeQuest.lua index 55cd0bc..683d4e2 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() diff --git a/Quests/Kanto/CascadeBadgeQuest.lua b/Quests/Kanto/CascadeBadgeQuest.lua index cae5b48..998a4cb 100644 --- a/Quests/Kanto/CascadeBadgeQuest.lua +++ b/Quests/Kanto/CascadeBadgeQuest.lua @@ -38,7 +38,7 @@ 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 diff --git a/Quests/Kanto/MoonFossilQuest.lua b/Quests/Kanto/MoonFossilQuest.lua index aff19df..c67fb6f 100644 --- a/Quests/Kanto/MoonFossilQuest.lua +++ b/Quests/Kanto/MoonFossilQuest.lua @@ -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/RockTunnelQuest.lua b/Quests/Kanto/RockTunnelQuest.lua new file mode 100644 index 0000000..985179a --- /dev/null +++ b/Quests/Kanto/RockTunnelQuest.lua @@ -0,0 +1,157 @@ +-- 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("Rainbow Badge") then + return true + end + return false +end + +function RockTunnelQuest:isDone() + if getMapName() == "Celadon City" or getMapName() == "Pokecenter Vermilion" 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,76) 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 + moveToCexl(33,46) + end +end + + + +function RockTunnelQuest:LavenderTown() + if self:needPokecenter() or not game.isTeamFullyHealed() then + return moveToCell(115,116) + + else + return moveToArea("Route 8") + end +end + +function RockTunnelQuest:PokecenterLavender() + self:pokecenter("Lavender Town") +end + +function RockTunnelQuest:Route8() + if isNpcOnCell(56,3) then -- Item: Leppa Berry + return talkToNpcOnCell(56,3) + elseif 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) + elseif isNpcOnCell(17,3) then -- Item: Rawst Berry + return talkToNpcOnCell(17,3) + elseif isNpcOnCell(18,3) then -- Item: Lum Berry + return talkToNpcOnCell(18,3) + elseif isNpcOnCell(18,3) then -- Item: Perism Berry + return talkToNpcOnCell(18,3) + else + return moveToArea("Underground House 4") + end +end + +function RockTunnelQuest:UndergroundHouse4() + return moveToArea("Underground1") +end + +function RockTunnelQuest:Underground1() + return moveToArea("Underground House 3") +end + +function RockTunnelQuest:UndergroundHouse3() + return moveToArea("Route 7") +end + +function RockTunnelQuest:Route7() + if isNpcOnCell(8,30) then -- Item: Sitrus Berry + return talkToNpcOnCell(8,30) + else + return moveToArea("Celadon City") + end +end + +return RockTunnelQuest \ No newline at end of file diff --git a/Quests/Kanto/ThunderBadgeQuest.lua b/Quests/Kanto/ThunderBadgeQuest.lua index 15c421a..502acef 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 @@ -61,7 +61,7 @@ function ThunderBadgeQuest:isDoable() end function ThunderBadgeQuest:isDone() - if ( getMapName() == "Route 10" ) then + if getMapName() == "Route 9" then return true else return false @@ -249,6 +249,15 @@ function ThunderBadgeQuest:Route11() 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) diff --git a/Quests/Quest.lua b/Quests/Quest.lua index 083f7ee..b68dfb5 100644 --- a/Quests/Quest.lua +++ b/Quests/Quest.lua @@ -277,7 +277,7 @@ 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" +if getAreaName() == "Rock Tunnel" or getAreaName() == "Mt. Moon" or getAreaName() == "Mt. Moon B1F" or getAreaName() == "Diglett's Cave" or getAreaName() == "Seafoam B4F" then return run() or sendUsablePokemon() or sendAnyPokemon() or attack() end @@ -290,12 +290,12 @@ end - -- if not isAlreadyCaught() and getPokedexOwned() < 11 - --and not sys.tableHasValue(blackListTargets, getOpponentName()) then - -- return useItem("Poké Ball") or sendUsablePokemon() or run() or sendAnyPokemon() + if not isAlreadyCaught() and getPokedexOwned() < 11 + and not sys.tableHasValue(blackListTargets, getOpponentName()) then + return useItem("Poké Ball") or sendUsablePokemon() or run() or sendAnyPokemon() -- else -- return attack() or useAnyMove() or sendAnyPokemon() or run() - -- end + end @@ -332,9 +332,9 @@ function Quest:trainerBattle() 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 sendAnyPokemon() end end diff --git a/Quests/QuestManager.lua b/Quests/QuestManager.lua index 5a9a953..1ad01c7 100644 --- a/Quests/QuestManager.lua +++ b/Quests/QuestManager.lua @@ -11,7 +11,7 @@ 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') @@ -22,6 +22,7 @@ local quests = { MoonFossilQuest:new(), CascadeBadgeQuest:new(), ThunderBadgeQuest:new(), + RockTunnelQuest:new(), } function QuestManager:new(o) From 726619dd2fa5088fb2ccb1c8f30474c6c7ad98f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Sat, 3 Nov 2018 21:44:54 +0700 Subject: [PATCH 03/32] remove useAnyMove() to avoid stuck in battle --- Quests/Quest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Quests/Quest.lua b/Quests/Quest.lua index b68dfb5..f3b0084 100644 --- a/Quests/Quest.lua +++ b/Quests/Quest.lua @@ -323,7 +323,7 @@ end --else -return attack() or useAnyMove() or run() or sendUsablePokemon() or sendAnyPokemon() +return attack() or run() or sendUsablePokemon() or sendAnyPokemon() end end function Quest:trainerBattle() From 25890be976ab3498c3fde37b320ed10504f26c09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Sun, 4 Nov 2018 06:48:18 +0700 Subject: [PATCH 04/32] fix miss spelling cerulean quest --- Quests/Kanto/CascadeBadgeQuest.lua | 2 +- Quests/Quest.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Quests/Kanto/CascadeBadgeQuest.lua b/Quests/Kanto/CascadeBadgeQuest.lua index 998a4cb..22b6326 100644 --- a/Quests/Kanto/CascadeBadgeQuest.lua +++ b/Quests/Kanto/CascadeBadgeQuest.lua @@ -129,7 +129,7 @@ function CascadeBadgeQuest:CeruleanGym() -- get Cascade Badge return askForTrainerInfo() elseif 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) diff --git a/Quests/Quest.lua b/Quests/Quest.lua index f3b0084..dc1323e 100644 --- a/Quests/Quest.lua +++ b/Quests/Quest.lua @@ -334,6 +334,7 @@ function Quest:trainerBattle() if not self.canRun then -- trying to switch while a pokemon is squeezed end up in an infinity loop return attack() or game.useAnyMove() else + log("hello") return attack() or sendUsablePokemon() or sendAnyPokemon() end From e2498d9d8d1dacd2a849afdf567657ebe77ccc84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Sun, 4 Nov 2018 06:50:43 +0700 Subject: [PATCH 05/32] remove test log condition --- Quests/Quest.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/Quests/Quest.lua b/Quests/Quest.lua index dc1323e..f3b0084 100644 --- a/Quests/Quest.lua +++ b/Quests/Quest.lua @@ -334,7 +334,6 @@ function Quest:trainerBattle() if not self.canRun then -- trying to switch while a pokemon is squeezed end up in an infinity loop return attack() or game.useAnyMove() else - log("hello") return attack() or sendUsablePokemon() or sendAnyPokemon() end From 65aa5edc4bcae7042044f147320b66c98fef41ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Sun, 4 Nov 2018 07:05:44 +0700 Subject: [PATCH 06/32] pick random starter --- Quests/Kanto/StartKantoQuest.lua | 10 ++++++++-- config.lua | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Quests/Kanto/StartKantoQuest.lua b/Quests/Kanto/StartKantoQuest.lua index fab398a..f4d883e 100644 --- a/Quests/Kanto/StartKantoQuest.lua +++ b/Quests/Kanto/StartKantoQuest.lua @@ -89,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/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 From 0e968d469ebaca460a9965cf78803d0322f9cead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Sun, 4 Nov 2018 08:04:51 +0700 Subject: [PATCH 07/32] fix bug again --- Quests/Kanto/CascadeBadgeQuest.lua | 4 ++-- Quests/Kanto/StartKantoQuest.lua | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Quests/Kanto/CascadeBadgeQuest.lua b/Quests/Kanto/CascadeBadgeQuest.lua index 22b6326..92024ea 100644 --- a/Quests/Kanto/CascadeBadgeQuest.lua +++ b/Quests/Kanto/CascadeBadgeQuest.lua @@ -45,7 +45,7 @@ function CascadeBadgeQuest:isDoable() end function CascadeBadgeQuest:isDone() - if getMapName() == "Route 5" then + if getAreaName() == "Route 5" then return true else return false @@ -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 diff --git a/Quests/Kanto/StartKantoQuest.lua b/Quests/Kanto/StartKantoQuest.lua index f4d883e..9eb02f4 100644 --- a/Quests/Kanto/StartKantoQuest.lua +++ b/Quests/Kanto/StartKantoQuest.lua @@ -89,13 +89,13 @@ function StartKantoQuest:ViridianPokémonMart() end function StartKantoQuest:OaksLab() - if getTeamSize() == 0 and KANTO_STARTER_ID = 1 then + 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 + 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 + elseif getTeamSize() == 0 and KANTO_STARTER_ID == 3 then pushDialogAnswer("Squirtle") talkToNpcOnCell(22, 103) -- TODO : Choose you damn pokemon else From 1e468f5dbce8306791393234f642604b8ea4945e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Sun, 4 Nov 2018 16:52:46 +0700 Subject: [PATCH 08/32] fix some bug --- Quests/Kanto/RockTunnelQuest.lua | 2 +- Quests/Kanto/ThunderBadgeQuest.lua | 2 +- Quests/Quest.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Quests/Kanto/RockTunnelQuest.lua b/Quests/Kanto/RockTunnelQuest.lua index 985179a..dcee312 100644 --- a/Quests/Kanto/RockTunnelQuest.lua +++ b/Quests/Kanto/RockTunnelQuest.lua @@ -82,7 +82,7 @@ function RockTunnelQuest:RockTunnel() else return moveToCell(47,25) end - elseif game.inRectangle(1,59,59,76) then + elseif game.inRectangle(1,59,59,75) then if isNpcOnCell(16,67) then talkToNpcOnCell(16,67) else diff --git a/Quests/Kanto/ThunderBadgeQuest.lua b/Quests/Kanto/ThunderBadgeQuest.lua index 502acef..e92e020 100644 --- a/Quests/Kanto/ThunderBadgeQuest.lua +++ b/Quests/Kanto/ThunderBadgeQuest.lua @@ -61,7 +61,7 @@ function ThunderBadgeQuest:isDoable() end function ThunderBadgeQuest:isDone() - if getMapName() == "Route 9" then + if getMapArea() == "Route 9" then return true else return false diff --git a/Quests/Quest.lua b/Quests/Quest.lua index f3b0084..46ba85c 100644 --- a/Quests/Quest.lua +++ b/Quests/Quest.lua @@ -291,7 +291,7 @@ end if not isAlreadyCaught() and getPokedexOwned() < 11 - and not sys.tableHasValue(blackListTargets, getOpponentName()) then + 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() From d95300ea230486f9b2fac64d59342bfc980b5752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Sun, 4 Nov 2018 17:49:31 +0700 Subject: [PATCH 09/32] fix bug lavender town --- Quests/Kanto/RockTunnelQuest.lua | 30 +++++++++++++++++------------- Quests/Quest.lua | 2 +- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/Quests/Kanto/RockTunnelQuest.lua b/Quests/Kanto/RockTunnelQuest.lua index dcee312..b7daf1b 100644 --- a/Quests/Kanto/RockTunnelQuest.lua +++ b/Quests/Kanto/RockTunnelQuest.lua @@ -28,7 +28,7 @@ function RockTunnelQuest:isDoable() end function RockTunnelQuest:isDone() - if getMapName() == "Celadon City" or getMapName() == "Pokecenter Vermilion" then --FIX Blackout if not Route10 or Lavander Pokecenter is Setup + 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 @@ -97,7 +97,7 @@ function RockTunnelQuest:RockTunnel() elseif game.inRectangle(14,72,38,93) then return moveToCell(17,91) else - moveToCexl(33,46) + moveToCell(33,46) end end @@ -108,30 +108,34 @@ function RockTunnelQuest:LavenderTown() return moveToCell(115,116) else - return moveToArea("Route 8") + return moveToCell(97,122) end end -function RockTunnelQuest:PokecenterLavender() +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 isNpcOnCell(56,3) then -- Item: Leppa Berry - return talkToNpcOnCell(56,3) +--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) elseif 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) - elseif isNpcOnCell(17,3) then -- Item: Rawst Berry - return talkToNpcOnCell(17,3) - elseif isNpcOnCell(18,3) then -- Item: Lum Berry - return talkToNpcOnCell(18,3) - elseif isNpcOnCell(18,3) then -- Item: Perism Berry - return talkToNpcOnCell(18,3) else - return moveToArea("Underground House 4") + return moveToCell(47,123) end +--end end function RockTunnelQuest:UndergroundHouse4() diff --git a/Quests/Quest.lua b/Quests/Quest.lua index 46ba85c..144c949 100644 --- a/Quests/Quest.lua +++ b/Quests/Quest.lua @@ -522,7 +522,7 @@ elseif getPokemonName(1) == "Dratini" then 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", + return forgetAnyMoveExcept({"Dig", "Shadow Ball","Water Pulse", "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", From 115d7f53016f0c589984ebf58a3e5c141c298ba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Sun, 4 Nov 2018 18:10:22 +0700 Subject: [PATCH 10/32] fix and complete RocktunnelQuest --- Quests/Kanto/RockTunnelQuest.lua | 27 ++++++++++++++------------- Quests/Kanto/ThunderBadgeQuest.lua | 6 +++--- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Quests/Kanto/RockTunnelQuest.lua b/Quests/Kanto/RockTunnelQuest.lua index b7daf1b..56729ac 100644 --- a/Quests/Kanto/RockTunnelQuest.lua +++ b/Quests/Kanto/RockTunnelQuest.lua @@ -133,28 +133,29 @@ function RockTunnelQuest:Route8() elseif isNpcOnCell(52,9) then --Pokemon: Growlithe LvL 10 (BlueBall) return talkToNpcOnCell(52,9) else - return moveToCell(47,123) + return moveToCell(26,119) end --end end -function RockTunnelQuest:UndergroundHouse4() - return moveToArea("Underground1") -end - -function RockTunnelQuest:Underground1() - return moveToArea("Underground House 3") +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:UndergroundHouse3() - return moveToArea("Route 7") -end function RockTunnelQuest:Route7() - if isNpcOnCell(8,30) then -- Item: Sitrus Berry - return talkToNpcOnCell(8,30) + if isNpcOnCell(198,104) then + return talkToNpcOnCell(198,104) + elseif isNpcOnCell(204,94) then + return talkToNpcOnCell(204,94) else - return moveToArea("Celadon City") + return moveToCell(167,85) end end diff --git a/Quests/Kanto/ThunderBadgeQuest.lua b/Quests/Kanto/ThunderBadgeQuest.lua index e92e020..625fe88 100644 --- a/Quests/Kanto/ThunderBadgeQuest.lua +++ b/Quests/Kanto/ThunderBadgeQuest.lua @@ -54,14 +54,14 @@ function ThunderBadgeQuest:new() end function ThunderBadgeQuest:isDoable() - if self:hasMap() then + if self:hasMap() then return true end return false end function ThunderBadgeQuest:isDone() - if getMapArea() == "Route 9" then + if getAreaName() == "Route 9" then return true else return false @@ -136,7 +136,7 @@ function ThunderBadgeQuest:UndergroundPath() return moveToCell(7,67) end else - if countBadges() == 3 and hasItem("HM09") then + if countBadges() == 3 and hasItem("HM09") then return moveToCell(11,83) else return moveToCell(8,87) From cd6ed2e4cd63db554e2ab450c2a4f57bb77c146f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Sun, 4 Nov 2018 18:40:10 +0700 Subject: [PATCH 11/32] fix bug thunder badge --- Quests/Kanto/RainbowBadgeQuest.lua | 269 +++++++++++++++++++++++++++++ Quests/Kanto/ThunderBadgeQuest.lua | 6 +- 2 files changed, 274 insertions(+), 1 deletion(-) create mode 100644 Quests/Kanto/RainbowBadgeQuest.lua diff --git a/Quests/Kanto/RainbowBadgeQuest.lua b/Quests/Kanto/RainbowBadgeQuest.lua new file mode 100644 index 0000000..94d894e --- /dev/null +++ b/Quests/Kanto/RainbowBadgeQuest.lua @@ -0,0 +1,269 @@ +-- 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 Lemonade for future quest' +local level = 3 + +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" + }) +} + +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("Soul Badge") and not isNpcOnCell(48,34) then + return true + end + return false +end + +function RainbowBadgeQuest:isDone() + if (hasItem("Rainbow Badge") and getAreaName() == "Lavender Town" )or isNpcOnCell(48,34) then + return true + else + return false + end +end + +function RainbowBadgeQuest:CeladonCity() + --if not enableTrainerBattles() then + -- enableTrainerBattles() + --else + if isNpcOnCell(21,51) and getPlayerX() == 21 and getPlayerY() == 50 and hasItem("Rainbow Badge") then --NPC: Trainer OP + return talkToNpcOnCell(21,51) + elseif self:needPokecenter() or not game.isTeamFullyHealed() then + return moveToCell(165,82) + elseif isNpcOnCell(54,14) then --Item: Great Ball + return talkToNpcOnCell(54,14) + elseif isNpcOnCell(46,49) and not isNpcOnCell(48,34) then --NPC: Rocket Guy + return talkToNpcOnCell(46,49) + 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 hasItem("Rainbow Badge") 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 + elseif isNpcOnCell(21,51) then + return talkToNpcOnCell(21,51) + else + return moveToMap("CeladonGym") + end + elseif isNpcOnCell(14,42) and not isNpcOnCell(48,34) and hasItem("Rainbow Badge") then --NPC: Remove the Guards + return talkToNpcOnCell(14,42) + elseif not hasItem("Lemonade") or (not hasItem("TM28") and getMoney() > 3500 ) then -- Buy Lemonade for Future Quest (Saffron Guard) + return moveToMap("Celadon Mart 1") + + else + return moveToMap("Route 7") + end +end + +function RainbowBadgeQuest:PokecenterCeladon() + if not game.isTeamFullyHealed() then + self:pokecenter("Celadon City") + else + -- if getTeamSize() >= 4 then + -- if isPCOpen() then + -- depositPokemonToPC(4) + -- else + return moveToCell() + -- end + -- else + -- moveToMap("Celadon City") + --end + end +end + +function RainbowBadgeQuest:Route7() + if self:needPokecenter() or not game.isTeamFullyHealed() then + return moveToMap("Celadon City") + elseif hasItem("Rainbow Badge") and hasItem("Lemonade") then + return moveToMap("Underground House 3") + elseif ( not self:isTrainingOver() and not hasItem("Rainbow Badge") )or (hasPokemonInTeam("Squirtle") and getPokemonLevel(1) < 60) then + if not game.inRectangle(12,8,21,21) then + return moveToCell(17,17) + else + return moveToGrass() + end + else + return moveToMap("Celadon City") + end +end + +function RainbowBadgeQuest:CeladonGym() + 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 + elseif hasItem("TM28") and not hasMove(1,"Dig") and getPokemonName(1) == "Mankey" then + useItemOnPokemon("TM28",1) + elseif self:needPokecenter() or not game.isTeamFullyHealed() or not self.registeredPokecenter == "Pokecenter Celadon" or not self:isTrainingOver() then + return moveToMap("Celadon City") + elseif not hasItem("Rainbow Badge") then + talkToNpcOnCell(8,4) -- Erika + else + 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 moveToMap("Celadon City") + end + end +end + +function RainbowBadgeQuest:CeladonMart1() + if not hasItem("Lemonade") or not hasItem("TM28") then + return moveToMap("Celadon Mart Elevator") + else + return moveToMap("Celadon City") + end +end + +function RainbowBadgeQuest:CeladonMartElevator() + if not hasItem("Lemonade") then + if not dialogs.martElevatorFloor5.state then + pushDialogAnswer(5) + return talkToNpcOnCell(1,1) + else + dialogs.martElevatorFloor5.state = false + return moveToCell(2,5) + end + elseif not hasItem("TM28") then + if not dialogs.martElevatorFloor3.state then + pushDialogAnswer(3) + return talkToNpcOnCell(1,1) + else + dialogs.martElevatorFloor3.state = false + return moveToCell(2,5) + end + elseif hasItem("Lemonade") and hasItem("TM28") and getMoney() > 600000 then + if not dialogs.martElevatorFloor2.state then + pushDialogAnswer(2) + return talkToNpcOnCell(1,1) + else + dialogs.martElevatorFloor2.state = false + return moveToCell(2,5) + end + else + if not dialogs.martElevatorFloor1.state then + pushDialogAnswer(1) + return talkToNpcOnCell(1,1) + else + dialogs.martElevatorFloor1.state = false + return moveToCell(2,5) + end + end +end + +function RainbowBadgeQuest:CeladonMart5() + if not hasItem("Lemonade") then + return moveToMap("Celadon Mart 6") + elseif not hasItem("TM28") then + return moveToMap("Celadon Mart Elevator") + else + return moveToMap("Celadon Mart Elevator") + end +end +function RainbowBadgeQuest:CeladonMart3() + if not hasItem("TM28") and getMoney() > 3500 then + if not isShopOpen() then + return talkToNpcOnCell(10,10) + else + return buyItem("TM28", 1) + end + else + return moveToMap("Celadon Mart Elevator") + end +end +function RainbowBadgeQuest:CeladonMart2() + n = getMoney() / 600 + if getMoney() > 600 and hasItem("TM28") and hasItem("Lemonade") then + if not isShopOpen() then + return talkToNpcOnCell(4,10) + else + return buyItem("Great Ball", n) + end + else + return moveToMap("Celadon Mart Elevator") + end +end +function RainbowBadgeQuest:CeladonMart6() + if not hasItem("Lemonade") then + if not isShopOpen() then + return talkToNpcOnCell(15, 7) + else + if getMoney() > 1000 then + return buyItem("Lemonade", 5) + else + return buyItem("Lemonade",(getMoney()/200)) + end + end + else + return moveToMap("Celadon Mart 5") + end +end + +function RainbowBadgeQuest:UndergroundHouse3() + return moveToMap("Underground1") +end + +function RainbowBadgeQuest:Underground1() + return moveToMap("Underground House 4") +end + +function RainbowBadgeQuest:UndergroundHouse4() + return moveToMap("Route 8") +end + +function RainbowBadgeQuest:Route8() + return moveToMap("Lavender Town") +end + +return RainbowBadgeQuest \ No newline at end of file diff --git a/Quests/Kanto/ThunderBadgeQuest.lua b/Quests/Kanto/ThunderBadgeQuest.lua index 625fe88..d4f754e 100644 --- a/Quests/Kanto/ThunderBadgeQuest.lua +++ b/Quests/Kanto/ThunderBadgeQuest.lua @@ -326,6 +326,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 @@ -339,7 +343,7 @@ function ThunderBadgeQuest:VermilionGym() end end end - -- end +end end return ThunderBadgeQuest From 90177ef42755362a5bffe57b6cf73fe2b0fdd4f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Sun, 4 Nov 2018 22:05:04 +0700 Subject: [PATCH 12/32] add RainbowBadge , fix Trainning over --- Quests/Kanto/CascadeBadgeQuest.lua | 2 +- Quests/Kanto/RainbowBadgeQuest.lua | 218 +++++++++++++++++++---------- Quests/Quest.lua | 2 +- Quests/QuestManager.lua | 4 +- 4 files changed, 147 insertions(+), 79 deletions(-) diff --git a/Quests/Kanto/CascadeBadgeQuest.lua b/Quests/Kanto/CascadeBadgeQuest.lua index 92024ea..8843813 100644 --- a/Quests/Kanto/CascadeBadgeQuest.lua +++ b/Quests/Kanto/CascadeBadgeQuest.lua @@ -124,7 +124,7 @@ 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 diff --git a/Quests/Kanto/RainbowBadgeQuest.lua b/Quests/Kanto/RainbowBadgeQuest.lua index 94d894e..396d714 100644 --- a/Quests/Kanto/RainbowBadgeQuest.lua +++ b/Quests/Kanto/RainbowBadgeQuest.lua @@ -38,7 +38,7 @@ function RainbowBadgeQuest:new() end function RainbowBadgeQuest:isDoable() - if self:hasMap() and not hasItem("Soul Badge") and not isNpcOnCell(48,34) then + if self:hasMap() and not hasItem("Soul Badge") then return true end return false @@ -53,17 +53,14 @@ function RainbowBadgeQuest:isDone() end function RainbowBadgeQuest:CeladonCity() - --if not enableTrainerBattles() then - -- enableTrainerBattles() - --else - if isNpcOnCell(21,51) and getPlayerX() == 21 and getPlayerY() == 50 and hasItem("Rainbow Badge") then --NPC: Trainer OP - return talkToNpcOnCell(21,51) - elseif self:needPokecenter() or not game.isTeamFullyHealed() then +if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() +else + if self:needPokecenter() or not game.isTeamFullyHealed() then return moveToCell(165,82) - elseif isNpcOnCell(54,14) then --Item: Great Ball - return talkToNpcOnCell(54,14) - elseif isNpcOnCell(46,49) and not isNpcOnCell(48,34) then --NPC: Rocket Guy - return talkToNpcOnCell(46,49) + 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) @@ -72,7 +69,10 @@ function RainbowBadgeQuest:CeladonCity() else fatal("No pokemon in this team can learn - Cut") end - elseif not hasItem("Rainbow Badge") then + elseif not hasItem("Silph Cope") 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) @@ -81,34 +81,133 @@ function RainbowBadgeQuest:CeladonCity() else fatal("No pokemon in this team can learn - Cut") end - elseif isNpcOnCell(21,51) then - return talkToNpcOnCell(21,51) - else - return moveToMap("CeladonGym") + else + return moveToCell(122,122) end elseif isNpcOnCell(14,42) and not isNpcOnCell(48,34) and hasItem("Rainbow Badge") then --NPC: Remove the Guards return talkToNpcOnCell(14,42) elseif not hasItem("Lemonade") or (not hasItem("TM28") and getMoney() > 3500 ) then -- Buy Lemonade for Future Quest (Saffron Guard) return moveToMap("Celadon Mart 1") - else - return moveToMap("Route 7") + return moveToCell(193,93) end +end end -function RainbowBadgeQuest:PokecenterCeladon() +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 Cope") 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 Cope") 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 + pushDialogAnswer("B4F") + talkToNpcOnCell(61,5) + 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(28,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 Cope") then + pushDialogAnswer("B4F") + talkToNpcOnCell(61,5) + else + return moveToCell(62,179) + end +else + if isNpcOnCell(28,190) then + talkToNpcOnCell(28,190) + elseif hasItem("Silph Cope") then + return moveToCell(27,196) + else + return moveToCell(24,184) + end + end + +end + +function RainbowBadgeQuest:CeladonPokémonCenter() if not game.isTeamFullyHealed() then self:pokecenter("Celadon City") else - -- if getTeamSize() >= 4 then - -- if isPCOpen() then - -- depositPokemonToPC(4) - -- else - return moveToCell() - -- end - -- else - -- moveToMap("Celadon City") - --end + + return moveToCell(12,84) end end @@ -129,33 +228,22 @@ function RainbowBadgeQuest:Route7() end function RainbowBadgeQuest:CeladonGym() - 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 - elseif hasItem("TM28") and not hasMove(1,"Dig") and getPokemonName(1) == "Mankey" then - useItemOnPokemon("TM28",1) - elseif self:needPokecenter() or not game.isTeamFullyHealed() or not self.registeredPokecenter == "Pokecenter Celadon" or not self:isTrainingOver() then - return moveToMap("Celadon City") - elseif not hasItem("Rainbow Badge") then - talkToNpcOnCell(8,4) -- Erika - else - 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 moveToMap("Celadon City") - end - end + 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:CeladonMart1() @@ -222,18 +310,6 @@ function RainbowBadgeQuest:CeladonMart3() return moveToMap("Celadon Mart Elevator") end end -function RainbowBadgeQuest:CeladonMart2() - n = getMoney() / 600 - if getMoney() > 600 and hasItem("TM28") and hasItem("Lemonade") then - if not isShopOpen() then - return talkToNpcOnCell(4,10) - else - return buyItem("Great Ball", n) - end - else - return moveToMap("Celadon Mart Elevator") - end -end function RainbowBadgeQuest:CeladonMart6() if not hasItem("Lemonade") then if not isShopOpen() then @@ -254,14 +330,6 @@ function RainbowBadgeQuest:UndergroundHouse3() return moveToMap("Underground1") end -function RainbowBadgeQuest:Underground1() - return moveToMap("Underground House 4") -end - -function RainbowBadgeQuest:UndergroundHouse4() - return moveToMap("Route 8") -end - function RainbowBadgeQuest:Route8() return moveToMap("Lavender Town") end diff --git a/Quests/Quest.lua b/Quests/Quest.lua index 144c949..36d2247 100644 --- a/Quests/Quest.lua +++ b/Quests/Quest.lua @@ -377,7 +377,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!") diff --git a/Quests/QuestManager.lua b/Quests/QuestManager.lua index 1ad01c7..72ba26c 100644 --- a/Quests/QuestManager.lua +++ b/Quests/QuestManager.lua @@ -12,8 +12,7 @@ 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 quests = { -- Kanto Quests @@ -23,6 +22,7 @@ local quests = { CascadeBadgeQuest:new(), ThunderBadgeQuest:new(), RockTunnelQuest:new(), + RainbowBadgeQuest:new(), } function QuestManager:new(o) From 79f3063a10ac8b4a59150114d58d5c2e5051ae03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Mon, 5 Nov 2018 16:43:07 +0700 Subject: [PATCH 13/32] fix bug and update rainbow quest --- Quests/Kanto/MoonFossilQuest.lua | 2 +- Quests/Kanto/RainbowBadgeQuest.lua | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Quests/Kanto/MoonFossilQuest.lua b/Quests/Kanto/MoonFossilQuest.lua index c67fb6f..548016f 100644 --- a/Quests/Kanto/MoonFossilQuest.lua +++ b/Quests/Kanto/MoonFossilQuest.lua @@ -33,7 +33,7 @@ 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() diff --git a/Quests/Kanto/RainbowBadgeQuest.lua b/Quests/Kanto/RainbowBadgeQuest.lua index 396d714..2ff7028 100644 --- a/Quests/Kanto/RainbowBadgeQuest.lua +++ b/Quests/Kanto/RainbowBadgeQuest.lua @@ -69,7 +69,7 @@ else else fatal("No pokemon in this team can learn - Cut") end - elseif not hasItem("Silph Cope") then + elseif not hasItem("Silph Scope") then return moveToCell(147,95) elseif countBadges() < 4 then @@ -105,7 +105,7 @@ end function RainbowBadgeQuest:CeladonGameCorner() if game.inRectangle(118,64,137,79) then - if not hasItem("Silph Cope") then + if not hasItem("Silph Scope") then if isNpcOnCell(133,67) then talkToNpcOnCell(133,67) else @@ -120,7 +120,7 @@ end function RainbowBadgeQuest:RocketHideoutB1F() if game.inRectangle(3,5,31,40) then - if not hasItem("Silph Cope") then + if not hasItem("Silph Scope") then if isNpcOnCell(16,24) then talkToNpcOnCell(16,24) elseif isNpcOnCell(8,23) then @@ -184,7 +184,7 @@ if game.inRectangle(3,172,18,191) then return moveToCell(18,187) end elseif game.inRectangle(60,173,65,180) then - if hasItem("Silph Cope") then + if hasItem("Silph Scope") then pushDialogAnswer("B4F") talkToNpcOnCell(61,5) else @@ -193,7 +193,7 @@ if game.inRectangle(3,172,18,191) then else if isNpcOnCell(28,190) then talkToNpcOnCell(28,190) - elseif hasItem("Silph Cope") then + elseif hasItem("Silph Scope") then return moveToCell(27,196) else return moveToCell(24,184) From 65ebdc24e8e7a680071b9f1ce93884edb66ba02b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Mon, 5 Nov 2018 16:48:26 +0700 Subject: [PATCH 14/32] fix some bug rainbow badge --- Quests/Kanto/RainbowBadgeQuest.lua | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Quests/Kanto/RainbowBadgeQuest.lua b/Quests/Kanto/RainbowBadgeQuest.lua index 2ff7028..6488dfe 100644 --- a/Quests/Kanto/RainbowBadgeQuest.lua +++ b/Quests/Kanto/RainbowBadgeQuest.lua @@ -136,8 +136,12 @@ if game.inRectangle(3,5,31,40) then return moveToCell(12,7) end elseif game.inRectangle(60,4,65,11) then - pushDialogAnswer("B4F") - talkToNpcOnCell(61,5) + if not hasItem("Silph Scope") then + pushDialogAnswer("B4F") + return talkToNpcOnCell(61,5) + else + return moveToCell(63, 10) + end end end @@ -185,21 +189,22 @@ if game.inRectangle(3,172,18,191) then end elseif game.inRectangle(60,173,65,180) then if hasItem("Silph Scope") then - pushDialogAnswer("B4F") - talkToNpcOnCell(61,5) + pushDialogAnswer("B1F") + talkToNpcOnCell(61,174) else return moveToCell(62,179) end else - if isNpcOnCell(28,190) then - talkToNpcOnCell(28,190) + if isNpcOnCell(25,170) then + return talkToNpcOnCell(25,170) elseif hasItem("Silph Scope") then return moveToCell(27,196) else - return moveToCell(24,184) + return talkToNpcOnCell(24,178) end end + end function RainbowBadgeQuest:CeladonPokémonCenter() From a89233f6aa16e2a8e12c2a8ec35adf941478ee2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Mon, 5 Nov 2018 16:53:03 +0700 Subject: [PATCH 15/32] change level --- Quests/Kanto/RainbowBadgeQuest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Quests/Kanto/RainbowBadgeQuest.lua b/Quests/Kanto/RainbowBadgeQuest.lua index 6488dfe..a48cb2a 100644 --- a/Quests/Kanto/RainbowBadgeQuest.lua +++ b/Quests/Kanto/RainbowBadgeQuest.lua @@ -12,7 +12,7 @@ local Dialog = require "Quests/Dialog" local name = 'Rainbow Badge' local description = 'Beat Erika + Get Lemonade for future quest' -local level = 3 +local level = 33 local dialogs = { martElevatorFloor1 = Dialog:new({ From c85c4335247b983837f39ef7cd380a63da07334a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Mon, 5 Nov 2018 17:09:07 +0700 Subject: [PATCH 16/32] fix bug --- Quests/Kanto/RainbowBadgeQuest.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Quests/Kanto/RainbowBadgeQuest.lua b/Quests/Kanto/RainbowBadgeQuest.lua index a48cb2a..07b2957 100644 --- a/Quests/Kanto/RainbowBadgeQuest.lua +++ b/Quests/Kanto/RainbowBadgeQuest.lua @@ -71,7 +71,8 @@ else end elseif not hasItem("Silph Scope") then return moveToCell(147,95) - + elseif not self:isTrainingOver then + return moveToCell(190,89) elseif countBadges() < 4 then if not game.hasPokemonWithMove("Cut") then if self.pokemonId <= getTeamSize() then @@ -221,7 +222,7 @@ function RainbowBadgeQuest:Route7() return moveToMap("Celadon City") elseif hasItem("Rainbow Badge") and hasItem("Lemonade") then return moveToMap("Underground House 3") - elseif ( not self:isTrainingOver() and not hasItem("Rainbow Badge") )or (hasPokemonInTeam("Squirtle") and getPokemonLevel(1) < 60) then + elseif not self:isTrainingOver() then if not game.inRectangle(12,8,21,21) then return moveToCell(17,17) else From 54a7a1fac5fe7a86cf1919e20abf1ed809cbb886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Mon, 5 Nov 2018 17:11:20 +0700 Subject: [PATCH 17/32] fix bug --- Quests/Kanto/RainbowBadgeQuest.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Quests/Kanto/RainbowBadgeQuest.lua b/Quests/Kanto/RainbowBadgeQuest.lua index 07b2957..4b208af 100644 --- a/Quests/Kanto/RainbowBadgeQuest.lua +++ b/Quests/Kanto/RainbowBadgeQuest.lua @@ -12,7 +12,7 @@ local Dialog = require "Quests/Dialog" local name = 'Rainbow Badge' local description = 'Beat Erika + Get Lemonade for future quest' -local level = 33 +local level = 35 local dialogs = { martElevatorFloor1 = Dialog:new({ @@ -71,7 +71,7 @@ else end elseif not hasItem("Silph Scope") then return moveToCell(147,95) - elseif not self:isTrainingOver then + elseif not self:isTrainingOver() then return moveToCell(190,89) elseif countBadges() < 4 then if not game.hasPokemonWithMove("Cut") then @@ -223,11 +223,8 @@ function RainbowBadgeQuest:Route7() elseif hasItem("Rainbow Badge") and hasItem("Lemonade") then return moveToMap("Underground House 3") elseif not self:isTrainingOver() then - if not game.inRectangle(12,8,21,21) then - return moveToCell(17,17) - else + return moveToGrass() - end else return moveToMap("Celadon City") end From e99a6d0e2b617acaf0a7aae24b2020428c12642d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Mon, 5 Nov 2018 17:14:03 +0700 Subject: [PATCH 18/32] fix bug stuck --- Quests/Kanto/RainbowBadgeQuest.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Quests/Kanto/RainbowBadgeQuest.lua b/Quests/Kanto/RainbowBadgeQuest.lua index 4b208af..9191bfa 100644 --- a/Quests/Kanto/RainbowBadgeQuest.lua +++ b/Quests/Kanto/RainbowBadgeQuest.lua @@ -218,9 +218,7 @@ function RainbowBadgeQuest:CeladonPokémonCenter() end function RainbowBadgeQuest:Route7() - if self:needPokecenter() or not game.isTeamFullyHealed() then - return moveToMap("Celadon City") - elseif hasItem("Rainbow Badge") and hasItem("Lemonade") then + if hasItem("Rainbow Badge") and hasItem("Lemonade") then return moveToMap("Underground House 3") elseif not self:isTrainingOver() then From 624957e09b0a3b00a0857f492a378c6192ddf485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Mon, 5 Nov 2018 17:24:30 +0700 Subject: [PATCH 19/32] fix bug --- Quests/Kanto/RainbowBadgeQuest.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/Quests/Kanto/RainbowBadgeQuest.lua b/Quests/Kanto/RainbowBadgeQuest.lua index 9191bfa..46379a6 100644 --- a/Quests/Kanto/RainbowBadgeQuest.lua +++ b/Quests/Kanto/RainbowBadgeQuest.lua @@ -85,8 +85,6 @@ else else return moveToCell(122,122) end - elseif isNpcOnCell(14,42) and not isNpcOnCell(48,34) and hasItem("Rainbow Badge") then --NPC: Remove the Guards - return talkToNpcOnCell(14,42) elseif not hasItem("Lemonade") or (not hasItem("TM28") and getMoney() > 3500 ) then -- Buy Lemonade for Future Quest (Saffron Guard) return moveToMap("Celadon Mart 1") else From 298810abbbbf87a7dcb6c3f856e2db3d0813d35b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Mon, 5 Nov 2018 17:41:21 +0700 Subject: [PATCH 20/32] fix again --- Quests/Kanto/RainbowBadgeQuest.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Quests/Kanto/RainbowBadgeQuest.lua b/Quests/Kanto/RainbowBadgeQuest.lua index 46379a6..dc3700a 100644 --- a/Quests/Kanto/RainbowBadgeQuest.lua +++ b/Quests/Kanto/RainbowBadgeQuest.lua @@ -217,12 +217,12 @@ end function RainbowBadgeQuest:Route7() if hasItem("Rainbow Badge") and hasItem("Lemonade") then - return moveToMap("Underground House 3") + return moveToMap("Underground House 3") elseif not self:isTrainingOver() then return moveToGrass() else - return moveToMap("Celadon City") + return moveToCell(170,87) end end From 5d6eff4d75695bb5020e6e4b5665d64b73e78a64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Mon, 5 Nov 2018 18:01:01 +0700 Subject: [PATCH 21/32] remove unuse condition --- Quests/Kanto/RainbowBadgeQuest.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Quests/Kanto/RainbowBadgeQuest.lua b/Quests/Kanto/RainbowBadgeQuest.lua index dc3700a..356d55d 100644 --- a/Quests/Kanto/RainbowBadgeQuest.lua +++ b/Quests/Kanto/RainbowBadgeQuest.lua @@ -216,9 +216,7 @@ function RainbowBadgeQuest:CeladonPokémonCenter() end function RainbowBadgeQuest:Route7() - if hasItem("Rainbow Badge") and hasItem("Lemonade") then - return moveToMap("Underground House 3") - elseif not self:isTrainingOver() then + if not self:isTrainingOver() then return moveToGrass() else From d39f7e238fc283515034522f1813524834f9a4bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Mon, 5 Nov 2018 19:53:27 +0700 Subject: [PATCH 22/32] fix loop battle if we lose ! --- Quests/Kanto/MoonFossilQuest.lua | 4 ++-- Quests/Quest.lua | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Quests/Kanto/MoonFossilQuest.lua b/Quests/Kanto/MoonFossilQuest.lua index 548016f..b338a42 100644 --- a/Quests/Kanto/MoonFossilQuest.lua +++ b/Quests/Kanto/MoonFossilQuest.lua @@ -38,7 +38,6 @@ end function MoonFossilQuest:Route3() if not game.isTeamFullyHealed() - then return moveToCell(178,48) else @@ -48,9 +47,10 @@ end function MoonFossilQuest:MtMoon() if not game.isTeamFullyHealed() - 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 diff --git a/Quests/Quest.lua b/Quests/Quest.lua index 36d2247..1c32cab 100644 --- a/Quests/Quest.lua +++ b/Quests/Quest.lua @@ -72,8 +72,6 @@ function Quest:pokecenter(exitMapName) -- idealy make it work without exitMapNam sys.todo("add a moveDown() or moveToNearestLink() or getLinks() to PROShine") if not game.isTeamFullyHealed() then return usePokecenter() - else - return moveToArea(exitMapName) end end @@ -276,7 +274,9 @@ local blackListTargets = { --it will kill this targets instead catch function Quest:wildBattle() if getTeamSize() >0 then - +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 getAreaName() == "Rock Tunnel" or getAreaName() == "Mt. Moon" or getAreaName() == "Mt. Moon B1F" or getAreaName() == "Diglett's Cave" or getAreaName() == "Seafoam B4F" then return run() or sendUsablePokemon() or sendAnyPokemon() or attack() From f19ab09d0951b33df29f33a30589b1dc404b9a5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Mon, 5 Nov 2018 20:23:00 +0700 Subject: [PATCH 23/32] fix if we lose jovani , it will train your pokemon first --- Quests/Kanto/RainbowBadgeQuest.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Quests/Kanto/RainbowBadgeQuest.lua b/Quests/Kanto/RainbowBadgeQuest.lua index 356d55d..bc4006d 100644 --- a/Quests/Kanto/RainbowBadgeQuest.lua +++ b/Quests/Kanto/RainbowBadgeQuest.lua @@ -69,10 +69,11 @@ else else fatal("No pokemon in this team can learn - Cut") end + elseif not self:isTrainingOver() then + return moveToCell(190,89) elseif not hasItem("Silph Scope") then return moveToCell(147,95) - elseif not self:isTrainingOver() then - return moveToCell(190,89) + elseif countBadges() < 4 then if not game.hasPokemonWithMove("Cut") then if self.pokemonId <= getTeamSize() then @@ -85,8 +86,8 @@ else else return moveToCell(122,122) end - elseif not hasItem("Lemonade") or (not hasItem("TM28") and getMoney() > 3500 ) then -- Buy Lemonade for Future Quest (Saffron Guard) - return moveToMap("Celadon Mart 1") + --elseif not hasItem("Lemonade") or (not hasItem("TM28") and getMoney() > 3500 ) then -- Buy Lemonade for Future Quest (Saffron Guard) + -- return moveToMap("Celadon Mart 1") else return moveToCell(193,93) end From 197b10bc6aba34f1ec1f8e424389e2aa06e5588c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Mon, 5 Nov 2018 20:24:19 +0700 Subject: [PATCH 24/32] fix black out --- Quests/Kanto/ThunderBadgeQuest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Quests/Kanto/ThunderBadgeQuest.lua b/Quests/Kanto/ThunderBadgeQuest.lua index d4f754e..3b46300 100644 --- a/Quests/Kanto/ThunderBadgeQuest.lua +++ b/Quests/Kanto/ThunderBadgeQuest.lua @@ -61,7 +61,7 @@ function ThunderBadgeQuest:isDoable() end function ThunderBadgeQuest:isDone() - if getAreaName() == "Route 9" then + if getAreaName() == "Route 9" or getAreaName() == "Cerulean Pokémon Center" then return true else return false From d39c9bd2181481c176b3b64a7c4d7fe4dc666605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Mon, 5 Nov 2018 20:51:16 +0700 Subject: [PATCH 25/32] implement new function in quest , test it ! --- Quests/Kanto/CascadeBadgeQuest.lua | 17 ++++++++++------- Quests/Quest.lua | 10 ++++++++++ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Quests/Kanto/CascadeBadgeQuest.lua b/Quests/Kanto/CascadeBadgeQuest.lua index 8843813..29c5ea1 100644 --- a/Quests/Kanto/CascadeBadgeQuest.lua +++ b/Quests/Kanto/CascadeBadgeQuest.lua @@ -54,7 +54,7 @@ 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 -- return moveToCell(166,133) -- pokemart @@ -85,11 +85,12 @@ function CascadeBadgeQuest:CeruleanPokémonMart() 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 @@ -127,7 +128,8 @@ function CascadeBadgeQuest:CeruleanGym() -- get Cascade Badge 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 countBadges() >= 0 then return talkToNpcOnCell(51, 109) @@ -136,6 +138,7 @@ function CascadeBadgeQuest:CeruleanGym() -- get Cascade Badge else return moveToCell(51,136) end + end end return CascadeBadgeQuest diff --git a/Quests/Quest.lua b/Quests/Quest.lua index 1c32cab..2478b77 100644 --- a/Quests/Quest.lua +++ b/Quests/Quest.lua @@ -75,6 +75,16 @@ function Quest:pokecenter(exitMapName) -- idealy make it work without exitMapNam 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 moveToCell(cellX,cellY) + end +end + -- at a point in the game we'll always need to buy the same things -- use this function then function Quest:pokemart(x,y,npcx,npcy) From d1cf04cf968e6b14bf25b0cb22716eb0a4d46084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Tue, 6 Nov 2018 21:26:01 +0700 Subject: [PATCH 26/32] complete rainbow badge , fix bug , add pokeflute quest (not done) --- Quests/Kanto/PokeFluteQuest.lua | 164 +++++++++++++++++++++++++++++ Quests/Kanto/RainbowBadgeQuest.lua | 148 ++++++++++---------------- Quests/Kanto/RockTunnelQuest.lua | 4 +- Quests/QuestManager.lua | 3 +- 4 files changed, 226 insertions(+), 93 deletions(-) create mode 100644 Quests/Kanto/PokeFluteQuest.lua diff --git a/Quests/Kanto/PokeFluteQuest.lua b/Quests/Kanto/PokeFluteQuest.lua new file mode 100644 index 0000000..5dc66ad --- /dev/null +++ b/Quests/Kanto/PokeFluteQuest.lua @@ -0,0 +1,164 @@ +-- 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 (Pokemon Tower)' +local level = 32 + +local dialogs = { + checkFujiHouse = Dialog:new({ + "i should check out" + }), + 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() == "Route 18") then --FIX Blackout + return true + else + return false + end +end + +function PokeFluteQuest:LavenderPokémonCenter() + + self:pokecentercell(53,25) + +end +function PokeFluteQuest:LavenderTown() + 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) + else + return moveToCell(96,122) + 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() + return moveToCell(26,119) +end + +function PokeFluteQuest: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 PokeFluteQuest: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 +function PokeFluteQuest:CeladonCity() + return moveToCell(95,105) +end +return PokeFluteQuest \ No newline at end of file diff --git a/Quests/Kanto/RainbowBadgeQuest.lua b/Quests/Kanto/RainbowBadgeQuest.lua index bc4006d..c7461da 100644 --- a/Quests/Kanto/RainbowBadgeQuest.lua +++ b/Quests/Kanto/RainbowBadgeQuest.lua @@ -11,8 +11,8 @@ local Quest = require "Quests/Quest" local Dialog = require "Quests/Dialog" local name = 'Rainbow Badge' -local description = 'Beat Erika + Get Lemonade for future quest' -local level = 35 +local description = 'Beat Erika + Get Silph Scope for future quest' +local level = 36 local dialogs = { martElevatorFloor1 = Dialog:new({ @@ -26,7 +26,14 @@ local dialogs = { }), 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() @@ -38,14 +45,14 @@ function RainbowBadgeQuest:new() end function RainbowBadgeQuest:isDoable() - if self:hasMap() and not hasItem("Soul Badge") then + if self:hasMap() and not hasItem("Poké Flute") then return true end return false end function RainbowBadgeQuest:isDone() - if (hasItem("Rainbow Badge") and getAreaName() == "Lavender Town" )or isNpcOnCell(48,34) then + if (hasItem("Silph Scope") and getAreaName() == "Lavender Town" ) then return true else return false @@ -69,7 +76,7 @@ else else fatal("No pokemon in this team can learn - Cut") end - elseif not self:isTrainingOver() then + elseif not self:isTrainingOver() and countBadges() < 4 then return moveToCell(190,89) elseif not hasItem("Silph Scope") then return moveToCell(147,95) @@ -86,14 +93,25 @@ else else return moveToCell(122,122) end - --elseif not hasItem("Lemonade") or (not hasItem("TM28") and getMoney() > 3500 ) then -- Buy Lemonade for Future Quest (Saffron Guard) - -- return moveToMap("Celadon Mart 1") + 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) @@ -217,12 +235,35 @@ function RainbowBadgeQuest:CeladonPokémonCenter() end function RainbowBadgeQuest:Route7() + 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 if not self:isTrainingOver() then return moveToGrass() 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() @@ -244,92 +285,19 @@ function RainbowBadgeQuest:CeladonGym() end end -function RainbowBadgeQuest:CeladonMart1() - if not hasItem("Lemonade") or not hasItem("TM28") then - return moveToMap("Celadon Mart Elevator") - else - return moveToMap("Celadon City") - end -end - -function RainbowBadgeQuest:CeladonMartElevator() - if not hasItem("Lemonade") then - if not dialogs.martElevatorFloor5.state then - pushDialogAnswer(5) - return talkToNpcOnCell(1,1) - else - dialogs.martElevatorFloor5.state = false - return moveToCell(2,5) - end - elseif not hasItem("TM28") then - if not dialogs.martElevatorFloor3.state then - pushDialogAnswer(3) - return talkToNpcOnCell(1,1) - else - dialogs.martElevatorFloor3.state = false - return moveToCell(2,5) - end - elseif hasItem("Lemonade") and hasItem("TM28") and getMoney() > 600000 then - if not dialogs.martElevatorFloor2.state then - pushDialogAnswer(2) - return talkToNpcOnCell(1,1) - else - dialogs.martElevatorFloor2.state = false - return moveToCell(2,5) - end - else - if not dialogs.martElevatorFloor1.state then - pushDialogAnswer(1) - return talkToNpcOnCell(1,1) - else - dialogs.martElevatorFloor1.state = false - return moveToCell(2,5) - end - end -end -function RainbowBadgeQuest:CeladonMart5() - if not hasItem("Lemonade") then - return moveToMap("Celadon Mart 6") - elseif not hasItem("TM28") then - return moveToMap("Celadon Mart Elevator") - else - return moveToMap("Celadon Mart Elevator") - end -end -function RainbowBadgeQuest:CeladonMart3() - if not hasItem("TM28") and getMoney() > 3500 then - if not isShopOpen() then - return talkToNpcOnCell(10,10) - else - return buyItem("TM28", 1) - end - else - return moveToMap("Celadon Mart Elevator") - end -end -function RainbowBadgeQuest:CeladonMart6() - if not hasItem("Lemonade") then - if not isShopOpen() then - return talkToNpcOnCell(15, 7) - else - if getMoney() > 1000 then - return buyItem("Lemonade", 5) - else - return buyItem("Lemonade",(getMoney()/200)) - end - end - else - return moveToMap("Celadon Mart 5") - end -end - -function RainbowBadgeQuest:UndergroundHouse3() - return moveToMap("Underground1") +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 moveToMap("Lavender Town") + 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 index 56729ac..7cdd759 100644 --- a/Quests/Kanto/RockTunnelQuest.lua +++ b/Quests/Kanto/RockTunnelQuest.lua @@ -21,7 +21,7 @@ function RockTunnelQuest:new() end function RockTunnelQuest:isDoable() - if self:hasMap() and not hasItem("Rainbow Badge") then + if self:hasMap() and not hasItem("Silph Scope") then return true end return false @@ -138,6 +138,7 @@ function RockTunnelQuest:Route8() --end end + function RockTunnelQuest:UndergroundPath() if game.inRectangle(105, 6,115, 14) then return moveToCell(108,10) @@ -148,7 +149,6 @@ else end end - function RockTunnelQuest:Route7() if isNpcOnCell(198,104) then return talkToNpcOnCell(198,104) diff --git a/Quests/QuestManager.lua b/Quests/QuestManager.lua index 72ba26c..8001539 100644 --- a/Quests/QuestManager.lua +++ b/Quests/QuestManager.lua @@ -13,7 +13,7 @@ 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 quests = { -- Kanto Quests StartKantoQuest:new(), @@ -23,6 +23,7 @@ local quests = { ThunderBadgeQuest:new(), RockTunnelQuest:new(), RainbowBadgeQuest:new(), + PokeFluteQuest:new(), } function QuestManager:new(o) From d153fecca2cdd5dda3c7817627ac929de6e2f07d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Wed, 7 Nov 2018 12:09:42 +0700 Subject: [PATCH 27/32] update pokeflute quest --- Quests/Kanto/PokeFluteQuest.lua | 59 ++++++++++++++++++++++++++------- Quests/Quest.lua | 2 +- 2 files changed, 48 insertions(+), 13 deletions(-) diff --git a/Quests/Kanto/PokeFluteQuest.lua b/Quests/Kanto/PokeFluteQuest.lua index 5dc66ad..0c5b6ee 100644 --- a/Quests/Kanto/PokeFluteQuest.lua +++ b/Quests/Kanto/PokeFluteQuest.lua @@ -11,7 +11,7 @@ local Quest = require "Quests/Quest" local Dialog = require "Quests/Dialog" local name = 'Poké Flute' -local description = 'Lavender Town (Pokemon Tower)' +local description = 'Lavender Town (get pokeflute ) and come fuchsia' local level = 32 local dialogs = { @@ -38,7 +38,7 @@ function PokeFluteQuest:isDoable() end function PokeFluteQuest:isDone() - if (hasItem("Poké Flute") and getAreaName() == "Route 18") then --FIX Blackout + if (hasItem("Poké Flute") and getAreaName() == "Fuchsia City") then --FIX Blackout return true else return false @@ -57,7 +57,7 @@ function PokeFluteQuest:LavenderTown() elseif not hasItem("Poké Flute") then return moveToCell(126,117) else - return moveToCell(96,122) + return moveToCell(119,160) end end @@ -140,15 +140,15 @@ function PokeFluteQuest:Route8() return moveToCell(26,119) end -function PokeFluteQuest: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 PokeFluteQuest: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 PokeFluteQuest:Route7() if isNpcOnCell(198,104) then return talkToNpcOnCell(198,104) @@ -161,4 +161,39 @@ end function PokeFluteQuest:CeladonCity() return moveToCell(95,105) end + +function PokeFluteQuest:LavenderTownGate() + return moveToCell(13,23) +end +function PokeFluteQuest:Route12() +if isNpcOnCell(262,133) then +pushDialogAnswer(getItemId("Poké Flute")) +talkToNpcOnCell(262,133) +elseif isNpcOnCell(257,147) then +return talkToNpcOnCell(257,147) + +else + return moveToCell(267,224) +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/Quest.lua b/Quests/Quest.lua index 2478b77..7f7fa6a 100644 --- a/Quests/Quest.lua +++ b/Quests/Quest.lua @@ -532,7 +532,7 @@ elseif getPokemonName(1) == "Dratini" then elseif getPokemonName(1) == "Swampert" and getPokemonLevel(1) >=70 then return forgetAnyMoveExcept({"Ice Beam","Dig","Dive","Earthquake"}) else - return forgetAnyMoveExcept({"Dig", "Shadow Ball","Water Pulse", "Dark Pulse", "Surf", "Hex", "Air Slash", "Cut", "Acrobatics", "Poison Fang", "Thunderbolt", + return forgetAnyMoveExcept({"Dig","Aqua Tail", "Shadow Ball","Water Pulse", "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", From d172037cd9afa8ec370566c3eeed960709d7351a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Sat, 17 Nov 2018 12:41:22 +0700 Subject: [PATCH 28/32] fix black out loop, add soul badge quest --- Quests/Kanto/CascadeBadgeQuest.lua | 14 +- Quests/Kanto/MoonFossilQuest.lua | 4 +- Quests/Kanto/SoulBadgeQuest.lua | 267 +++++++++++++++++++++++++++++ Quests/Quest.lua | 25 +-- Quests/QuestManager.lua | 2 + 5 files changed, 297 insertions(+), 15 deletions(-) create mode 100644 Quests/Kanto/SoulBadgeQuest.lua diff --git a/Quests/Kanto/CascadeBadgeQuest.lua b/Quests/Kanto/CascadeBadgeQuest.lua index 29c5ea1..29279d1 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({ @@ -58,8 +58,8 @@ function CascadeBadgeQuest:CeruleanCity() return moveToCell(162,114) --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() @@ -80,6 +80,14 @@ function CascadeBadgeQuest:CeruleanHouse6() end end +function CascadeBadgeQuest:Route4() + if not self:isTrainingOver() then + return moveToGrass() + else + return moveToCell(130,101) + end +end + function CascadeBadgeQuest:CeruleanPokémonMart() self:pokemart(22,7) end diff --git a/Quests/Kanto/MoonFossilQuest.lua b/Quests/Kanto/MoonFossilQuest.lua index b338a42..4d47868 100644 --- a/Quests/Kanto/MoonFossilQuest.lua +++ b/Quests/Kanto/MoonFossilQuest.lua @@ -45,8 +45,8 @@ 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 diff --git a/Quests/Kanto/SoulBadgeQuest.lua b/Quests/Kanto/SoulBadgeQuest.lua new file mode 100644 index 0000000..61abb99 --- /dev/null +++ b/Quests/Kanto/SoulBadgeQuest.lua @@ -0,0 +1,267 @@ +-- 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 = 79 + +local dialogs = { + questSurfAccept = Dialog:new({ + "There is something there I want you to take", + "Did you get the HM broseph" + }) +} + +local SoulBadgeQuest = Quest:new() + +function SoulBadgeQuest:new() + local o = Quest.new(SoulBadgeQuest, name, description, level, dialogs) + o.zoneExp = 1 + o.pokemonId = 1 + return o +end + +function SoulBadgeQuest:isDoable() + if self:hasMap() and not hasItem("Marsh Badge") 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 (hasItem("Soul Badge") and hasItem("HM03") and getMapName() == "Route 15") or getMapName() == "Safari Entrance" or getMapName() == "Route 20"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() + + self:pokecentercell(102,98) +end +function SoulBadgeQuest:Route18() + if self:canEnterSafari() then + return moveToArea("Fuchsia City") + else + return moveToRectangle(32,19,35,19) + end + +end + +function SoulBadgeQuest:FuchsiaCity() +if not isTrainerInfoReceived() then + log("getting trainer info") + return askForTrainerInfo() +else + if self:needPokecenter() or not game.isTeamFullyHealed() or self.registeredPokecenter ~= "Fuchsia Pokémon Center" then + return moveToCell(115,98) + elseif countBadges() < 5 then + return moveToCell(97,98) + elseif not self:canEnterSafari() then + return moveToArea("Route 18") + elseif not hasItem("HM03") then + if not dialogs.questSurfAccept.state then + return moveToArea("Fuchsia City Stop House") + else + return moveToArea("Safari Stop") + end + else + return moveToArea("Fuchsia City Stop House") + end +end +end +function SoulBadgeQuest:FuchsiaHouse1() + if hasItem("Old Rod") and not hasItem("Good Rod") and getMoney() > 15000 then + return talkToNpcOnCell(3,6) + else + return moveToArea("Fuchsia City") + end +end +function SoulBadgeQuest:SafariStop() + if self:needPokemart_() then + self:pokemart_() + elseif hasItem("Soul Badge") and dialogs.questSurfAccept.state then + if not hasItem("HM03") and self:canEnterSafari() then + return talkToNpcOnCell(7,4) + else + return moveToArea("Fuchsia City") + end + else + return moveToArea("Fuchsia City") + end +end + +function SoulBadgeQuest:Route15StopHouse() + if game.maxTeamLevel() >= 95 and hasItem("HM03") then + return moveToArea("Route 15") + elseif self:needPokecenter() or not self.registeredPokecenter == "Pokecenter Fuchsia" or ( self:isTrainingOver() and not hasPokemonInTeam("Ditto")) then + return moveToArea("Fuchsia City") + elseif hasItem("HM03") then + return moveToArea("Route 15") + elseif not self:isTrainingOver() then + self.zoneExp = math.random(1,4) + return moveToArea("Route 15") + else + return moveToArea("Route 15") + end +end + +function SoulBadgeQuest:FuchsiaCityStopHouse() + if game.maxTeamLevel() >= 95 and hasItem("HM03") then + return moveToArea("Fuchsia City") + 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 game.maxTeamLevel() >= 95 and hasItem("HM03") then + return moveToArea("Fuchsia City Stop House") + elseif hasItem("HM03") then + if not game.hasPokemonWithMove("Surf") then + if self.pokemonId <= getTeamSize() then + useItemOnPokemon("HM03", self.pokemonId) + log("Pokemon: " .. self.pokemonId .. " Try Learning: HM03") + self.pokemonId = self.pokemonId + 1 + return + + else + useItemOnPokemon("HM03", 2) + end + else + return moveToArea("Route 20") + end + else + if dialogs.questSurfAccept.state then + return moveToArea("Fuchsia City Stop House") + else + return talkToNpcOnCell(33,19) + end + 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() < 5 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/Quest.lua b/Quests/Quest.lua index 7f7fa6a..fe03a3f 100644 --- a/Quests/Quest.lua +++ b/Quests/Quest.lua @@ -213,6 +213,9 @@ function Quest:advanceSorting() end end end + if game.maxTeamLevel() - game.minTeamLevel() > 15 then + return sortTeamRangeByLevelAscending(1, pokemonsUsable) + end return sortTeamRangeByLevelDescending(1, pokemonsUsable) end @@ -320,16 +323,18 @@ 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) - --- 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) + end + else + return attack() or useAnyMove() or sendAnyPokemon() or run() + end + end --else diff --git a/Quests/QuestManager.lua b/Quests/QuestManager.lua index 8001539..65f9dcd 100644 --- a/Quests/QuestManager.lua +++ b/Quests/QuestManager.lua @@ -14,6 +14,7 @@ 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 quests = { -- Kanto Quests StartKantoQuest:new(), @@ -24,6 +25,7 @@ local quests = { RockTunnelQuest:new(), RainbowBadgeQuest:new(), PokeFluteQuest:new(), + SoulBadgeQuest:new(), } function QuestManager:new(o) From a19b7714de204e0f718c3dbad877a7c7cf20733c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Sat, 17 Nov 2018 12:53:54 +0700 Subject: [PATCH 29/32] fix small bug --- Quests/Kanto/CascadeBadgeQuest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Quests/Kanto/CascadeBadgeQuest.lua b/Quests/Kanto/CascadeBadgeQuest.lua index 29279d1..a906bde 100644 --- a/Quests/Kanto/CascadeBadgeQuest.lua +++ b/Quests/Kanto/CascadeBadgeQuest.lua @@ -81,7 +81,7 @@ function CascadeBadgeQuest:CeruleanHouse6() end function CascadeBadgeQuest:Route4() - if not self:isTrainingOver() then + if not self:isTrainingOver() or getPokemonLevel(1) < level then return moveToGrass() else return moveToCell(130,101) From cdfa210eef761ad926d19675c0985fb005063e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Wed, 21 Nov 2018 19:26:09 +0700 Subject: [PATCH 30/32] Update Kanto Questing --- PokeOne_Questing.lua.rar | Bin 0 -> 48360 bytes Quests/Kanto/CascadeBadgeQuest.lua | 2 +- Quests/Kanto/EarthBadgeQuest.lua | 222 +++++++++++++++++++++++ Quests/Kanto/MarshBadgeQuest.lua | 274 +++++++++++++++++++++++++++++ Quests/Kanto/PokeFluteQuest.lua | 91 ++++++++-- Quests/Kanto/RainbowBadgeQuest.lua | 23 +-- Quests/Kanto/RockTunnelQuest.lua | 7 +- Quests/Kanto/SoulBadgeQuest.lua | 231 ++++++++++++++++++------ Quests/Kanto/StartKantoQuest.lua | 2 +- Quests/Kanto/ThunderBadgeQuest.lua | 9 +- Quests/Kanto/VolcanoBadgeQuest.lua | 266 ++++++++++++++++++++++++++++ Quests/Quest.lua | 246 ++++++++++---------------- Quests/QuestManager.lua | 6 + Quests/new 1.txt | 123 +++++++++++++ Quests/new 2.txt | 11 ++ 15 files changed, 1267 insertions(+), 246 deletions(-) create mode 100644 PokeOne_Questing.lua.rar create mode 100644 Quests/Kanto/EarthBadgeQuest.lua create mode 100644 Quests/Kanto/MarshBadgeQuest.lua create mode 100644 Quests/Kanto/VolcanoBadgeQuest.lua create mode 100644 Quests/new 1.txt create mode 100644 Quests/new 2.txt diff --git a/PokeOne_Questing.lua.rar b/PokeOne_Questing.lua.rar new file mode 100644 index 0000000000000000000000000000000000000000..8a43d0ea4a1ff7f8e94fe0b30473faa2fb988dfe GIT binary patch literal 48360 zcmZU)Q*>rsx3wMIu`0H0+qP}ns@S%Tik*sW+qP4&&A*-(d;eeC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V_M{3-l}S(o_dNx?BjW|&NQ2< zEw0=UI}vFRaTb+G0q1KgtpMn&A^#>#RYriOy2naru6DwsqQ-&6Xy!@Jb2I+Bc;_e= zYE?Dz6xOnUDp6CQS)sK&-sl8nt{jyGjQfI8VvhJ)4?%!@WX3m@yT~EBWdb8|y36AT zy>rC#L!^{ihoem|6ELflxzMSd3UGQoyCm_lcepj#DCdCqtpOc`g1P|66NlYr-{OZz zU22*4$GAtKU|Ws;-SZ}rgnP3>wvL1z?}?qtb#G!z9!ir{I}0=zdwd*@a(94l2S=s< z*$x3f0T2LwKmGv!jeaNk|Ij)Au90IK8Swu!OS&!~rxN~OQ*dExLnkLwr(df#=H>s? zD|v=~t8xF=3Pi@z=zmOz_}Bhp5~5jFL-2o1!2Y*?>(}VZdFnqyucvU?y>P%_PXGYF u-`{@)q$nQ}(l^BpFzC$u|6{t8+{=@V1)!XZ;s0y>71vEo5f~H%;Qs;qNj=g4 literal 0 HcmV?d00001 diff --git a/Quests/Kanto/CascadeBadgeQuest.lua b/Quests/Kanto/CascadeBadgeQuest.lua index a906bde..cf4f05c 100644 --- a/Quests/Kanto/CascadeBadgeQuest.lua +++ b/Quests/Kanto/CascadeBadgeQuest.lua @@ -56,7 +56,7 @@ end function CascadeBadgeQuest:CeruleanCity() 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() or getPokemonLevel(1) < level then return moveToCell(115,101)-- Route 24 Bridge' 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/PokeFluteQuest.lua b/Quests/Kanto/PokeFluteQuest.lua index 0c5b6ee..0c0960b 100644 --- a/Quests/Kanto/PokeFluteQuest.lua +++ b/Quests/Kanto/PokeFluteQuest.lua @@ -11,12 +11,12 @@ local Quest = require "Quests/Quest" local Dialog = require "Quests/Dialog" local name = 'Poké Flute' -local description = 'Lavender Town (get pokeflute ) and come fuchsia' +local description = 'Lavender Town (get pokeflute ) and come saffron or fuchsia' local level = 32 local dialogs = { - checkFujiHouse = Dialog:new({ - "i should check out" + grandma = Dialog:new({ + "Meowth even brings money home!" }), checkFujiNote = Dialog:new({ "go into that tower to check", @@ -38,7 +38,8 @@ function PokeFluteQuest:isDoable() end function PokeFluteQuest:isDone() - if (hasItem("Poké Flute") and getAreaName() == "Fuchsia City") then --FIX Blackout + 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 @@ -51,14 +52,21 @@ function PokeFluteQuest:LavenderPokémonCenter() 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) - else + elseif countBadges() == 4 then + return moveToCell(90,122) + elseif countBadges() == 5 then return moveToCell(119,160) end +end end function PokeFluteQuest:LavenderTownVolunteerHouse() @@ -137,19 +145,41 @@ end function PokeFluteQuest:Route8() - return moveToCell(26,119) -end - ---function PokeFluteQuest: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 +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 @@ -157,25 +187,48 @@ function PokeFluteQuest:Route7() else return moveToCell(167,85) end +else + return moveToCell(225,91) +end end function PokeFluteQuest:CeladonCity() - return moveToCell(95,105) +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) diff --git a/Quests/Kanto/RainbowBadgeQuest.lua b/Quests/Kanto/RainbowBadgeQuest.lua index c7461da..331841d 100644 --- a/Quests/Kanto/RainbowBadgeQuest.lua +++ b/Quests/Kanto/RainbowBadgeQuest.lua @@ -166,8 +166,10 @@ 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(28,74) + 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 @@ -235,10 +237,14 @@ function RainbowBadgeQuest:CeladonPokémonCenter() end function RainbowBadgeQuest:Route7() - if not isTrainerInfoReceived() then + if not self:isTrainingOver() then + + return moveToGrass() +else + if not isTrainerInfoReceived() then log("getting trainer info") return askForTrainerInfo() -else + else if countBadges() == 4 then if not dialogs.policegirl.state then return moveToCell(225,90) @@ -246,13 +252,10 @@ else return moveToCell(191,106) end else - if not self:isTrainingOver() then - - return moveToGrass() - else return moveToCell(170,87) - end - end + + end +end end end diff --git a/Quests/Kanto/RockTunnelQuest.lua b/Quests/Kanto/RockTunnelQuest.lua index 7cdd759..3a8adfc 100644 --- a/Quests/Kanto/RockTunnelQuest.lua +++ b/Quests/Kanto/RockTunnelQuest.lua @@ -126,9 +126,10 @@ function RockTunnelQuest:Route8() --return moveToCell(105,122) --else - if isNpcOnCell(90,117) then -- Item: Leppa Berry - return talkToNpcOnCell(90,117) - elseif isNpcOnCell(57,3) then -- Item: Leppa Berry + --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) diff --git a/Quests/Kanto/SoulBadgeQuest.lua b/Quests/Kanto/SoulBadgeQuest.lua index 61abb99..e7c7ef2 100644 --- a/Quests/Kanto/SoulBadgeQuest.lua +++ b/Quests/Kanto/SoulBadgeQuest.lua @@ -12,13 +12,17 @@ local Dialog = require "Quests/Dialog" local name = 'Sould Badge' local description = 'Fuchsia City' -local level = 79 +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() @@ -27,11 +31,12 @@ 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("Marsh Badge") then + 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 @@ -46,7 +51,7 @@ function SoulBadgeQuest:isDoable() end function SoulBadgeQuest:isDone() - if (hasItem("Soul Badge") and hasItem("HM03") and getMapName() == "Route 15") or getMapName() == "Safari Entrance" or getMapName() == "Route 20"then + if getAreaName()== "Cinnabar Pokémon Center" then return true else return false @@ -131,8 +136,27 @@ function SoulBadgeQuest:randomZoneExp() 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 @@ -144,66 +168,138 @@ function SoulBadgeQuest:Route18() 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 countBadges() < 5 then + 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("HM03") then - if not dialogs.questSurfAccept.state then - return moveToArea("Fuchsia City Stop House") + elseif not hasItem("HM06") then + if not dialogs.questRockSmash.state or hasItem("Gold Teeth") then + return moveToCell(134,93) else - return moveToArea("Safari Stop") + return moveToCell(121,51) end + elseif not game.hasPokemonWithMove("Surf") and getTeamSize() == 6 and hasItem("HM03") then + return moveToCell(115,98) else - return moveToArea("Fuchsia City Stop House") + return moveToCell(108,118) end + end end end -function SoulBadgeQuest:FuchsiaHouse1() - if hasItem("Old Rod") and not hasItem("Good Rod") and getMoney() > 15000 then - return talkToNpcOnCell(3,6) +function SoulBadgeQuest:FuchsiaCityGate() + if not game.hasPokemonWithMove("Surf") and getTeamSize() == 6 and hasItem("HM03") then + return moveToCell(73,134) else - return moveToArea("Fuchsia City") + return moveToCell(73,147) --73,134 end end -function SoulBadgeQuest:SafariStop() - if self:needPokemart_() then - self:pokemart_() - elseif hasItem("Soul Badge") and dialogs.questSurfAccept.state then +function SoulBadgeQuest:SafariGate() + + if getPlayerY() > 15 then if not hasItem("HM03") and self:canEnterSafari() then - return talkToNpcOnCell(7,4) + return talkToNpcOnCell(36,15) else - return moveToArea("Fuchsia City") + 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 moveToArea("Fuchsia City") + return moveToCell(126,148) end +end end - -function SoulBadgeQuest:Route15StopHouse() - if game.maxTeamLevel() >= 95 and hasItem("HM03") then - return moveToArea("Route 15") - elseif self:needPokecenter() or not self.registeredPokecenter == "Pokecenter Fuchsia" or ( self:isTrainingOver() and not hasPokemonInTeam("Ditto")) then - return moveToArea("Fuchsia City") - elseif hasItem("HM03") then - return moveToArea("Route 15") - elseif not self:isTrainingOver() then - self.zoneExp = math.random(1,4) - return moveToArea("Route 15") + +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 moveToArea("Route 15") + 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 game.maxTeamLevel() >= 95 and hasItem("HM03") then - return moveToArea("Fuchsia City") + if not hasItem("HM03") then + return moveToCell(169,113) elseif not hasItem("HM03") then if dialogs.questSurfAccept.state then return moveToArea("Fuchsia City") @@ -216,29 +312,54 @@ function SoulBadgeQuest:FuchsiaCityStopHouse() end function SoulBadgeQuest:Route19() - if game.maxTeamLevel() >= 95 and hasItem("HM03") then - return moveToArea("Fuchsia City Stop House") - elseif hasItem("HM03") then - if not game.hasPokemonWithMove("Surf") then + +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("HM03", self.pokemonId) - log("Pokemon: " .. self.pokemonId .. " Try Learning: HM03") + useItemOnPokemon("HM06", self.pokemonId) + log("Pokemon: " .. self.pokemonId .. " Try Learning: HM06 - Rock Smash") self.pokemonId = self.pokemonId + 1 return - else - useItemOnPokemon("HM03", 2) + fatal("no pokemon can learn rock smash") end - else - return moveToArea("Route 20") - end - else - if dialogs.questSurfAccept.state then - return moveToArea("Fuchsia City Stop House") - else - return talkToNpcOnCell(33,19) - end - end +elseif isNpcOnCell(14,16) then + talkToNpcOnCell(14,16) + else + moveToCell(49,24) + end end function SoulBadgeQuest:Route15() @@ -255,7 +376,7 @@ if not isTrainerInfoReceived() then log("getting trainer info") return askForTrainerInfo() else - if countBadges() < 5 then + if countBadges() < 6 then -- return talkToNpcOnCell(9,84) else diff --git a/Quests/Kanto/StartKantoQuest.lua b/Quests/Kanto/StartKantoQuest.lua index 9eb02f4..3a649aa 100644 --- a/Quests/Kanto/StartKantoQuest.lua +++ b/Quests/Kanto/StartKantoQuest.lua @@ -53,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 diff --git a/Quests/Kanto/ThunderBadgeQuest.lua b/Quests/Kanto/ThunderBadgeQuest.lua index 3b46300..775f896 100644 --- a/Quests/Kanto/ThunderBadgeQuest.lua +++ b/Quests/Kanto/ThunderBadgeQuest.lua @@ -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 getAreaName() == "Route 9" or getAreaName() == "Cerulean Pokémon Center" 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 @@ -233,7 +236,7 @@ end end function ThunderBadgeQuest:VermilionPokémonMart() - self:pokemart(10,17,9,9) + self:pokemart(9,9) end 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 fe03a3f..7f17809 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 @@ -72,6 +72,8 @@ function Quest:pokecenter(exitMapName) -- idealy make it work without exitMapNam sys.todo("add a moveDown() or moveToNearestLink() or getLinks() to PROShine") if not game.isTeamFullyHealed() then return usePokecenter() + else + return moveToNearestLink() end end @@ -109,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 @@ -139,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 @@ -178,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 @@ -213,7 +258,7 @@ function Quest:advanceSorting() end end end - if game.maxTeamLevel() - game.minTeamLevel() > 15 then + if game.maxTeamLevel() - game.minTeamLevel() > 15 and game.maxTeamLevel() < self.level then return sortTeamRangeByLevelAscending(1, pokemonsUsable) end return sortTeamRangeByLevelDescending(1, pokemonsUsable) @@ -225,7 +270,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() @@ -290,20 +338,27 @@ if getTeamSize() >0 then 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 getAreaName() == "Rock Tunnel" or getAreaName() == "Mt. Moon" - or getAreaName() == "Mt. Moon B1F" or getAreaName() == "Diglett's Cave" or getAreaName() == "Seafoam B4F" then +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("Poké Ball") 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 isAlreadyCaught() and getPokedexOwned() < 11 + 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 @@ -338,18 +393,20 @@ if getPokemonLevel(1) < getOpponentLevel() then --else -return attack() or run() or sendUsablePokemon() or sendAnyPokemon() +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 attack() or game.useAnyMove() else - return attack() or sendUsablePokemon() or sendAnyPokemon() + return attack() or sendUsablePokemon() or useAnyMove() or sendAnyPokemon() end end @@ -359,6 +416,9 @@ function Quest:battle() self.inBattle = true self:battleBegin() end +-- if self:askPlayerStats() then + -- return true +--- end if isWildBattle() then return self:wildBattle() else @@ -414,137 +474,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","Aqua Tail", "Shadow Ball","Water Pulse", "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 65f9dcd..af1ec3a 100644 --- a/Quests/QuestManager.lua +++ b/Quests/QuestManager.lua @@ -15,6 +15,9 @@ 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(), @@ -26,6 +29,9 @@ local quests = { 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 From 4d79d262cad0a16c6815f8c07b875f0ef6a7ab24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Wed, 21 Nov 2018 19:55:35 +0700 Subject: [PATCH 31/32] fix bug --- Quests/Quest.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Quests/Quest.lua b/Quests/Quest.lua index 7f17809..e406a03 100644 --- a/Quests/Quest.lua +++ b/Quests/Quest.lua @@ -258,10 +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 From d0685f53cbc9f6d30bf0c8e4c9c6706e4f60d947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=A5y?= Date: Thu, 22 Nov 2018 08:14:32 +0700 Subject: [PATCH 32/32] add training for boulder badge --- Quests/Kanto/BoulderBadgeQuest.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Quests/Kanto/BoulderBadgeQuest.lua b/Quests/Kanto/BoulderBadgeQuest.lua index 683d4e2..2d542f1 100644 --- a/Quests/Kanto/BoulderBadgeQuest.lua +++ b/Quests/Kanto/BoulderBadgeQuest.lua @@ -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