Hello There, Guest! Login Register


It's Safari Time!
(2016-11-05, 12:18:06)teoaoproo1
(2016-08-26, 02:13:34)redskhie *snip*
*snip*

did you seriously just paste the whole 1300 line script?

but yeah i'm also getting the pokecenter loop in kanto safari.
my natu syncs both have "Psychic" move, which is damaging. and my false swiper has damaging moves also. i was using huntEeveeChansey with all other options set to false.

i get the error
error: getRemainingPowerPoints: the pokémon 1 does not have a move called 'NONE'.
even though the sleepmove = "None"
and sleepOn = false

EDIT:
SOLUTION 1:
i found the pokecenter error, he wrote on line 506
synchIndex2
etc.

instead of
synch2

and you also need to delete the
and isPokemonUsable(synchIndex3)
since there is no third sync implemented yet



and for the "NONE" error, i believe it happens when you try to catch eevees, as it won't check if you have enabled sleep move before checking the PP, since eevee has take down he has made it so it always sleeps an eevee and nothing else.

SOLUTION 2: you must use a sleep pokemon when hunting eevee or edit the script which im too lazy to do rn xD
 
Reply
I'm still get stucked @ pokecenter..

Team:
1 - Xatu with sync adamant
2 - Parasect with Sleep and False Swipe
3 - Umbreon with sync Jolly
4 - Nidoking, with hm's (surf, dig, rocksmash and cut)
5 - Random poke
6 - Random poke
Red, plz help!! :|

-- Copyright © 2016 redskhie



huntandFarm = false --set to true if you want to kill all encountered pokes else false
catchUncaught = false --set to true if you want to catch uncaught pokes else false
catchShiny = true --set to true if you want to catch encountered shiny's else false


-- CATCH CONFIGURATION --CASE INSENSITIVE
--SINGLE CATCHING

singleCatch = false --Set to true if you want to catch only 1 Pokes and set multipleCatch to false

toHunt = "Torchic" --Set/Change the name of Pokemon you want to Catch    
huntMap = "Zone 6" --Set/Change the Map Area of the Pokemon    --OPTIONS: "Zone 1", "Zone 2", "Zone 3", "Zone 4", "Zone 5", "Zone 6"



--MULTIPLE CATCHING

multipleCatch = true --Set to true if you want to catch multiple Pokes at Different Time and set singleCatch to false
--NOTE: PLEASE PROPERLY ARRANGE THE TEAM ACCORDING TO YOUR INPUT CONFIG


--MORNING TIME CONFIG

toHunt1 = "Torchic" --Set/Change the name of Pokemon you want to Catch
huntMap1 = "Zone 6" --Set/Change the Map Area of the 1st Pokemon    --OPTIONS: "Zone 1", "Zone 2", "Zone 3", "Zone 4", "Zone 5", "Zone 6"



synch1 = "Adamant" --Set the Nature of the Synch Poke to Use at Morning
synchIndex1 = 1 --Do not touch this line!

--DAY TIME CONFIG

toHunt2 = "Riolu" --Set/Change the name of Pokemon you want to Catch at Noon
huntMap2 = "Zone 3" --Set/Change the Map Area of the 2nd Pokemon    --OPTIONS: "Zone 1", "Zone 2", "Zone 3", "Zone 4", "Zone 5", "Zone 6"


synch2 = "Jolly" --Set the Nature of the Synch Poke to Use at Noon
synchIndex2 = 3 --set the Index # of the Synch Poke to Use at Noon, elseif the same leave
--NIGHT TIME CONFIG

toHunt3 = "Treecko" --Set/Change the name of Pokemon you want to Catch at Night
huntMap3 = "Zone 1" --Set/Change the Map Area of the 3rdPokemon    --OPTIONS: "Zone 1", "Zone 2", "Zone 3", "Zone 4", "Zone 5", "Zone 6"


synch3 = "Adamant" --Set the Nature of the Synch Poke to Use at Night
synchIndex3 = 1 --set the Index # of the Synch Poke to Use at Night, elseif the same leave




--ADDED HUNT --Use this if multiple catch is full and you think you can Hunt another poke in the same area

Add = false --Set to true if you want to catch another pokemon
addHunt1 = "Rhyhorn" --Set the name of the pokemon
addHunt2 = "" --Set the name of the pokemon
addHunt3 = "" --Set the name of the pokemon



fishItem = "Super Rod" --Set/Change the Name of the Fishing Item you want to Use, Don't leave it blank --NOT USABLE at HOENN






-- You can only choose One Special Catching, set true, else leave the 3 false

                                  --use only normalCatchOn if you don't have fswiper and sleeper
                                  --Leave blank at sleepmove/weakmove if you don't have atleast


normalCatchOn = false        --Directly throw pokeballs on hunted pokemons
fswipeOn = true        --Switch to pokemon with false swipe, use false swipe until the hunted pokes hp is reach to 1 then throw pokeballs
sleepOn = false            --Switch to pokemon with sleep move, use sleep move until the hunted pokes status is SLEEPING then throw pokeballs
advanceCatchOn = false        --Use fswipeOn and sleepOn to catch hunted pokes

falseswiper = 2            --Index of pokemon with false swipe
fswipeHP = 10            --Returns the health percent of the false swiper, then heal to PC
weakmove = "False Swipe"    --False Swipe move --If you have no false swiper change to "None"

sleeper = 2            --Index of pokemon with sleep move
sleeperHP = 10            --Returns the health percent of the false swiper, then heal to PC
sleepmove = "None"        --Set/Change the name of the sleep move --If you have no sleeper change to "None"



--MOUNTING CONFIGURATION


   -- Set/Change the name of the mount you want to use on LAND

mount = "Glaceon Mount"

   -- Set/Change to true if you want to use mount,else false

mountSwitch = false








--WARNING!!! DO NOT TOUCH THE CODES BELOW!!!


-- Copyright © 2016 redskhie
--List of Pokemon to Catch

local ZoneOneList = {"Pikachu", "Treecko", "Girafarig", "Natu", "Wobuffet", "Buneary"}
local ZoneTwoList = {"Natu", "Beldum"}
local ZoneThreeList = {"Riolu", "Rhyhorn", "Heracross"}
local ZoneFourList = {"Litleo", "Heracross", "Stantler", "Donphan", "Pinsir"}
local ZoneFiveList = {"Gligar", "Aipom", "Mareep", "Snubbull"}
local ZoneFiveSurfList = {"Mudkip", "Remoraid", "Marill", "Octillery"}
local ZoneSixList = {"Torchic", "Aipom", "Houndour", "Teddiursa", "Pineco", "Miltank"}

-- Copyright © 2016 redskhie



name = "All in One Catcher at Hoenn Safari"
author = "redskhie"
description = [[This script will catch your desired Pokemons at Hoenn Safari]]



function List5()

for _,ZoneFiveList in pairs(ZoneFiveList) do
 if (singleCatch and ZoneFiveList == toHunt) or (multipleCatch and isMorning() and ZoneFiveList == toHunt1) or (multipleCatch and isNoon() and ZoneFiveList == toHunt2) or (multipleCatch and isNight() and ZoneFiveList == toHunt3) then
    moveToGrass()
   break
 end
end

for _,ZoneFiveSurfList in pairs(ZoneFiveSurfList) do
 if (singleCatch and ZoneFiveSurfList == toHunt) or (multipleCatch and isMorning() and ZoneFiveSurfList == toHunt1) or (multipleCatch and isNoon() and ZoneFiveSurfList == toHunt2) or (multipleCatch and isNight() and ZoneFiveSurfList == toHunt3) then
    moveToWater()
   break
 end
end

end

 
function pc()

if getMapName() == "Lilycove City" then
            moveToMap("Pokecenter Lilycove City")
       elseif getMapName() == "Route 121" then
               moveToMap("Lilycove City")
       elseif getMapName() == "Hoenn Safari Zone Lobby" then
               moveToMap("Route 121")
elseif getMapName() == "Hoenn Safari Zone Area 6" then
moveToMap("Hoenn Safari Zone Area 5")
elseif getMapName() == "Hoenn Safari Zone Area 3" then
moveToMap("Hoenn Safari Zone Area 4")
elseif getMapName() == "Hoenn Safari Zone Area 5" or getMapName() == "Hoenn Safari Zone Area 4" then
moveToMap("Hoenn Safari Zone Area 1")
elseif getMapName() == "Hoenn Safari Zone Area 1" then
moveToCell(23,48)
       elseif getMapName() == "Hoenn Safari Zone Area 2" then
moveToMap("Hoenn Safari Zone Area 1")
       elseif getMapName() == "Pokecenter Lilycove City" then
           usePokecenter()
       end
   
end

function Zone1()

if getMapName() == "Pokecenter Lilycove City" then
            moveToMap("Lilycove City")
       elseif getMapName() == "Lilycove City" then
               moveToMap("Route 121")
       elseif getMapName() == "Route 121" then
               moveToMap("Hoenn Safari Zone Lobby")
       elseif getMapName() == "Hoenn Safari Zone Lobby" then
               talkToNpcOnCell(21, 6)
elseif getMapName() == "Hoenn Safari Zone Area 6" then
moveToMap("Hoenn Safari Zone Area 5")
elseif getMapName() == "Hoenn Safari Zone Area 3" then
moveToMap("Hoenn Safari Zone Area 4")
elseif getMapName() == "Hoenn Safari Zone Area 5" or getMapName() == "Hoenn Safari Zone Area 4" or getMapName() == "Hoenn Safari Zone Area 2" then
moveToMap("Hoenn Safari Zone Area 1")
       elseif getMapName() == "Hoenn Safari Zone Area 1" then
               moveToGrass()
       end

end

function Zone2()

if getMapName() == "Pokecenter Lilycove City" then
            moveToMap("Lilycove City")
       elseif getMapName() == "Lilycove City" then
               moveToMap("Route 121")
       elseif getMapName() == "Route 121" then
               moveToMap("Hoenn Safari Zone Lobby")
       elseif getMapName() == "Hoenn Safari Zone Lobby" then
               talkToNpcOnCell(21, 6)
elseif getMapName() == "Hoenn Safari Zone Area 6" then
moveToMap("Hoenn Safari Zone Area 5")
elseif getMapName() == "Hoenn Safari Zone Area 3" then
moveToMap("Hoenn Safari Zone Area 4")
elseif getMapName() == "Hoenn Safari Zone Area 5" or getMapName() == "Hoenn Safari Zone Area 4" then
moveToMap("Hoenn Safari Zone Area 1")
elseif getMapName() == "Hoenn Safari Zone Area 1" then
moveToMap("Hoenn Safari Zone Area 2")
       elseif getMapName() == "Hoenn Safari Zone Area 2" then
               moveToGrass()
       end

end
function Zone3()

if getMapName() == "Pokecenter Lilycove City" then
            moveToMap("Lilycove City")
       elseif getMapName() == "Lilycove City" then
               moveToMap("Route 121")
       elseif getMapName() == "Route 121" then
               moveToMap("Hoenn Safari Zone Lobby")
       elseif getMapName() == "Hoenn Safari Zone Lobby" then
               talkToNpcOnCell(21, 6)
elseif getMapName() == "Hoenn Safari Zone Area 6" then
moveToMap("Hoenn Safari Zone Area 5")
elseif getMapName() == "Hoenn Safari Zone Area 4" then
moveToMap("Hoenn Safari Zone Area 3")
elseif getMapName() == "Hoenn Safari Zone Area 5" or getMapName() == "Hoenn Safari Zone Area 2" then
moveToMap("Hoenn Safari Zone Area 1")
elseif getMapName() == "Hoenn Safari Zone Area 1" then
moveToMap("Hoenn Safari Zone Area 4")
       elseif getMapName() == "Hoenn Safari Zone Area 3" then
               moveToGrass()
       end

end
function Zone4()

if getMapName() == "Pokecenter Lilycove City" then
            moveToMap("Lilycove City")
       elseif getMapName() == "Lilycove City" then
               moveToMap("Route 121")
       elseif getMapName() == "Route 121" then
               moveToMap("Hoenn Safari Zone Lobby")
       elseif getMapName() == "Hoenn Safari Zone Lobby" then
               talkToNpcOnCell(21, 6)
elseif getMapName() == "Hoenn Safari Zone Area 6" then
moveToMap("Hoenn Safari Zone Area 5")
elseif getMapName() == "Hoenn Safari Zone Area 3" then
moveToMap("Hoenn Safari Zone Area 4")
elseif getMapName() == "Hoenn Safari Zone Area 5" or getMapName() == "Hoenn Safari Zone Area 2" then
moveToMap("Hoenn Safari Zone Area 1")
elseif getMapName() == "Hoenn Safari Zone Area 1" then
moveToMap("Hoenn Safari Zone Area 4")
       elseif getMapName() == "Hoenn Safari Zone Area 4" then
               moveToGrass()
       end

end

function Zone5()

if getMapName() == "Pokecenter Lilycove City" then
            moveToMap("Lilycove City")
       elseif getMapName() == "Lilycove City" then
               moveToMap("Route 121")
       elseif getMapName() == "Route 121" then
               moveToMap("Hoenn Safari Zone Lobby")
       elseif getMapName() == "Hoenn Safari Zone Lobby" then
               talkToNpcOnCell(21, 6)
elseif getMapName() == "Hoenn Safari Zone Area 6" then
moveToMap("Hoenn Safari Zone Area 5")
elseif getMapName() == "Hoenn Safari Zone Area 3" then
moveToMap("Hoenn Safari Zone Area 4")
elseif getMapName() == "Hoenn Safari Zone Area 2" or getMapName() == "Hoenn Safari Zone Area 4" then
moveToMap("Hoenn Safari Zone Area 1")
elseif getMapName() == "Hoenn Safari Zone Area 1" then
moveToMap("Hoenn Safari Zone Area 5")
       elseif getMapName() == "Hoenn Safari Zone Area 5" then
               List5()
       end


end

function Zone6()

if getMapName() == "Pokecenter Lilycove City" then
            moveToMap("Lilycove City")
       elseif getMapName() == "Lilycove City" then
               moveToMap("Route 121")
       elseif getMapName() == "Route 121" then
               moveToMap("Hoenn Safari Zone Lobby")
       elseif getMapName() == "Hoenn Safari Zone Lobby" then
               talkToNpcOnCell(21, 6)
elseif getMapName() == "Hoenn Safari Zone Area 5" then
moveToMap("Hoenn Safari Zone Area 6")
elseif getMapName() == "Hoenn Safari Zone Area 3" then
moveToMap("Hoenn Safari Zone Area 4")
elseif getMapName() == "Hoenn Safari Zone Area 2" or getMapName() == "Hoenn Safari Zone Area 4" then
moveToMap("Hoenn Safari Zone Area 1")
elseif getMapName() == "Hoenn Safari Zone Area 1" then
moveToMap("Hoenn Safari Zone Area 5")
       elseif getMapName() == "Hoenn Safari Zone Area 6" then
               moveToGrass()
       end


end

function natureSwap()

if synch1 ~= synch2 and synch2 ~= synch3 then

if isMorning() and getPokemonNature(synchIndex1) == synch3 and getPokemonNature(synchIndex2) == synch1 and getPokemonNature(synchIndex3) == synch2 then
return swapPokemon(synchIndex1, synchIndex2)
elseif isMorning() and getPokemonNature(synchIndex1) == synch3 and getPokemonNature(synchIndex2) == synch2 and getPokemonNature(synchIndex3) == synch1 then
return swapPokemon(synchIndex1, synchIndex3)
elseif isMorning() and getPokemonNature(synchIndex1) == synch1 then

if huntMap1 == "Zone 1" then
Zone1()
elseif huntMap1 == "Zone 2" then
Zone2()
elseif huntMap1 == "Zone 3" then
Zone3()
elseif huntMap1 == "Zone 4" then
Zone4()
elseif huntMap1 == "Zone 5" then
Zone5()
elseif huntMap1 == "Zone 6" then
Zone6()
end

end

if isNoon() and getPokemonNature(synchIndex1) == synch1 and getPokemonNature(synchIndex2) == synch2 and getPokemonNature(synchIndex3) == synch3 then
return swapPokemon(synchIndex1, synchIndex2)
elseif isNoon() and getPokemonNature(synchIndex1) == synch1 and getPokemonNature(synchIndex2) == synch3 and getPokemonNature(synchIndex3) == synch2 then
return swapPokemon(synchIndex1, synchIndex3)
elseif isNoon() and getPokemonNature(synchIndex1) == synch2 then

if huntMap2 == "Zone 1" then
Zone1()
elseif huntMap2 == "Zone 2" then
Zone2()
elseif huntMap2 == "Zone 3" then
Zone3()
elseif huntMap2 == "Zone 4" then
Zone4()
elseif huntMap2 == "Zone 5" then
Zone5()
elseif huntMap2 == "Zone 6" then
Zone6()
end
end

if isNight() and getPokemonNature(synchIndex1) == synch2 and getPokemonNature(synchIndex2) == synch3 and getPokemonNature(synchIndex3) == synch1 then
return swapPokemon(synchIndex1, synchIndex2)
elseif isNight() and getPokemonNature(synchIndex1) == synch2 and getPokemonNature(synchIndex2) == synch1 and getPokemonNature(synchIndex3) == synch3 then
return swapPokemon(synchIndex1, synchIndex3)
elseif isNight() and getPokemonNature(synchIndex1) == synch3 then

if huntMap3 == "Zone 1" then
Zone1()
elseif huntMap3 == "Zone 2" then
Zone2()
elseif huntMap3 == "Zone 3" then
Zone3()
elseif huntMap3 == "Zone 4" then
Zone4()
elseif huntMap3 == "Zone 5" then
Zone5()
elseif huntMap3 == "Zone 6" then
Zone6()
end
end

elseif synch1 == synch2 and synch2 ~= synch3 then

if isMorning() and getPokemonNature(1) ~= synch1 then
return swapPokemon(synchIndex1, synchIndex3)
elseif isMorning() and getPokemonNature(1) == synch1 then
if huntMap1 == "Zone 1" then
Zone1()
elseif huntMap1 == "Zone 2" then
Zone2()
elseif huntMap1 == "Zone 3" then
Zone3()
elseif huntMap1 == "Zone 4" then
Zone4()
elseif huntMap1 == "Zone 5" then
Zone5()
elseif huntMap1 == "Zone 6" then
Zone6()
end
end
if isNoon() and getPokemonNature(1) ~= synch2 then
return swapPokemon(synchIndex2, synchIndex3)
elseif isNoon() and getPokemonNature(1) == synch2 then
if huntMap2 == "Zone 1" then
Zone1()
elseif huntMap2 == "Zone 2" then
Zone2()
elseif huntMap2 == "Zone 3" then
Zone3()
elseif huntMap2 == "Zone 4" then
Zone4()
elseif huntMap2 == "Zone 5" then
Zone5()
elseif huntMap2 == "Zone 6" then
Zone6()
end
end
if isNight() and getPokemonNature(1) ~= synch3 then
return swapPokemon(synchIndex2, synchIndex3)
elseif isNight() and getPokemonNature(1) == synch3 then
if huntMap3 == "Zone 1" then
Zone1()
elseif huntMap3 == "Zone 2" then
Zone2()
elseif huntMap3 == "Zone 3" then
Zone3()
elseif huntMap3 == "Zone 4" then
Zone4()
elseif huntMap3 == "Zone 5" then
Zone5()
elseif huntMap3 == "Zone 6" then
Zone6()
end
end

elseif synch1 == synch3 and synch2 ~= synch3 then

if isMorning() and getPokemonNature(1) ~= synch1 then
return swapPokemon(synchIndex1, synchIndex2)
elseif isMorning() and getPokemonNature(1) == synch1 then
if huntMap1 == "Zone 1" then
Zone1()
elseif huntMap1 == "Zone 2" then
Zone2()
elseif huntMap1 == "Zone 3" then
Zone3()
elseif huntMap1 == "Zone 4" then
Zone4()
elseif huntMap1 == "Zone 5" then
Zone5()
elseif huntMap1 == "Zone 6" then
Zone6()
end
end
if isNoon() and getPokemonNature(1) ~= synch2 then
return swapPokemon(synchIndex2, synchIndex1)
elseif isNoon() and getPokemonNature(1) == synch2 then
if huntMap2 == "Zone 1" then
Zone1()
elseif huntMap2 == "Zone 2" then
Zone2()
elseif huntMap2 == "Zone 3" then
Zone3()
elseif huntMap2 == "Zone 4" then
Zone4()
elseif huntMap2 == "Zone 5" then
Zone5()
elseif huntMap2 == "Zone 6" then
Zone6()
end
end
if isNight() and getPokemonNature(1) ~= synch3 then
return swapPokemon(synchIndex2, synchIndex3)
elseif isNight() and getPokemonNature(1) == synch3 then
if huntMap3 == "Zone 1" then
Zone1()
elseif huntMap3 == "Zone 2" then
Zone2()
elseif huntMap3 == "Zone 3" then
Zone3()
elseif huntMap3 == "Zone 4" then
Zone4()
elseif huntMap3 == "Zone 5" then
Zone5()
elseif huntMap3 == "Zone 6" then
Zone6()
end
end

elseif synch1 == synch3 and synch2 == synch3 then

if isMorning() and getPokemonNature(1) == synch1 then
if huntMap1 == "Zone 1" then
Zone1()
elseif huntMap1 == "Zone 2" then
Zone2()
elseif huntMap1 == "Zone 3" then
Zone3()
elseif huntMap1 == "Zone 4" then
Zone4()
elseif huntMap1 == "Zone 5" then
Zone5()
elseif huntMap1 == "Zone 6" then
Zone6()
end
end
if isNoon() and getPokemonNature(1) == synch2 then
if huntMap2 == "Zone 1" then
Zone1()
elseif huntMap2 == "Zone 2" then
Zone2()
elseif huntMap2 == "Zone 3" then
Zone3()
elseif huntMap2 == "Zone 4" then
Zone4()
elseif huntMap2 == "Zone 5" then
Zone5()
elseif huntMap2 == "Zone 6" then
Zone6()
end
end
if isNight() and getPokemonNature(1) == synch3 then
if huntMap3 == "Zone 1" then
Zone1()
elseif huntMap3 == "Zone 2" then
Zone2()
elseif huntMap3 == "Zone 3" then
Zone3()
elseif huntMap3 == "Zone 4" then
Zone4()
elseif huntMap3 == "Zone 5" then
Zone5()
elseif huntMap3 == "Zone 6" then
Zone6()
end
end

end

end
function sleepPP()
if sleepmove == "Hypnosis" or sleepmove == "Spore" or sleepmove == "Sleep Powder" or sleepmove ~= "None" then
return getRemainingPowerPoints(sleeper, sleepmove) >= 1
elseif sleepmove == "None" then
isPokemonUsable(sleeper)
end
end
function fswipePP()
if weakmove == "False Swipe" or weakmove ~= "None" then
return getRemainingPowerPoints(falseswiper, weakmove) >= 1
elseif weakmove == "None" then
isPokemonUsable(falseswiper)
end
end

function onPathAction()
if not isMounted() and mountSwitch == true and hasItem(mount) and not isSurfing() and isOutside() then
       log("---------------------------")
       log("~~~ Riding on my pet!!! ~~~")
       log("---------------------------")
               return useItem(mount)

elseif sleepPP() and fswipePP() and isPokemonUsable(1) and isPokemonUsable(synchIndex2) and isPokemonUsable(synchIndex3) and isPokemonUsable(falseswiper) and getPokemonHealthPercent(falseswiper) > fswipeHP and getPokemonHealthPercent(sleeper) > sleeperHP and isPokemonUsable(sleeper) then
   
if singleCatch then
if huntMap == "Zone 1" then
Zone1()
elseif huntMap == "Zone 2" then
Zone2()
elseif huntMap == "Zone 3" then
Zone3()
elseif huntMap == "Zone 4" then
Zone4()
elseif huntMap == "Zone 5" then
Zone5()
elseif huntMap == "Zone 6" then
Zone6()
end
elseif multipleCatch then
natureSwap()
end
else
pc()
end

end

function onBattleAction()

if isWildBattle() and ((catchShiny and isOpponentShiny()) or (catchUncaught and not isAlreadyCaught())) then
if fswipeOn then
          log("-------- Commencing False Swipe --------")
            fswipe()
        elseif sleepOn then
            log("-------- Commencing Sleep Move --------")
            sleep()
        elseif advanceCatchOn then
            log("-------- Commencing False Swipe with Sleep Move --------")
            advanceCatch()
        elseif normalCatchOn then
            log("-------- Starting to throw Pokeballs --------")
            normal()  
end
elseif isWildBattle() and getOpponentName() == "Beldum" then
            log("-------- Commencing Sleep Move --------")
            sleep()
elseif singleCatch and getOpponentName() == toHunt then
if fswipeOn then
          log("-------- Commencing False Swipe --------")
            fswipe()
        elseif sleepOn then
            log("-------- Commencing Sleep Move --------")
            sleep()
        elseif advanceCatchOn then
            log("-------- Commencing False Swipe with Sleep Move --------")
            advanceCatch()
        elseif normalCatchOn then
            log("-------- Starting to throw Pokeballs --------")
            normal()  
end
elseif multipleCatch and (getOpponentName() == toHunt1 or getOpponentName() == toHunt2 or getOpponentName() == toHunt3) then
if fswipeOn then
          log("-------- Commencing False Swipe --------")
            fswipe()
        elseif sleepOn then
            log("-------- Commencing Sleep Move --------")
            sleep()
        elseif advanceCatchOn then
            log("-------- Commencing False Swipe with Sleep Move --------")
            advanceCatch()
        elseif normalCatchOn then
            log("-------- Starting to throw Pokeballs --------")
            normal()  
end
elseif Add and (getOpponentName() == addHunt1 or getOpponentName() == addHunt2 or getOpponentName() == addHunt3) then
if fswipeOn then
          log("-------- Commencing False Swipe --------")
            fswipe()
        elseif sleepOn then
            log("-------- Commencing Sleep Move --------")
            sleep()
        elseif advanceCatchOn then
            log("-------- Commencing False Swipe with Sleep Move --------")
            advanceCatch()
        elseif normalCatchOn then
            log("-------- Starting to throw Pokeballs --------")
            normal()  
end
elseif huntandFarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
elseif (getOpponentName() == "Wobbuffet" ) then

return attack() or sendAnyPokemon()
else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
       end

end

function normal()
   return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")  or sendAnyPokemon() or attack() or run()
end

function advanceCatch()
       if getActivePokemonNumber() == 1 then
           return sendPokemon(falseswiper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() > 1 ) then
           return weakAttack() or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == sleeper ) and ( getOpponentStatus() ~= "SLEEP" and getOpponentStatus() ~= "PARALIZE" and getOpponentStatus() ~= "POISON" and getOpponentStatus() ~= "BURN" ) and ( getOpponentHealth() == 1 ) then
           return useMove(sleepmove) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() == 1 ) then
           return sendPokemon(sleeper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif getOpponentStatus() == "SLEEP" or getOpponentStatus() == "PARALIZE" or getOpponentStatus() == "POISON" or getOpponentStatus() == "BURN" then
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or attack() or run()
       else
               return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or attack() or run()
       end
end

function fswipe()
       if getActivePokemonNumber() == 1 then
           return sendPokemon(falseswiper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() > 1 ) then
           return weakAttack() or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif getOpponentHealth() == 1 then
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")  or sendAnyPokemon() or attack() or run()
       end
end
function sleep()
       if getActivePokemonNumber() == 1 then
           return sendPokemon(sleeper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or run()
       elseif ( getActivePokemonNumber() == sleeper ) and ( getOpponentStatus() ~= "SLEEP" and getOpponentStatus() ~= "PARALIZE" and getOpponentStatus() ~= "POISON" and getOpponentStatus() ~= "BURN" ) then
           return useMove(sleepmove) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif getOpponentStatus() == "SLEEP" or getOpponentStatus() == "PARALIZE" or getOpponentStatus() == "POISON" or getOpponentStatus() == "BURN" then
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
     
       end    
end



function onStart()

startime = os.time()
    shinyCounter = 0
pokecenterCounter = 0
    wildCounter = 0
pokeballCounter = 0
startMoney = getMoney()
poke1 = 0
poke2 = 0
poke3 = 0
poke = 0
add1 = 0
add2 = 0
add3 = 0
log("-----------------------------------------------------------")
       log("|---- We are now Commencing the Catch Routine ----|")
       log("-----------------------------------------------------------")
if multipleCatch then
log("-------- MULTI-CATCHING STARTED --------")
        log("-------- Script Information --------")
log("~~~HUNTED POKEMONS~~~")
log("-Morning Time: "..toHunt1.."- -Location: Hoenn Safari "..huntMap1.." -")
log("-Day Time: "..toHunt2.."- -Location: Hoenn Safari "..huntMap2.." -")
log("-Night Time: "..toHunt3.."- -Location: Hoenn Safari "..huntMap3.." -")
        log("--------------------------------------")
elseif singleCatch then
log("-------- SINGLE-CATCHING STARTED --------")
      log("-------- Script Information --------")
log("-We will hunt "..toHunt.." all Day!!!- -Location: Hoenn Safari "..huntMap.." -")
        log("--------------------------------------")
end


end
function onDialogMessage(pokecenter)
   if stringContains(pokecenter, "Would you like me to heal your Pokemon?") then
       pokecenterCounter = pokecenterCounter + 1
   end
end
function onBattleMessage(wild)
   
   if stringContains(wild, "A Wild SHINY ") then
       shinyCounter = shinyCounter + 1    
   
   elseif stringContains(wild, "You throw") then
       pokeballCounter = pokeballCounter + 1    
   
   elseif wild == "A Wild [FF9900]"..toHunt.."[-] Attacks!" then
       poke = poke + 1
 
   elseif wild == "A Wild [FF9900]"..toHunt1.."[-] Attacks!" then
       poke1 = poke1 + 1

   elseif wild == "A Wild [FF9900]"..toHunt2.."[-] Attacks!" then
       poke2 = poke2 + 1

   elseif wild == "A Wild [FF9900]"..toHunt3.."[-] Attacks!" then
       poke3 = poke3 + 1

   elseif stringContains(wild, "A Wild ") then
           wildCounter = wildCounter + 1
   end
     
end



function onPause()
   
    log(" --------------------------------------------")
       log("|--------- CATCH ROUTINE PAUSED ----------|")
       log(" --------------------------------------------")
log("|--------- Move Remaining Power Points ----------|")
    log("--------------------------------------")
    log("False Swipe: " .. tostring(getRemainingPowerPoints(falseswiper,weakmove)))
    log("Sleep Move: " .. tostring(getRemainingPowerPoints(sleeper,sleepmove)))
    log("-----------------------------------------------------------")
   
    log(" ")
if multipleCatch then
log("-------- MULTI-CATCHING Status --------")
        log(" ")
log("~~~HUNTED POKEMONS~~~")
log("- "..toHunt1..": "..poke1)
log("- "..toHunt2..": "..poke2)
log("- "..toHunt3..": "..poke3)
        log("--------------------------------------")
elseif singleCatch then
log("-------- SINGLE-CATCHING Status --------")
      log(" ")
log("- "..toHunt..": "..poke)
        log("--------------------------------------")
end


log(" --------------------------------------------")
    log("Pokeball's used: " .. pokeballCounter)
    log("-----------------------------------------------------------")
    log("Shinies Caught: " .. shinyCounter)
log("Pokemons encountered: " .. wildCounter)
    log("---------------------------------------------")
log("Times in Pokecenter: " .. pokecenterCounter)
if huntandFarm then
log("Pokedollars earned: "..tostring(getMoney() - startMoney))
end
log("---------------------------------------------")
end

function onStop()
   log("-----------------------------------------------------------")
       log("---------------------- Routine Stopped ---------------------")
       log("-----------------------------------------------------------")
   endtime = os.time()
       log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/3600 ).. " hours")
       log("or")
       log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/60 ).. " minutes")
       log("-----------------------------------------------------------")
end
 
Reply
its always healing at pokecenter and doing anything else.can someone help me please.
and what is this?

Error during the script execution: chunk_2:(505,4-292): cannot convert a nil to a clr type System.Int32
 
Reply
[18:32:02] Script "Rare catcher at Kanto Safari" by "redskhie" successfully loaded
[18:32:02] This script will catch your desired Pokemons at Kanto Safari
[18:32:05] Bot started
[18:32:05] -----------------------------------------------------------
[18:32:05] |---- We are now Commencing the Catch Routine ----|
[18:32:05] -----------------------------------------------------------
[18:32:05] -------- MULTI-CATCHING STARTED --------
[18:32:05] Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Bulbasaur at Night
[18:32:05] --------------------------------------
[18:32:05] error: isPokemonUsable: tried to retrieve the non-existing pokemon 4.
[18:32:05] Bot stopped
[18:32:05] -----------------------------------------------------------
[18:32:05] ---------------------- Routine Stopped ---------------------
[18:32:05] -----------------------------------------------------------
[18:32:05] Bot running time: 0.00 hours
[18:32:05] or
[18:32:05] Bot running time: 0.00 minutes
[18:32:05] -----------------------------------------------------------
[18:32:05] System: You are no longer AFK!
[18:32:29] Position updated: Pokecenter Fuchsia (9, 22) [OK]
[18:33:30] System: You are now AFK!

[18:32:05] error: isPokemonUsable: tried to retrieve the non-existing pokemon 4. <- This's my problem.
 
Reply
(2016-11-13, 21:34:22)Fakyngeimer [18:32:02] Script "Rare catcher at Kanto Safari" by "redskhie" successfully loaded
[18:32:02] This script will catch your desired Pokemons at Kanto Safari
[18:32:05] Bot started
[18:32:05] -----------------------------------------------------------
[18:32:05] |---- We are now Commencing the Catch Routine ----|
[18:32:05] -----------------------------------------------------------
[18:32:05] -------- MULTI-CATCHING STARTED --------
[18:32:05] Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Bulbasaur at Night
[18:32:05] --------------------------------------
[18:32:05] error: isPokemonUsable: tried to retrieve the non-existing pokemon 4.
[18:32:05] Bot stopped
[18:32:05] -----------------------------------------------------------
[18:32:05] ---------------------- Routine Stopped ---------------------
[18:32:05] -----------------------------------------------------------
[18:32:05] Bot running time: 0.00 hours
[18:32:05] or
[18:32:05] Bot running time: 0.00 minutes
[18:32:05] -----------------------------------------------------------
[18:32:05] System: You are no longer AFK!
[18:32:29] Position updated: Pokecenter Fuchsia (9, 22) [OK]
[18:33:30] System: You are now AFK!

[18:32:05] error: isPokemonUsable: tried to retrieve the non-existing pokemon 4. <- This's my problem.

That means it's trying to see if your 4th pokemon is uasable, but you dont have a 4th pokemon.
 
Reply
its repeatedly heal at pokecenter, my setting is no sync but have sleep powder and false sweep.then i disable sleep powder,still like that,then i disable false sweep,still like that.can anyone help?

        --CHOOSE WHAT POKEMON DO YOU WANT TO HUNT
        -- WARNING!!! YOU CAN ONLY PICK 1 "true" then leave "false"

    -- Set to true if you want to catch this Pokemon, else leave false

huntEevee = true        --hunt Eevee all time    
huntScyther = false        --hunt Scyther all time
huntPinsir = false        --hunt Pinsir all time
huntBulba = false        --hunt Bulbasaur all time
huntChansey = false        --hunt Chansey all time
huntRhyhorn = false        --hunt Rhyhorn all time
huntKanga = false        --hunt Kangaskhan all time
huntChanseyBulba = false        --hunt Chansey and Bulbasaur all time


    -- If you want to use this Go to Synchronize Section after picking 1 at the bottom
    -- Set to true if you want to catch multiple Pokemon at multiple time, else leave false

huntEeveeRhyhorn = false    --hunt Eevee at Morning and Day        -- hunt Rhyhorn at Night
huntEeveeBulba = true         --hunt Eevee at Morning and Day     -- hunt Bulbasaur at Night
huntEeveeChansey = false    --hunt Eevee at Morning and Day        -- hunt Chansey at Night
huntEeveeScytherPinsir = false     --hunt Eevee at Morning and Day     -- hunt Scyther and Pinsir at Night

    --You can only use this if you have MEMBERSHIP

        --UNTESTED

huntEeveeUmbreon = false    --hunt Eevee at Morning and Day        -- hunt Umbreon at Night
huntEeveeMarill = false        --hunt Eevee at Morning and Day         -- hunt Marill at Night
huntStarlyUmbreon = false        --hunt Starly at Morning and Day    -- hunt Umbreon at Night
huntDratiniStarlyUmbreon = false        --hunt Dratini at Morning     --hunt Starly Day    -- hunt Umbreon at Night
huntScytherRhyhorn = false        --hunt Scyther and Rhyhorn all time




                    -- CATCH CONFIGURATION

                --If you don't have synch poke leave. And don't use the multiple hunt

    --Use synch1 at MORNING and DAY Time/    synch2 at NIGHT Time


    --Synchronize
    
synch1 = 1            --Pokemon Index of 1st SynchPoke
nature1 = "Timid"    --Pokemon Nature of 1st SynchPoke
synch2 = 3            --Pokemon Index of 2nd SynchPoke
nature2 = "Adamant"    --Pokemon Nature of 2nd SynchPoke


    -- You can only choose One Special Catching, set true, else leave the 3 false
                                   --use only normalCatchOn if you don't have fswiper and sleeper
                                   --Leave blank at sleepmove/weakmove if you don't have atleast


normalCatchOn = true        --Directly throw pokeballs on hunted pokemons
fswipeOn = false        --Switch to pokemon with false swipe, use false swipe until the hunted pokes hp is reach to 1 then throw pokeballs
sleepOn = false            --Switch to pokemon with sleep move, use sleep move until the hunted pokes status is SLEEPING then throw pokeballs
advanceCatchOn = false        --Use fswipeOn and sleepOn to catch hunted pokes

falseswiper = 4            --Index of pokemon with false swipe
fswipeHP = 10            --Returns the health percent of the false swiper, then heal to PC
weakmove = "False Swipe"    --False Swipe move --Change to "None" if you don't have

sleeper = 4            --Index of pokemon with sleep move
sleeperHP = 10            --Returns the health percent of the false swiper, then heal to PC
sleepmove = "None"        --Set/Change the name of the sleep move --Change to "None" if you don't have



        --MOUNTING CONFIGURATION


    -- Set/Change the name of the mount you want to use on LAND

mount = "Bicycle"

    -- Set/Change to true if you want to use mount,else false

mountSwitch = true



        --POKEBALL CONFIGURATION

    --Disable/enable pokeball function. set to true else false

ballSwitch = false

    


    --POKEBALLS --Great ball is the default balls it will buy

ballquantity = 200         --set the number of balls you want to buy
minball = 10            --set the minimum number of balls and bot will buy more    




        --MONEY FARMING CONFIGURATION


huntandfarm = false    --set this to true if you want to farm money while hunting pokes

moneyfarm = false    --set this to true if you want to farm money when minimum money reaches, else false
minmoney = 1000    --set the minimum money to start farming
maxmoney = 100000    --set the maximum money to start again on hunting pokes

    --Set the number of pokemon you want to remain while farming and start healing

pokeNumber = 2

    --Pick only one area of farming

cCave = false        --Start farming at Cerulean Cave 1F
sFoam = false        --Start farming at Seafoam B4F
continue to heal at pokecenter.anyone can help?
 
Reply
(2016-11-21, 02:40:41)genostelar its repeatedly heal at pokecenter, my setting is no sync but have sleep powder and false sweep.then i disable sleep powder,still like that,then i disable false sweep,still like that.can anyone 
Use this script, I was able to fix it. I do have spore as my sleep.
                           -- Copyright © 2016 redskhie


       --CHOOSE WHAT POKEMON DO YOU WANT TO HUNT
       -- WARNING!!! YOU CAN ONLY PICK 1 "true" then leave "false"

   -- Set to true if you want to catch this Pokemon, else leave false

huntEevee = true        --hunt Eevee all time    
huntScyther = false        --hunt Scyther all time
huntPinsir = false        --hunt Pinsir all time
huntBulba = false        --hunt Bulbasaur all time
huntChansey = false        --hunt Chansey all time
huntRhyhorn = false        --hunt Rhyhorn all time
huntKanga = false        --hunt Kangaskhan all time
huntChanseyBulba = false        --hunt Chansey and Bulbasaur all time


   -- If you want to use this Go to Synchronize Section after picking 1 at the bottom
   -- Set to true if you want to catch multiple Pokemon at multiple time, else leave false

huntEeveeRhyhorn = false    --hunt Eevee at Morning and Day        -- hunt Rhyhorn at Night
huntEeveeBulba = false         --hunt Eevee at Morning and Day     -- hunt Bulbasaur at Night
huntEeveeChansey = false    --hunt Eevee at Morning and Day        -- hunt Chansey at Night
huntEeveeScytherPinsir = false     --hunt Eevee at Morning and Day     -- hunt Scyther and Pinsir at Night

   --You can only use this if you have MEMBERSHIP

       --UNTESTED

huntEeveeUmbreon = false    --hunt Eevee at Morning and Day        -- hunt Umbreon at Night
huntEeveeMarill = false        --hunt Eevee at Morning and Day         -- hunt Marill at Night
huntStarlyUmbreon = false        --hunt Starly at Morning and Day    -- hunt Umbreon at Night
huntDratiniStarlyUmbreon = false        --hunt Dratini at Morning     --hunt Starly Day    -- hunt Umbreon at Night
huntScytherRhyhorn = false        --hunt Scyther and Rhyhorn all time




                   -- CATCH CONFIGURATION

               --If you don't have synch poke leave. And don't use the multiple hunt

    --Use synch1 at MORNING and DAY Time/    synch2 at NIGHT Time


   --Synchronize
   
synch1 = 1            --Pokemon Index of 1st SynchPoke
nature1 = "Adamant"    --Pokemon Nature of 1st SynchPoke
synch2 = 3            --Pokemon Index of 2nd SynchPoke
nature2 = "Jolly"    --Pokemon Nature of 2nd SynchPoke


   -- You can only choose One Special Catching, set true, else leave the 3 false
                                  --use only normalCatchOn if you don't have fswiper and sleeper
                                  --Leave blank at sleepmove/weakmove if you don't have atleast


normalCatchOn = false        --Directly throw pokeballs on hunted pokemons
fswipeOn = true        --Switch to pokemon with false swipe, use false swipe until the hunted pokes hp is reach to 1 then throw pokeballs
sleepOn = true            --Switch to pokemon with sleep move, use sleep move until the hunted pokes status is SLEEPING then throw pokeballs
advanceCatchOn = true --Use fswipeOn and sleepOn to catch hunted pokes

falseswiper = 2           --Index of pokemon with false swipe
fswipeHP = 10            --Returns the health percent of the false swiper, then heal to PC
weakmove = "False Swipe"    --False Swipe move --Change to "None" if you don't have

sleeper = 2            --Index of pokemon with sleep move
sleeperHP = 10            --Returns the health percent of the false swiper, then heal to PC
sleepmove = "Spore"        --Set/Change the name of the sleep move --Change to "None" if you don't have



       --MOUNTING CONFIGURATION


   -- Set/Change the name of the mount you want to use on LAND

mount = "Bicycle"

   -- Set/Change to true if you want to use mount,else false

mountSwitch = true



       --POKEBALL CONFIGURATION

   --Disable/enable pokeball function. set to true else false

ballSwitch = true

   


   --POKEBALLS --Great ball is the default balls it will buy

ballquantity = 10         --set the number of balls you want to buy
minball = 49            --set the minimum number of balls and bot will buy more    




       --MONEY FARMING CONFIGURATION


huntandfarm = false    --set this to true if you want to farm money while hunting pokes

moneyfarm = false    --set this to true if you want to farm money when minimum money reaches, else false
minmoney = 1000    --set the minimum money to start farming
maxmoney = 100000    --set the maximum money to start again on hunting pokes

   --Set the number of pokemon you want to remain while farming and start healing

pokeNumber = 1

   --Pick only one area of farming

cCave = false        --Start farming at Cerulean Cave 1F
sFoam = false        --Start farming at Seafoam B4F






                           -- Copyright © 2016 redskhie






       --DO NOT TOUCH THIS if you don't know what you're doing!

name = "Rare catcher at Kanto Safari"
author = "redskhie"
description = [[This script will catch your desired Pokemons at Kanto Safari]]

function onStart()
   
   startime = os.time()

   shinyCounter = 0

   eeveecounter = 0
   scythercounter = 0
   pinsircounter = 0
   bulbacounter = 0
   chanseycounter = 0
   rhycounter = 0
   kangascounter = 0
   umbreoncounter = 0
   starlycounter = 0
   pokecenterCounter = 0
   wildCounter = 0
   
   startingMoney = getMoney()

   log("-----------------------------------------------------------")
       log("|---- We are now Commencing the Catch Routine ----|")
       log("-----------------------------------------------------------")

   if huntEeveeRhyhorn then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Rhyhorn at Night")
       log("--------------------------------------")
   elseif huntEeveeBulba then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Bulbasaur at Night")
       log("--------------------------------------")
   elseif huntEeveeChansey then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Chansey at Night")
       log("--------------------------------------")
   elseif huntEeveeScytherPinsir then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Scyther and Pinsir at Night")
       log("--------------------------------------")
   elseif huntEeveeUmbreon then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Umbreon and Pinsir at Night")
       log("--------------------------------------")
   elseif huntStarlyUmbreon then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Starly at Morning and Day ~ Hunting Umbreon at Night")
       log("--------------------------------------")
   elseif huntEeveeMarill then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Marill at Night")
       log("--------------------------------------")
   end

   if huntEevee then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Safari Area 3")
       log("--------------------------------------")
   elseif huntScyther then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Scyther at Safari Area 1")
       log("--------------------------------------")
   elseif huntPinsir then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Pinsir at Safari Area 1")
       log("--------------------------------------")
   elseif huntBulba then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Bulbasaur at Safari Area 2")
       log("--------------------------------------")
   elseif huntChansey then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Chansey at Safari Area 2")
       log("--------------------------------------")
   elseif huntRhyhorn then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Rhyhorn at Safari Area 2")
       log("--------------------------------------")
   elseif huntKanga then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Kangaskhan at Safari Area 1")
       log("--------------------------------------")
   elseif huntChanseyBulba then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Chansey and Bulbasaur at Safari Area 2")
       log("--------------------------------------")

   end
   if moneyfarm then
       if cCave then
           log("~Farming money at Cerulean Cave 1F when money is less than "..minmoney.." pokedollars")
           log("~Continue hunting when money reached to "..maxmoney.."+ pokedollars")
           log("--------------------------------------")
       elseif sFoam then
           log("~Farming money at Seafoam B4F when money is less than "..minmoney.." pokedollars")
           log("~Continue hunting when money reached to "..maxmoney.."+ pokedollars")
           log("--------------------------------------")
       end
   end
   if huntandfarm then
       log("Killing all encountered pokes while hunting your desired pokes")
       log("--------------------------------------")
   end
   pokeballCounter = 0

end
function onDialogMessage(pokecenter)
   if stringContains(pokecenter, "Would you like me to heal your Pokemon?") then
       pokecenterCounter = pokecenterCounter + 1
       if usingLogs then
           log("Info ~ Times in Pokecenter: " .. pokecenterCounter)
       end
   end
end
function areaone()

           
       if getMapName() == "Pokecenter Fuchsia" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Safari Stop")
       elseif getMapName() == "Safari Stop" then
           talkToNpcOnCell(6, 4)    
       elseif getMapName() == "Safari Entrance" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Area 2")
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Safari Area 1" then
           moveToGrass()
       elseif getMapName() ~= "Fuchsia City" then
           backtofarm()
       end
   
end

function areatwo()

       if getMapName() == "Pokecenter Fuchsia" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Safari Stop")
       elseif getMapName() == "Safari Stop" then
           talkToNpcOnCell(6, 4)    
       elseif getMapName() == "Safari Entrance" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 2" then
           moveToGrass()
       elseif getMapName() == "Safari Area 1" then
           moveToMap("Safari Area 2")
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Area 2")
       elseif getMapName() ~= "Fuchsia City" then
           backtofarm()
       end
   
end

function areathree()

   
       if getMapName() == "Pokecenter Fuchsia" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Safari Stop")
       elseif getMapName() == "Safari Stop" then
           talkToNpcOnCell(6, 4)    
       elseif getMapName() == "Safari Entrance" then
           moveToMap("Safari Area 3")
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 3")
       elseif getMapName() == "Safari Area 1" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Safari Area 3" then
           moveToRectangle(25, 29, 30, 29)
       elseif getMapName() ~= "Fuchsia City" then
           backtofarm()
       end
   
end

function area13()

       
       if not isNight() and getPokemonNature(synch1) ~= nature1 then
           return swapPokemon(synch2, synch1)
       elseif not isNight() and getPokemonNature(synch1) == nature1 then

           areathree()

       elseif isNight() and getPokemonNature(synch1) ~= nature2 then
           return swapPokemon(synch2, synch1)
       elseif isNight() and getPokemonNature(synch1) == nature2 then

           areaone()

       
       end
   

end

function area23()
   
    if isPokemonUsable(1) and isPokemonUsable(falseswiper) and getPokemonHealthPercent(falseswiper) > fswipeHP and getPokemonHealthPercent(sleeper) > sleeperHP and isPokemonUsable(sleeper) and getRemainingPowerPoints(sleeper, sleepmove) >= 1 and getRemainingPowerPoints(falseswiper, weakmove) >= 1 then
   
       if not isNight() and getPokemonNature(synch1) ~= nature1 then
           return swapPokemon(synch2, synch1)
       elseif not isNight() and getPokemonNature(synch1) == nature1 then

           areathree()

       end
       if isNight() and getPokemonNature(synch1) ~= nature2 then
           return swapPokemon(synch2, synch1)
       elseif isNight() and getPokemonNature(synch1) == nature2 then

           areatwo()

       end

   else
       pc()
   end    
end
function exclusive()
       
            if getMapName() == "Pokecenter Fuchsia" then
                   moveToMap("Fuchsia City")
               elseif getMapName() == "Fuchsia City" then    
                   moveToMap("Safari Stop")
               elseif getMapName() == "Safari Stop" then
                   talkToNpcOnCell(6, 4)
               elseif getMapName() == "Safari Entrance" then
                    moveToMap("Safari Area 3")
               elseif getMapName() == "Safari Area 3" then
                   talkToNpcOnCell(17, 34)
              elseif getMapName() == "Fuchsia Pokemart" then
                   moveToMap("Fuchsia City")
           elseif getMapName() == "Safari Exclusive" then
                   moveToRectangle(13, 11, 18, 11)
           elseif getMapName() ~= "Fuchsia City" then
                   backtofarm()
           end

end

function exwater()
       
            if getMapName() == "Pokecenter Fuchsia" then
                   moveToMap("Fuchsia City")
               elseif getMapName() == "Fuchsia City" then    
                   moveToMap("Safari Stop")
               elseif getMapName() == "Safari Stop" then
                   talkToNpcOnCell(6, 4)
               elseif getMapName() == "Safari Entrance" then
                    moveToMap("Safari Area 3")
               elseif getMapName() == "Safari Area 3" then
                   talkToNpcOnCell(17, 34)
              elseif getMapName() == "Fuchsia Pokemart" then
                   moveToMap("Fuchsia City")
           elseif getMapName() == "Safari Exclusive" then
                   moveToWater()
           elseif getMapName() ~= "Fuchsia City" then
                   backtofarm()
           end

end

function areaex3()
   
   
       if not isNight() and getPokemonNature(synch1) ~= nature1 then
           return swapPokemon(synch2, synch1)
       elseif not isNight() and getPokemonNature(synch1) == nature1 then

           areathree()

       end
       if isNight() and getPokemonNature(synch1) ~= nature2 then
           return swapPokemon(synch2, synch1)
       elseif isNight() and getPokemonNature(synch1) == nature2 then

           exclusive()

       end
   
   

end

function ball()
       if getMapName() == "Safari Exclusive" then
                   talkToNpcOnCell(21, 3)
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Area 1" then
           if not isMounted() then
               useItem("Arcanine Mount")
           elseif isMounted() then
               moveToMap("Safari Entrance")
           end
       elseif getMapName() == "Safari Entrance" then
           talkToNpcOnCell(27, 25)
       elseif getMapName() == "Safari Stop" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Pokecenter Fuchsia" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
                  moveToMap("Fuchsia Pokemart")
           elseif getMapName() == "Fuchsia Pokemart" and not isShopOpen() then
                   talkToNpcOnCell(3, 5)
           elseif isShopOpen() then
           log("----------------")
           log("--- Buying "..ballquantity.." Great Balls ---")
           log("----------------")
                   buyItem("Great Ball", ballquantity)
       elseif getMapName() ~= "Fuchsia City" then
           backtofarm()
           end
end
function sleepPP()
    if sleepmove == "Hypnosis" or sleepmove == "Spore" or sleepmove == "Sleep Powder" or sleepmove ~= "None" then
        return getRemainingPowerPoints(sleeper, sleepmove) >= 1
    elseif sleepmove == "None" then
        isPokemonUsable(sleeper)
    end
end
function fswipePP()
    if weakmove == "False Swipe" or weakmove ~= "None" then
        return getRemainingPowerPoints(falseswiper, weakmove) >= 1
    elseif weakmove == "None" then
        isPokemonUsable(falseswiper)
    end
end
function onPathAction()
   
   if not isMounted() and mountSwitch == true and hasItem(mount) and not isSurfing() and isOutside() then
       log("---------------------------")
       log("~~~ Riding on my pet!!! ~~~")
       log("---------------------------")
               return useItem(mount)

   elseif moneyfarm and (getMoney() >= minmoney and getMoney() <= maxmoney)  then
       log("~~~ Grinding some pokedollars!!! ~~~")
       if cCave then
           ceCave()
       elseif sFoam then
           seafoam()
       end
           
   elseif ballSwitch and ( getItemQuantity("Great Ball") <= minball ) then

       ball()

   elseif sleepPP() and fswipePP() and isPokemonUsable(1) and isPokemonUsable(falseswiper) and getPokemonHealthPercent(falseswiper) > fswipeHP and getPokemonHealthPercent(sleeper) > sleeperHP and isPokemonUsable(sleeper) then
   
   if huntEeveeRhyhorn then
           
       area23()

   elseif huntEeveeBulba then
       
       area23()

   elseif huntEeveeChansey then
       
       area23()

   elseif huntEeveeScytherPinsir then
       
       area13()

   elseif huntEeveeUmbreon then
       
       areaex3()

   elseif huntStarlyUmbreon or huntScytherRhyhorn then
       
       exclusive()

   elseif huntEeveeMarill then
       
       areaex3()

   elseif huntEevee then
       
       areathree()

   elseif huntScyther then
       
       areaone()

   elseif huntPinsir then
           
       areaone()

   elseif huntBulba then
       
       areatwo()

   elseif huntChansey then
       
       areatwo()

   elseif huntRhyhorn then
       
       areatwo()

   elseif huntKanga then
       
       areaone()

   elseif huntChanseyBulba then
           
       areatwo()

   elseif huntDratiniStarlyUmbreon then
    
    if isMorning() and getPokemonNature(synch1) ~= nature1 then
           return swapPokemon(synch2, synch1)
       elseif isMorning() and getPokemonNature(synch1) == nature1 then

           exwater()

       end

    if isNoon() and getPokemonNature(synch1) ~= nature1 then
           return swapPokemon(synch2, synch1)
       elseif isNoon() and getPokemonNature(synch1) == nature1 then

           exclusive()

       end

       if isNight() and getPokemonNature(synch1) ~= nature2 then
           return swapPokemon(synch2, synch1)
       elseif isNight() and getPokemonNature(synch1) == nature2 then

           exclusive()

       end

   end

   else
       pc()
   end
   

end

function pc()
       if getMapName() == "Cerulean Cave 1F" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean City" then    
           return moveToMap("Route 5") or moveToMap("Route 4")
       elseif getMapName() == "Route 4"  then    
           moveToCell(96, 21)
       elseif getMapName() == "Pokecenter Cerulean" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Pokecenter Vermilion" or getMapName() == "Route 6" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then
           moveToMap("Route 11")
       elseif getMapName() == "Cerulean City" then
           moveToMap("Route 5")
       elseif getMapName() == "Route 5" then
           moveToMap("Route 5 Stop House")
       elseif getMapName() == "Route 5 Stop House" then
           moveToMap("Saffron City")
       elseif getMapName() == "Saffron City" then
           moveToMap("Route 6 Stop House")
       elseif getMapName() == "Route 6 Stop House" then
           moveToMap("Route 6")
       elseif getMapName() == "Cerulean Cave 1F" then
           moveToMap("Cerulean City")
       elseif ( getPlayerX() == 1 and getPlayerY() == 20 ) or ( getPlayerX() == 1 and getPlayerY() == 19 ) then
           moveToMap("Route 5")
       elseif getMapName() == "Cerulean City" then    
           return moveToMap("Route 4")
       elseif getMapName() == "Route 4"  then    
           moveToCell(96, 21)
       elseif getMapName() == "Route 11" then
           moveToMap("Route 11 Stop House")
       elseif getMapName() == "Route 11 Stop House" then
           moveToMap("Route 12")
       elseif getMapName() == "Route 12" then
           moveToCell(24, 92)
       elseif getMapName() == "Route 13" then
           moveToMap("Route 14")
       elseif getMapName() == "Route 14" then
           moveToMap("Route 15")
       elseif getMapName() == "Route 15" then
           moveToMap("Route 15 Stop House")
       elseif getMapName() == "Route 15 Stop House" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Seafoam B4F" then    
           moveToCell(9, 6)
       elseif getMapName() == "Seafoam B3F" then    
           moveToMap("Seafoam B2F")
       elseif getMapName() == "Seafoam B2F" then    
           moveToMap("Seafoam B1F")
       elseif getMapName() == "Seafoam B1F" then    
           moveToMap("Seafoam 1F")
       elseif getMapName() == "Seafoam 1F" then    
           moveToCell(13, 16)
       elseif getMapName() == "Route 20" then    
           moveToMap("Route 19")
       elseif getMapName() == "Route 19" then    
           moveToMap("Fuchsia City Stop House")
       elseif getMapName() == "Fuchsia City Stop House" then    
           moveToMap("Fuchsia City")
       elseif getMapName() == "Safari Exclusive" then
                   talkToNpcOnCell(21, 3)
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Area 1" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Entrance" then
           talkToNpcOnCell(27, 25)
       elseif getMapName() == "Safari Stop" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Pokecenter Fuchsia")
           elseif getMapName() == "Pokecenter Fuchsia" then
           usePokecenter()
       end

end
function onBattleAction()

   if moneyfarm and (getMoney() <= minmoney or ((getMoney() - startingMoney) < moneyneeded)) then
       
           return attack() or sendAnyPokemon() or sendUsablePokemon() or run()
           
       
   elseif isOpponentShiny() or not isAlreadyCaught() or getOpponentName() == "Charmander" or getOpponentName() == "Squirtle" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntEeveeRhyhorn then
       if getOpponentName() == "Rhyhorn" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
       end
   elseif huntEeveeBulba then
       if getOpponentName() == "Bulbasaur" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
       end
   elseif huntEeveeChansey then
       if getOpponentName() == "Chansey" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
       end
   elseif huntEeveeScytherPinsir then
       if getOpponentName() == "Scyther" or getOpponentName() == "Pinsir" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
       
       end
   elseif huntEeveeUmbreon then
       if getOpponentName() == "Umbreon" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
       end
   elseif huntStarlyUmbreon and ( getOpponentName() == "Starly" or getOpponentName() == "Umbreon" ) then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntEeveeMarill then
       if getOpponentName() == "Marill" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
       end    
   elseif huntEevee and getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
   elseif huntScyther and getOpponentName() == "Scyther" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntPinsir and getOpponentName() == "Pinsir" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntBulba and getOpponentName() == "Bulbasaur" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntChansey and getOpponentName() == "Chansey" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntRhyhorn and getOpponentName() == "Rhyhorn" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end    
   elseif huntKanga and getOpponentName() == "Kangaskhan" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end    
   elseif huntChanseyBulba and ( getOpponentName() == "Chansey" or getOpponentName() == "Bulbasaur" ) then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end
   elseif huntScytherRhyhorn and ( getOpponentName() == "Scyther" or getOpponentName() == "Rhyhorn" ) then
    if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end
   elseif huntDratiniStarlyUmbreon and ( getOpponentName() == "Dratini" or getOpponentName() == "Starly" or getOpponentName() == "Umbreon" ) then
    if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end
    
   elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()    
   else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
   end
end

function normal()
   return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")  or sendAnyPokemon() or attack() or run()
end

function advanceCatch()
       if getActivePokemonNumber() == 1 then
           return sendPokemon(falseswiper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() > 1 ) then
           return weakAttack() or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == sleeper ) and ( getOpponentStatus() ~= "SLEEP" and getOpponentStatus() ~= "PARALIZE" and getOpponentStatus() ~= "POISON" and getOpponentStatus() ~= "BURN" ) and ( getOpponentHealth() == 1 ) then
           return useMove(sleepmove) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() == 1 ) then
           return sendPokemon(sleeper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif getOpponentStatus() == "SLEEP" or getOpponentStatus() == "PARALIZE" or getOpponentStatus() == "POISON" or getOpponentStatus() == "BURN" then
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or attack() or run()
       else
               return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or attack() or run()
       end
end

function fswipe()
       if getActivePokemonNumber() == 1 then
           return sendPokemon(falseswiper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() > 1 ) then
           return weakAttack() or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif getOpponentHealth() == 1 then
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")  or sendAnyPokemon() or attack() or run()
       end
end
function sleep()
       if getActivePokemonNumber() == 1 then
           return sendPokemon(sleeper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or run()
       elseif ( getActivePokemonNumber() == sleeper ) and ( getOpponentStatus() ~= "SLEEP" and getOpponentStatus() ~= "PARALIZE" and getOpponentStatus() ~= "POISON" and getOpponentStatus() ~= "BURN" ) then
           return useMove(sleepmove) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif getOpponentStatus() == "SLEEP" or getOpponentStatus() == "PARALIZE" or getOpponentStatus() == "POISON" or getOpponentStatus() == "BURN" then
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       else
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or attack() or run()
       end    
end
function onBattleMessage(wild)
   
       if stringContains(wild, "A Wild SHINY ") then
       shinyCounter = shinyCounter + 1    
   
   elseif stringContains(wild, "You throw") then
       pokeballCounter = pokeballCounter + 1    
   
       elseif stringContains(wild, "Pokedollar(s)") then
               log("Info ~ Pokedollars earned: "..tostring(getMoney() - startingMoney).." (" ..tostring((getMoney() - startingMoney)/wildCounter).." average)")
   elseif wild == "A Wild [FF9900]Scyther[-] Attacks!" then
       scythercounter = scythercounter + 1
 
   elseif wild == "A Wild [FF9900]Pinsir[-] Attacks!" then
       pinsircounter = pinsircounter + 1
   
   elseif wild == "A Wild [FF9900]Eevee[-] Attacks!" then
       eeveecounter = eeveecounter + 1
   
   elseif wild == "A Wild [FF9900]Bulbasaur[-] Attacks!" then
       bulbacounter = bulbacounter + 1
   
   elseif wild == "A Wild [FF9900]Chansey[-] Attacks!" then
       chanseycounter = chanseycounter + 1

   elseif wild == "A Wild [FF9900]Rhyhorn[-] Attacks!" then
       rhycounter = rhycounter + 1

   elseif wild == "A Wild [FF9900]Kangaskhan[-] Attacks!" then
       kangascounter = kangascounter + 1
   
   elseif wild == "A Wild [FF9900]Umbreon[-] Attacks!" then
       umbreoncounter = umbreoncounter + 1

   elseif wild == "A Wild [FF9900]Starly[-] Attacks!" then
       starlycounter = starlycounter + 1
   elseif stringContains(wild, "A Wild ") then
           wildCounter = wildCounter + 1
   end
     
end

function onPause()
   
   log(" --------------------------------------------")
       log("|--------- CATCH ROUTINE PAUSED ----------|")
       log(" --------------------------------------------")
   log("|--------- Move Remaining Power Points ----------|")
   log("--------------------------------------")
   log("False Swipe: " .. tostring(getRemainingPowerPoints(falseswiper,weakmove)))
   log("Sleep Move: " .. tostring(getRemainingPowerPoints(sleeper,sleepmove)))
   log("-----------------------------------------------------------")
   log("|--------- Pokemon Caught Status ----------|")
   log(" ")
   
   if huntEeveeRhyhorn then
       log("Eevee Caught: " .. eeveecounter)
       log("Rhyhorn Caught: ".. rhycounter)
       
   elseif huntEeveeBulba then
       log("Eevee Caught: " .. eeveecounter)
       log("Bulbasaur Caught: " .. bulbacounter)
       
   elseif huntEeveeChansey then
       log("Eevee Caught: " .. eeveecounter)
       log("Chansey Caught: " .. chanseycounter)
       
   elseif huntEeveeScytherPinsir then
       log("Eevee Caught: " .. eeveecounter)
       log("Scyther Caught: " .. scythercounter)
       log("Pinsir Caught: " .. pinsircounter)
       
   elseif huntEeveeUmbreon then
       log("Eevee Caught: " .. eeveecounter)
       log("Umbreon Caught: " .. umbreoncounter)
       
   elseif huntStarlyUmbreon then
       log("Starly Caught: " .. starlycounter)
       log("Umbreon Caught: " .. umbreoncounter)
       
   elseif huntEeveeMarill then
       log("Eevee Caught: " .. eeveecounter)
       log("Marill Caught: " .. marillcounter)
       
   elseif huntEevee then
       log("Eevee Caught: " .. eeveecounter)
       
   elseif huntScyther then
       log("Scyther Caught: " .. scythercounter)
       
   elseif huntPinsir then
       log("Pinsir Caught: " .. pinsircounter)
       
   elseif huntBulba then
       log("Bulbasaur Caught: " .. bulbacounter)
       
   elseif huntChansey then
       log("Chansey Caught: " .. chanseycounter)
       
   elseif huntRhyhorn then
       log("Rhyhorn Caught: ".. rhycounter)
       
   elseif huntKanga then
       log("Kangaskhan Caught: " .. kangascounter)
       
   elseif huntChanseyBulba then
       log("Chansey Caught: " .. chanseycounter)
       log("Bulbasaur Caught: " .. bulbacounter)
   end
   
   log(" --------------------------------------------")
   log("Pokemons encountered: " .. wildCounter)
   log("-----------------------------------------------------------")
   log("Shinies Caught: " .. shinyCounter)
   log("Pokeball's used: " .. pokeballCounter)
   log("---------------------------------------------")
   log("|--------- Character Information ----------|")
   log(" ")
   log("Times in Pokecenter: " .. pokecenterCounter)
   if huntandfarm or moneyfarm then
        log("Pokedollars earned: "..tostring(getMoney() - startingMoney).." (" ..tostring((getMoney() - startingMoney)/wildCounter).." average)")
       log("-----------------------------------------------------------")
   end
end

function onStop()
   log("-----------------------------------------------------------")
       log("---------------------- Routine Stopped ---------------------")
       log("-----------------------------------------------------------")
   endtime = os.time()
       log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/3600 ).. " hours")
       log("or")
       log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/60 ).. " minutes")
       log("-----------------------------------------------------------")
end



function ceCave()


   if getUsablePokemonCount() > pokeNumber then

       if getMapName() == "Safari Exclusive" then
                   talkToNpcOnCell(21, 3)
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Area 1" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Entrance" then
           talkToNpcOnCell(27, 25)
       elseif getMapName() == "Pokecenter Cerulean" then
           moveToMap("Cerulean City")
       elseif (getPlayerX() == 26 and getPlayerY() == 31) or (getPlayerX() == 9 and getPlayerY() == 49) then
           moveToMap("Route 4")
       elseif getMapName() == "Route 6" then    
           moveToMap("Route 6 Stop House")
       elseif getMapName() == "Safari Stop" or getMapName() == "Pokecenter Fuchsia" then    
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Route 15 Stop House")
       elseif getMapName() == "Route 15 Stop House" then    
           return moveToMap("Route 15")
       elseif getMapName() == "Route 15" then
           moveToMap("Route 14")
       elseif getMapName() == "Route 14" then    
           moveToMap("Route 13")
       elseif getMapName() == "Route 13" then    
           moveToMap("Route 12")
       elseif getMapName() == "Route 12" then    
           moveToMap("Route 11 Stop House")
       elseif getMapName() == "Route 11 Stop House" then    
           moveToMap("Route 11")
       elseif getMapName() == "Route 11" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Pokecenter Vermilion" then    
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then    
           moveToMap("Route 6")
       elseif getMapName() == "Route 6 Stop House" then    
           moveToMap("Saffron City")
       elseif getMapName() == "Saffron City" then    
           moveToMap("Route 5 Stop House")
       elseif getMapName() == "Route 5 Stop House" then    
           moveToMap("Route 5")
       elseif getMapName() == "Route 5" then    
           moveToCell(14, 0)
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Cerulean City" or getMapName() == "Route 4" then
           return  moveToMap("Cerulean Cave 1F") or moveToCell(96, 14)    
       elseif getMapName() == "Cerulean Cave 1F"  then    
           return moveNearExit("Cerulean City")
       end
   else
       if getMapName() == "Cerulean Cave 1F" then
           moveToMap("Cerulean City")
       elseif ( getPlayerX() == 1 and getPlayerY() == 20 ) then
           moveToCell(26, 30)
       elseif getMapName() == "Cerulean City" then    
           return moveToMap("Route 4")
       elseif getMapName() == "Route 4"  then    
           moveToCell(96, 21)
       elseif getMapName() == "Pokecenter Cerulean"  then    
               usePokecenter()
       end
   end
end

function seafoam()

   if getUsablePokemonCount() > pokeNumber then
       
       if getMapName() == "Safari Exclusive" then
                   talkToNpcOnCell(21, 3)
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Safari Area 1" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Entrance" then
           talkToNpcOnCell(27, 25)
       elseif getMapName() == "Safari Stop" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Pokecenter Fuchsia" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Fuchsia City Stop House")
       elseif getMapName() == "Fuchsia City Stop House" then
           moveToMap("Route 19")
       elseif getMapName() == "Route 19" then    
           moveToMap("Route 20")
       elseif getMapName() == "Route 20" then    
           moveToCell(60, 32)
       elseif getMapName() == "Seafoam 1F" then    
           moveToMap("Seafoam B1F")
       elseif getMapName() == "Seafoam B1F" then    
           moveToMap("Seafoam B2F")
       elseif getMapName() == "Seafoam B2F" then    
           moveToMap("Seafoam B3F")
       elseif getMapName() == "Seafoam B3F" then    
           moveToCell(12, 8)
       elseif getMapName() == "Seafoam B4F" then
           moveToRectangle(9,15,13,20)
       end
           
   else
       
       if getMapName() == "Seafoam B4F" then    
           moveToCell(9, 6)
       elseif getMapName() == "Seafoam B3F" then    
           moveToMap("Seafoam B2F")
       elseif getMapName() == "Seafoam B2F" then    
           moveToMap("Seafoam B1F")
       elseif getMapName() == "Seafoam B1F" then    
           moveToMap("Seafoam 1F")
       elseif getMapName() == "Seafoam 1F" then    
           moveToCell(13, 16)
       elseif getMapName() == "Route 20" then    
           moveToMap("Route 19")
       elseif getMapName() == "Route 19" then    
           moveToMap("Fuchsia City Stop House")
       elseif getMapName() == "Fuchsia City Stop House" then    
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then    
           moveToMap("Pokecenter Fuchsia")
           elseif getMapName() == "Pokecenter Fuchsia" then
           usePokecenter()
       end

   end

end

function backtofarm()
   
       if getMapName() == "Cerulean Cave 1F" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean City" then    
           return moveToMap("Route 5") or moveToMap("Route 4")
       elseif getMapName() == "Route 4"  then    
           moveToCell(96, 21)
       elseif getMapName() == "Pokecenter Cerulean" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Pokecenter Vermilion" or getMapName() == "Route 6" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then
           moveToMap("Route 11")
       elseif getMapName() == "Cerulean City" then
           moveToMap("Route 5")
       elseif getMapName() == "Route 5" then
           moveToMap("Route 5 Stop House")
       elseif getMapName() == "Route 5 Stop House" then
           moveToMap("Saffron City")
       elseif getMapName() == "Saffron City" then
           moveToMap("Route 6 Stop House")
       elseif getMapName() == "Route 6 Stop House" then
           moveToMap("Route 6")
       elseif getMapName() == "Cerulean Cave 1F" then
           moveToMap("Cerulean City")
       elseif ( getPlayerX() == 1 and getPlayerY() == 20 ) or ( getPlayerX() == 1 and getPlayerY() == 19 ) then
           moveToMap("Route 5")
       elseif getMapName() == "Cerulean City" then    
           return moveToMap("Route 4")
       elseif getMapName() == "Route 4"  then    
           moveToCell(96, 21)
       elseif getMapName() == "Route 11" then
           moveToMap("Route 11 Stop House")
       elseif getMapName() == "Route 11 Stop House" then
           moveToMap("Route 12")
       elseif getMapName() == "Route 12" then
           moveToCell(24, 92)
       elseif getMapName() == "Route 13" then
           moveToMap("Route 14")
       elseif getMapName() == "Route 14" then
           moveToMap("Route 15")
       elseif getMapName() == "Route 15" then
           moveToMap("Route 15 Stop House")
       elseif getMapName() == "Route 15 Stop House" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Seafoam B4F" then    
           return moveToCell(9, 6)
       elseif getMapName() == "Seafoam B3F" then    
           moveToMap("Seafoam B2F")
       elseif getMapName() == "Seafoam B2F" then    
           moveToMap("Seafoam B1F")
       elseif getMapName() == "Seafoam B1F" then    
           moveToMap("Seafoam 1F")
       elseif getMapName() == "Seafoam 1F" then    
           moveToCell(13, 16)
       elseif getMapName() == "Route 20" then    
           moveToMap("Route 19")
       elseif getMapName() == "Route 19" then    
           moveToMap("Fuchsia City Stop House")
       elseif getMapName() == "Fuchsia City Stop House" then    
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       end
end
 
Reply
(2016-11-21, 18:25:55)linkexe
(2016-11-21, 02:40:41)genostelar its repeatedly heal at pokecenter, my setting is no sync but have sleep powder and false sweep.then i disable sleep powder,still like that,then i disable false sweep,still like that.can anyone 
Use this script, I was able to fix it. I do have spore as my sleep.
                           -- Copyright © 2016 redskhie


       --CHOOSE WHAT POKEMON DO YOU WANT TO HUNT
       -- WARNING!!! YOU CAN ONLY PICK 1 "true" then leave "false"

   -- Set to true if you want to catch this Pokemon, else leave false

huntEevee = true        --hunt Eevee all time    
huntScyther = false        --hunt Scyther all time
huntPinsir = false        --hunt Pinsir all time
huntBulba = false        --hunt Bulbasaur all time
huntChansey = false        --hunt Chansey all time
huntRhyhorn = false        --hunt Rhyhorn all time
huntKanga = false        --hunt Kangaskhan all time
huntChanseyBulba = false        --hunt Chansey and Bulbasaur all time


   -- If you want to use this Go to Synchronize Section after picking 1 at the bottom
   -- Set to true if you want to catch multiple Pokemon at multiple time, else leave false

huntEeveeRhyhorn = false    --hunt Eevee at Morning and Day        -- hunt Rhyhorn at Night
huntEeveeBulba = false         --hunt Eevee at Morning and Day     -- hunt Bulbasaur at Night
huntEeveeChansey = false    --hunt Eevee at Morning and Day        -- hunt Chansey at Night
huntEeveeScytherPinsir = false     --hunt Eevee at Morning and Day     -- hunt Scyther and Pinsir at Night

   --You can only use this if you have MEMBERSHIP

       --UNTESTED

huntEeveeUmbreon = false    --hunt Eevee at Morning and Day        -- hunt Umbreon at Night
huntEeveeMarill = false        --hunt Eevee at Morning and Day         -- hunt Marill at Night
huntStarlyUmbreon = false        --hunt Starly at Morning and Day    -- hunt Umbreon at Night
huntDratiniStarlyUmbreon = false        --hunt Dratini at Morning     --hunt Starly Day    -- hunt Umbreon at Night
huntScytherRhyhorn = false        --hunt Scyther and Rhyhorn all time




                   -- CATCH CONFIGURATION

               --If you don't have synch poke leave. And don't use the multiple hunt

    --Use synch1 at MORNING and DAY Time/    synch2 at NIGHT Time


   --Synchronize
   
synch1 = 1            --Pokemon Index of 1st SynchPoke
nature1 = "Adamant"    --Pokemon Nature of 1st SynchPoke
synch2 = 3            --Pokemon Index of 2nd SynchPoke
nature2 = "Jolly"    --Pokemon Nature of 2nd SynchPoke


   -- You can only choose One Special Catching, set true, else leave the 3 false
                                  --use only normalCatchOn if you don't have fswiper and sleeper
                                  --Leave blank at sleepmove/weakmove if you don't have atleast


normalCatchOn = false        --Directly throw pokeballs on hunted pokemons
fswipeOn = true        --Switch to pokemon with false swipe, use false swipe until the hunted pokes hp is reach to 1 then throw pokeballs
sleepOn = true            --Switch to pokemon with sleep move, use sleep move until the hunted pokes status is SLEEPING then throw pokeballs
advanceCatchOn = true --Use fswipeOn and sleepOn to catch hunted pokes

falseswiper = 2           --Index of pokemon with false swipe
fswipeHP = 10            --Returns the health percent of the false swiper, then heal to PC
weakmove = "False Swipe"    --False Swipe move --Change to "None" if you don't have

sleeper = 2            --Index of pokemon with sleep move
sleeperHP = 10            --Returns the health percent of the false swiper, then heal to PC
sleepmove = "Spore"        --Set/Change the name of the sleep move --Change to "None" if you don't have



       --MOUNTING CONFIGURATION


   -- Set/Change the name of the mount you want to use on LAND

mount = "Bicycle"

   -- Set/Change to true if you want to use mount,else false

mountSwitch = true



       --POKEBALL CONFIGURATION

   --Disable/enable pokeball function. set to true else false

ballSwitch = true

   


   --POKEBALLS --Great ball is the default balls it will buy

ballquantity = 10         --set the number of balls you want to buy
minball = 49            --set the minimum number of balls and bot will buy more    




       --MONEY FARMING CONFIGURATION


huntandfarm = false    --set this to true if you want to farm money while hunting pokes

moneyfarm = false    --set this to true if you want to farm money when minimum money reaches, else false
minmoney = 1000    --set the minimum money to start farming
maxmoney = 100000    --set the maximum money to start again on hunting pokes

   --Set the number of pokemon you want to remain while farming and start healing

pokeNumber = 1

   --Pick only one area of farming

cCave = false        --Start farming at Cerulean Cave 1F
sFoam = false        --Start farming at Seafoam B4F






                           -- Copyright © 2016 redskhie






       --DO NOT TOUCH THIS if you don't know what you're doing!

name = "Rare catcher at Kanto Safari"
author = "redskhie"
description = [[This script will catch your desired Pokemons at Kanto Safari]]

function onStart()
   
   startime = os.time()

   shinyCounter = 0

   eeveecounter = 0
   scythercounter = 0
   pinsircounter = 0
   bulbacounter = 0
   chanseycounter = 0
   rhycounter = 0
   kangascounter = 0
   umbreoncounter = 0
   starlycounter = 0
   pokecenterCounter = 0
   wildCounter = 0
   
   startingMoney = getMoney()

   log("-----------------------------------------------------------")
       log("|---- We are now Commencing the Catch Routine ----|")
       log("-----------------------------------------------------------")

   if huntEeveeRhyhorn then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Rhyhorn at Night")
       log("--------------------------------------")
   elseif huntEeveeBulba then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Bulbasaur at Night")
       log("--------------------------------------")
   elseif huntEeveeChansey then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Chansey at Night")
       log("--------------------------------------")
   elseif huntEeveeScytherPinsir then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Scyther and Pinsir at Night")
       log("--------------------------------------")
   elseif huntEeveeUmbreon then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Umbreon and Pinsir at Night")
       log("--------------------------------------")
   elseif huntStarlyUmbreon then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Starly at Morning and Day ~ Hunting Umbreon at Night")
       log("--------------------------------------")
   elseif huntEeveeMarill then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Marill at Night")
       log("--------------------------------------")
   end

   if huntEevee then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Safari Area 3")
       log("--------------------------------------")
   elseif huntScyther then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Scyther at Safari Area 1")
       log("--------------------------------------")
   elseif huntPinsir then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Pinsir at Safari Area 1")
       log("--------------------------------------")
   elseif huntBulba then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Bulbasaur at Safari Area 2")
       log("--------------------------------------")
   elseif huntChansey then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Chansey at Safari Area 2")
       log("--------------------------------------")
   elseif huntRhyhorn then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Rhyhorn at Safari Area 2")
       log("--------------------------------------")
   elseif huntKanga then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Kangaskhan at Safari Area 1")
       log("--------------------------------------")
   elseif huntChanseyBulba then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Chansey and Bulbasaur at Safari Area 2")
       log("--------------------------------------")

   end
   if moneyfarm then
       if cCave then
           log("~Farming money at Cerulean Cave 1F when money is less than "..minmoney.." pokedollars")
           log("~Continue hunting when money reached to "..maxmoney.."+ pokedollars")
           log("--------------------------------------")
       elseif sFoam then
           log("~Farming money at Seafoam B4F when money is less than "..minmoney.." pokedollars")
           log("~Continue hunting when money reached to "..maxmoney.."+ pokedollars")
           log("--------------------------------------")
       end
   end
   if huntandfarm then
       log("Killing all encountered pokes while hunting your desired pokes")
       log("--------------------------------------")
   end
   pokeballCounter = 0

end
function onDialogMessage(pokecenter)
   if stringContains(pokecenter, "Would you like me to heal your Pokemon?") then
       pokecenterCounter = pokecenterCounter + 1
       if usingLogs then
           log("Info ~ Times in Pokecenter: " .. pokecenterCounter)
       end
   end
end
function areaone()

           
       if getMapName() == "Pokecenter Fuchsia" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Safari Stop")
       elseif getMapName() == "Safari Stop" then
           talkToNpcOnCell(6, 4)    
       elseif getMapName() == "Safari Entrance" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Area 2")
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Safari Area 1" then
           moveToGrass()
       elseif getMapName() ~= "Fuchsia City" then
           backtofarm()
       end
   
end

function areatwo()

       if getMapName() == "Pokecenter Fuchsia" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Safari Stop")
       elseif getMapName() == "Safari Stop" then
           talkToNpcOnCell(6, 4)    
       elseif getMapName() == "Safari Entrance" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 2" then
           moveToGrass()
       elseif getMapName() == "Safari Area 1" then
           moveToMap("Safari Area 2")
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Area 2")
       elseif getMapName() ~= "Fuchsia City" then
           backtofarm()
       end
   
end

function areathree()

   
       if getMapName() == "Pokecenter Fuchsia" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Safari Stop")
       elseif getMapName() == "Safari Stop" then
           talkToNpcOnCell(6, 4)    
       elseif getMapName() == "Safari Entrance" then
           moveToMap("Safari Area 3")
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 3")
       elseif getMapName() == "Safari Area 1" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Safari Area 3" then
           moveToRectangle(25, 29, 30, 29)
       elseif getMapName() ~= "Fuchsia City" then
           backtofarm()
       end
   
end

function area13()

       
       if not isNight() and getPokemonNature(synch1) ~= nature1 then
           return swapPokemon(synch2, synch1)
       elseif not isNight() and getPokemonNature(synch1) == nature1 then

           areathree()

       elseif isNight() and getPokemonNature(synch1) ~= nature2 then
           return swapPokemon(synch2, synch1)
       elseif isNight() and getPokemonNature(synch1) == nature2 then

           areaone()

       
       end
   

end

function area23()
   
    if isPokemonUsable(1) and isPokemonUsable(falseswiper) and getPokemonHealthPercent(falseswiper) > fswipeHP and getPokemonHealthPercent(sleeper) > sleeperHP and isPokemonUsable(sleeper) and getRemainingPowerPoints(sleeper, sleepmove) >= 1 and getRemainingPowerPoints(falseswiper, weakmove) >= 1 then
   
       if not isNight() and getPokemonNature(synch1) ~= nature1 then
           return swapPokemon(synch2, synch1)
       elseif not isNight() and getPokemonNature(synch1) == nature1 then

           areathree()

       end
       if isNight() and getPokemonNature(synch1) ~= nature2 then
           return swapPokemon(synch2, synch1)
       elseif isNight() and getPokemonNature(synch1) == nature2 then

           areatwo()

       end

   else
       pc()
   end    
end
function exclusive()
       
            if getMapName() == "Pokecenter Fuchsia" then
                   moveToMap("Fuchsia City")
               elseif getMapName() == "Fuchsia City" then    
                   moveToMap("Safari Stop")
               elseif getMapName() == "Safari Stop" then
                   talkToNpcOnCell(6, 4)
               elseif getMapName() == "Safari Entrance" then
                    moveToMap("Safari Area 3")
               elseif getMapName() == "Safari Area 3" then
                   talkToNpcOnCell(17, 34)
              elseif getMapName() == "Fuchsia Pokemart" then
                   moveToMap("Fuchsia City")
           elseif getMapName() == "Safari Exclusive" then
                   moveToRectangle(13, 11, 18, 11)
           elseif getMapName() ~= "Fuchsia City" then
                   backtofarm()
           end

end

function exwater()
       
            if getMapName() == "Pokecenter Fuchsia" then
                   moveToMap("Fuchsia City")
               elseif getMapName() == "Fuchsia City" then    
                   moveToMap("Safari Stop")
               elseif getMapName() == "Safari Stop" then
                   talkToNpcOnCell(6, 4)
               elseif getMapName() == "Safari Entrance" then
                    moveToMap("Safari Area 3")
               elseif getMapName() == "Safari Area 3" then
                   talkToNpcOnCell(17, 34)
              elseif getMapName() == "Fuchsia Pokemart" then
                   moveToMap("Fuchsia City")
           elseif getMapName() == "Safari Exclusive" then
                   moveToWater()
           elseif getMapName() ~= "Fuchsia City" then
                   backtofarm()
           end

end

function areaex3()
   
   
       if not isNight() and getPokemonNature(synch1) ~= nature1 then
           return swapPokemon(synch2, synch1)
       elseif not isNight() and getPokemonNature(synch1) == nature1 then

           areathree()

       end
       if isNight() and getPokemonNature(synch1) ~= nature2 then
           return swapPokemon(synch2, synch1)
       elseif isNight() and getPokemonNature(synch1) == nature2 then

           exclusive()

       end
   
   

end

function ball()
       if getMapName() == "Safari Exclusive" then
                   talkToNpcOnCell(21, 3)
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Area 1" then
           if not isMounted() then
               useItem("Arcanine Mount")
           elseif isMounted() then
               moveToMap("Safari Entrance")
           end
       elseif getMapName() == "Safari Entrance" then
           talkToNpcOnCell(27, 25)
       elseif getMapName() == "Safari Stop" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Pokecenter Fuchsia" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
                  moveToMap("Fuchsia Pokemart")
           elseif getMapName() == "Fuchsia Pokemart" and not isShopOpen() then
                   talkToNpcOnCell(3, 5)
           elseif isShopOpen() then
           log("----------------")
           log("--- Buying "..ballquantity.." Great Balls ---")
           log("----------------")
                   buyItem("Great Ball", ballquantity)
       elseif getMapName() ~= "Fuchsia City" then
           backtofarm()
           end
end
function sleepPP()
    if sleepmove == "Hypnosis" or sleepmove == "Spore" or sleepmove == "Sleep Powder" or sleepmove ~= "None" then
        return getRemainingPowerPoints(sleeper, sleepmove) >= 1
    elseif sleepmove == "None" then
        isPokemonUsable(sleeper)
    end
end
function fswipePP()
    if weakmove == "False Swipe" or weakmove ~= "None" then
        return getRemainingPowerPoints(falseswiper, weakmove) >= 1
    elseif weakmove == "None" then
        isPokemonUsable(falseswiper)
    end
end
function onPathAction()
   
   if not isMounted() and mountSwitch == true and hasItem(mount) and not isSurfing() and isOutside() then
       log("---------------------------")
       log("~~~ Riding on my pet!!! ~~~")
       log("---------------------------")
               return useItem(mount)

   elseif moneyfarm and (getMoney() >= minmoney and getMoney() <= maxmoney)  then
       log("~~~ Grinding some pokedollars!!! ~~~")
       if cCave then
           ceCave()
       elseif sFoam then
           seafoam()
       end
           
   elseif ballSwitch and ( getItemQuantity("Great Ball") <= minball ) then

       ball()

   elseif sleepPP() and fswipePP() and isPokemonUsable(1) and isPokemonUsable(falseswiper) and getPokemonHealthPercent(falseswiper) > fswipeHP and getPokemonHealthPercent(sleeper) > sleeperHP and isPokemonUsable(sleeper) then
   
   if huntEeveeRhyhorn then
           
       area23()

   elseif huntEeveeBulba then
       
       area23()

   elseif huntEeveeChansey then
       
       area23()

   elseif huntEeveeScytherPinsir then
       
       area13()

   elseif huntEeveeUmbreon then
       
       areaex3()

   elseif huntStarlyUmbreon or huntScytherRhyhorn then
       
       exclusive()

   elseif huntEeveeMarill then
       
       areaex3()

   elseif huntEevee then
       
       areathree()

   elseif huntScyther then
       
       areaone()

   elseif huntPinsir then
           
       areaone()

   elseif huntBulba then
       
       areatwo()

   elseif huntChansey then
       
       areatwo()

   elseif huntRhyhorn then
       
       areatwo()

   elseif huntKanga then
       
       areaone()

   elseif huntChanseyBulba then
           
       areatwo()

   elseif huntDratiniStarlyUmbreon then
    
    if isMorning() and getPokemonNature(synch1) ~= nature1 then
           return swapPokemon(synch2, synch1)
       elseif isMorning() and getPokemonNature(synch1) == nature1 then

           exwater()

       end

    if isNoon() and getPokemonNature(synch1) ~= nature1 then
           return swapPokemon(synch2, synch1)
       elseif isNoon() and getPokemonNature(synch1) == nature1 then

           exclusive()

       end

       if isNight() and getPokemonNature(synch1) ~= nature2 then
           return swapPokemon(synch2, synch1)
       elseif isNight() and getPokemonNature(synch1) == nature2 then

           exclusive()

       end

   end

   else
       pc()
   end
   

end

function pc()
       if getMapName() == "Cerulean Cave 1F" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean City" then    
           return moveToMap("Route 5") or moveToMap("Route 4")
       elseif getMapName() == "Route 4"  then    
           moveToCell(96, 21)
       elseif getMapName() == "Pokecenter Cerulean" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Pokecenter Vermilion" or getMapName() == "Route 6" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then
           moveToMap("Route 11")
       elseif getMapName() == "Cerulean City" then
           moveToMap("Route 5")
       elseif getMapName() == "Route 5" then
           moveToMap("Route 5 Stop House")
       elseif getMapName() == "Route 5 Stop House" then
           moveToMap("Saffron City")
       elseif getMapName() == "Saffron City" then
           moveToMap("Route 6 Stop House")
       elseif getMapName() == "Route 6 Stop House" then
           moveToMap("Route 6")
       elseif getMapName() == "Cerulean Cave 1F" then
           moveToMap("Cerulean City")
       elseif ( getPlayerX() == 1 and getPlayerY() == 20 ) or ( getPlayerX() == 1 and getPlayerY() == 19 ) then
           moveToMap("Route 5")
       elseif getMapName() == "Cerulean City" then    
           return moveToMap("Route 4")
       elseif getMapName() == "Route 4"  then    
           moveToCell(96, 21)
       elseif getMapName() == "Route 11" then
           moveToMap("Route 11 Stop House")
       elseif getMapName() == "Route 11 Stop House" then
           moveToMap("Route 12")
       elseif getMapName() == "Route 12" then
           moveToCell(24, 92)
       elseif getMapName() == "Route 13" then
           moveToMap("Route 14")
       elseif getMapName() == "Route 14" then
           moveToMap("Route 15")
       elseif getMapName() == "Route 15" then
           moveToMap("Route 15 Stop House")
       elseif getMapName() == "Route 15 Stop House" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Seafoam B4F" then    
           moveToCell(9, 6)
       elseif getMapName() == "Seafoam B3F" then    
           moveToMap("Seafoam B2F")
       elseif getMapName() == "Seafoam B2F" then    
           moveToMap("Seafoam B1F")
       elseif getMapName() == "Seafoam B1F" then    
           moveToMap("Seafoam 1F")
       elseif getMapName() == "Seafoam 1F" then    
           moveToCell(13, 16)
       elseif getMapName() == "Route 20" then    
           moveToMap("Route 19")
       elseif getMapName() == "Route 19" then    
           moveToMap("Fuchsia City Stop House")
       elseif getMapName() == "Fuchsia City Stop House" then    
           moveToMap("Fuchsia City")
       elseif getMapName() == "Safari Exclusive" then
                   talkToNpcOnCell(21, 3)
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Area 1" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Entrance" then
           talkToNpcOnCell(27, 25)
       elseif getMapName() == "Safari Stop" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Pokecenter Fuchsia")
           elseif getMapName() == "Pokecenter Fuchsia" then
           usePokecenter()
       end

end
function onBattleAction()

   if moneyfarm and (getMoney() <= minmoney or ((getMoney() - startingMoney) < moneyneeded)) then
       
           return attack() or sendAnyPokemon() or sendUsablePokemon() or run()
           
       
   elseif isOpponentShiny() or not isAlreadyCaught() or getOpponentName() == "Charmander" or getOpponentName() == "Squirtle" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntEeveeRhyhorn then
       if getOpponentName() == "Rhyhorn" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
       end
   elseif huntEeveeBulba then
       if getOpponentName() == "Bulbasaur" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
       end
   elseif huntEeveeChansey then
       if getOpponentName() == "Chansey" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
       end
   elseif huntEeveeScytherPinsir then
       if getOpponentName() == "Scyther" or getOpponentName() == "Pinsir" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
       
       end
   elseif huntEeveeUmbreon then
       if getOpponentName() == "Umbreon" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
       end
   elseif huntStarlyUmbreon and ( getOpponentName() == "Starly" or getOpponentName() == "Umbreon" ) then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntEeveeMarill then
       if getOpponentName() == "Marill" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
       end    
   elseif huntEevee and getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
   elseif huntScyther and getOpponentName() == "Scyther" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntPinsir and getOpponentName() == "Pinsir" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntBulba and getOpponentName() == "Bulbasaur" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntChansey and getOpponentName() == "Chansey" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntRhyhorn and getOpponentName() == "Rhyhorn" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end    
   elseif huntKanga and getOpponentName() == "Kangaskhan" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end    
   elseif huntChanseyBulba and ( getOpponentName() == "Chansey" or getOpponentName() == "Bulbasaur" ) then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end
   elseif huntScytherRhyhorn and ( getOpponentName() == "Scyther" or getOpponentName() == "Rhyhorn" ) then
    if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end
   elseif huntDratiniStarlyUmbreon and ( getOpponentName() == "Dratini" or getOpponentName() == "Starly" or getOpponentName() == "Umbreon" ) then
    if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end
    
   elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()    
   else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
   end
end

function normal()
   return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")  or sendAnyPokemon() or attack() or run()
end

function advanceCatch()
       if getActivePokemonNumber() == 1 then
           return sendPokemon(falseswiper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() > 1 ) then
           return weakAttack() or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == sleeper ) and ( getOpponentStatus() ~= "SLEEP" and getOpponentStatus() ~= "PARALIZE" and getOpponentStatus() ~= "POISON" and getOpponentStatus() ~= "BURN" ) and ( getOpponentHealth() == 1 ) then
           return useMove(sleepmove) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() == 1 ) then
           return sendPokemon(sleeper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif getOpponentStatus() == "SLEEP" or getOpponentStatus() == "PARALIZE" or getOpponentStatus() == "POISON" or getOpponentStatus() == "BURN" then
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or attack() or run()
       else
               return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or attack() or run()
       end
end

function fswipe()
       if getActivePokemonNumber() == 1 then
           return sendPokemon(falseswiper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() > 1 ) then
           return weakAttack() or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif getOpponentHealth() == 1 then
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")  or sendAnyPokemon() or attack() or run()
       end
end
function sleep()
       if getActivePokemonNumber() == 1 then
           return sendPokemon(sleeper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or run()
       elseif ( getActivePokemonNumber() == sleeper ) and ( getOpponentStatus() ~= "SLEEP" and getOpponentStatus() ~= "PARALIZE" and getOpponentStatus() ~= "POISON" and getOpponentStatus() ~= "BURN" ) then
           return useMove(sleepmove) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif getOpponentStatus() == "SLEEP" or getOpponentStatus() == "PARALIZE" or getOpponentStatus() == "POISON" or getOpponentStatus() == "BURN" then
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       else
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or attack() or run()
       end    
end
function onBattleMessage(wild)
   
       if stringContains(wild, "A Wild SHINY ") then
       shinyCounter = shinyCounter + 1    
   
   elseif stringContains(wild, "You throw") then
       pokeballCounter = pokeballCounter + 1    
   
       elseif stringContains(wild, "Pokedollar(s)") then
               log("Info ~ Pokedollars earned: "..tostring(getMoney() - startingMoney).." (" ..tostring((getMoney() - startingMoney)/wildCounter).." average)")
   elseif wild == "A Wild [FF9900]Scyther[-] Attacks!" then
       scythercounter = scythercounter + 1
 
   elseif wild == "A Wild [FF9900]Pinsir[-] Attacks!" then
       pinsircounter = pinsircounter + 1
   
   elseif wild == "A Wild [FF9900]Eevee[-] Attacks!" then
       eeveecounter = eeveecounter + 1
   
   elseif wild == "A Wild [FF9900]Bulbasaur[-] Attacks!" then
       bulbacounter = bulbacounter + 1
   
   elseif wild == "A Wild [FF9900]Chansey[-] Attacks!" then
       chanseycounter = chanseycounter + 1

   elseif wild == "A Wild [FF9900]Rhyhorn[-] Attacks!" then
       rhycounter = rhycounter + 1

   elseif wild == "A Wild [FF9900]Kangaskhan[-] Attacks!" then
       kangascounter = kangascounter + 1
   
   elseif wild == "A Wild [FF9900]Umbreon[-] Attacks!" then
       umbreoncounter = umbreoncounter + 1

   elseif wild == "A Wild [FF9900]Starly[-] Attacks!" then
       starlycounter = starlycounter + 1
   elseif stringContains(wild, "A Wild ") then
           wildCounter = wildCounter + 1
   end
     
end

function onPause()
   
   log(" --------------------------------------------")
       log("|--------- CATCH ROUTINE PAUSED ----------|")
       log(" --------------------------------------------")
   log("|--------- Move Remaining Power Points ----------|")
   log("--------------------------------------")
   log("False Swipe: " .. tostring(getRemainingPowerPoints(falseswiper,weakmove)))
   log("Sleep Move: " .. tostring(getRemainingPowerPoints(sleeper,sleepmove)))
   log("-----------------------------------------------------------")
   log("|--------- Pokemon Caught Status ----------|")
   log(" ")
   
   if huntEeveeRhyhorn then
       log("Eevee Caught: " .. eeveecounter)
       log("Rhyhorn Caught: ".. rhycounter)
       
   elseif huntEeveeBulba then
       log("Eevee Caught: " .. eeveecounter)
       log("Bulbasaur Caught: " .. bulbacounter)
       
   elseif huntEeveeChansey then
       log("Eevee Caught: " .. eeveecounter)
       log("Chansey Caught: " .. chanseycounter)
       
   elseif huntEeveeScytherPinsir then
       log("Eevee Caught: " .. eeveecounter)
       log("Scyther Caught: " .. scythercounter)
       log("Pinsir Caught: " .. pinsircounter)
       
   elseif huntEeveeUmbreon then
       log("Eevee Caught: " .. eeveecounter)
       log("Umbreon Caught: " .. umbreoncounter)
       
   elseif huntStarlyUmbreon then
       log("Starly Caught: " .. starlycounter)
       log("Umbreon Caught: " .. umbreoncounter)
       
   elseif huntEeveeMarill then
       log("Eevee Caught: " .. eeveecounter)
       log("Marill Caught: " .. marillcounter)
       
   elseif huntEevee then
       log("Eevee Caught: " .. eeveecounter)
       
   elseif huntScyther then
       log("Scyther Caught: " .. scythercounter)
       
   elseif huntPinsir then
       log("Pinsir Caught: " .. pinsircounter)
       
   elseif huntBulba then
       log("Bulbasaur Caught: " .. bulbacounter)
       
   elseif huntChansey then
       log("Chansey Caught: " .. chanseycounter)
       
   elseif huntRhyhorn then
       log("Rhyhorn Caught: ".. rhycounter)
       
   elseif huntKanga then
       log("Kangaskhan Caught: " .. kangascounter)
       
   elseif huntChanseyBulba then
       log("Chansey Caught: " .. chanseycounter)
       log("Bulbasaur Caught: " .. bulbacounter)
   end
   
   log(" --------------------------------------------")
   log("Pokemons encountered: " .. wildCounter)
   log("-----------------------------------------------------------")
   log("Shinies Caught: " .. shinyCounter)
   log("Pokeball's used: " .. pokeballCounter)
   log("---------------------------------------------")
   log("|--------- Character Information ----------|")
   log(" ")
   log("Times in Pokecenter: " .. pokecenterCounter)
   if huntandfarm or moneyfarm then
        log("Pokedollars earned: "..tostring(getMoney() - startingMoney).." (" ..tostring((getMoney() - startingMoney)/wildCounter).." average)")
       log("-----------------------------------------------------------")
   end
end

function onStop()
   log("-----------------------------------------------------------")
       log("---------------------- Routine Stopped ---------------------")
       log("-----------------------------------------------------------")
   endtime = os.time()
       log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/3600 ).. " hours")
       log("or")
       log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/60 ).. " minutes")
       log("-----------------------------------------------------------")
end



function ceCave()


   if getUsablePokemonCount() > pokeNumber then

       if getMapName() == "Safari Exclusive" then
                   talkToNpcOnCell(21, 3)
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Area 1" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Entrance" then
           talkToNpcOnCell(27, 25)
       elseif getMapName() == "Pokecenter Cerulean" then
           moveToMap("Cerulean City")
       elseif (getPlayerX() == 26 and getPlayerY() == 31) or (getPlayerX() == 9 and getPlayerY() == 49) then
           moveToMap("Route 4")
       elseif getMapName() == "Route 6" then    
           moveToMap("Route 6 Stop House")
       elseif getMapName() == "Safari Stop" or getMapName() == "Pokecenter Fuchsia" then    
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Route 15 Stop House")
       elseif getMapName() == "Route 15 Stop House" then    
           return moveToMap("Route 15")
       elseif getMapName() == "Route 15" then
           moveToMap("Route 14")
       elseif getMapName() == "Route 14" then    
           moveToMap("Route 13")
       elseif getMapName() == "Route 13" then    
           moveToMap("Route 12")
       elseif getMapName() == "Route 12" then    
           moveToMap("Route 11 Stop House")
       elseif getMapName() == "Route 11 Stop House" then    
           moveToMap("Route 11")
       elseif getMapName() == "Route 11" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Pokecenter Vermilion" then    
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then    
           moveToMap("Route 6")
       elseif getMapName() == "Route 6 Stop House" then    
           moveToMap("Saffron City")
       elseif getMapName() == "Saffron City" then    
           moveToMap("Route 5 Stop House")
       elseif getMapName() == "Route 5 Stop House" then    
           moveToMap("Route 5")
       elseif getMapName() == "Route 5" then    
           moveToCell(14, 0)
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Cerulean City" or getMapName() == "Route 4" then
           return  moveToMap("Cerulean Cave 1F") or moveToCell(96, 14)    
       elseif getMapName() == "Cerulean Cave 1F"  then    
           return moveNearExit("Cerulean City")
       end
   else
       if getMapName() == "Cerulean Cave 1F" then
           moveToMap("Cerulean City")
       elseif ( getPlayerX() == 1 and getPlayerY() == 20 ) then
           moveToCell(26, 30)
       elseif getMapName() == "Cerulean City" then    
           return moveToMap("Route 4")
       elseif getMapName() == "Route 4"  then    
           moveToCell(96, 21)
       elseif getMapName() == "Pokecenter Cerulean"  then    
               usePokecenter()
       end
   end
end

function seafoam()

   if getUsablePokemonCount() > pokeNumber then
       
       if getMapName() == "Safari Exclusive" then
                   talkToNpcOnCell(21, 3)
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Safari Area 1" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Entrance" then
           talkToNpcOnCell(27, 25)
       elseif getMapName() == "Safari Stop" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Pokecenter Fuchsia" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Fuchsia City Stop House")
       elseif getMapName() == "Fuchsia City Stop House" then
           moveToMap("Route 19")
       elseif getMapName() == "Route 19" then    
           moveToMap("Route 20")
       elseif getMapName() == "Route 20" then    
           moveToCell(60, 32)
       elseif getMapName() == "Seafoam 1F" then    
           moveToMap("Seafoam B1F")
       elseif getMapName() == "Seafoam B1F" then    
           moveToMap("Seafoam B2F")
       elseif getMapName() == "Seafoam B2F" then    
           moveToMap("Seafoam B3F")
       elseif getMapName() == "Seafoam B3F" then    
           moveToCell(12, 8)
       elseif getMapName() == "Seafoam B4F" then
           moveToRectangle(9,15,13,20)
       end
           
   else
       
       if getMapName() == "Seafoam B4F" then    
           moveToCell(9, 6)
       elseif getMapName() == "Seafoam B3F" then    
           moveToMap("Seafoam B2F")
       elseif getMapName() == "Seafoam B2F" then    
           moveToMap("Seafoam B1F")
       elseif getMapName() == "Seafoam B1F" then    
           moveToMap("Seafoam 1F")
       elseif getMapName() == "Seafoam 1F" then    
           moveToCell(13, 16)
       elseif getMapName() == "Route 20" then    
           moveToMap("Route 19")
       elseif getMapName() == "Route 19" then    
           moveToMap("Fuchsia City Stop House")
       elseif getMapName() == "Fuchsia City Stop House" then    
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then    
           moveToMap("Pokecenter Fuchsia")
           elseif getMapName() == "Pokecenter Fuchsia" then
           usePokecenter()
       end

   end

end

function backtofarm()
   
       if getMapName() == "Cerulean Cave 1F" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean City" then    
           return moveToMap("Route 5") or moveToMap("Route 4")
       elseif getMapName() == "Route 4"  then    
           moveToCell(96, 21)
       elseif getMapName() == "Pokecenter Cerulean" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Pokecenter Vermilion" or getMapName() == "Route 6" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then
           moveToMap("Route 11")
       elseif getMapName() == "Cerulean City" then
           moveToMap("Route 5")
       elseif getMapName() == "Route 5" then
           moveToMap("Route 5 Stop House")
       elseif getMapName() == "Route 5 Stop House" then
           moveToMap("Saffron City")
       elseif getMapName() == "Saffron City" then
           moveToMap("Route 6 Stop House")
       elseif getMapName() == "Route 6 Stop House" then
           moveToMap("Route 6")
       elseif getMapName() == "Cerulean Cave 1F" then
           moveToMap("Cerulean City")
       elseif ( getPlayerX() == 1 and getPlayerY() == 20 ) or ( getPlayerX() == 1 and getPlayerY() == 19 ) then
           moveToMap("Route 5")
       elseif getMapName() == "Cerulean City" then    
           return moveToMap("Route 4")
       elseif getMapName() == "Route 4"  then    
           moveToCell(96, 21)
       elseif getMapName() == "Route 11" then
           moveToMap("Route 11 Stop House")
       elseif getMapName() == "Route 11 Stop House" then
           moveToMap("Route 12")
       elseif getMapName() == "Route 12" then
           moveToCell(24, 92)
       elseif getMapName() == "Route 13" then
           moveToMap("Route 14")
       elseif getMapName() == "Route 14" then
           moveToMap("Route 15")
       elseif getMapName() == "Route 15" then
           moveToMap("Route 15 Stop House")
       elseif getMapName() == "Route 15 Stop House" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Seafoam B4F" then    
           return moveToCell(9, 6)
       elseif getMapName() == "Seafoam B3F" then    
           moveToMap("Seafoam B2F")
       elseif getMapName() == "Seafoam B2F" then    
           moveToMap("Seafoam B1F")
       elseif getMapName() == "Seafoam B1F" then    
           moveToMap("Seafoam 1F")
       elseif getMapName() == "Seafoam 1F" then    
           moveToCell(13, 16)
       elseif getMapName() == "Route 20" then    
           moveToMap("Route 19")
       elseif getMapName() == "Route 19" then    
           moveToMap("Fuchsia City Stop House")
       elseif getMapName() == "Fuchsia City Stop House" then    
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       end
end

Do you use synch pokemon?
 
Reply
I shouldn't have to use one with this script, regardless correct?
 
Reply
can you help me make script like this?:-

My Pokemon
1.Snorlax       - for defend
2.Marowak   - false sweep
3.Butterfree - sleep powder
i make this on script for sleep powder:

sleepmove = "Sleep Powder"        --Set/Change the name of the sleep move --Change to "None" if you don't have
but got error like this :

[11:39:12 AM] Error during the script execution: chunk_2:(505,4-292): cannot convert a nil to a clr type System.Int32

[11:39:12 AM] Bot stopped



4.Ninjask       - cut,flash
5.Golem         - dig,rock smash
6.Ludicolo     - surf,dive

Mount = Bicycle

no sync pokemon

catch target = eevee
 
Reply
(2016-11-22, 03:36:15)genostelar
[11:39:12 AM] Error during the script execution: chunk_2:(505,4-292): cannot convert a nil to a clr type System.Int32

[11:39:12 AM] Bot stopped

Line 505 is:
   elseif sleepPP() and fswipePP() and isPokemonUsable(1) and isPokemonUsable(synchIndex2) and isPokemonUsable(synchIndex3) and isPokemonUsable(falseswiper) and getPokemonHealthPercent(falseswiper) > fswipeHP and getPokemonHealthPercent(sleeper) > sleeperHP and isPokemonUsable(sleeper) then
 So you're missing either 1 or more of these:
synchIndex2
synchIndex3
falseswiper
fswipeHP
sleeper
sleeperHP
 
Reply
(2016-11-22, 14:24:30)Crazy3001
(2016-11-22, 03:36:15)genostelar
[11:39:12 AM] Error during the script execution: chunk_2:(505,4-292): cannot convert a nil to a clr type System.Int32

[11:39:12 AM] Bot stopped

Line 505 is:
   elseif sleepPP() and fswipePP() and isPokemonUsable(1) and isPokemonUsable(synchIndex2) and isPokemonUsable(synchIndex3) and isPokemonUsable(falseswiper) and getPokemonHealthPercent(falseswiper) > fswipeHP and getPokemonHealthPercent(sleeper) > sleeperHP and isPokemonUsable(sleeper) then
 So you're missing either 1 or more of these:
synchIndex2
synchIndex3
falseswiper
fswipeHP
sleeper
sleeperHP
That is why I need help and I didnot want use sync pokemon
 
Reply
Anyone having issues with Hoenn? It was working for a bit and then just randomly stopped:

                         -- Copyright © 2016 redskhie



huntandFarm = false        --set to true if you want to kill all encountered pokes else false
catchUncaught = false        --set to true if you want to catch uncaught pokes else false
catchShiny = true        --set to true if you want to catch encountered shiny's else false


                        -- CATCH CONFIGURATION --CASE INSENSITIVE
            --SINGLE CATCHING

singleCatch = false        --Set to true if you want to catch only 1 Pokes and set multipleCatch to false
    
toHunt = "Torchic"        --Set/Change the name of Pokemon you want to Catch    
huntMap = "Zone 6"        --Set/Change the Map Area of the Pokemon    --OPTIONS: "Zone 1", "Zone 2", "Zone 3", "Zone 4", "Zone 5", "Zone 6"



            --MULTIPLE CATCHING

multipleCatch = true        --Set to true if you want to catch multiple Pokes at Different Time and set singleCatch to false
                --NOTE: PLEASE PROPERLY ARRANGE THE TEAM ACCORDING TO YOUR INPUT CONFIG


            --MORNING TIME CONFIG

toHunt1 = "Litleo"        --Set/Change the name of Pokemon you want to Catch
huntMap1 = "Zone 4"        --Set/Change the Map Area of the 1st Pokemon    --OPTIONS: "Zone 1", "Zone 2", "Zone 3", "Zone 4", "Zone 5", "Zone 6"



synch1 = "Timid "            --Set the Nature of the Synch Poke to Use at Morning
synchIndex1 = 1            --Do not touch this line!

            --DAY TIME CONFIG

toHunt2 = "Riolu"            --Set/Change the name of Pokemon you want to Catch at Noon
huntMap2 = "Zone 3"            --Set/Change the Map Area of the 2nd Pokemon    --OPTIONS: "Zone 1", "Zone 2", "Zone 3", "Zone 4", "Zone 5", "Zone 6"


synch2 = "Adamant"        --Set the Nature of the Synch Poke to Use at Noon
synchIndex2 = 3            --set the Index # of the Synch Poke to Use at Noon, elseif the same leave
            --NIGHT TIME CONFIG

toHunt3 = "Litleo"            --Set/Change the name of Pokemon you want to Catch at Night
huntMap3 = "Zone 4"        --Set/Change the Map Area of the 3rdPokemon    --OPTIONS: "Zone 1", "Zone 2", "Zone 3", "Zone 4", "Zone 5", "Zone 6"


synch3 = "Timid"        --Set the Nature of the Synch Poke to Use at Night        
synchIndex3 = 1        --set the Index # of the Synch Poke to Use at Night, elseif the same leave




    --ADDED HUNT    --Use this if multiple catch is full and you think you can Hunt another poke in the same area

Add = false        --Set to true if you want to catch another pokemon
addHunt1 = "Rhyhorn"    --Set the name of the pokemon
addHunt2 = ""        --Set the name of the pokemon
addHunt3 = ""        --Set the name of the pokemon



fishItem = "Super Rod"        --Set/Change the Name of the Fishing Item you want to Use, Don't leave it blank        --NOT USABLE at HOENN






    -- You can only choose One Special Catching, set true, else leave the 3 false

                                  --use only normalCatchOn if you don't have fswiper and sleeper
                                  --Leave blank at sleepmove/weakmove if you don't have atleast


normalCatchOn = false        --Directly throw pokeballs on hunted pokemons
fswipeOn = true        --Switch to pokemon with false swipe, use false swipe until the hunted pokes hp is reach to 1 then throw pokeballs
sleepOn = true            --Switch to pokemon with sleep move, use sleep move until the hunted pokes status is SLEEPING then throw pokeballs
advanceCatchOn = true        --Use fswipeOn and sleepOn to catch hunted pokes

falseswiper = 2            --Index of pokemon with false swipe
fswipeHP = 10            --Returns the health percent of the false swiper, then heal to PC
weakmove = "False Swipe"    --False Swipe move --If you have no false swiper change to "None"

sleeper = 2            --Index of pokemon with sleep move
sleeperHP = 10            --Returns the health percent of the false swiper, then heal to PC
sleepmove = "Spore"        --Set/Change the name of the sleep move --If you have no sleeper change to "None"



            --MOUNTING CONFIGURATION


   -- Set/Change the name of the mount you want to use on LAND

mount = "Bicycle"

   -- Set/Change to true if you want to use mount,else false

mountSwitch = true









        --WARNING!!! DO NOT TOUCH THE CODES BELOW!!!


                     -- Copyright © 2016 redskhie
            --List of Pokemon to Catch

    local ZoneOneList = {"Pikachu", "Treecko", "Girafarig", "Natu", "Wobuffet", "Buneary"}
    local ZoneTwoList = {"Natu", "Beldum"}
    local ZoneThreeList = {"Riolu", "Rhyhorn", "Heracross"}
    local ZoneFourList = {"Litleo", "Heracross", "Stantler", "Donphan", "Pinsir"}
    local ZoneFiveList = {"Gligar", "Aipom", "Mareep", "Snubbull"}
    local ZoneFiveSurfList = {"Mudkip", "Remoraid", "Marill", "Octillery"}
    local ZoneSixList = {"Torchic", "Aipom", "Houndour", "Teddiursa", "Pineco", "Miltank"}
        
                     -- Copyright © 2016 redskhie



name = "All in One Catcher at Hoenn Safari"
author = "redskhie"
description = [[This script will catch your desired Pokemons at Hoenn Safari]]



function List5()

for _,ZoneFiveList in pairs(ZoneFiveList) do
 if (singleCatch and ZoneFiveList == toHunt) or (multipleCatch and isMorning() and ZoneFiveList == toHunt1) or (multipleCatch and isNoon() and ZoneFiveList == toHunt2) or (multipleCatch and isNight() and ZoneFiveList == toHunt3) then
       moveToGrass()
   break
 end
end

for _,ZoneFiveSurfList in pairs(ZoneFiveSurfList) do
 if (singleCatch and ZoneFiveSurfList == toHunt) or (multipleCatch and isMorning() and ZoneFiveSurfList == toHunt1) or (multipleCatch and isNoon() and ZoneFiveSurfList == toHunt2) or (multipleCatch and isNight() and ZoneFiveSurfList == toHunt3) then
       moveToWater()
   break
 end
end

end

 
function pc()

    if getMapName() == "Lilycove City" then
               moveToMap("Pokecenter Lilycove City")
       elseif getMapName() == "Route 121" then
               moveToMap("Lilycove City")
       elseif getMapName() == "Hoenn Safari Zone Lobby" then
               moveToMap("Route 121")
    elseif getMapName() == "Hoenn Safari Zone Area 6" then
        moveToMap("Hoenn Safari Zone Area 5")
    elseif getMapName() == "Hoenn Safari Zone Area 3" then
        moveToMap("Hoenn Safari Zone Area 4")
    elseif getMapName() == "Hoenn Safari Zone Area 5" or getMapName() == "Hoenn Safari Zone Area 4" then
        moveToMap("Hoenn Safari Zone Area 1")
    elseif getMapName() == "Hoenn Safari Zone Area 1" then
        moveToCell(23,48)
       elseif getMapName() == "Hoenn Safari Zone Area 2" then
        moveToMap("Hoenn Safari Zone Area 1")
       elseif getMapName() == "Pokecenter Lilycove City" then
           usePokecenter()
       end
       
end

function Zone1()

    if getMapName() == "Pokecenter Lilycove City" then
               moveToMap("Lilycove City")
       elseif getMapName() == "Lilycove City" then
               moveToMap("Route 121")
       elseif getMapName() == "Route 121" then
               moveToMap("Hoenn Safari Zone Lobby")
       elseif getMapName() == "Hoenn Safari Zone Lobby" then
               talkToNpcOnCell(21, 6)
    elseif getMapName() == "Hoenn Safari Zone Area 6" then
        moveToMap("Hoenn Safari Zone Area 5")
    elseif getMapName() == "Hoenn Safari Zone Area 3" then
        moveToMap("Hoenn Safari Zone Area 4")
    elseif getMapName() == "Hoenn Safari Zone Area 5" or getMapName() == "Hoenn Safari Zone Area 4" or getMapName() == "Hoenn Safari Zone Area 2" then
        moveToMap("Hoenn Safari Zone Area 1")
       elseif getMapName() == "Hoenn Safari Zone Area 1" then
               moveToGrass()
       end

end

function Zone2()

    if getMapName() == "Pokecenter Lilycove City" then
               moveToMap("Lilycove City")
       elseif getMapName() == "Lilycove City" then
               moveToMap("Route 121")
       elseif getMapName() == "Route 121" then
               moveToMap("Hoenn Safari Zone Lobby")
       elseif getMapName() == "Hoenn Safari Zone Lobby" then
               talkToNpcOnCell(21, 6)
    elseif getMapName() == "Hoenn Safari Zone Area 6" then
        moveToMap("Hoenn Safari Zone Area 5")
    elseif getMapName() == "Hoenn Safari Zone Area 3" then
        moveToMap("Hoenn Safari Zone Area 4")
    elseif getMapName() == "Hoenn Safari Zone Area 5" or getMapName() == "Hoenn Safari Zone Area 4" then
        moveToMap("Hoenn Safari Zone Area 1")
    elseif getMapName() == "Hoenn Safari Zone Area 1" then
        moveToMap("Hoenn Safari Zone Area 2")
       elseif getMapName() == "Hoenn Safari Zone Area 2" then
               moveToGrass()
       end

end
function Zone3()

    if getMapName() == "Pokecenter Lilycove City" then
               moveToMap("Lilycove City")
       elseif getMapName() == "Lilycove City" then
               moveToMap("Route 121")
       elseif getMapName() == "Route 121" then
               moveToMap("Hoenn Safari Zone Lobby")
       elseif getMapName() == "Hoenn Safari Zone Lobby" then
               talkToNpcOnCell(21, 6)
    elseif getMapName() == "Hoenn Safari Zone Area 6" then
        moveToMap("Hoenn Safari Zone Area 5")
    elseif getMapName() == "Hoenn Safari Zone Area 4" then
        moveToMap("Hoenn Safari Zone Area 3")
    elseif getMapName() == "Hoenn Safari Zone Area 5" or getMapName() == "Hoenn Safari Zone Area 2" then
        moveToMap("Hoenn Safari Zone Area 1")
    elseif getMapName() == "Hoenn Safari Zone Area 1" then
        moveToMap("Hoenn Safari Zone Area 4")
       elseif getMapName() == "Hoenn Safari Zone Area 3" then
               moveToGrass()
       end

end
function Zone4()

    if getMapName() == "Pokecenter Lilycove City" then
               moveToMap("Lilycove City")
       elseif getMapName() == "Lilycove City" then
               moveToMap("Route 121")
       elseif getMapName() == "Route 121" then
               moveToMap("Hoenn Safari Zone Lobby")
       elseif getMapName() == "Hoenn Safari Zone Lobby" then
               talkToNpcOnCell(21, 6)
    elseif getMapName() == "Hoenn Safari Zone Area 6" then
        moveToMap("Hoenn Safari Zone Area 5")
    elseif getMapName() == "Hoenn Safari Zone Area 3" then
        moveToMap("Hoenn Safari Zone Area 4")
    elseif getMapName() == "Hoenn Safari Zone Area 5" or getMapName() == "Hoenn Safari Zone Area 2" then
        moveToMap("Hoenn Safari Zone Area 1")
    elseif getMapName() == "Hoenn Safari Zone Area 1" then
        moveToMap("Hoenn Safari Zone Area 4")
       elseif getMapName() == "Hoenn Safari Zone Area 4" then
               moveToGrass()
       end

end

function Zone5()

    if getMapName() == "Pokecenter Lilycove City" then
               moveToMap("Lilycove City")
       elseif getMapName() == "Lilycove City" then
               moveToMap("Route 121")
       elseif getMapName() == "Route 121" then
               moveToMap("Hoenn Safari Zone Lobby")
       elseif getMapName() == "Hoenn Safari Zone Lobby" then
               talkToNpcOnCell(21, 6)
    elseif getMapName() == "Hoenn Safari Zone Area 6" then
        moveToMap("Hoenn Safari Zone Area 5")
    elseif getMapName() == "Hoenn Safari Zone Area 3" then
        moveToMap("Hoenn Safari Zone Area 4")
    elseif getMapName() == "Hoenn Safari Zone Area 2" or getMapName() == "Hoenn Safari Zone Area 4" then
        moveToMap("Hoenn Safari Zone Area 1")
    elseif getMapName() == "Hoenn Safari Zone Area 1" then
        moveToMap("Hoenn Safari Zone Area 5")
       elseif getMapName() == "Hoenn Safari Zone Area 5" then
               List5()
       end


end

function Zone6()

    if getMapName() == "Pokecenter Lilycove City" then
               moveToMap("Lilycove City")
       elseif getMapName() == "Lilycove City" then
               moveToMap("Route 121")
       elseif getMapName() == "Route 121" then
               moveToMap("Hoenn Safari Zone Lobby")
       elseif getMapName() == "Hoenn Safari Zone Lobby" then
               talkToNpcOnCell(21, 6)
    elseif getMapName() == "Hoenn Safari Zone Area 5" then
        moveToMap("Hoenn Safari Zone Area 6")
    elseif getMapName() == "Hoenn Safari Zone Area 3" then
        moveToMap("Hoenn Safari Zone Area 4")
    elseif getMapName() == "Hoenn Safari Zone Area 2" or getMapName() == "Hoenn Safari Zone Area 4" then
        moveToMap("Hoenn Safari Zone Area 1")
    elseif getMapName() == "Hoenn Safari Zone Area 1" then
        moveToMap("Hoenn Safari Zone Area 5")
       elseif getMapName() == "Hoenn Safari Zone Area 6" then
               moveToGrass()
       end


end

function natureSwap()
    
    if synch1 ~= synch2 and synch2 ~= synch3 then
    
    if isMorning() and getPokemonNature(synchIndex1) == synch3 and getPokemonNature(synchIndex2) == synch1 and getPokemonNature(synchIndex3) == synch2 then
        return swapPokemon(synchIndex1, synchIndex2)
    elseif isMorning() and getPokemonNature(synchIndex1) == synch3 and getPokemonNature(synchIndex2) == synch2 and getPokemonNature(synchIndex3) == synch1 then
        return swapPokemon(synchIndex1, synchIndex3)
    elseif isMorning() and getPokemonNature(synchIndex1) == synch1 then

        if huntMap1 == "Zone 1" then
            Zone1()
        elseif huntMap1 == "Zone 2" then
            Zone2()
        elseif huntMap1 == "Zone 3" then
            Zone3()
        elseif huntMap1 == "Zone 4" then
            Zone4()
        elseif huntMap1 == "Zone 5" then
            Zone5()
        elseif huntMap1 == "Zone 6" then
            Zone6()
        end

    end

    if isNoon() and getPokemonNature(synchIndex1) == synch1 and getPokemonNature(synchIndex2) == synch2 and getPokemonNature(synchIndex3) == synch3 then
        return swapPokemon(synchIndex1, synchIndex2)
    elseif isNoon() and getPokemonNature(synchIndex1) == synch1 and getPokemonNature(synchIndex2) == synch3 and getPokemonNature(synchIndex3) == synch2 then
        return swapPokemon(synchIndex1, synchIndex3)
    elseif isNoon() and getPokemonNature(synchIndex1) == synch2 then

        if huntMap2 == "Zone 1" then
            Zone1()
        elseif huntMap2 == "Zone 2" then
            Zone2()
        elseif huntMap2 == "Zone 3" then
            Zone3()
        elseif huntMap2 == "Zone 4" then
            Zone4()
        elseif huntMap2 == "Zone 5" then
            Zone5()
        elseif huntMap2 == "Zone 6" then
            Zone6()
        end
    end
    
    if isNight() and getPokemonNature(synchIndex1) == synch2 and getPokemonNature(synchIndex2) == synch3 and getPokemonNature(synchIndex3) == synch1 then
        return swapPokemon(synchIndex1, synchIndex2)
    elseif isNight() and getPokemonNature(synchIndex1) == synch2 and getPokemonNature(synchIndex2) == synch1 and getPokemonNature(synchIndex3) == synch3 then
        return swapPokemon(synchIndex1, synchIndex3)
    elseif isNight() and getPokemonNature(synchIndex1) == synch3 then

        if huntMap3 == "Zone 1" then
            Zone1()
        elseif huntMap3 == "Zone 2" then
            Zone2()
        elseif huntMap3 == "Zone 3" then
            Zone3()
        elseif huntMap3 == "Zone 4" then
            Zone4()
        elseif huntMap3 == "Zone 5" then
            Zone5()
        elseif huntMap3 == "Zone 6" then
            Zone6()
        end
    end
    
    elseif synch1 == synch2 and synch2 ~= synch3 then
    
    if isMorning() and getPokemonNature(1) ~= synch1 then
        return swapPokemon(synchIndex1, synchIndex3)
    elseif isMorning() and getPokemonNature(1) == synch1 then
        if huntMap1 == "Zone 1" then
            Zone1()
        elseif huntMap1 == "Zone 2" then
            Zone2()
        elseif huntMap1 == "Zone 3" then
            Zone3()
        elseif huntMap1 == "Zone 4" then
            Zone4()
        elseif huntMap1 == "Zone 5" then
            Zone5()
        elseif huntMap1 == "Zone 6" then
            Zone6()
        end
    end
    if isNoon() and getPokemonNature(1) ~= synch2 then
        return swapPokemon(synchIndex2, synchIndex3)
    elseif isNoon() and getPokemonNature(1) == synch2 then
        if huntMap2 == "Zone 1" then
            Zone1()
        elseif huntMap2 == "Zone 2" then
            Zone2()
        elseif huntMap2 == "Zone 3" then
            Zone3()
        elseif huntMap2 == "Zone 4" then
            Zone4()
        elseif huntMap2 == "Zone 5" then
            Zone5()
        elseif huntMap2 == "Zone 6" then
            Zone6()
        end
    end
    if isNight() and getPokemonNature(1) ~= synch3 then
        return swapPokemon(synchIndex2, synchIndex3)
    elseif isNight() and getPokemonNature(1) == synch3 then
        if huntMap3 == "Zone 1" then
            Zone1()
        elseif huntMap3 == "Zone 2" then
            Zone2()
        elseif huntMap3 == "Zone 3" then
            Zone3()
        elseif huntMap3 == "Zone 4" then
            Zone4()
        elseif huntMap3 == "Zone 5" then
            Zone5()
        elseif huntMap3 == "Zone 6" then
            Zone6()
        end
    end
    
    elseif synch1 == synch3 and synch2 ~= synch3 then
    
    if isMorning() and getPokemonNature(1) ~= synch1 then
        return swapPokemon(synchIndex1, synchIndex2)
    elseif isMorning() and getPokemonNature(1) == synch1 then
        if huntMap1 == "Zone 1" then
            Zone1()
        elseif huntMap1 == "Zone 2" then
            Zone2()
        elseif huntMap1 == "Zone 3" then
            Zone3()
        elseif huntMap1 == "Zone 4" then
            Zone4()
        elseif huntMap1 == "Zone 5" then
            Zone5()
        elseif huntMap1 == "Zone 6" then
            Zone6()
        end
    end
    if isNoon() and getPokemonNature(1) ~= synch2 then
        return swapPokemon(synchIndex2, synchIndex1)
    elseif isNoon() and getPokemonNature(1) == synch2 then
        if huntMap2 == "Zone 1" then
            Zone1()
        elseif huntMap2 == "Zone 2" then
            Zone2()
        elseif huntMap2 == "Zone 3" then
            Zone3()
        elseif huntMap2 == "Zone 4" then
            Zone4()
        elseif huntMap2 == "Zone 5" then
            Zone5()
        elseif huntMap2 == "Zone 6" then
            Zone6()
        end
    end
    if isNight() and getPokemonNature(1) ~= synch3 then
        return swapPokemon(synchIndex2, synchIndex3)
    elseif isNight() and getPokemonNature(1) == synch3 then
        if huntMap3 == "Zone 1" then
            Zone1()
        elseif huntMap3 == "Zone 2" then
            Zone2()
        elseif huntMap3 == "Zone 3" then
            Zone3()
        elseif huntMap3 == "Zone 4" then
            Zone4()
        elseif huntMap3 == "Zone 5" then
            Zone5()
        elseif huntMap3 == "Zone 6" then
            Zone6()
        end
    end
    
    elseif synch1 == synch3 and synch2 == synch3 then
    
    if isMorning() and getPokemonNature(1) == synch1 then
        if huntMap1 == "Zone 1" then
            Zone1()
        elseif huntMap1 == "Zone 2" then
            Zone2()
        elseif huntMap1 == "Zone 3" then
            Zone3()
        elseif huntMap1 == "Zone 4" then
            Zone4()
        elseif huntMap1 == "Zone 5" then
            Zone5()
        elseif huntMap1 == "Zone 6" then
            Zone6()
        end
    end
    if isNoon() and getPokemonNature(1) == synch2 then
        if huntMap2 == "Zone 1" then
            Zone1()
        elseif huntMap2 == "Zone 2" then
            Zone2()
        elseif huntMap2 == "Zone 3" then
            Zone3()
        elseif huntMap2 == "Zone 4" then
            Zone4()
        elseif huntMap2 == "Zone 5" then
            Zone5()
        elseif huntMap2 == "Zone 6" then
            Zone6()
        end
    end
    if isNight() and getPokemonNature(1) == synch3 then
        if huntMap3 == "Zone 1" then
            Zone1()
        elseif huntMap3 == "Zone 2" then
            Zone2()
        elseif huntMap3 == "Zone 3" then
            Zone3()
        elseif huntMap3 == "Zone 4" then
            Zone4()
        elseif huntMap3 == "Zone 5" then
            Zone5()
        elseif huntMap3 == "Zone 6" then
            Zone6()
        end
    end
    
    end
    
end
function sleepPP()
    if sleepmove == "Hypnosis" or sleepmove == "Spore" or sleepmove == "Sleep Powder" or sleepmove ~= "None" then
        return getRemainingPowerPoints(sleeper, sleepmove) >= 1
    elseif sleepmove == "None" then
        isPokemonUsable(sleeper)
    end
end
function fswipePP()
    if weakmove == "False Swipe" or weakmove ~= "None" then
        return getRemainingPowerPoints(falseswiper, weakmove) >= 1
    elseif weakmove == "None" then
        isPokemonUsable(falseswiper)
    end
end

function onPathAction()
    if not isMounted() and mountSwitch == true and hasItem(mount) and not isSurfing() and isOutside() then
       log("---------------------------")
       log("~~~ Riding on my pet!!! ~~~")
       log("---------------------------")
               return useItem(mount)

    elseif sleepPP() and fswipePP() and isPokemonUsable(1) and isPokemonUsable(synchIndex2) and isPokemonUsable(synchIndex3) and isPokemonUsable(falseswiper) and getPokemonHealthPercent(falseswiper) > fswipeHP and getPokemonHealthPercent(sleeper) > sleeperHP and isPokemonUsable(sleeper) then
   
        if singleCatch then
            if huntMap == "Zone 1" then
                Zone1()
            elseif huntMap == "Zone 2" then
                Zone2()
            elseif huntMap == "Zone 3" then
                Zone3()
            elseif huntMap == "Zone 4" then
                Zone4()
            elseif huntMap == "Zone 5" then
                Zone5()
            elseif huntMap == "Zone 6" then
                Zone6()
            end
        elseif multipleCatch then
            natureSwap()
        end
    else
        pc()
    end

end

function onBattleAction()

    if isWildBattle() and ((catchShiny and isOpponentShiny()) or (catchUncaught and not isAlreadyCaught())) then
        if fswipeOn then
              log("-------- Commencing False Swipe --------")
                   fswipe()
           elseif sleepOn then
               log("-------- Commencing Sleep Move --------")
                   sleep()
           elseif advanceCatchOn then
               log("-------- Commencing False Swipe with Sleep Move --------")
                   advanceCatch()
           elseif normalCatchOn then
               log("-------- Starting to throw Pokeballs --------")
                   normal()  
        end
    elseif isWildBattle() and getOpponentName() == "Beldum" then
               log("-------- Commencing Sleep Move --------")
                   sleep()
    elseif singleCatch and getOpponentName() == toHunt then
        if fswipeOn then
              log("-------- Commencing False Swipe --------")
                   fswipe()
           elseif sleepOn then
               log("-------- Commencing Sleep Move --------")
                   sleep()
           elseif advanceCatchOn then
               log("-------- Commencing False Swipe with Sleep Move --------")
                   advanceCatch()
           elseif normalCatchOn then
               log("-------- Starting to throw Pokeballs --------")
                   normal()  
        end
    elseif multipleCatch and (getOpponentName() == toHunt1 or getOpponentName() == toHunt2 or getOpponentName() == toHunt3) then
        if fswipeOn then
              log("-------- Commencing False Swipe --------")
                   fswipe()
           elseif sleepOn then
               log("-------- Commencing Sleep Move --------")
                   sleep()
           elseif advanceCatchOn then
               log("-------- Commencing False Swipe with Sleep Move --------")
                   advanceCatch()
           elseif normalCatchOn then
               log("-------- Starting to throw Pokeballs --------")
                   normal()  
        end
    elseif Add and (getOpponentName() == addHunt1 or getOpponentName() == addHunt2 or getOpponentName() == addHunt3) then
        if fswipeOn then
              log("-------- Commencing False Swipe --------")
                   fswipe()
           elseif sleepOn then
               log("-------- Commencing Sleep Move --------")
                   sleep()
           elseif advanceCatchOn then
               log("-------- Commencing False Swipe with Sleep Move --------")
                   advanceCatch()
           elseif normalCatchOn then
               log("-------- Starting to throw Pokeballs --------")
                   normal()  
        end
    elseif huntandFarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
    elseif (getOpponentName() == "Wobbuffet" ) then
        
        return attack() or sendAnyPokemon()
    else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
       end
    
end

function normal()
   return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")  or sendAnyPokemon() or attack() or run()
end

function advanceCatch()
       if getActivePokemonNumber() == 1 then
           return sendPokemon(falseswiper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() > 1 ) then
           return weakAttack() or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == sleeper ) and ( getOpponentStatus() ~= "SLEEP" and getOpponentStatus() ~= "PARALIZE" and getOpponentStatus() ~= "POISON" and getOpponentStatus() ~= "BURN" ) and ( getOpponentHealth() == 1 ) then
           return useMove(sleepmove) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() == 1 ) then
           return sendPokemon(sleeper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif getOpponentStatus() == "SLEEP" or getOpponentStatus() == "PARALIZE" or getOpponentStatus() == "POISON" or getOpponentStatus() == "BURN" then
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or attack() or run()
       else
               return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or attack() or run()
       end
end

function fswipe()
       if getActivePokemonNumber() == 1 then
           return sendPokemon(falseswiper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() > 1 ) then
           return weakAttack() or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif getOpponentHealth() == 1 then
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")  or sendAnyPokemon() or attack() or run()
       end
end
function sleep()
       if getActivePokemonNumber() == 1 then
           return sendPokemon(sleeper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or run()
       elseif ( getActivePokemonNumber() == sleeper ) and ( getOpponentStatus() ~= "SLEEP" and getOpponentStatus() ~= "PARALIZE" and getOpponentStatus() ~= "POISON" and getOpponentStatus() ~= "BURN" ) then
           return useMove(sleepmove) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif getOpponentStatus() == "SLEEP" or getOpponentStatus() == "PARALIZE" or getOpponentStatus() == "POISON" or getOpponentStatus() == "BURN" then
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
     
       end    
end


    
function onStart()

    startime = os.time()
       shinyCounter = 0
    pokecenterCounter = 0
       wildCounter = 0    
    pokeballCounter = 0
    startMoney = getMoney()
    poke1 = 0
    poke2 = 0
    poke3 = 0
    poke = 0
    add1 = 0
    add2 = 0
    add3 = 0
    log("-----------------------------------------------------------")
       log("|---- We are now Commencing the Catch Routine ----|")
       log("-----------------------------------------------------------")
    if multipleCatch then
        log("-------- MULTI-CATCHING STARTED --------")
           log("-------- Script Information --------")
        log("~~~HUNTED POKEMONS~~~")
        log("-Morning Time: "..toHunt1.."- -Location: Hoenn Safari "..huntMap1.." -")
        log("-Day Time: "..toHunt2.."- -Location: Hoenn Safari "..huntMap2.." -")
        log("-Night Time: "..toHunt3.."- -Location: Hoenn Safari "..huntMap3.." -")
           log("--------------------------------------")
    elseif singleCatch then
        log("-------- SINGLE-CATCHING STARTED --------")
              log("-------- Script Information --------")
        log("-We will hunt "..toHunt.." all Day!!!- -Location: Hoenn Safari "..huntMap.." -")
           log("--------------------------------------")
    end
    

end
function onDialogMessage(pokecenter)
   if stringContains(pokecenter, "Would you like me to heal your Pokemon?") then
       pokecenterCounter = pokecenterCounter + 1
   end
end
function onBattleMessage(wild)
   
   if stringContains(wild, "A Wild SHINY ") then
       shinyCounter = shinyCounter + 1    
   
   elseif stringContains(wild, "You throw") then
       pokeballCounter = pokeballCounter + 1    
   
   elseif wild == "A Wild [FF9900]"..toHunt.."[-] Attacks!" then
       poke = poke + 1
 
   elseif wild == "A Wild [FF9900]"..toHunt1.."[-] Attacks!" then
       poke1 = poke1 + 1
    
   elseif wild == "A Wild [FF9900]"..toHunt2.."[-] Attacks!" then
       poke2 = poke2 + 1

   elseif wild == "A Wild [FF9900]"..toHunt3.."[-] Attacks!" then
       poke3 = poke3 + 1

   elseif stringContains(wild, "A Wild ") then
           wildCounter = wildCounter + 1
   end
     
end
    

    
function onPause()
   
       log(" --------------------------------------------")
       log("|--------- CATCH ROUTINE PAUSED ----------|")
       log(" --------------------------------------------")
    log("|--------- Move Remaining Power Points ----------|")
       log("--------------------------------------")
       log("False Swipe: " .. tostring(getRemainingPowerPoints(falseswiper,weakmove)))
       log("Sleep Move: " .. tostring(getRemainingPowerPoints(sleeper,sleepmove)))
       log("-----------------------------------------------------------")
       
       log(" ")
    if multipleCatch then
        log("-------- MULTI-CATCHING Status --------")
           log(" ")
        log("~~~HUNTED POKEMONS~~~")
        log("- "..toHunt1..": "..poke1)
        log("- "..toHunt2..": "..poke2)
        log("- "..toHunt3..": "..poke3)
           log("--------------------------------------")
    elseif singleCatch then
        log("-------- SINGLE-CATCHING Status --------")
              log(" ")
        log("- "..toHunt..": "..poke)
           log("--------------------------------------")
    end
    
    
    log(" --------------------------------------------")
       log("Pokeball's used: " .. pokeballCounter)
       log("-----------------------------------------------------------")
       log("Shinies Caught: " .. shinyCounter)
    log("Pokemons encountered: " .. wildCounter)
       log("---------------------------------------------")
    log("Times in Pokecenter: " .. pokecenterCounter)
    if huntandFarm then
        log("Pokedollars earned: "..tostring(getMoney() - startMoney))
    end
    log("---------------------------------------------")
end

function onStop()
   log("-----------------------------------------------------------")
       log("---------------------- Routine Stopped ---------------------")
       log("-----------------------------------------------------------")
   endtime = os.time()
       log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/3600 ).. " hours")
       log("or")
       log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/60 ).. " minutes")
       log("-----------------------------------------------------------")
end
 
Reply
Thumbs Down 
(2016-08-26, 02:13:34)redskhie
[Image: Ot71ir0.png]
[Image: 0yzLcOr.png]
  • Johto Safari Script Lua
  • Catch your desired Pokemons
  • Single Catching at All Time
  • Multiple Catching Features at Different Time
  • Synchronize Features
  • False Swipe, Sleep, Normal or Both False Swipe/Sleep Catch
  • Mounting Features
  • Hunt and Farm Features
  • Kanto Safari Script Added at Git     --May be Re-coded the whole script soon     Old Link: https://proshine-bot.com/thread-1145.html
  • Hoenn Safari Script    ETA: UNKNOWN
  • HOENN SAFARI SCRIPT RELEASED!
[Image: 1rwnoPa.png]
08-26-2016 ~ Initial Release
08-26-2016 ~ Johto and Kanto Safari Script at Github
08-27-2016 ~ Johto Safari Script Swapping Method FIXED!
08-27-2016 ~ HOENN SAFARI RELEASED!
09-17-2016 ~ Adjusted the script for getRemainingPP code
09-17-2016 ~ Hoenn and Johto Safari Script Bug fixes
09-18-2016 ~ Bug fixes

[Image: BycFZM4.png]

[Image: 0X5dKRy.png]

[Image: 479Ub0l.png]

PLEASE REPORT YOUR ENCOUNTERED BUG/ERROR with DETAILS.... Ciao!!!
[Image: Y9wNr6X.png]


@Edit
Kanto Safari, buggy into the pokecenter, repeating the actions


Quote[12:39:32] Have a nice morning!
[12:39:35] Good morning, Gutavo160!
[12:39:35] Welcome to Fuchsia City Pokemon Center.
[12:39:35] Would you like me to heal your Pokemon?
[12:39:37] Okay, let me take a look at those Pokemon.
[12:39:43] There you go, take care of them!
[12:39:43] Have a nice morning!
[12:39:46] Good morning, Gutavo160!
[12:39:46] Welcome to Fuchsia City Pokemon Center.
[12:39:46] Would you like me to heal your Pokemon?
[12:39:48] Okay, let me take a look at those Pokemon.
[12:39:55] There you go, take care of them!
[12:39:55] Have a nice morning!
[12:39:57] Good morning, Gutavo160!
[12:39:57] Welcome to Fuchsia City Pokemon Center.
[12:39:57] Would you like me to heal your Pokemon?
[12:39:59] Okay, let me take a look at those Pokemon.
[12:40:06] There you go, take care of them!
[12:40:06] Have a nice morning!
[12:40:10] Good morning, Gutavo160!
[12:40:10] Welcome to Fuchsia City Pokemon Center.
[12:40:10] Would you like me to heal your Pokemon?
[12:40:12] Okay, let me take a look at those Pokemon.
[12:40:18] There you go, take care of them!
[12:40:18] Have a nice morning!
[12:40:21] Good morning, Gutavo160!
[12:40:21] Welcome to Fuchsia City Pokemon Center.
[12:40:21] Would you like me to heal your Pokemon?
[12:40:23] Okay, let me take a look at those Pokemon.
[12:40:30] There you go, take care of them!
[12:40:30] Have a nice morning!
[12:40:33] Good morning, Gutavo160!
[12:40:33] Welcome to Fuchsia City Pokemon Center.
[12:40:33] Would you like me to heal your Pokemon?
[12:40:36] Okay, let me take a look at those Pokemon.
[12:40:43] There you go, take care of them!
[12:40:43] Have a nice morning!
[12:40:46] Good morning, Gutavo160!
[12:40:46] Welcome to Fuchsia City Pokemon Center.
[12:40:46] Would you like me to heal your Pokemon?
[12:40:49] Okay, let me take a look at those Pokemon.
[12:40:56] There you go, take care of them!
[12:40:56] Have a nice morning!
[12:40:59] Good morning, Gutavo160!
[12:40:59] Welcome to Fuchsia City Pokemon Center.
[12:40:59] Would you like me to heal your Pokemon?
[12:41:03] Okay, let me take a look at those Pokemon.
[12:41:10] There you go, take care of them!
[12:41:10] Have a nice morning!
[12:41:14] Good morning, Gutavo160!
[12:41:14] Welcome to Fuchsia City Pokemon Center.
[12:41:14] Would you like me to heal your Pokemon?
[12:41:17] Okay, let me take a look at those Pokemon.
[12:41:22] There you go, take care of them!
[12:41:22] Have a nice morning!
[12:41:24] Good morning, Gutavo160!
[12:41:24] Welcome to Fuchsia City Pokemon Center.
[12:41:24] Would you like me to heal your Pokemon?
[12:41:27] Okay, let me take a look at those Pokemon.
[12:41:33] There you go, take care of them!
[12:41:33] Have a nice morning!
[12:41:35] Good morning, Gutavo160!
[12:41:35] Welcome to Fuchsia City Pokemon Center.
[12:41:35] Would you like me to heal your Pokemon?
[12:41:39] Okay, let me take a look at those Pokemon.
[12:41:44] There you go, take care of them!
[12:41:44] Have a nice morning!
[12:41:47] Good morning, Gutavo160!
[12:41:47] Welcome to Fuchsia City Pokemon Center.
[12:41:47] Would you like me to heal your Pokemon?
[12:41:50] Okay, let me take a look at those Pokemon.
[12:41:54] There you go, take care of them!
[12:41:54] Have a nice morning!
[12:41:56] Bot paused
[12:41:56]  --------------------------------------------
[12:41:56] |--------- CATCH ROUTINE PAUSED ----------|
[12:41:56]  --------------------------------------------
[12:41:56] |--------- Move Remaining Power Points ----------|
[12:41:56] --------------------------------------
[12:41:56] False Swipe: 40
[12:41:56] error: getRemainingPowerPoints: the pokémon 4 does not have a move called 'NONE'.
[12:41:56] Bot stopped
[12:41:56] -----------------------------------------------------------
[12:41:56] ---------------------- Routine Stopped ---------------------
[12:41:56] -----------------------------------------------------------
[12:41:56] Bot running time: 0.36 hours
[12:41:56] or
[12:41:56] Bot running time: 21.68 minutes
[12:41:56] -----------------------------------------------------------
[12:41:56] Sleep Move: 0
[12:41:56] -----------------------------------------------------------
[12:41:56] |--------- Pokemon Caught Status ----------|
[12:41:56]  
[12:41:56] Eevee Caught: 0
[12:41:56] Bulbasaur Caught: 0
[12:41:56]  --------------------------------------------
[12:41:56] Pokemons encountered: 0
[12:41:56] -----------------------------------------------------------
[12:41:56] Shinies Caught: 0
[12:41:56] Pokeball's used: 0
[12:41:56] ---------------------------------------------
[12:41:56] |--------- Character Information ----------|
[12:41:56]  
[12:41:56] Times in Pokecenter: 104
 
Reply
Pokecenter loop any fix? Was looking to catch just eevee's
                           -- Copyright © 2016 redskhie


       --CHOOSE WHAT POKEMON DO YOU WANT TO HUNT
       -- WARNING!!! YOU CAN ONLY PICK 1 "true" then leave "false"

   -- Set to true if you want to catch this Pokemon, else leave false

huntEevee = true        --hunt Eevee all time    
huntScyther = false        --hunt Scyther all time
huntPinsir = false        --hunt Pinsir all time
huntBulba = false        --hunt Bulbasaur all time
huntChansey = false        --hunt Chansey all time
huntRhyhorn = false        --hunt Rhyhorn all time
huntKanga = true        --hunt Kangaskhan all time
huntChanseyBulba = false        --hunt Chansey and Bulbasaur all time


   -- If you want to use this Go to Synchronize Section after picking 1 at the bottom
   -- Set to true if you want to catch multiple Pokemon at multiple time, else leave false

huntEeveeRhyhorn = false    --hunt Eevee at Morning and Day        -- hunt Rhyhorn at Night
huntEeveeBulba = false         --hunt Eevee at Morning and Day     -- hunt Bulbasaur at Night
huntEeveeChansey = false    --hunt Eevee at Morning and Day        -- hunt Chansey at Night
huntEeveeScytherPinsir = false     --hunt Eevee at Morning and Day     -- hunt Scyther and Pinsir at Night

   --You can only use this if you have MEMBERSHIP

       --UNTESTED

huntEeveeUmbreon = false    --hunt Eevee at Morning and Day        -- hunt Umbreon at Night
huntEeveeMarill = false        --hunt Eevee at Morning and Day         -- hunt Marill at Night
huntStarlyUmbreon = false        --hunt Starly at Morning and Day    -- hunt Umbreon at Night
huntDratiniStarlyUmbreon = false        --hunt Dratini at Morning     --hunt Starly Day    -- hunt Umbreon at Night
huntScytherRhyhorn = false        --hunt Scyther and Rhyhorn all time




                   -- CATCH CONFIGURATION

               --If you don't have synch poke leave. And don't use the multiple hunt

    --Use synch1 at MORNING and DAY Time/    synch2 at NIGHT Time


   --Synchronize
   
synch1 = 1            --Pokemon Index of 1st SynchPoke
nature1 = "Timid"    --Pokemon Nature of 1st SynchPoke
synch2 = 3            --Pokemon Index of 2nd SynchPoke
nature2 = "Adamant"    --Pokemon Nature of 2nd SynchPoke


   -- You can only choose One Special Catching, set true, else leave the 3 false
                                  --use only normalCatchOn if you don't have fswiper and sleeper
                                  --Leave blank at sleepmove/weakmove if you don't have atleast


normalCatchOn = true        --Directly throw pokeballs on hunted pokemons
fswipeOn = false        --Switch to pokemon with false swipe, use false swipe until the hunted pokes hp is reach to 1 then throw pokeballs
sleepOn = false            --Switch to pokemon with sleep move, use sleep move until the hunted pokes status is SLEEPING then throw pokeballs
advanceCatchOn = false        --Use fswipeOn and sleepOn to catch hunted pokes

falseswiper = 4            --Index of pokemon with false swipe
fswipeHP = 10            --Returns the health percent of the false swiper, then heal to PC
weakmove = "False Swipe"    --False Swipe move --Change to "None" if you don't have

sleeper = 4            --Index of pokemon with sleep move
sleeperHP = 10            --Returns the health percent of the false swiper, then heal to PC
sleepmove = "None"        --Set/Change the name of the sleep move --Change to "None" if you don't have



       --MOUNTING CONFIGURATION


   -- Set/Change the name of the mount you want to use on LAND

mount = "Bicycle"

   -- Set/Change to true if you want to use mount,else false

mountSwitch = true



       --POKEBALL CONFIGURATION

   --Disable/enable pokeball function. set to true else false

ballSwitch = false

   


   --POKEBALLS --Great ball is the default balls it will buy

ballquantity = 10         --set the number of balls you want to buy
minball = 49            --set the minimum number of balls and bot will buy more    




       --MONEY FARMING CONFIGURATION


huntandfarm = true    --set this to true if you want to farm money while hunting pokes

moneyfarm = false    --set this to true if you want to farm money when minimum money reaches, else false
minmoney = 1000    --set the minimum money to start farming
maxmoney = 100000    --set the maximum money to start again on hunting pokes

   --Set the number of pokemon you want to remain while farming and start healing

pokeNumber = 2

   --Pick only one area of farming

cCave = true        --Start farming at Cerulean Cave 1F
sFoam = false        --Start farming at Seafoam B4F






                           -- Copyright © 2016 redskhie






       --DO NOT TOUCH THIS if you don't know what you're doing!

name = "Rare catcher at Kanto Safari"
author = "redskhie"
description = [[This script will catch your desired Pokemons at Kanto Safari]]

function onStart()
   
   startime = os.time()

   shinyCounter = 0

   eeveecounter = 0
   scythercounter = 0
   pinsircounter = 0
   bulbacounter = 0
   chanseycounter = 0
   rhycounter = 0
   kangascounter = 0
   umbreoncounter = 0
   starlycounter = 0
   pokecenterCounter = 0
   wildCounter = 0
   
   startingMoney = getMoney()

   log("-----------------------------------------------------------")
       log("|---- We are now Commencing the Catch Routine ----|")
       log("-----------------------------------------------------------")

   if huntEeveeRhyhorn then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Rhyhorn at Night")
       log("--------------------------------------")
   elseif huntEeveeBulba then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Bulbasaur at Night")
       log("--------------------------------------")
   elseif huntEeveeChansey then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Chansey at Night")
       log("--------------------------------------")
   elseif huntEeveeScytherPinsir then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Scyther and Pinsir at Night")
       log("--------------------------------------")
   elseif huntEeveeUmbreon then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Umbreon and Pinsir at Night")
       log("--------------------------------------")
   elseif huntStarlyUmbreon then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Starly at Morning and Day ~ Hunting Umbreon at Night")
       log("--------------------------------------")
   elseif huntEeveeMarill then
       log("-------- MULTI-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Morning and Day ~ Hunting Marill at Night")
       log("--------------------------------------")
   end

   if huntEevee then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Eevee at Safari Area 3")
       log("--------------------------------------")
   elseif huntScyther then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Scyther at Safari Area 1")
       log("--------------------------------------")
   elseif huntPinsir then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Pinsir at Safari Area 1")
       log("--------------------------------------")
   elseif huntBulba then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Bulbasaur at Safari Area 2")
       log("--------------------------------------")
   elseif huntChansey then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Chansey at Safari Area 2")
       log("--------------------------------------")
   elseif huntRhyhorn then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Rhyhorn at Safari Area 2")
       log("--------------------------------------")
   elseif huntKanga then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Kangaskhan at Safari Area 1")
       log("--------------------------------------")
   elseif huntChanseyBulba then
       log("-------- SINGLE-CATCHING STARTED --------")
       log("Script Info ~~> Hunting Chansey and Bulbasaur at Safari Area 2")
       log("--------------------------------------")

   end
   if moneyfarm then
       if cCave then
           log("~Farming money at Cerulean Cave 1F when money is less than "..minmoney.." pokedollars")
           log("~Continue hunting when money reached to "..maxmoney.."+ pokedollars")
           log("--------------------------------------")
       elseif sFoam then
           log("~Farming money at Seafoam B4F when money is less than "..minmoney.." pokedollars")
           log("~Continue hunting when money reached to "..maxmoney.."+ pokedollars")
           log("--------------------------------------")
       end
   end
   if huntandfarm then
       log("Killing all encountered pokes while hunting your desired pokes")
       log("--------------------------------------")
   end
   pokeballCounter = 0

end
function onDialogMessage(pokecenter)
   if stringContains(pokecenter, "Would you like me to heal your Pokemon?") then
       pokecenterCounter = pokecenterCounter + 1
       if usingLogs then
           log("Info ~ Times in Pokecenter: " .. pokecenterCounter)
       end
   end
end
function areaone()

           
       if getMapName() == "Pokecenter Fuchsia" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Safari Stop")
       elseif getMapName() == "Safari Stop" then
           talkToNpcOnCell(6, 4)    
       elseif getMapName() == "Safari Entrance" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Area 2")
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Safari Area 1" then
           moveToGrass()
       elseif getMapName() ~= "Fuchsia City" then
           backtofarm()
       end
   
end

function areatwo()

       if getMapName() == "Pokecenter Fuchsia" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Safari Stop")
       elseif getMapName() == "Safari Stop" then
           talkToNpcOnCell(6, 4)    
       elseif getMapName() == "Safari Entrance" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 2" then
           moveToGrass()
       elseif getMapName() == "Safari Area 1" then
           moveToMap("Safari Area 2")
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Area 2")
       elseif getMapName() ~= "Fuchsia City" then
           backtofarm()
       end
   
end

function areathree()

   
       if getMapName() == "Pokecenter Fuchsia" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Safari Stop")
       elseif getMapName() == "Safari Stop" then
           talkToNpcOnCell(6, 4)    
       elseif getMapName() == "Safari Entrance" then
           moveToMap("Safari Area 3")
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 3")
       elseif getMapName() == "Safari Area 1" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Safari Area 3" then
           moveToRectangle(25, 29, 30, 29)
       elseif getMapName() ~= "Fuchsia City" then
           backtofarm()
       end
   
end

function area13()

       
       if not isNight() and getPokemonNature(synch1) ~= nature1 then
           return swapPokemon(synch2, synch1)
       elseif not isNight() and getPokemonNature(synch1) == nature1 then

           areathree()

       elseif isNight() and getPokemonNature(synch1) ~= nature2 then
           return swapPokemon(synch2, synch1)
       elseif isNight() and getPokemonNature(synch1) == nature2 then

           areaone()

       
       end
   

end

function area23()
   
    if isPokemonUsable(1) and isPokemonUsable(falseswiper) and getPokemonHealthPercent(falseswiper) > fswipeHP and getPokemonHealthPercent(sleeper) > sleeperHP and isPokemonUsable(sleeper) and getRemainingPowerPoints(sleeper, sleepmove) >= 1 and getRemainingPowerPoints(falseswiper, weakmove) >= 1 then
   
       if not isNight() and getPokemonNature(synch1) ~= nature1 then
           return swapPokemon(synch2, synch1)
       elseif not isNight() and getPokemonNature(synch1) == nature1 then

           areathree()

       end
       if isNight() and getPokemonNature(synch1) ~= nature2 then
           return swapPokemon(synch2, synch1)
       elseif isNight() and getPokemonNature(synch1) == nature2 then

           areatwo()

       end

   else
       pc()
   end    
end
function exclusive()
       
            if getMapName() == "Pokecenter Fuchsia" then
                   moveToMap("Fuchsia City")
               elseif getMapName() == "Fuchsia City" then    
                   moveToMap("Safari Stop")
               elseif getMapName() == "Safari Stop" then
                   talkToNpcOnCell(6, 4)
               elseif getMapName() == "Safari Entrance" then
                    moveToMap("Safari Area 3")
               elseif getMapName() == "Safari Area 3" then
                   talkToNpcOnCell(17, 34)
              elseif getMapName() == "Fuchsia Pokemart" then
                   moveToMap("Fuchsia City")
           elseif getMapName() == "Safari Exclusive" then
                   moveToRectangle(13, 11, 18, 11)
           elseif getMapName() ~= "Fuchsia City" then
                   backtofarm()
           end

end

function exwater()
       
            if getMapName() == "Pokecenter Fuchsia" then
                   moveToMap("Fuchsia City")
               elseif getMapName() == "Fuchsia City" then    
                   moveToMap("Safari Stop")
               elseif getMapName() == "Safari Stop" then
                   talkToNpcOnCell(6, 4)
               elseif getMapName() == "Safari Entrance" then
                    moveToMap("Safari Area 3")
               elseif getMapName() == "Safari Area 3" then
                   talkToNpcOnCell(17, 34)
              elseif getMapName() == "Fuchsia Pokemart" then
                   moveToMap("Fuchsia City")
           elseif getMapName() == "Safari Exclusive" then
                   moveToWater()
           elseif getMapName() ~= "Fuchsia City" then
                   backtofarm()
           end

end

function areaex3()
   
   
       if not isNight() and getPokemonNature(synch1) ~= nature1 then
           return swapPokemon(synch2, synch1)
       elseif not isNight() and getPokemonNature(synch1) == nature1 then

           areathree()

       end
       if isNight() and getPokemonNature(synch1) ~= nature2 then
           return swapPokemon(synch2, synch1)
       elseif isNight() and getPokemonNature(synch1) == nature2 then

           exclusive()

       end
   
   

end

function ball()
       if getMapName() == "Safari Exclusive" then
                   talkToNpcOnCell(21, 3)
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Area 1" then
           if not isMounted() then
               useItem("Arcanine Mount")
           elseif isMounted() then
               moveToMap("Safari Entrance")
           end
       elseif getMapName() == "Safari Entrance" then
           talkToNpcOnCell(27, 25)
       elseif getMapName() == "Safari Stop" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Pokecenter Fuchsia" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
                  moveToMap("Fuchsia Pokemart")
           elseif getMapName() == "Fuchsia Pokemart" and not isShopOpen() then
                   talkToNpcOnCell(3, 5)
           elseif isShopOpen() then
           log("----------------")
           log("--- Buying "..ballquantity.." Great Balls ---")
           log("----------------")
                   buyItem("Great Ball", ballquantity)
       elseif getMapName() ~= "Fuchsia City" then
           backtofarm()
           end
end
function sleepPP()
    if sleepmove == "Hypnosis" or sleepmove == "Spore" or sleepmove == "Sleep Powder" or sleepmove ~= "None" then
        return getRemainingPowerPoints(sleeper, sleepmove) >= 1
    elseif sleepmove == "None" then
        isPokemonUsable(sleeper)
    end
end
function fswipePP()
    if weakmove == "False Swipe" or weakmove ~= "None" then
        return getRemainingPowerPoints(falseswiper, weakmove) >= 1
    elseif weakmove == "None" then
        isPokemonUsable(falseswiper)
    end
end
function onPathAction()
   
   if not isMounted() and mountSwitch == true and hasItem(mount) and not isSurfing() and isOutside() then
       log("---------------------------")
       log("~~~ Riding on my pet!!! ~~~")
       log("---------------------------")
               return useItem(mount)

   elseif moneyfarm and (getMoney() >= minmoney and getMoney() <= maxmoney)  then
       log("~~~ Grinding some pokedollars!!! ~~~")
       if cCave then
           ceCave()
       elseif sFoam then
           seafoam()
       end
           
   elseif ballSwitch and ( getItemQuantity("Great Ball") <= minball ) then

       ball()

   elseif sleepPP() and fswipePP() and isPokemonUsable(1) and isPokemonUsable(synchIndex2) and isPokemonUsable(synchIndex3) and isPokemonUsable(falseswiper) and getPokemonHealthPercent(falseswiper) > fswipeHP and getPokemonHealthPercent(sleeper) > sleeperHP and isPokemonUsable(sleeper) then
   
   if huntEeveeRhyhorn then
           
       area23()

   elseif huntEeveeBulba then
       
       area23()

   elseif huntEeveeChansey then
       
       area23()

   elseif huntEeveeScytherPinsir then
       
       area13()

   elseif huntEeveeUmbreon then
       
       areaex3()

   elseif huntStarlyUmbreon or huntScytherRhyhorn then
       
       exclusive()

   elseif huntEeveeMarill then
       
       areaex3()

   elseif huntEevee then
       
       areathree()

   elseif huntScyther then
       
       areaone()

   elseif huntPinsir then
           
       areaone()

   elseif huntBulba then
       
       areatwo()

   elseif huntChansey then
       
       areatwo()

   elseif huntRhyhorn then
       
       areatwo()

   elseif huntKanga then
       
       areaone()

   elseif huntChanseyBulba then
           
       areatwo()

   elseif huntDratiniStarlyUmbreon then
    
    if isMorning() and getPokemonNature(synch1) ~= nature1 then
           return swapPokemon(synch2, synch1)
       elseif isMorning() and getPokemonNature(synch1) == nature1 then

           exwater()

       end

    if isNoon() and getPokemonNature(synch1) ~= nature1 then
           return swapPokemon(synch2, synch1)
       elseif isNoon() and getPokemonNature(synch1) == nature1 then

           exclusive()

       end

       if isNight() and getPokemonNature(synch1) ~= nature2 then
           return swapPokemon(synch2, synch1)
       elseif isNight() and getPokemonNature(synch1) == nature2 then

           exclusive()

       end

   end

   else
       pc()
   end
   

end

function pc()
       if getMapName() == "Cerulean Cave 1F" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean City" then    
           return moveToMap("Route 5") or moveToMap("Route 4")
       elseif getMapName() == "Route 4"  then    
           moveToCell(96, 21)
       elseif getMapName() == "Pokecenter Cerulean" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Pokecenter Vermilion" or getMapName() == "Route 6" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then
           moveToMap("Route 11")
       elseif getMapName() == "Cerulean City" then
           moveToMap("Route 5")
       elseif getMapName() == "Route 5" then
           moveToMap("Route 5 Stop House")
       elseif getMapName() == "Route 5 Stop House" then
           moveToMap("Saffron City")
       elseif getMapName() == "Saffron City" then
           moveToMap("Route 6 Stop House")
       elseif getMapName() == "Route 6 Stop House" then
           moveToMap("Route 6")
       elseif getMapName() == "Cerulean Cave 1F" then
           moveToMap("Cerulean City")
       elseif ( getPlayerX() == 1 and getPlayerY() == 20 ) or ( getPlayerX() == 1 and getPlayerY() == 19 ) then
           moveToMap("Route 5")
       elseif getMapName() == "Cerulean City" then    
           return moveToMap("Route 4")
       elseif getMapName() == "Route 4"  then    
           moveToCell(96, 21)
       elseif getMapName() == "Route 11" then
           moveToMap("Route 11 Stop House")
       elseif getMapName() == "Route 11 Stop House" then
           moveToMap("Route 12")
       elseif getMapName() == "Route 12" then
           moveToCell(24, 92)
       elseif getMapName() == "Route 13" then
           moveToMap("Route 14")
       elseif getMapName() == "Route 14" then
           moveToMap("Route 15")
       elseif getMapName() == "Route 15" then
           moveToMap("Route 15 Stop House")
       elseif getMapName() == "Route 15 Stop House" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Seafoam B4F" then    
           moveToCell(9, 6)
       elseif getMapName() == "Seafoam B3F" then    
           moveToMap("Seafoam B2F")
       elseif getMapName() == "Seafoam B2F" then    
           moveToMap("Seafoam B1F")
       elseif getMapName() == "Seafoam B1F" then    
           moveToMap("Seafoam 1F")
       elseif getMapName() == "Seafoam 1F" then    
           moveToCell(13, 16)
       elseif getMapName() == "Route 20" then    
           moveToMap("Route 19")
       elseif getMapName() == "Route 19" then    
           moveToMap("Fuchsia City Stop House")
       elseif getMapName() == "Fuchsia City Stop House" then    
           moveToMap("Fuchsia City")
       elseif getMapName() == "Safari Exclusive" then
                   talkToNpcOnCell(21, 3)
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Area 1" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Entrance" then
           talkToNpcOnCell(27, 25)
       elseif getMapName() == "Safari Stop" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Pokecenter Fuchsia")
           elseif getMapName() == "Pokecenter Fuchsia" then
           usePokecenter()
       end

end
function onBattleAction()

   if moneyfarm and (getMoney() <= minmoney or ((getMoney() - startingMoney) < moneyneeded)) then
       
           return attack() or sendAnyPokemon() or sendUsablePokemon() or run()
           
       
   elseif isOpponentShiny() or not isAlreadyCaught() or getOpponentName() == "Charmander" or getOpponentName() == "Squirtle" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntEeveeRhyhorn then
       if getOpponentName() == "Rhyhorn" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
       end
   elseif huntEeveeBulba then
       if getOpponentName() == "Bulbasaur" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
       end
   elseif huntEeveeChansey then
       if getOpponentName() == "Chansey" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
       end
   elseif huntEeveeScytherPinsir then
       if getOpponentName() == "Scyther" or getOpponentName() == "Pinsir" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
       
       end
   elseif huntEeveeUmbreon then
       if getOpponentName() == "Umbreon" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
       end
   elseif huntStarlyUmbreon and ( getOpponentName() == "Starly" or getOpponentName() == "Umbreon" ) then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntEeveeMarill then
       if getOpponentName() == "Marill" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end
       elseif getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
       else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
       end    
   elseif huntEevee and getOpponentName() == "Eevee" then
           log("-------- Commencing Sleep Move --------")
           sleep()
   elseif huntScyther and getOpponentName() == "Scyther" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntPinsir and getOpponentName() == "Pinsir" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntBulba and getOpponentName() == "Bulbasaur" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntChansey and getOpponentName() == "Chansey" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()
       end    
   elseif huntRhyhorn and getOpponentName() == "Rhyhorn" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end    
   elseif huntKanga and getOpponentName() == "Kangaskhan" then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end    
   elseif huntChanseyBulba and ( getOpponentName() == "Chansey" or getOpponentName() == "Bulbasaur" ) then
       if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end
   elseif huntScytherRhyhorn and ( getOpponentName() == "Scyther" or getOpponentName() == "Rhyhorn" ) then
    if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end
   elseif huntDratiniStarlyUmbreon and ( getOpponentName() == "Dratini" or getOpponentName() == "Starly" or getOpponentName() == "Umbreon" ) then
    if fswipeOn then
           log("-------- Commencing False Swipe --------")
           fswipe()
       elseif sleepOn then
           log("-------- Commencing Sleep Move --------")
           sleep()
       elseif advanceCatchOn then
           log("-------- Commencing False Swipe with Sleep Move --------")
           advanceCatch()
       elseif normalCatchOn then
           log("-------- Starting to throw Pokeballs --------")
           normal()    
       end
    
   elseif huntandfarm then
           return attack() or sendAnyPokemon() or run() or sendUsablePokemon()    
   else
           return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
   
   end
end

function normal()
   return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")  or sendAnyPokemon() or attack() or run()
end

function advanceCatch()
       if getActivePokemonNumber() == 1 then
           return sendPokemon(falseswiper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() > 1 ) then
           return weakAttack() or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == sleeper ) and ( getOpponentStatus() ~= "SLEEP" and getOpponentStatus() ~= "PARALIZE" and getOpponentStatus() ~= "POISON" and getOpponentStatus() ~= "BURN" ) and ( getOpponentHealth() == 1 ) then
           return useMove(sleepmove) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() == 1 ) then
           return sendPokemon(sleeper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif getOpponentStatus() == "SLEEP" or getOpponentStatus() == "PARALIZE" or getOpponentStatus() == "POISON" or getOpponentStatus() == "BURN" then
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or attack() or run()
       else
               return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or attack() or run()
       end
end

function fswipe()
       if getActivePokemonNumber() == 1 then
           return sendPokemon(falseswiper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() > 1 ) then
           return weakAttack() or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif getOpponentHealth() == 1 then
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")  or sendAnyPokemon() or attack() or run()
       end
end
function sleep()
       if getActivePokemonNumber() == 1 then
           return sendPokemon(sleeper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or run()
       elseif ( getActivePokemonNumber() == sleeper ) and ( getOpponentStatus() ~= "SLEEP" and getOpponentStatus() ~= "PARALIZE" and getOpponentStatus() ~= "POISON" and getOpponentStatus() ~= "BURN" ) then
           return useMove(sleepmove) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       elseif getOpponentStatus() == "SLEEP" or getOpponentStatus() == "PARALIZE" or getOpponentStatus() == "POISON" or getOpponentStatus() == "BURN" then
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
       else
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or attack() or run()
       end    
end
function onBattleMessage(wild)
   
       if stringContains(wild, "A Wild SHINY ") then
       shinyCounter = shinyCounter + 1    
   
   elseif stringContains(wild, "You throw") then
       pokeballCounter = pokeballCounter + 1    
   
       elseif stringContains(wild, "Pokedollar(s)") then
               log("Info ~ Pokedollars earned: "..tostring(getMoney() - startingMoney).." (" ..tostring((getMoney() - startingMoney)/wildCounter).." average)")
   elseif wild == "A Wild [FF9900]Scyther[-] Attacks!" then
       scythercounter = scythercounter + 1
 
   elseif wild == "A Wild [FF9900]Pinsir[-] Attacks!" then
       pinsircounter = pinsircounter + 1
   
   elseif wild == "A Wild [FF9900]Eevee[-] Attacks!" then
       eeveecounter = eeveecounter + 1
   
   elseif wild == "A Wild [FF9900]Bulbasaur[-] Attacks!" then
       bulbacounter = bulbacounter + 1
   
   elseif wild == "A Wild [FF9900]Chansey[-] Attacks!" then
       chanseycounter = chanseycounter + 1

   elseif wild == "A Wild [FF9900]Rhyhorn[-] Attacks!" then
       rhycounter = rhycounter + 1

   elseif wild == "A Wild [FF9900]Kangaskhan[-] Attacks!" then
       kangascounter = kangascounter + 1
   
   elseif wild == "A Wild [FF9900]Umbreon[-] Attacks!" then
       umbreoncounter = umbreoncounter + 1

   elseif wild == "A Wild [FF9900]Starly[-] Attacks!" then
       starlycounter = starlycounter + 1
   elseif stringContains(wild, "A Wild ") then
           wildCounter = wildCounter + 1
   end
     
end

function onPause()
   
   log(" --------------------------------------------")
       log("|--------- CATCH ROUTINE PAUSED ----------|")
       log(" --------------------------------------------")
   log("|--------- Move Remaining Power Points ----------|")
   log("--------------------------------------")
   log("False Swipe: " .. tostring(getRemainingPowerPoints(falseswiper,weakmove)))
   log("Sleep Move: " .. tostring(getRemainingPowerPoints(sleeper,sleepmove)))
   log("-----------------------------------------------------------")
   log("|--------- Pokemon Caught Status ----------|")
   log(" ")
   
   if huntEeveeRhyhorn then
       log("Eevee Caught: " .. eeveecounter)
       log("Rhyhorn Caught: ".. rhycounter)
       
   elseif huntEeveeBulba then
       log("Eevee Caught: " .. eeveecounter)
       log("Bulbasaur Caught: " .. bulbacounter)
       
   elseif huntEeveeChansey then
       log("Eevee Caught: " .. eeveecounter)
       log("Chansey Caught: " .. chanseycounter)
       
   elseif huntEeveeScytherPinsir then
       log("Eevee Caught: " .. eeveecounter)
       log("Scyther Caught: " .. scythercounter)
       log("Pinsir Caught: " .. pinsircounter)
       
   elseif huntEeveeUmbreon then
       log("Eevee Caught: " .. eeveecounter)
       log("Umbreon Caught: " .. umbreoncounter)
       
   elseif huntStarlyUmbreon then
       log("Starly Caught: " .. starlycounter)
       log("Umbreon Caught: " .. umbreoncounter)
       
   elseif huntEeveeMarill then
       log("Eevee Caught: " .. eeveecounter)
       log("Marill Caught: " .. marillcounter)
       
   elseif huntEevee then
       log("Eevee Caught: " .. eeveecounter)
       
   elseif huntScyther then
       log("Scyther Caught: " .. scythercounter)
       
   elseif huntPinsir then
       log("Pinsir Caught: " .. pinsircounter)
       
   elseif huntBulba then
       log("Bulbasaur Caught: " .. bulbacounter)
       
   elseif huntChansey then
       log("Chansey Caught: " .. chanseycounter)
       
   elseif huntRhyhorn then
       log("Rhyhorn Caught: ".. rhycounter)
       
   elseif huntKanga then
       log("Kangaskhan Caught: " .. kangascounter)
       
   elseif huntChanseyBulba then
       log("Chansey Caught: " .. chanseycounter)
       log("Bulbasaur Caught: " .. bulbacounter)
   end
   
   log(" --------------------------------------------")
   log("Pokemons encountered: " .. wildCounter)
   log("-----------------------------------------------------------")
   log("Shinies Caught: " .. shinyCounter)
   log("Pokeball's used: " .. pokeballCounter)
   log("---------------------------------------------")
   log("|--------- Character Information ----------|")
   log(" ")
   log("Times in Pokecenter: " .. pokecenterCounter)
   if huntandfarm or moneyfarm then
        log("Pokedollars earned: "..tostring(getMoney() - startingMoney).." (" ..tostring((getMoney() - startingMoney)/wildCounter).." average)")
       log("-----------------------------------------------------------")
   end
end

function onStop()
   log("-----------------------------------------------------------")
       log("---------------------- Routine Stopped ---------------------")
       log("-----------------------------------------------------------")
   endtime = os.time()
       log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/3600 ).. " hours")
       log("or")
       log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/60 ).. " minutes")
       log("-----------------------------------------------------------")
end



function ceCave()


   if getUsablePokemonCount() > pokeNumber then

       if getMapName() == "Safari Exclusive" then
                   talkToNpcOnCell(21, 3)
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Area 1" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Entrance" then
           talkToNpcOnCell(27, 25)
       elseif getMapName() == "Pokecenter Cerulean" then
           moveToMap("Cerulean City")
       elseif (getPlayerX() == 26 and getPlayerY() == 31) or (getPlayerX() == 9 and getPlayerY() == 49) then
           moveToMap("Route 4")
       elseif getMapName() == "Route 6" then    
           moveToMap("Route 6 Stop House")
       elseif getMapName() == "Safari Stop" or getMapName() == "Pokecenter Fuchsia" then    
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Route 15 Stop House")
       elseif getMapName() == "Route 15 Stop House" then    
           return moveToMap("Route 15")
       elseif getMapName() == "Route 15" then
           moveToMap("Route 14")
       elseif getMapName() == "Route 14" then    
           moveToMap("Route 13")
       elseif getMapName() == "Route 13" then    
           moveToMap("Route 12")
       elseif getMapName() == "Route 12" then    
           moveToMap("Route 11 Stop House")
       elseif getMapName() == "Route 11 Stop House" then    
           moveToMap("Route 11")
       elseif getMapName() == "Route 11" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Pokecenter Vermilion" then    
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then    
           moveToMap("Route 6")
       elseif getMapName() == "Route 6 Stop House" then    
           moveToMap("Saffron City")
       elseif getMapName() == "Saffron City" then    
           moveToMap("Route 5 Stop House")
       elseif getMapName() == "Route 5 Stop House" then    
           moveToMap("Route 5")
       elseif getMapName() == "Route 5" then    
           moveToCell(14, 0)
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Cerulean City" or getMapName() == "Route 4" then
           return  moveToMap("Cerulean Cave 1F") or moveToCell(96, 14)    
       elseif getMapName() == "Cerulean Cave 1F"  then    
           return moveNearExit("Cerulean City")
       end
   else
       if getMapName() == "Cerulean Cave 1F" then
           moveToMap("Cerulean City")
       elseif ( getPlayerX() == 1 and getPlayerY() == 20 ) then
           moveToCell(26, 30)
       elseif getMapName() == "Cerulean City" then    
           return moveToMap("Route 4")
       elseif getMapName() == "Route 4"  then    
           moveToCell(96, 21)
       elseif getMapName() == "Pokecenter Cerulean"  then    
               usePokecenter()
       end
   end
end

function seafoam()

   if getUsablePokemonCount() > pokeNumber then
       
       if getMapName() == "Safari Exclusive" then
                   talkToNpcOnCell(21, 3)
       elseif getMapName() == "Safari Area 2" then
           moveToMap("Safari Area 1")
       elseif getMapName() == "Safari Area 3" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Safari Area 1" then
           moveToMap("Safari Entrance")
       elseif getMapName() == "Safari Entrance" then
           talkToNpcOnCell(27, 25)
       elseif getMapName() == "Safari Stop" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Pokecenter Fuchsia" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then
           moveToMap("Fuchsia City Stop House")
       elseif getMapName() == "Fuchsia City Stop House" then
           moveToMap("Route 19")
       elseif getMapName() == "Route 19" then    
           moveToMap("Route 20")
       elseif getMapName() == "Route 20" then    
           moveToCell(60, 32)
       elseif getMapName() == "Seafoam 1F" then    
           moveToMap("Seafoam B1F")
       elseif getMapName() == "Seafoam B1F" then    
           moveToMap("Seafoam B2F")
       elseif getMapName() == "Seafoam B2F" then    
           moveToMap("Seafoam B3F")
       elseif getMapName() == "Seafoam B3F" then    
           moveToCell(12, 8)
       elseif getMapName() == "Seafoam B4F" then
           moveToRectangle(9,15,13,20)
       end
           
   else
       
       if getMapName() == "Seafoam B4F" then    
           moveToCell(9, 6)
       elseif getMapName() == "Seafoam B3F" then    
           moveToMap("Seafoam B2F")
       elseif getMapName() == "Seafoam B2F" then    
           moveToMap("Seafoam B1F")
       elseif getMapName() == "Seafoam B1F" then    
           moveToMap("Seafoam 1F")
       elseif getMapName() == "Seafoam 1F" then    
           moveToCell(13, 16)
       elseif getMapName() == "Route 20" then    
           moveToMap("Route 19")
       elseif getMapName() == "Route 19" then    
           moveToMap("Fuchsia City Stop House")
       elseif getMapName() == "Fuchsia City Stop House" then    
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia City" then    
           moveToMap("Pokecenter Fuchsia")
           elseif getMapName() == "Pokecenter Fuchsia" then
           usePokecenter()
       end

   end

end

function backtofarm()
   
       if getMapName() == "Cerulean Cave 1F" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean City" then    
           return moveToMap("Route 5") or moveToMap("Route 4")
       elseif getMapName() == "Route 4"  then    
           moveToCell(96, 21)
       elseif getMapName() == "Pokecenter Cerulean" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Pokecenter Vermilion" or getMapName() == "Route 6" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then
           moveToMap("Route 11")
       elseif getMapName() == "Cerulean City" then
           moveToMap("Route 5")
       elseif getMapName() == "Route 5" then
           moveToMap("Route 5 Stop House")
       elseif getMapName() == "Route 5 Stop House" then
           moveToMap("Saffron City")
       elseif getMapName() == "Saffron City" then
           moveToMap("Route 6 Stop House")
       elseif getMapName() == "Route 6 Stop House" then
           moveToMap("Route 6")
       elseif getMapName() == "Cerulean Cave 1F" then
           moveToMap("Cerulean City")
       elseif ( getPlayerX() == 1 and getPlayerY() == 20 ) or ( getPlayerX() == 1 and getPlayerY() == 19 ) then
           moveToMap("Route 5")
       elseif getMapName() == "Cerulean City" then    
           return moveToMap("Route 4")
       elseif getMapName() == "Route 4"  then    
           moveToCell(96, 21)
       elseif getMapName() == "Route 11" then
           moveToMap("Route 11 Stop House")
       elseif getMapName() == "Route 11 Stop House" then
           moveToMap("Route 12")
       elseif getMapName() == "Route 12" then
           moveToCell(24, 92)
       elseif getMapName() == "Route 13" then
           moveToMap("Route 14")
       elseif getMapName() == "Route 14" then
           moveToMap("Route 15")
       elseif getMapName() == "Route 15" then
           moveToMap("Route 15 Stop House")
       elseif getMapName() == "Route 15 Stop House" then
           moveToMap("Fuchsia City")
       elseif getMapName() == "Seafoam B4F" then    
           return moveToCell(9, 6)
       elseif getMapName() == "Seafoam B3F" then    
           moveToMap("Seafoam B2F")
       elseif getMapName() == "Seafoam B2F" then    
           moveToMap("Seafoam B1F")
       elseif getMapName() == "Seafoam B1F" then    
           moveToMap("Seafoam 1F")
       elseif getMapName() == "Seafoam 1F" then    
           moveToCell(13, 16)
       elseif getMapName() == "Route 20" then    
           moveToMap("Route 19")
       elseif getMapName() == "Route 19" then    
           moveToMap("Fuchsia City Stop House")
       elseif getMapName() == "Fuchsia City Stop House" then    
           moveToMap("Fuchsia City")
       elseif getMapName() == "Fuchsia Pokemart" then
           moveToMap("Fuchsia City")
       end
end
 
Reply
need some help here. for some reasons, everytime i start the bot, it keeps looping in pokecenter. i changed the script abit can you help me figure out what is the mistake?
below is my script.
-----------------------------------------------------
-- Copyright © 2016 redskhie



huntandFarm = false --set to true if you want to kill all encountered pokes else false
catchUncaught = false --set to true if you want to catch uncaught pokes else false
catchShiny = true --set to true if you want to catch encountered shiny's else false


-- CATCH CONFIGURATION --CASE INSENSITIVE
--SINGLE CATCHING

singleCatch = true --Set to true if you want to catch only 1 Pokes and set multipleCatch to false

toHunt = "Riolu" --Set/Change the name of Pokemon you want to Catch
huntMap = "Zone 3" --Set/Change the Map Area of the Pokemon --OPTIONS: "Zone 1", "Zone 2", "Zone 3", "Zone 4", "Zone 5", "Zone 6"



--MULTIPLE CATCHING

multipleCatch = false --Set to true if you want to catch multiple Pokes at Different Time and set singleCatch to false
--NOTE: PLEASE PROPERLY ARRANGE THE TEAM ACCORDING TO YOUR INPUT CONFIG


--MORNING TIME CONFIG

toHunt1 = "Treecko" --Set/Change the name of Pokemon you want to Catch
huntMap1 = "Zone 1" --Set/Change the Map Area of the 1st Pokemon --OPTIONS: "Zone 1", "Zone 2", "Zone 3", "Zone 4", "Zone 5", "Zone 6"



synch1 = "Timid" --Set the Nature of the Synch Poke to Use at Morning
synchIndex1 = 1 --Do not touch this line!

--DAY TIME CONFIG

toHunt2 = "Riolu" --Set/Change the name of Pokemon you want to Catch at Noon
huntMap2 = "Zone 3" --Set/Change the Map Area of the 2nd Pokemon --OPTIONS: "Zone 1", "Zone 2", "Zone 3", "Zone 4", "Zone 5", "Zone 6"


synch2 = "Jolly" --Set the Nature of the Synch Poke to Use at Noon
synchIndex2 = 3 --set the Index # of the Synch Poke to Use at Noon, elseif the same leave
--NIGHT TIME CONFIG

toHunt3 = "Treecko" --Set/Change the name of Pokemon you want to Catch at Night
huntMap3 = "Zone 1" --Set/Change the Map Area of the 3rdPokemon --OPTIONS: "Zone 1", "Zone 2", "Zone 3", "Zone 4", "Zone 5", "Zone 6"


synch3 = "Timid" --Set the Nature of the Synch Poke to Use at Night
synchIndex3 = 1 --set the Index # of the Synch Poke to Use at Night, elseif the same leave




--ADDED HUNT --Use this if multiple catch is full and you think you can Hunt another poke in the same area

Add = false --Set to true if you want to catch another pokemon
addHunt1 = "" --Set the name of the pokemon
addHunt2 = "" --Set the name of the pokemon
addHunt3 = "" --Set the name of the pokemon



fishItem = "Super Rod" --Set/Change the Name of the Fishing Item you want to Use, Don't leave it blank --NOT USABLE at HOENN






-- You can only choose One Special Catching, set true, else leave the 3 false

--use only normalCatchOn if you don't have fswiper and sleeper
--Leave blank at sleepmove/weakmove if you don't have atleast


normalCatchOn = false --Directly throw pokeballs on hunted pokemons
fswipeOn = true --Switch to pokemon with false swipe, use false swipe until the hunted pokes hp is reach to 1 then throw pokeballs
sleepOn = false --Switch to pokemon with sleep move, use sleep move until the hunted pokes status is SLEEPING then throw pokeballs
advanceCatchOn = false --Use fswipeOn and sleepOn to catch hunted pokes

falseswiper = 2 --Index of pokemon with false swipe
fswipeHP = 10 --Returns the health percent of the false swiper, then heal to PC
weakmove = "False Swipe" --False Swipe move --If you have no false swiper change to "None"

sleeper = 2 --Index of pokemon with sleep move
sleeperHP = 10 --Returns the health percent of the false swiper, then heal to PC
sleepmove = "None" --Set/Change the name of the sleep move --If you have no sleeper change to "None"



--MOUNTING CONFIGURATION


-- Set/Change the name of the mount you want to use on LAND

mount = "Arcanine mount"

-- Set/Change to true if you want to use mount,else false

mountSwitch = false









--WARNING!!! DO NOT TOUCH THE CODES BELOW!!!


-- Copyright © 2016 redskhie
--List of Pokemon to Catch

local ZoneOneList = {"Pikachu", "Treecko", "Girafarig", "Natu", "Wobuffet", "Buneary"}
local ZoneTwoList = {"Natu", "Beldum"}
local ZoneThreeList = {"Riolu", "Rhyhorn", "Heracross"}
local ZoneFourList = {"Litleo", "Heracross", "Stantler", "Donphan", "Pinsir"}
local ZoneFiveList = {"Gligar", "Aipom", "Mareep", "Snubbull"}
local ZoneFiveSurfList = {"Mudkip", "Remoraid", "Marill", "Octillery"}
local ZoneSixList = {"Torchic", "Aipom", "Houndour", "Teddiursa", "Pineco", "Miltank"}

-- Copyright © 2016 redskhie



name = "All in One Catcher at Hoenn Safari"
author = "redskhie"
description = [[This script will catch your desired Pokemons at Hoenn Safari]]



function List5()

for _,ZoneFiveList in pairs(ZoneFiveList) do
if (singleCatch and ZoneFiveList == toHunt) or (multipleCatch and isMorning() and ZoneFiveList == toHunt1) or (multipleCatch and isNoon() and ZoneFiveList == toHunt2) or (multipleCatch and isNight() and ZoneFiveList == toHunt3) then
moveToGrass()
break
end
end

for _,ZoneFiveSurfList in pairs(ZoneFiveSurfList) do
if (singleCatch and ZoneFiveSurfList == toHunt) or (multipleCatch and isMorning() and ZoneFiveSurfList == toHunt1) or (multipleCatch and isNoon() and ZoneFiveSurfList == toHunt2) or (multipleCatch and isNight() and ZoneFiveSurfList == toHunt3) then
moveToWater()
break
end
end

end


function pc()

if getMapName() == "Lilycove City" then
moveToMap("Pokecenter Lilycove City")
elseif getMapName() == "Route 121" then
moveToMap("Lilycove City")
elseif getMapName() == "Hoenn Safari Zone Lobby" then
moveToMap("Route 121")
elseif getMapName() == "Hoenn Safari Zone Area 6" then
moveToMap("Hoenn Safari Zone Area 5")
elseif getMapName() == "Hoenn Safari Zone Area 3" then
moveToMap("Hoenn Safari Zone Area 4")
elseif getMapName() == "Hoenn Safari Zone Area 5" or getMapName() == "Hoenn Safari Zone Area 4" then
moveToMap("Hoenn Safari Zone Area 1")
elseif getMapName() == "Hoenn Safari Zone Area 1" then
moveToCell(23,48)
elseif getMapName() == "Hoenn Safari Zone Area 2" then
moveToMap("Hoenn Safari Zone Area 1")
elseif getMapName() == "Pokecenter Lilycove City" then
usePokecenter()
end

end

function Zone1()

if getMapName() == "Pokecenter Lilycove City" then
moveToMap("Lilycove City")
elseif getMapName() == "Lilycove City" then
moveToMap("Route 121")
elseif getMapName() == "Route 121" then
moveToMap("Hoenn Safari Zone Lobby")
elseif getMapName() == "Hoenn Safari Zone Lobby" then
talkToNpcOnCell(21, 6)
elseif getMapName() == "Hoenn Safari Zone Area 6" then
moveToMap("Hoenn Safari Zone Area 5")
elseif getMapName() == "Hoenn Safari Zone Area 3" then
moveToMap("Hoenn Safari Zone Area 4")
elseif getMapName() == "Hoenn Safari Zone Area 5" or getMapName() == "Hoenn Safari Zone Area 4" or getMapName() == "Hoenn Safari Zone Area 2" then
moveToMap("Hoenn Safari Zone Area 1")
elseif getMapName() == "Hoenn Safari Zone Area 1" then
moveToGrass()
end

end

function Zone2()

if getMapName() == "Pokecenter Lilycove City" then
moveToMap("Lilycove City")
elseif getMapName() == "Lilycove City" then
moveToMap("Route 121")
elseif getMapName() == "Route 121" then
moveToMap("Hoenn Safari Zone Lobby")
elseif getMapName() == "Hoenn Safari Zone Lobby" then
talkToNpcOnCell(21, 6)
elseif getMapName() == "Hoenn Safari Zone Area 6" then
moveToMap("Hoenn Safari Zone Area 5")
elseif getMapName() == "Hoenn Safari Zone Area 3" then
moveToMap("Hoenn Safari Zone Area 4")
elseif getMapName() == "Hoenn Safari Zone Area 5" or getMapName() == "Hoenn Safari Zone Area 4" then
moveToMap("Hoenn Safari Zone Area 1")
elseif getMapName() == "Hoenn Safari Zone Area 1" then
moveToMap("Hoenn Safari Zone Area 2")
elseif getMapName() == "Hoenn Safari Zone Area 2" then
moveToGrass()
end

end
function Zone3()

if getMapName() == "Pokecenter Lilycove City" then
moveToMap("Lilycove City")
elseif getMapName() == "Lilycove City" then
moveToMap("Route 121")
elseif getMapName() == "Route 121" then
moveToMap("Hoenn Safari Zone Lobby")
elseif getMapName() == "Hoenn Safari Zone Lobby" then
talkToNpcOnCell(21, 6)
elseif getMapName() == "Hoenn Safari Zone Area 6" then
moveToMap("Hoenn Safari Zone Area 5")
elseif getMapName() == "Hoenn Safari Zone Area 4" then
moveToMap("Hoenn Safari Zone Area 3")
elseif getMapName() == "Hoenn Safari Zone Area 5" or getMapName() == "Hoenn Safari Zone Area 2" then
moveToMap("Hoenn Safari Zone Area 1")
elseif getMapName() == "Hoenn Safari Zone Area 1" then
moveToMap("Hoenn Safari Zone Area 4")
elseif getMapName() == "Hoenn Safari Zone Area 3" then
moveToGrass()
end

end
function Zone4()

if getMapName() == "Pokecenter Lilycove City" then
moveToMap("Lilycove City")
elseif getMapName() == "Lilycove City" then
moveToMap("Route 121")
elseif getMapName() == "Route 121" then
moveToMap("Hoenn Safari Zone Lobby")
elseif getMapName() == "Hoenn Safari Zone Lobby" then
talkToNpcOnCell(21, 6)
elseif getMapName() == "Hoenn Safari Zone Area 6" then
moveToMap("Hoenn Safari Zone Area 5")
elseif getMapName() == "Hoenn Safari Zone Area 3" then
moveToMap("Hoenn Safari Zone Area 4")
elseif getMapName() == "Hoenn Safari Zone Area 5" or getMapName() == "Hoenn Safari Zone Area 2" then
moveToMap("Hoenn Safari Zone Area 1")
elseif getMapName() == "Hoenn Safari Zone Area 1" then
moveToMap("Hoenn Safari Zone Area 4")
elseif getMapName() == "Hoenn Safari Zone Area 4" then
moveToGrass()
end

end

function Zone5()

if getMapName() == "Pokecenter Lilycove City" then
moveToMap("Lilycove City")
elseif getMapName() == "Lilycove City" then
moveToMap("Route 121")
elseif getMapName() == "Route 121" then
moveToMap("Hoenn Safari Zone Lobby")
elseif getMapName() == "Hoenn Safari Zone Lobby" then
talkToNpcOnCell(21, 6)
elseif getMapName() == "Hoenn Safari Zone Area 6" then
moveToMap("Hoenn Safari Zone Area 5")
elseif getMapName() == "Hoenn Safari Zone Area 3" then
moveToMap("Hoenn Safari Zone Area 4")
elseif getMapName() == "Hoenn Safari Zone Area 2" or getMapName() == "Hoenn Safari Zone Area 4" then
moveToMap("Hoenn Safari Zone Area 1")
elseif getMapName() == "Hoenn Safari Zone Area 1" then
moveToMap("Hoenn Safari Zone Area 5")
elseif getMapName() == "Hoenn Safari Zone Area 5" then
List5()
end


end

function Zone6()

if getMapName() == "Pokecenter Lilycove City" then
moveToMap("Lilycove City")
elseif getMapName() == "Lilycove City" then
moveToMap("Route 121")
elseif getMapName() == "Route 121" then
moveToMap("Hoenn Safari Zone Lobby")
elseif getMapName() == "Hoenn Safari Zone Lobby" then
talkToNpcOnCell(21, 6)
elseif getMapName() == "Hoenn Safari Zone Area 5" then
moveToMap("Hoenn Safari Zone Area 6")
elseif getMapName() == "Hoenn Safari Zone Area 3" then
moveToMap("Hoenn Safari Zone Area 4")
elseif getMapName() == "Hoenn Safari Zone Area 2" or getMapName() == "Hoenn Safari Zone Area 4" then
moveToMap("Hoenn Safari Zone Area 1")
elseif getMapName() == "Hoenn Safari Zone Area 1" then
moveToMap("Hoenn Safari Zone Area 5")
elseif getMapName() == "Hoenn Safari Zone Area 6" then
moveToGrass()
end


end

function natureSwap()

if synch1 ~= synch2 and synch2 ~= synch3 then

if isMorning() and getPokemonNature(synchIndex1) == synch3 and getPokemonNature(synchIndex2) == synch1 and getPokemonNature(synchIndex3) == synch2 then
return swapPokemon(synchIndex1, synchIndex2)
elseif isMorning() and getPokemonNature(synchIndex1) == synch3 and getPokemonNature(synchIndex2) == synch2 and getPokemonNature(synchIndex3) == synch1 then
return swapPokemon(synchIndex1, synchIndex3)
elseif isMorning() and getPokemonNature(synchIndex1) == synch1 then

if huntMap1 == "Zone 1" then
Zone1()
elseif huntMap1 == "Zone 2" then
Zone2()
elseif huntMap1 == "Zone 3" then
Zone3()
elseif huntMap1 == "Zone 4" then
Zone4()
elseif huntMap1 == "Zone 5" then
Zone5()
elseif huntMap1 == "Zone 6" then
Zone6()
end

end

if isNoon() and getPokemonNature(synchIndex1) == synch1 and getPokemonNature(synchIndex2) == synch2 and getPokemonNature(synchIndex3) == synch3 then
return swapPokemon(synchIndex1, synchIndex2)
elseif isNoon() and getPokemonNature(synchIndex1) == synch1 and getPokemonNature(synchIndex2) == synch3 and getPokemonNature(synchIndex3) == synch2 then
return swapPokemon(synchIndex1, synchIndex3)
elseif isNoon() and getPokemonNature(synchIndex1) == synch2 then

if huntMap2 == "Zone 1" then
Zone1()
elseif huntMap2 == "Zone 2" then
Zone2()
elseif huntMap2 == "Zone 3" then
Zone3()
elseif huntMap2 == "Zone 4" then
Zone4()
elseif huntMap2 == "Zone 5" then
Zone5()
elseif huntMap2 == "Zone 6" then
Zone6()
end
end

if isNight() and getPokemonNature(synchIndex1) == synch2 and getPokemonNature(synchIndex2) == synch3 and getPokemonNature(synchIndex3) == synch1 then
return swapPokemon(synchIndex1, synchIndex2)
elseif isNight() and getPokemonNature(synchIndex1) == synch2 and getPokemonNature(synchIndex2) == synch1 and getPokemonNature(synchIndex3) == synch3 then
return swapPokemon(synchIndex1, synchIndex3)
elseif isNight() and getPokemonNature(synchIndex1) == synch3 then

if huntMap3 == "Zone 1" then
Zone1()
elseif huntMap3 == "Zone 2" then
Zone2()
elseif huntMap3 == "Zone 3" then
Zone3()
elseif huntMap3 == "Zone 4" then
Zone4()
elseif huntMap3 == "Zone 5" then
Zone5()
elseif huntMap3 == "Zone 6" then
Zone6()
end
end

elseif synch1 == synch2 and synch2 ~= synch3 then

if isMorning() and getPokemonNature(1) ~= synch1 then
return swapPokemon(synchIndex1, synchIndex3)
elseif isMorning() and getPokemonNature(1) == synch1 then
if huntMap1 == "Zone 1" then
Zone1()
elseif huntMap1 == "Zone 2" then
Zone2()
elseif huntMap1 == "Zone 3" then
Zone3()
elseif huntMap1 == "Zone 4" then
Zone4()
elseif huntMap1 == "Zone 5" then
Zone5()
elseif huntMap1 == "Zone 6" then
Zone6()
end
end
if isNoon() and getPokemonNature(1) ~= synch2 then
return swapPokemon(synchIndex2, synchIndex3)
elseif isNoon() and getPokemonNature(1) == synch2 then
if huntMap2 == "Zone 1" then
Zone1()
elseif huntMap2 == "Zone 2" then
Zone2()
elseif huntMap2 == "Zone 3" then
Zone3()
elseif huntMap2 == "Zone 4" then
Zone4()
elseif huntMap2 == "Zone 5" then
Zone5()
elseif huntMap2 == "Zone 6" then
Zone6()
end
end
if isNight() and getPokemonNature(1) ~= synch3 then
return swapPokemon(synchIndex2, synchIndex3)
elseif isNight() and getPokemonNature(1) == synch3 then
if huntMap3 == "Zone 1" then
Zone1()
elseif huntMap3 == "Zone 2" then
Zone2()
elseif huntMap3 == "Zone 3" then
Zone3()
elseif huntMap3 == "Zone 4" then
Zone4()
elseif huntMap3 == "Zone 5" then
Zone5()
elseif huntMap3 == "Zone 6" then
Zone6()
end
end

elseif synch1 == synch3 and synch2 ~= synch3 then

if isMorning() and getPokemonNature(1) ~= synch1 then
return swapPokemon(synchIndex1, synchIndex2)
elseif isMorning() and getPokemonNature(1) == synch1 then
if huntMap1 == "Zone 1" then
Zone1()
elseif huntMap1 == "Zone 2" then
Zone2()
elseif huntMap1 == "Zone 3" then
Zone3()
elseif huntMap1 == "Zone 4" then
Zone4()
elseif huntMap1 == "Zone 5" then
Zone5()
elseif huntMap1 == "Zone 6" then
Zone6()
end
end
if isNoon() and getPokemonNature(1) ~= synch2 then
return swapPokemon(synchIndex2, synchIndex1)
elseif isNoon() and getPokemonNature(1) == synch2 then
if huntMap2 == "Zone 1" then
Zone1()
elseif huntMap2 == "Zone 2" then
Zone2()
elseif huntMap2 == "Zone 3" then
Zone3()
elseif huntMap2 == "Zone 4" then
Zone4()
elseif huntMap2 == "Zone 5" then
Zone5()
elseif huntMap2 == "Zone 6" then
Zone6()
end
end
if isNight() and getPokemonNature(1) ~= synch3 then
return swapPokemon(synchIndex2, synchIndex3)
elseif isNight() and getPokemonNature(1) == synch3 then
if huntMap3 == "Zone 1" then
Zone1()
elseif huntMap3 == "Zone 2" then
Zone2()
elseif huntMap3 == "Zone 3" then
Zone3()
elseif huntMap3 == "Zone 4" then
Zone4()
elseif huntMap3 == "Zone 5" then
Zone5()
elseif huntMap3 == "Zone 6" then
Zone6()
end
end

elseif synch1 == synch3 and synch2 == synch3 then

if isMorning() and getPokemonNature(1) == synch1 then
if huntMap1 == "Zone 1" then
Zone1()
elseif huntMap1 == "Zone 2" then
Zone2()
elseif huntMap1 == "Zone 3" then
Zone3()
elseif huntMap1 == "Zone 4" then
Zone4()
elseif huntMap1 == "Zone 5" then
Zone5()
elseif huntMap1 == "Zone 6" then
Zone6()
end
end
if isNoon() and getPokemonNature(1) == synch2 then
if huntMap2 == "Zone 1" then
Zone1()
elseif huntMap2 == "Zone 2" then
Zone2()
elseif huntMap2 == "Zone 3" then
Zone3()
elseif huntMap2 == "Zone 4" then
Zone4()
elseif huntMap2 == "Zone 5" then
Zone5()
elseif huntMap2 == "Zone 6" then
Zone6()
end
end
if isNight() and getPokemonNature(1) == synch3 then
if huntMap3 == "Zone 1" then
Zone1()
elseif huntMap3 == "Zone 2" then
Zone2()
elseif huntMap3 == "Zone 3" then
Zone3()
elseif huntMap3 == "Zone 4" then
Zone4()
elseif huntMap3 == "Zone 5" then
Zone5()
elseif huntMap3 == "Zone 6" then
Zone6()
end
end

end

end
function sleepPP()
if sleepmove == "Hypnosis" or sleepmove == "Spore" or sleepmove == "Sleep Powder" or sleepmove ~= "None" then
return getRemainingPowerPoints(sleeper, sleepmove) >= 1
elseif sleepmove == "None" then
isPokemonUsable(sleeper)
end
end
function fswipePP()
if weakmove == "False Swipe" or weakmove ~= "None" then
return getRemainingPowerPoints(falseswiper, weakmove) >= 1
elseif weakmove == "None" then
isPokemonUsable(falseswiper)
end
end

function onPathAction()
if not isMounted() and mountSwitch == true and hasItem(mount) and not isSurfing() and isOutside() then
log("---------------------------")
log("~~~ Riding on my pet!!! ~~~")
log("---------------------------")
return useItem(mount)

elseif sleepPP() and fswipePP() and isPokemonUsable(1) and isPokemonUsable(synchIndex2) and isPokemonUsable(synchIndex3) and isPokemonUsable(falseswiper) and getPokemonHealthPercent(falseswiper) > fswipeHP and getPokemonHealthPercent(sleeper) > sleeperHP and isPokemonUsable(sleeper) then

if singleCatch then
if huntMap == "Zone 1" then
Zone1()
elseif huntMap == "Zone 2" then
Zone2()
elseif huntMap == "Zone 3" then
Zone3()
elseif huntMap == "Zone 4" then
Zone4()
elseif huntMap == "Zone 5" then
Zone5()
elseif huntMap == "Zone 6" then
Zone6()
end
elseif multipleCatch then
natureSwap()
end
else
pc()
end

end

function onBattleAction()

if isWildBattle() and ((catchShiny and isOpponentShiny()) or (catchUncaught and not isAlreadyCaught())) then
if fswipeOn then
log("-------- Commencing False Swipe --------")
fswipe()
elseif sleepOn then
log("-------- Commencing Sleep Move --------")
sleep()
elseif advanceCatchOn then
log("-------- Commencing False Swipe with Sleep Move --------")
advanceCatch()
elseif normalCatchOn then
log("-------- Starting to throw Pokeballs --------")
normal()
end
elseif isWildBattle() and getOpponentName() == "Beldum" then
log("-------- Commencing Sleep Move --------")
sleep()
elseif singleCatch and getOpponentName() == toHunt then
if fswipeOn then
log("-------- Commencing False Swipe --------")
fswipe()
elseif sleepOn then
log("-------- Commencing Sleep Move --------")
sleep()
elseif advanceCatchOn then
log("-------- Commencing False Swipe with Sleep Move --------")
advanceCatch()
elseif normalCatchOn then
log("-------- Starting to throw Pokeballs --------")
normal()
end
elseif multipleCatch and (getOpponentName() == toHunt1 or getOpponentName() == toHunt2 or getOpponentName() == toHunt3) then
if fswipeOn then
log("-------- Commencing False Swipe --------")
fswipe()
elseif sleepOn then
log("-------- Commencing Sleep Move --------")
sleep()
elseif advanceCatchOn then
log("-------- Commencing False Swipe with Sleep Move --------")
advanceCatch()
elseif normalCatchOn then
log("-------- Starting to throw Pokeballs --------")
normal()
end
elseif Add and (getOpponentName() == addHunt1 or getOpponentName() == addHunt2 or getOpponentName() == addHunt3) then
if fswipeOn then
log("-------- Commencing False Swipe --------")
fswipe()
elseif sleepOn then
log("-------- Commencing Sleep Move --------")
sleep()
elseif advanceCatchOn then
log("-------- Commencing False Swipe with Sleep Move --------")
advanceCatch()
elseif normalCatchOn then
log("-------- Starting to throw Pokeballs --------")
normal()
end
elseif huntandFarm then
return attack() or sendAnyPokemon() or run() or sendUsablePokemon()
elseif (getOpponentName() == "Wobbuffet" ) then

return attack() or sendAnyPokemon()
else
return run() or sendUsablePokemon() or attack() or sendAnyPokemon()
end

end

function normal()
return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or attack() or run()
end

function advanceCatch()
if getActivePokemonNumber() == 1 then
return sendPokemon(falseswiper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() > 1 ) then
return weakAttack() or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
elseif ( getActivePokemonNumber() == sleeper ) and ( getOpponentStatus() ~= "SLEEP" and getOpponentStatus() ~= "PARALIZE" and getOpponentStatus() ~= "POISON" and getOpponentStatus() ~= "BURN" ) and ( getOpponentHealth() == 1 ) then
return useMove(sleepmove) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() == 1 ) then
return sendPokemon(sleeper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
elseif getOpponentStatus() == "SLEEP" or getOpponentStatus() == "PARALIZE" or getOpponentStatus() == "POISON" or getOpponentStatus() == "BURN" then
return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or attack() or run()
else
return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or attack() or run()
end
end

function fswipe()
if getActivePokemonNumber() == 1 then
return sendPokemon(falseswiper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
elseif ( getActivePokemonNumber() == falseswiper ) and ( getOpponentHealth() > 1 ) then
return weakAttack() or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
elseif getOpponentHealth() == 1 then
return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or attack() or run()
end
end
function sleep()
if getActivePokemonNumber() == 1 then
return sendPokemon(sleeper) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or run()
elseif ( getActivePokemonNumber() == sleeper ) and ( getOpponentStatus() ~= "SLEEP" and getOpponentStatus() ~= "PARALIZE" and getOpponentStatus() ~= "POISON" and getOpponentStatus() ~= "BURN" ) then
return useMove(sleepmove) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
elseif getOpponentStatus() == "SLEEP" or getOpponentStatus() == "PARALIZE" or getOpponentStatus() == "POISON" or getOpponentStatus() == "BURN" then
return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()

end
end



function onStart()

startime = os.time()
shinyCounter = 0
pokecenterCounter = 0
wildCounter = 0
pokeballCounter = 0
startMoney = getMoney()
poke1 = 0
poke2 = 0
poke3 = 0
poke = 0
add1 = 0
add2 = 0
add3 = 0
log("-----------------------------------------------------------")
log("|---- We are now Commencing the Catch Routine ----|")
log("-----------------------------------------------------------")
if multipleCatch then
log("-------- MULTI-CATCHING STARTED --------")
log("-------- Script Information --------")
log("~~~HUNTED POKEMONS~~~")
log("-Morning Time: "..toHunt1.."- -Location: Hoenn Safari "..huntMap1.." -")
log("-Day Time: "..toHunt2.."- -Location: Hoenn Safari "..huntMap2.." -")
log("-Night Time: "..toHunt3.."- -Location: Hoenn Safari "..huntMap3.." -")
log("--------------------------------------")
elseif singleCatch then
log("-------- SINGLE-CATCHING STARTED --------")
log("-------- Script Information --------")
log("-We will hunt "..toHunt.." all Day!!!- -Location: Hoenn Safari "..huntMap.." -")
log("--------------------------------------")
end


end
function onDialogMessage(pokecenter)
if stringContains(pokecenter, "Would you like me to heal your Pokemon?") then
pokecenterCounter = pokecenterCounter + 1
end
end
function onBattleMessage(wild)

if stringContains(wild, "A Wild SHINY ") then
shinyCounter = shinyCounter + 1

elseif stringContains(wild, "You throw") then
pokeballCounter = pokeballCounter + 1

elseif wild == "A Wild [FF9900]"..toHunt.."[-] Attacks!" then
poke = poke + 1

elseif wild == "A Wild [FF9900]"..toHunt1.."[-] Attacks!" then
poke1 = poke1 + 1

elseif wild == "A Wild [FF9900]"..toHunt2.."[-] Attacks!" then
poke2 = poke2 + 1

elseif wild == "A Wild [FF9900]"..toHunt3.."[-] Attacks!" then
poke3 = poke3 + 1

elseif stringContains(wild, "A Wild ") then
wildCounter = wildCounter + 1
end

end



function onPause()

log(" --------------------------------------------")
log("|--------- CATCH ROUTINE PAUSED ----------|")
log(" --------------------------------------------")
log("|--------- Move Remaining Power Points ----------|")
log("--------------------------------------")
log("False Swipe: " .. tostring(getRemainingPowerPoints(falseswiper,weakmove)))
log("Sleep Move: " .. tostring(getRemainingPowerPoints(sleeper,sleepmove)))
log("-----------------------------------------------------------")

log(" ")
if multipleCatch then
log("-------- MULTI-CATCHING Status --------")
log(" ")
log("~~~HUNTED POKEMONS~~~")
log("- "..toHunt1..": "..poke1)
log("- "..toHunt2..": "..poke2)
log("- "..toHunt3..": "..poke3)
log("--------------------------------------")
elseif singleCatch then
log("-------- SINGLE-CATCHING Status --------")
log(" ")
log("- "..toHunt..": "..poke)
log("--------------------------------------")
end


log(" --------------------------------------------")
log("Pokeball's used: " .. pokeballCounter)
log("-----------------------------------------------------------")
log("Shinies Caught: " .. shinyCounter)
log("Pokemons encountered: " .. wildCounter)
log("---------------------------------------------")
log("Times in Pokecenter: " .. pokecenterCounter)
if huntandFarm then
log("Pokedollars earned: "..tostring(getMoney() - startMoney))
end
log("---------------------------------------------")
end

function onStop()
log("-----------------------------------------------------------")
log("---------------------- Routine Stopped ---------------------")
log("-----------------------------------------------------------")
endtime = os.time()
log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/3600 ).. " hours")
log("or")
log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/60 ).. " minutes")
log("-----------------------------------------------------------")
end
 
Reply
hey bro, i really want and need to use ur script. however, i dont know how to use the .lua script. could you please help me? thank you very much Smile
 
Reply
it didn't work, : Error during the script execution: chunk_1Sad505,4-292): cannot convert a nil to a clr type System.Int32
what does this mean?
 
Reply
Sorry for my English.
I have read your code. I guess your function to check if you need PC or not is not good.
If we use normal catch mode, we can only check if all of team dead or not.
In advance mod , we must check if user use sleeper or not. If they don't sleeper, checking sleepPP is wrong.
Checking using False Swiper, Syncer or not is also necessary.
I hope you will corret the code as soon as possible.
 
Reply
how to fix the poke center loop ?
 
Reply
Hi Why cant i leave the pokecenter, Im new so i dont know how and why i can the bot leave the pc it always use the center and heal, ( maybe he loves nurse joy )
And all the way down  l
                                   l
                                   v


[Image: E64lmo2.png?1]
Show ContentHoenn Safari:
 
Reply
(2017-05-24, 09:26:49)derpro Hi Why cant i leave the pokecenter, Im new so i dont know how and why i can the bot leave the pc it always use the center and heal, ( maybe he loves nurse joy )
And all the way down  l
                                   l
                                   v


[Image: E64lmo2.png?1]
Show ContentHoenn Safari:

i have the same problem i dont get it...
 
Reply
Im gonna update this after I finish questing my new account Big Grin

If you want to donate some account that are finish kanto - hoenn I would love it ! Hehehe.
God Karp Trainer loading... *splash*splash Huh

 
Reply
SAFARI TIME IS CURRENTLY ON TEST. Please visit this link to follow my update https://github.com/r3dskhie/SAFARI-TIME
God Karp Trainer loading... *splash*splash Huh

 
Reply
(2017-05-31, 04:59:36)redskhie SAFARI TIME IS CURRENTLY ON TEST. Please visit this link to follow my update https://github.com/r3dskhie/SAFARI-TIME

Thanks for all the hard work Redd! Greatly appreciate all you are doing to provide these scripts.
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)