Hello There, Guest! Login Register


Squirtle-Farmer / Shellder Farmer
#76
Yeaaa, this doesn't work anymore Tongue
 
Reply
#77
chunk_1: (71,0-12): unexpected symbol near 'huntShellder'
 
Reply
#78
Not work please fix it Sad
 
Reply
#79
I got an really wierd bug
http://www.bilder-upload.eu/show.php?fil...046547.png
 
Reply
#80
Do you still want to use this script? I could update it. Smile
Just respond and I'll do it.
 
Reply
#81
Hey Royal, it would be so nice if you update this script. Please update it :-)
 
Reply
#82
Would it be hard to update his script?
 
Reply
#83
(2018-05-04, 03:10:49)EMSENTRY Would it be hard to update his script?

I'll check it. I don't have a account currently, could somebody tell me what's not working?
 
Reply
#84
(2018-05-04, 08:21:44)Royal
(2018-05-04, 03:10:49)EMSENTRY Would it be hard to update his script?

I'll check it. I don't have a account currently, could somebody tell me what's not working?

Wow thanks for the quick answer Smile


Looks like there is a loop in the Pokecenter Vermilion

[14:16:31] Bot started
[14:16:31] Config | Buying Pokeballs is activated!
[14:16:31] Config | The bot will buy: 50 Pokeballs.
[14:16:31] Config | The bot moves to the next Pokemart if you have less then: 100 Pokeballs.
[14:16:31] Config | Using Debug Logs is activated!
[14:16:31] Config | Private messages are disabled!
[14:16:31] Config | The bot will attack every Pokemon!
[14:16:31] Config | The bot will use special catch feature!
[14:16:31] Config | Your first Sync Pokemon is on index 1 and use the nature Bold.
[14:16:31] Config | Your second Sync Pokemon is on index 6 and use the nature Adamant.
[14:16:31] Config | Your false swiper is on index 3.
[14:16:31] Config | Your sleeper is on index 4 and use the Sleep Attack Sleep Powder.
[14:16:31] Config | Hunting Shellder is deactivated!
[14:16:31] Farming / Healing | Catch Squirtle with Special Catch
[14:16:35] Farming / Healing | Catch Squirtle with Special Catch
[14:16:35] Good afternoon, Trainer!
[14:16:35] Welcome to Vermilion CIty Pokemon Center.
[14:16:35] Info | Times in Pokecenter: 1
[14:16:35] Would you like me to heal your Pokemon?
[14:16:38] Okay, let me take a look at those Pokemon.
[14:16:45] There you go, take care of them!
[14:16:45] Have a nice afternoon!
[14:16:48] Farming / Healing | Catch Squirtle with Special Catch
[14:16:49] Good afternoon, Trainer!
[14:16:49] Welcome to Vermilion CIty Pokemon Center.
[14:16:49] Info | Times in Pokecenter: 2
[14:16:49] Would you like me to heal your Pokemon?
[14:16:52] Okay, let me take a look at those Pokemon.
[14:16:57] There you go, take care of them!
[14:16:57] Have a nice afternoon!
[14:17:01] Farming / Healing | Catch Squirtle with Special Catch
[14:17:01] Good afternoon, Trainer!
[14:17:01] Welcome to Vermilion CIty Pokemon Center.
[14:17:01] Info | Times in Pokecenter: 3
[14:17:01] Would you like me to heal your Pokemon?
[14:17:03] Okay, let me take a look at those Pokemon.
[14:17:07] There you go, take care of them!
[14:17:07] Have a nice afternoon!
[14:17:10] Farming / Healing | Catch Squirtle with Special Catch
[14:17:11] Good afternoon, Trainer!
[14:17:11] Welcome to Vermilion CIty Pokemon Center.
[14:17:11] Info | Times in Pokecenter: 4
[14:17:11] Would you like me to heal your Pokemon?
 
Reply
#85
Hello there Royal,
i editted your Script in order to catch Electabuzz in Power Plant
but i've had a problem with <eof>

I wonder if you could take a look and gimme an advice for the script

here it is
-- ########################## CONFIG ##########################
-- ######### Change these lines for your own purpose ##########
-- ############################################################

-- ##### Logs #####
-- Set them to false if you don't want to use logs,
-- I would advise you to use logs, so you don't
-- need to login with the normal client
-- if you want to look if the bot catch any Shinies
usingLogs = true

-- If you encounter a bug this logs can help me to fix this bug,
-- so please turn this to true if you want to support this script
usingDebugLogs = true
-- ################

-- ##### Buying Pokeballs ######
-- Set them to false if you don't want to buy Pokeballs,
-- I would advise you to set them to true, so you won't miss
-- any Pokemon because you had not enough Pokeballs
buyingPokeballs = false

-- Set the number of Pokeballs you would like to buy                      
quantity = 100    

itemName = "Pokeball"    

-- If you have less than the number what you entered then the bot will
-- buy new Pokeballs
atLeast = 15          
-- #############################

-- ##### Attack Config #####
-- Set them to true if you want to attack every Pokemon
-- set them to false if you want to run away from every Pokemon
attackPokemon = false
-- #########################

-- ##### Catch Config #####
-- If you set them to true the bot will use a Sync, a False Swiper and a Pokemon with sleep to catch every Pokemon
usingSpecialCatch = true
-- ########################

-- ##### Private Message #####
-- turn it to true if you want to disable private messages (recommend)
allowPrivateMessage = true
-- ###########################

-- ################## Special Catch Config ####################
-- ## Only change these lines if you activated special catch ##
-- Set the index of your first Sync Pokemon
indexOfSync1 = 1
-- Set the nature for your first Sync Pokemon
nature1 = "Adamant"
-- Set the index of your second Sync Pokemon
indexOfSync2 = 2
-- Set the nature of your second Sync Pokemon
nature2 = "Modest"
-- Set the index of your False Swiper
indexOfFalseSwiper = 3
-- Set the Index of your Sleeper
indexOfSleeper = 4
-- Set the Sleep Attack for your Sleeper
sleepAttack = "Hypnosis"
-- ############################################################

-- [[Below these lines is the Script if you haven't any experience about Lua scripting then don't change anything!]]
-- #########################################################################################################################

name = "Power Plant Electabuzz Farmer"
author = "Royal"
description = [[Start the Script in Route 10, Cerulean City, Pokecenter Cerulean and Cerulean Pokemart.
It will catch any Shiny, any Electabuzz.
If you found any bugs or have any suggestions feel free to report it to me.]]

function onStart()
   -- Display the Configurations if usingLogs is true
   if usingLogs then
       if buyingPokeballs then
           log("Config | Buying Pokeballs is activated!")
           log("Config | The bot will buy: " .. quantity .. " Pokeballs.")
           log("Config | The bot moves to the next Pokemart if you have less then: " .. atLeast .. " Pokeballs.")
       elseif buyingPokeballs == false then
           log("Config | Buying Pokeballs is deactivated!")
       end
       if usingDebugLogs then
           log("Config | Using Debug Logs is activated!")
       elseif usingDebugLogs == false then
           log("Config | Using Debug Logs is deactivated!")
       end
       if allowPrivateMessage then
           log("Config | Private messages are disabled!")
       elseif allowPrivateMessage == false then
           log("Config | Private messages aren't disabled!")
       end
       if attackPokemon then
           log("Config | The bot will attack every Pokemon!")
       elseif attackPokemon == false then
           log("Config | The bot will run away from every Pokemon!")
       end
       if usingSpecialCatch then
           log("Config | The bot will use special catch feature!")
           log("Config | Your first Sync Pokemon is on index " .. indexOfSync1 .. " and use the nature " .. nature1 .. ".")
           log("Config | Your second Sync Pokemon is on index " .. indexOfSync2 .. " and use the nature " .. nature2 .. ".")
           log("Config | Your false swiper is on index " .. indexOfFalseSwiper .. ".")
           log("Config | Your sleeper is on index " .. indexOfSleeper .. " and use the Sleep Attack " .. sleepAttack .. ".")
       elseif usingSpecialCatch == false then
           log("Config | The bot won't use special catch feature!")
       end
   end
   
   wildCounter = 0
   shinyCounter = 0
   electabuzzCounter = 0
   pokecenterCounter = 0
   shellderCounter = 0
   startingMoney = getMoney()
   pokeballCounter = 0
   pokemonsCaught = 0
   

end

if allowPrivateMessage then
   if isPrivateMessageEnabled() then
       disablePrivateMessage()
   end
end


function useLogs()
   if usingLogs then
       log("Info | Pokemons encountered: " .. wildCounter)
       log("Info | Shinies encountered: " .. shinyCounter)
       log("Info | Electabuzz ecountered: " .. electabuzzCounter)
       log("Info | Pokemons caught: " .. pokemonsCaught)
   end
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 onBattleMessage(wild)
   if stringContains(wild, "A Wild SHINY ") then
       shinyCounter = shinyCounter + 1
       wildCounter = wildCounter + 1
       useLogs()
   elseif wild == "A Wild [FF9900]Electabuzz[-] Attacks!" then
       squirtleCounter = electabuzzCounter + 1
       wildCounter = wildCounter + 1
       useLogs()
   elseif stringContains(wild, "A Wild ") then
       wildCounter = wildCounter + 1
       useLogs()
   elseif stringContains(wild, "Pokedollar(s)") then
       if usingLogs then
           log("Info | Pokedollars earned: "..tostring(getMoney() - startingMoney).." (" ..tostring((getMoney() - startingMoney)/wildCounter).." average)")
       end
   elseif stringContains(wild, "Success!") then
       pokemonsCaught = pokemonsCaught + 1
   elseif stringContains(wild, "You throw") then
       pokeballCounter = pokeballCounter + 1
   end
end

function onPause()

   if usingLogs then
       log("Times in Pokecenter: " .. pokecenterCounter)
       log("Pokemons encountered: " .. wildCounter)
       log("Shinies encountered: " .. shinyCounter .. " (" .. 100 * (shinyCounter/wildCounter) .. "%)")
       log("Electabuzzs encountered: " .. electabuzzCounter .. " (" .. 100 * (electabuzzCounter/wildCounter) .. "%)")
       log("Pokedollars earned: "..tostring(getMoney() - startingMoney).." (" ..tostring((getMoney() - startingMoney)/wildCounter).." average)")
       log("Pokeballs used: " .. pokeballCounter)
   end
end

function onPathAction()

   -- Buying Pokeballs

   if getItemQuantity(itemName) < atLeast and buyingPokeballs == true then
       if getMapName() == "Cerulean City" then
           moveToMap("Cerulean Pokemart")
       elseif getMapName() == "Route 10" then
           moveToMap("Route 9")
       elseif getMapName() == "Route 9" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean Pokemart" and not isShopOpen() then
           talkToNpcOnCell(3, 5)
       elseif isShopOpen() then
           buyItem(itemName, quantity)
       end
   end

   -- Normal Electabuzz, without Special Catch
   
   if usingSpecialCatch == false and isPokemonUsable(1) then
       if usingDebugLogs then
           log("Farming | Catch Electabuzz without Special Catch | Hunting Electabuzz")
       end
       if getMapName() == "Route 10" then
           moveToMap("Power Plant")
       elseif getMapName() == "Pokecenter Cerulean" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean Pokemart" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Vermilion City" then
           moveToMap("Route 9")
       elseif getMapName() == "Route 9" then
           moveToCell(93,33)
       if getMapName() == "Power Plant" then
           moveToRectangle(4,17,16,18)
       end
   end
   if usingSpecialCatch == false and not isPokemonUsable(1) then
       if usingDebugLogs then
           log("Farming / Healing | Catch Electabuzz without Special Catch")
       end
       if getMapName() == "Power Plant" then
           moveToMap("Route 10")
       if getMapName() == "Route 10" then
           moveToMap("Route 9")
       if getMapName() == "Route 9" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean Pokemart" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean City" then
           moveToMap("Pokecenter Cerulean")
       elseif getMapName() == "Pokecenter Cerulean" then
           usePokecenter()
       end
   end
   
   -- Electabuzz, with Special Catch

   if usingSpecialCatch and isPokemonUsable(1) and isPokemonUsable(indexOfFalseSwiper) and isPokemonUsable(indexOfSleeper) and getRemainingPowerPoints(indexOfFalseSwiper, "False Swipe") >= 1 and getRemainingPowerPoints(indexOfSleeper, sleepAttack) >= 1 then
       if usingDebugLogs then
           log("Farming | Catch Electabuzz with Special Catch")
       end
       if getPokemonNature(1) ~= "Bold" then
           swapPokemon(indexOfSync2, indexOfSync1)
       if getMapName() == "Route 10" then
           moveToMap("Power Plant")
       elseif getMapName() == "Pokecenter Cerulean" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean Pokemart" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean City" then
           moveToMap("Route 9")
       elseif getMapName() == "Route 9" then
           moveToCell(93,33)
       if getMapName() == "Power Plant" then
           moveToRectangle(4,17,16,18)
       end
   end
   if not isPokemonUsable(1) or not isPokemonUsable(indexOfFalseSwiper) or not isPokemonUsable(indexOfSleeper) or getRemainingPowerPoints(indexOfFalseSwiper, "False Swipe") < 1 or getRemainingPowerPoints(indexOfSleeper, sleepAttack) < 1 then
       if usingDebugLogs then
           log("Farming / Healing | Catch Electabuzz with Special Catch")
       end
       if getMapName() == "Power Plant" then
           moveToMap("Route 10")
       if getMapName() == "Route 10" then
           moveToMap("Route 9")
       if getMapName() == "Route 9" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean Pokemart" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean City" then
           moveToMap("Pokecenter Cerulean")
       elseif getMapName() == "Pokecenter Cerulean" then
           usePokecenter()
       end
   end

end

function onBattleAction()

   -- Using Special Catch

   if usingSpecialCatch and (isWildBattle() and (isOpponentShiny() or getOpponentName() == "Electabuzz")) then
       if getActivePokemonNumber() == 1 then
           if usingDebugLogs then
               log("Battle | Sending False Swiper")
           end
           sendPokemon(indexOfFalseSwiper)
       elseif ( getActivePokemonNumber() == indexOfFalseSwiper ) and (getOpponentHealth() > 1) then
           if usingDebugLogs then
               log("Battle | Using False Swipe")
           end
           return useMove("False Swipe") or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")
       elseif ( getActivePokemonNumber() == indexOfFalseSwiper ) and (getOpponentHealth() == 1) then
           if usingDebugLogs then
               log("Battle | Sending Sleeper")
           end
           sendPokemon(indexOfSleeper)
       elseif (getActivePokemonNumber() == indexOfSleeper) and (getOpponentStatus() ~= "SLEEP") then
           if usingDebugLogs then
               log("Battle | Using a Sleep Attack")
           end
           return useMove(sleepAttack) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")
       elseif (getActivePokemonNumber() == indexOfSleeper) and ( getOpponentStatus() == "SLEEP") then
           if usingDebugLogs then
               log("Battle | Using Pokeballs")
           end
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")
       end
   
   
       -- Don't using Special Catch
   
   elseif usingSpecialCatch == false and isWildBattle() and (isOpponentShiny() or getOpponentName() == "Electabuzz") then
       if usingDebugLogs then
           log("Battle | Catch Pokemon (without Special Catch)")
       end
       return useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") or sendUsablePokemon() or run()
   
   -- Attack Pokemon
   
   elseif attackPokemon and isWildBattle() and not isOpponentShiny() or not getOpponentName() == "Electabuzz" then
       if usingDebugLogs then
           log("Battle | Attacking Pokemon")
       end
       return attack() or sendUsablePokemon() or run()
       
       -- Run Away
   
   elseif attackPokemon == false and isWildBattle() and not isOpponentShiny() or not getOpponentName() == "Electabuzz" then
       if usingDebugLogs then
           log("Battle | Run away from Pokemon")
       end
       return run() or sendUsablePokemon() or attack()
   end

end
and here's the problem
Quote[1:20:09 PM] Could not load script Electabuzz Farmer at Power Plant Buys ball test.lua: 
chunk_1Sad342,3): unexpected symbol near '<eof>'
[1:20:09 PM] Bot stopped
 
Reply
#86
(2018-08-06, 06:23:43)ladori Hello there Royal,
i editted your Script in order to catch Electabuzz in Power Plant
but i've had a problem with <eof>

I wonder if you could take a look and gimme an advice for the script

here it is
-- ########################## CONFIG ##########################
-- ######### Change these lines for your own purpose ##########
-- ############################################################

-- ##### Logs #####
-- Set them to false if you don't want to use logs,
-- I would advise you to use logs, so you don't
-- need to login with the normal client
-- if you want to look if the bot catch any Shinies
usingLogs = true

-- If you encounter a bug this logs can help me to fix this bug,
-- so please turn this to true if you want to support this script
usingDebugLogs = true
-- ################

-- ##### Buying Pokeballs ######
-- Set them to false if you don't want to buy Pokeballs,
-- I would advise you to set them to true, so you won't miss
-- any Pokemon because you had not enough Pokeballs
buyingPokeballs = false

-- Set the number of Pokeballs you would like to buy                      
quantity = 100    

itemName = "Pokeball"    

-- If you have less than the number what you entered then the bot will
-- buy new Pokeballs
atLeast = 15          
-- #############################

-- ##### Attack Config #####
-- Set them to true if you want to attack every Pokemon
-- set them to false if you want to run away from every Pokemon
attackPokemon = false
-- #########################

-- ##### Catch Config #####
-- If you set them to true the bot will use a Sync, a False Swiper and a Pokemon with sleep to catch every Pokemon
usingSpecialCatch = true
-- ########################

-- ##### Private Message #####
-- turn it to true if you want to disable private messages (recommend)
allowPrivateMessage = true
-- ###########################

-- ################## Special Catch Config ####################
-- ## Only change these lines if you activated special catch ##
-- Set the index of your first Sync Pokemon
indexOfSync1 = 1
-- Set the nature for your first Sync Pokemon
nature1 = "Adamant"
-- Set the index of your second Sync Pokemon
indexOfSync2 = 2
-- Set the nature of your second Sync Pokemon
nature2 = "Modest"
-- Set the index of your False Swiper
indexOfFalseSwiper = 3
-- Set the Index of your Sleeper
indexOfSleeper = 4
-- Set the Sleep Attack for your Sleeper
sleepAttack = "Hypnosis"
-- ############################################################

-- [[Below these lines is the Script if you haven't any experience about Lua scripting then don't change anything!]]
-- #########################################################################################################################

name = "Power Plant Electabuzz Farmer"
author = "Royal"
description = [[Start the Script in Route 10, Cerulean City, Pokecenter Cerulean and Cerulean Pokemart.
It will catch any Shiny, any Electabuzz.
If you found any bugs or have any suggestions feel free to report it to me.]]

function onStart()
   -- Display the Configurations if usingLogs is true
   if usingLogs then
       if buyingPokeballs then
           log("Config | Buying Pokeballs is activated!")
           log("Config | The bot will buy: " .. quantity .. " Pokeballs.")
           log("Config | The bot moves to the next Pokemart if you have less then: " .. atLeast .. " Pokeballs.")
       elseif buyingPokeballs == false then
           log("Config | Buying Pokeballs is deactivated!")
       end
       if usingDebugLogs then
           log("Config | Using Debug Logs is activated!")
       elseif usingDebugLogs == false then
           log("Config | Using Debug Logs is deactivated!")
       end
       if allowPrivateMessage then
           log("Config | Private messages are disabled!")
       elseif allowPrivateMessage == false then
           log("Config | Private messages aren't disabled!")
       end
       if attackPokemon then
           log("Config | The bot will attack every Pokemon!")
       elseif attackPokemon == false then
           log("Config | The bot will run away from every Pokemon!")
       end
       if usingSpecialCatch then
           log("Config | The bot will use special catch feature!")
           log("Config | Your first Sync Pokemon is on index " .. indexOfSync1 .. " and use the nature " .. nature1 .. ".")
           log("Config | Your second Sync Pokemon is on index " .. indexOfSync2 .. " and use the nature " .. nature2 .. ".")
           log("Config | Your false swiper is on index " .. indexOfFalseSwiper .. ".")
           log("Config | Your sleeper is on index " .. indexOfSleeper .. " and use the Sleep Attack " .. sleepAttack .. ".")
       elseif usingSpecialCatch == false then
           log("Config | The bot won't use special catch feature!")
       end
   end
   
   wildCounter = 0
   shinyCounter = 0
   electabuzzCounter = 0
   pokecenterCounter = 0
   shellderCounter = 0
   startingMoney = getMoney()
   pokeballCounter = 0
   pokemonsCaught = 0
   

end

if allowPrivateMessage then
   if isPrivateMessageEnabled() then
       disablePrivateMessage()
   end
end


function useLogs()
   if usingLogs then
       log("Info | Pokemons encountered: " .. wildCounter)
       log("Info | Shinies encountered: " .. shinyCounter)
       log("Info | Electabuzz ecountered: " .. electabuzzCounter)
       log("Info | Pokemons caught: " .. pokemonsCaught)
   end
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 onBattleMessage(wild)
   if stringContains(wild, "A Wild SHINY ") then
       shinyCounter = shinyCounter + 1
       wildCounter = wildCounter + 1
       useLogs()
   elseif wild == "A Wild [FF9900]Electabuzz[-] Attacks!" then
       squirtleCounter = electabuzzCounter + 1
       wildCounter = wildCounter + 1
       useLogs()
   elseif stringContains(wild, "A Wild ") then
       wildCounter = wildCounter + 1
       useLogs()
   elseif stringContains(wild, "Pokedollar(s)") then
       if usingLogs then
           log("Info | Pokedollars earned: "..tostring(getMoney() - startingMoney).." (" ..tostring((getMoney() - startingMoney)/wildCounter).." average)")
       end
   elseif stringContains(wild, "Success!") then
       pokemonsCaught = pokemonsCaught + 1
   elseif stringContains(wild, "You throw") then
       pokeballCounter = pokeballCounter + 1
   end
end

function onPause()

   if usingLogs then
       log("Times in Pokecenter: " .. pokecenterCounter)
       log("Pokemons encountered: " .. wildCounter)
       log("Shinies encountered: " .. shinyCounter .. " (" .. 100 * (shinyCounter/wildCounter) .. "%)")
       log("Electabuzzs encountered: " .. electabuzzCounter .. " (" .. 100 * (electabuzzCounter/wildCounter) .. "%)")
       log("Pokedollars earned: "..tostring(getMoney() - startingMoney).." (" ..tostring((getMoney() - startingMoney)/wildCounter).." average)")
       log("Pokeballs used: " .. pokeballCounter)
   end
end

function onPathAction()

   -- Buying Pokeballs

   if getItemQuantity(itemName) < atLeast and buyingPokeballs == true then
       if getMapName() == "Cerulean City" then
           moveToMap("Cerulean Pokemart")
       elseif getMapName() == "Route 10" then
           moveToMap("Route 9")
       elseif getMapName() == "Route 9" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean Pokemart" and not isShopOpen() then
           talkToNpcOnCell(3, 5)
       elseif isShopOpen() then
           buyItem(itemName, quantity)
       end
   end

   -- Normal Electabuzz, without Special Catch
   
   if usingSpecialCatch == false and isPokemonUsable(1) then
       if usingDebugLogs then
           log("Farming | Catch Electabuzz without Special Catch | Hunting Electabuzz")
       end
       if getMapName() == "Route 10" then
           moveToMap("Power Plant")
       elseif getMapName() == "Pokecenter Cerulean" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean Pokemart" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Vermilion City" then
           moveToMap("Route 9")
       elseif getMapName() == "Route 9" then
           moveToCell(93,33)
       if getMapName() == "Power Plant" then
           moveToRectangle(4,17,16,18)
       end
   end
   if usingSpecialCatch == false and not isPokemonUsable(1) then
       if usingDebugLogs then
           log("Farming / Healing | Catch Electabuzz without Special Catch")
       end
       if getMapName() == "Power Plant" then
           moveToMap("Route 10")
       if getMapName() == "Route 10" then
           moveToMap("Route 9")
       if getMapName() == "Route 9" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean Pokemart" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean City" then
           moveToMap("Pokecenter Cerulean")
       elseif getMapName() == "Pokecenter Cerulean" then
           usePokecenter()
       end
   end
   
   -- Electabuzz, with Special Catch

   if usingSpecialCatch and isPokemonUsable(1) and isPokemonUsable(indexOfFalseSwiper) and isPokemonUsable(indexOfSleeper) and getRemainingPowerPoints(indexOfFalseSwiper, "False Swipe") >= 1 and getRemainingPowerPoints(indexOfSleeper, sleepAttack) >= 1 then
       if usingDebugLogs then
           log("Farming | Catch Electabuzz with Special Catch")
       end
       if getPokemonNature(1) ~= "Bold" then
           swapPokemon(indexOfSync2, indexOfSync1)
       if getMapName() == "Route 10" then
           moveToMap("Power Plant")
       elseif getMapName() == "Pokecenter Cerulean" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean Pokemart" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean City" then
           moveToMap("Route 9")
       elseif getMapName() == "Route 9" then
           moveToCell(93,33)
       if getMapName() == "Power Plant" then
           moveToRectangle(4,17,16,18)
       end
   end
   if not isPokemonUsable(1) or not isPokemonUsable(indexOfFalseSwiper) or not isPokemonUsable(indexOfSleeper) or getRemainingPowerPoints(indexOfFalseSwiper, "False Swipe") < 1 or getRemainingPowerPoints(indexOfSleeper, sleepAttack) < 1 then
       if usingDebugLogs then
           log("Farming / Healing | Catch Electabuzz with Special Catch")
       end
       if getMapName() == "Power Plant" then
           moveToMap("Route 10")
       if getMapName() == "Route 10" then
           moveToMap("Route 9")
       if getMapName() == "Route 9" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean Pokemart" then
           moveToMap("Cerulean City")
       elseif getMapName() == "Cerulean City" then
           moveToMap("Pokecenter Cerulean")
       elseif getMapName() == "Pokecenter Cerulean" then
           usePokecenter()
       end
   end

end

function onBattleAction()

   -- Using Special Catch

   if usingSpecialCatch and (isWildBattle() and (isOpponentShiny() or getOpponentName() == "Electabuzz")) then
       if getActivePokemonNumber() == 1 then
           if usingDebugLogs then
               log("Battle | Sending False Swiper")
           end
           sendPokemon(indexOfFalseSwiper)
       elseif ( getActivePokemonNumber() == indexOfFalseSwiper ) and (getOpponentHealth() > 1) then
           if usingDebugLogs then
               log("Battle | Using False Swipe")
           end
           return useMove("False Swipe") or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")
       elseif ( getActivePokemonNumber() == indexOfFalseSwiper ) and (getOpponentHealth() == 1) then
           if usingDebugLogs then
               log("Battle | Sending Sleeper")
           end
           sendPokemon(indexOfSleeper)
       elseif (getActivePokemonNumber() == indexOfSleeper) and (getOpponentStatus() ~= "SLEEP") then
           if usingDebugLogs then
               log("Battle | Using a Sleep Attack")
           end
           return useMove(sleepAttack) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")
       elseif (getActivePokemonNumber() == indexOfSleeper) and ( getOpponentStatus() == "SLEEP") then
           if usingDebugLogs then
               log("Battle | Using Pokeballs")
           end
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")
       end
   
   
       -- Don't using Special Catch
   
   elseif usingSpecialCatch == false and isWildBattle() and (isOpponentShiny() or getOpponentName() == "Electabuzz") then
       if usingDebugLogs then
           log("Battle | Catch Pokemon (without Special Catch)")
       end
       return useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") or sendUsablePokemon() or run()
   
   -- Attack Pokemon
   
   elseif attackPokemon and isWildBattle() and not isOpponentShiny() or not getOpponentName() == "Electabuzz" then
       if usingDebugLogs then
           log("Battle | Attacking Pokemon")
       end
       return attack() or sendUsablePokemon() or run()
       
       -- Run Away
   
   elseif attackPokemon == false and isWildBattle() and not isOpponentShiny() or not getOpponentName() == "Electabuzz" then
       if usingDebugLogs then
           log("Battle | Run away from Pokemon")
       end
       return run() or sendUsablePokemon() or attack()
   end

end
and here's the problem
Quote[1:20:09 PM] Could not load script Electabuzz Farmer at Power Plant Buys ball test.lua: 
chunk_1Sad342,3): unexpected symbol near '<eof>'
[1:20:09 PM] Bot stopped

Good day,

I'll look into it. Wink

Fixed it. 

-- ########################## CONFIG ##########################
-- ######### Change these lines for your own purpose ##########
-- ############################################################

-- ##### Logs #####
-- Set them to false if you don't want to use logs,
-- I would advise you to use logs, so you don't
-- need to login with the normal client
-- if you want to look if the bot catch any Shinies
usingLogs = true

-- If you encounter a bug this logs can help me to fix this bug,
-- so please turn this to true if you want to support this script
usingDebugLogs = true
-- ################

-- ##### Buying Pokeballs ######
-- Set them to false if you don't want to buy Pokeballs,
-- I would advise you to set them to true, so you won't miss
-- any Pokemon because you had not enough Pokeballs
buyingPokeballs = false

-- Set the number of Pokeballs you would like to buy                      
quantity = 100    

itemName = "Pokeball"    

-- If you have less than the number what you entered then the bot will
-- buy new Pokeballs
atLeast = 15          
-- #############################

-- ##### Attack Config #####
-- Set them to true if you want to attack every Pokemon
-- set them to false if you want to run away from every Pokemon
attackPokemon = false
-- #########################

-- ##### Catch Config #####
-- If you set them to true the bot will use a Sync, a False Swiper and a Pokemon with sleep to catch every Pokemon
usingSpecialCatch = true
-- ########################

-- ################## Special Catch Config ####################
-- ## Only change these lines if you activated special catch ##
-- Set the index of your first Sync Pokemon
indexOfSync1 = 1
-- Set the nature for your first Sync Pokemon
nature1 = "Adamant"
-- Set the index of your second Sync Pokemon
indexOfSync2 = 2
-- Set the nature of your second Sync Pokemon
nature2 = "Modest"
-- Set the index of your False Swiper
indexOfFalseSwiper = 3
-- Set the Index of your Sleeper
indexOfSleeper = 4
-- Set the Sleep Attack for your Sleeper
sleepAttack = "Hypnosis"
-- ############################################################

-- [[Below these lines is the Script if you haven't any experience about Lua scripting then don't change anything!]]
-- #########################################################################################################################

name = "Power Plant Electabuzz Farmer"
author = "Royal"
description = [[Start the Script in Route 10, Cerulean City, Pokecenter Cerulean and Cerulean Pokemart.
It will catch any Shiny, any Electabuzz.
If you found any bugs or have any suggestions feel free to report it to me.]]

function onStart()
  -- Display the Configurations if usingLogs is true
  if usingLogs then
      if buyingPokeballs then
          log("Config | Buying Pokeballs is activated!")
          log("Config | The bot will buy: " .. quantity .. " Pokeballs.")
          log("Config | The bot moves to the next Pokemart if you have less then: " .. atLeast .. " Pokeballs.")
      elseif buyingPokeballs == false then
          log("Config | Buying Pokeballs is deactivated!")
      end
      if usingDebugLogs then
          log("Config | Using Debug Logs is activated!")
      elseif usingDebugLogs == false then
          log("Config | Using Debug Logs is deactivated!")
      end
      if allowPrivateMessage then
          log("Config | Private messages are disabled!")
      elseif allowPrivateMessage == false then
          log("Config | Private messages aren't disabled!")
      end
      if attackPokemon then
          log("Config | The bot will attack every Pokemon!")
      elseif attackPokemon == false then
          log("Config | The bot will run away from every Pokemon!")
      end
      if usingSpecialCatch then
          log("Config | The bot will use special catch feature!")
          log("Config | Your first Sync Pokemon is on index " .. indexOfSync1 .. " and use the nature " .. nature1 .. ".")
          log("Config | Your second Sync Pokemon is on index " .. indexOfSync2 .. " and use the nature " .. nature2 .. ".")
          log("Config | Your false swiper is on index " .. indexOfFalseSwiper .. ".")
          log("Config | Your sleeper is on index " .. indexOfSleeper .. " and use the Sleep Attack " .. sleepAttack .. ".")
      elseif usingSpecialCatch == false then
          log("Config | The bot won't use special catch feature!")
      end
  end
 
  wildCounter = 0
  shinyCounter = 0
  electabuzzCounter = 0
  pokecenterCounter = 0
  shellderCounter = 0
  startingMoney = getMoney()
  pokeballCounter = 0
  pokemonsCaught = 0
 

end


function useLogs()
  if usingLogs then
      log("Info | Pokemons encountered: " .. wildCounter)
      log("Info | Shinies encountered: " .. shinyCounter)
      log("Info | Electabuzz ecountered: " .. electabuzzCounter)
      log("Info | Pokemons caught: " .. pokemonsCaught)
  end
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 onBattleMessage(wild)
  if stringContains(wild, "A Wild SHINY ") then
      shinyCounter = shinyCounter + 1
      wildCounter = wildCounter + 1
      useLogs()
  elseif wild == "A Wild [FF9900]Electabuzz[-] Attacks!" then
      squirtleCounter = electabuzzCounter + 1
      wildCounter = wildCounter + 1
      useLogs()
  elseif stringContains(wild, "A Wild ") then
      wildCounter = wildCounter + 1
      useLogs()
  elseif stringContains(wild, "Pokedollar(s)") then
      if usingLogs then
          log("Info | Pokedollars earned: "..tostring(getMoney() - startingMoney).." (" ..tostring((getMoney() - startingMoney)/wildCounter).." average)")
      end
  elseif stringContains(wild, "Success!") then
      pokemonsCaught = pokemonsCaught + 1
  elseif stringContains(wild, "You throw") then
      pokeballCounter = pokeballCounter + 1
  end
end

function onPause()

  if usingLogs then
      log("Times in Pokecenter: " .. pokecenterCounter)
      log("Pokemons encountered: " .. wildCounter)
      log("Shinies encountered: " .. shinyCounter .. " (" .. 100 * (shinyCounter/wildCounter) .. "%)")
      log("Electabuzzs encountered: " .. electabuzzCounter .. " (" .. 100 * (electabuzzCounter/wildCounter) .. "%)")
      log("Pokedollars earned: "..tostring(getMoney() - startingMoney).." (" ..tostring((getMoney() - startingMoney)/wildCounter).." average)")
      log("Pokeballs used: " .. pokeballCounter)
  end
end

function onPathAction()

  -- Buying Pokeballs

  if getItemQuantity(itemName) < atLeast and buyingPokeballs == true then
      if getMapName() == "Cerulean City" then
          moveToMap("Cerulean Pokemart")
      elseif getMapName() == "Route 10" then
          moveToMap("Route 9")
      elseif getMapName() == "Route 9" then
          moveToMap("Cerulean City")
      elseif getMapName() == "Cerulean Pokemart" and not isShopOpen() then
          talkToNpcOnCell(3, 5)
      elseif isShopOpen() then
          buyItem(itemName, quantity)
      end
  end

  -- Normal Electabuzz, without Special Catch
 
  if usingSpecialCatch == false and isPokemonUsable(1) then
      if usingDebugLogs then
          log("Farming | Catch Electabuzz without Special Catch | Hunting Electabuzz")
      end
      if getMapName() == "Route 10" then
          moveToMap("Power Plant")
      elseif getMapName() == "Pokecenter Cerulean" then
          moveToMap("Cerulean City")
      elseif getMapName() == "Cerulean Pokemart" then
          moveToMap("Cerulean City")
      elseif getMapName() == "Vermilion City" then
          moveToMap("Route 9")
      elseif getMapName() == "Route 9" then
          moveToCell(93,33)
      elseif getMapName() == "Power Plant" then
          moveToRectangle(4,17,16,18)
      end
  end
 
  if usingSpecialCatch == false and not isPokemonUsable(1) then
      if usingDebugLogs then
          log("Farming / Healing | Catch Electabuzz without Special Catch")
      end
      if getMapName() == "Power Plant" then
          moveToMap("Route 10")
      elseif getMapName() == "Route 10" then
          moveToMap("Route 9")
      elseif getMapName() == "Route 9" then
          moveToMap("Cerulean City")
      elseif getMapName() == "Cerulean Pokemart" then
          moveToMap("Cerulean City")
      elseif getMapName() == "Cerulean City" then
          moveToMap("Pokecenter Cerulean")
      elseif getMapName() == "Pokecenter Cerulean" then
          usePokecenter()
      end
  end
 
  -- Electabuzz, with Special Catch

  if usingSpecialCatch and isPokemonUsable(1) and isPokemonUsable(indexOfFalseSwiper) and isPokemonUsable(indexOfSleeper) and getRemainingPowerPoints(indexOfFalseSwiper, "False Swipe") >= 1 and getRemainingPowerPoints(indexOfSleeper, sleepAttack) >= 1 then
      if usingDebugLogs then
          log("Farming | Catch Electabuzz with Special Catch")
      end
      if getPokemonNature(1) ~= "Bold" then
          swapPokemon(indexOfSync2, indexOfSync1)
      elseif getMapName() == "Route 10" then
          moveToMap("Power Plant")
      elseif getMapName() == "Pokecenter Cerulean" then
          moveToMap("Cerulean City")
      elseif getMapName() == "Cerulean Pokemart" then
          moveToMap("Cerulean City")
      elseif getMapName() == "Cerulean City" then
          moveToMap("Route 9")
      elseif getMapName() == "Route 9" then
          moveToCell(93,33)
      elseif getMapName() == "Power Plant" then
          moveToRectangle(4,17,16,18)
      end
  end
 
  if not isPokemonUsable(1) or not isPokemonUsable(indexOfFalseSwiper) or not isPokemonUsable(indexOfSleeper) or getRemainingPowerPoints(indexOfFalseSwiper, "False Swipe") < 1 or getRemainingPowerPoints(indexOfSleeper, sleepAttack) < 1 then
      if usingDebugLogs then
          log("Farming / Healing | Catch Electabuzz with Special Catch")
      end
      if getMapName() == "Power Plant" then
          moveToMap("Route 10")
      elseif getMapName() == "Route 10" then
          moveToMap("Route 9")
      elseif getMapName() == "Route 9" then
          moveToMap("Cerulean City")
      elseif getMapName() == "Cerulean Pokemart" then
          moveToMap("Cerulean City")
      elseif getMapName() == "Cerulean City" then
          moveToMap("Pokecenter Cerulean")
      elseif getMapName() == "Pokecenter Cerulean" then
          usePokecenter()
      end
  end

end

function onBattleAction()

  -- Using Special Catch

  if usingSpecialCatch and (isWildBattle() and (isOpponentShiny() or getOpponentName() == "Electabuzz")) then
      if getActivePokemonNumber() == 1 then
          if usingDebugLogs then
              log("Battle | Sending False Swiper")
          end
          sendPokemon(indexOfFalseSwiper)
      elseif ( getActivePokemonNumber() == indexOfFalseSwiper ) and (getOpponentHealth() > 1) then
          if usingDebugLogs then
              log("Battle | Using False Swipe")
          end
          return useMove("False Swipe") or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")
      elseif ( getActivePokemonNumber() == indexOfFalseSwiper ) and (getOpponentHealth() == 1) then
          if usingDebugLogs then
              log("Battle | Sending Sleeper")
          end
          sendPokemon(indexOfSleeper)
      elseif (getActivePokemonNumber() == indexOfSleeper) and (getOpponentStatus() ~= "SLEEP") then
          if usingDebugLogs then
              log("Battle | Using a Sleep Attack")
          end
          return useMove(sleepAttack) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")
      elseif (getActivePokemonNumber() == indexOfSleeper) and ( getOpponentStatus() == "SLEEP") then
          if usingDebugLogs then
              log("Battle | Using Pokeballs")
          end
          return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")
      end
 
 
      -- Don't using Special Catch
 
  elseif usingSpecialCatch == false and isWildBattle() and (isOpponentShiny() or getOpponentName() == "Electabuzz") then
      if usingDebugLogs then
          log("Battle | Catch Pokemon (without Special Catch)")
      end
      return useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") or sendUsablePokemon() or run()
 
  -- Attack Pokemon
 
  elseif attackPokemon and isWildBattle() and not isOpponentShiny() or not getOpponentName() == "Electabuzz" then
      if usingDebugLogs then
          log("Battle | Attacking Pokemon")
      end
      return attack() or sendUsablePokemon() or run()
     
      -- Run Away
 
  elseif attackPokemon == false and isWildBattle() and not isOpponentShiny() or not getOpponentName() == "Electabuzz" then
      if usingDebugLogs then
          log("Battle | Run away from Pokemon")
      end
      return run() or sendUsablePokemon() or attack()
  end

end

If you need some more help let me know. 


Greetings
 
Reply
#87
hey i was wondering if this squirtle script is still working decently? id like to try to catch some clones....
 
Reply
#88
(2016-07-05, 13:09:16)Royal Squirtle-Farmer

Você pode começar este roteiro na Rota 6, Vermilion City, dentro do Pokecenter lá e dentro do Pokemart.
O roteiro vai passar para o próximo ponto de água e navegar por lá.

[Image: 95f920759bb1402ab3d0a42d63e2cbf2.jpg]
  • Pegue todos os brilhantes
  • Pegue todos os Squirtle
  • Pegue todos os Shellder
  • Você pode escolher se você gostaria de cultivar no dia Squirtle e na noite Shellder
  • Nivelando seu primeiro Pokémon
  • Contador (você é capaz de desativar isso)
  • Compre pokebolas
  • O script usará um Sync, um False Swiper e um Pokemon com um ataque de sono para capturar Shinies e Squirtles (você pode definir isso como verdadeiro ou falso)

[Image: 1db3a0aa89fa4c9890b77037d08c6b20.png]

Royal 5 de julho de 2016: Primeira versão
8 de julho de 2016: algumas melhorias
9 de julho de 2016: correção final
10 de julho de 2016: versão Beta
11 de julho de 2016: versão final
10 de outubro de 2016: correção de pequenos bugs

[Image: 57e4fd7b135f4a1e839ac392ee7d539e.jpg]

-- ########################## CONFIG ##########################
-- ######### Change these lines for your own purpose ##########
-- ############################################################

-- ##### Logs #####
-- Set them to false if you don't want to use logs,
-- I would advise you to use logs, so you don't
-- need to login with the normal client
-- if you want to look if the bot catch any Shinies
usingLogs = true

-- If you encounter a bug this logs can help me to fix this bug,
-- so please turn this to true if you want to support this script
usingDebugLogs = true
-- ################

-- ##### Buying Pokeballs ######
-- Set them to false if you don't want to buy Pokeballs,
-- I would advise you to set them to true, so you won't miss
-- any Pokemon because you had not enough Pokeballs
buyingPokeballs = true

-- Set the number of Pokeballs you would like to buy                      
quantity = 50    

itemName = "Pokeball"    

-- If you have less than the number what you entered then the bot will
-- buy new Pokeballs
atLeast = 100          
-- #############################

-- ##### Attack Config #####
-- Set them to true if you want to attack every Pokemon
-- set them to false if you want to run away from every Pokemon
attackPokemon = true
-- #########################

-- ##### Catch Config #####
-- If you set them to true the bot will use a Sync, a False Swiper and a Pokemon with sleep to catch every Pokemon
usingSpecialCatch = true
-- ########################

-- ##### Private Message #####
-- turn it to true if you want to disable private messages (recommend)
allowPrivateMessage = true
-- ###########################

-- ################## Special Catch Config ####################
-- ## Only change these lines if you activated special catch ##
-- Set the index of your first Sync Pokemon
indexOfSync1 = 1
-- Set the nature for your first Sync Pokemon
nature1 = "Bold"
-- Set the index of your second Sync Pokemon
indexOfSync2 = 6
-- Set the nature of your second Sync Pokemon
nature2 = "Adamant"
-- Set the index of your False Swiper
indexOfFalseSwiper = 3
-- Set the Index of your Sleeper
indexOfSleeper = 4
-- Set the Sleep Attack for your Sleeper
sleepAttack = "Sleep Powder"
-- ############################################################

-- ############## Night Config ##############
-- ## This config will happen if its Night ##
-- Set hunt Shellder to true if you want to hunt it in the night
huntShellder = true
-- Set the rod what you want to use
usingRod = "Good Rod"
-- ###########################################

-- [[Below these lines is the Script if you haven't any experience about Lua scripting then don't change anything!]]
-- #########################################################################################################################

name = "Vermilion Squirtle Farmer | Route 6 Shellder Farmer"
author = "Royal"
description = [[Start the Script in Route 6, Vermilion City, Pokecenter Vermilion and Vermilion Pokemart.
It will catch any Shiny, any Squirtle and any Shellder.
If you found any bugs or have any suggestions feel free to report it to me.]]

function onStart()
   -- Display the Configurations if usingLogs is true
   if usingLogs then
       if buyingPokeballs then
           log("Config | Buying Pokeballs is activated!")
           log("Config | The bot will buy: " .. quantity .. " Pokeballs.")
           log("Config | The bot moves to the next Pokemart if you have less then: " .. atLeast .. " Pokeballs.")
       elseif buyingPokeballs == false then
           log("Config | Buying Pokeballs is deactivated!")
       end
       if usingDebugLogs then
           log("Config | Using Debug Logs is activated!")
       elseif usingDebugLogs == false then
           log("Config | Using Debug Logs is deactivated!")
       end
       if allowPrivateMessage then
           log("Config | Private messages are disabled!")
       elseif allowPrivateMessage == false then
           log("Config | Private messages aren't disabled!")
       end
       if attackPokemon then
           log("Config | The bot will attack every Pokemon!")
       elseif attackPokemon == false then
           log("Config | The bot will run away from every Pokemon!")
       end
       if usingSpecialCatch then
           log("Config | The bot will use special catch feature!")
           log("Config | Your first Sync Pokemon is on index " .. indexOfSync1 .. " and use the nature " .. nature1 .. ".")
           log("Config | Your second Sync Pokemon is on index " .. indexOfSync2 .. " and use the nature " .. nature2 .. ".")
           log("Config | Your false swiper is on index " .. indexOfFalseSwiper .. ".")
           log("Config | Your sleeper is on index " .. indexOfSleeper .. " and use the Sleep Attack " .. sleepAttack .. ".")
       elseif usingSpecialCatch == false then
           log("Config | The bot won't use special catch feature!")
       end
       if huntShellder then
           log("Config | Hunting Shellder is activated!")
           log("Config | Used rod is " .. usingRod .. ".")
       elseif huntShellder == false then
           log("Config | Hunting Shellder is deactivated!")
       end
   end
   
   wildCounter = 0
   shinyCounter = 0
   squirtleCounter = 0
   poliwagCounter = 0
   tentacoolCounter = 0
   tentacruelCounter = 0
   pokecenterCounter = 0
   shellderCounter = 0
   krabbyCounter = 0
   magikarpCounter = 0
   goldeenCounter = 0
   startingMoney = getMoney()
   pokeballCounter = 0
   pokemonsCaught = 0
   
   specialCase = false
   
   specialShellder = true
   
   if usingSpecialCatch == true and huntShellder == true then
       specialShellder = true
   else
       specialShellder = false
   end
   
end

if allowPrivateMessage then
   if isPrivateMessageEnabled() then
       disablePrivateMessage()
   end
end


function useLogs()
   if usingLogs then
       log("Info | Pokemons encountered: " .. wildCounter)
       log("Info | Shinies encountered: " .. shinyCounter)
       log("Info | Squirtles ecountered: " .. squirtleCounter)
       log("Info | Pokemons caught: " .. pokemonsCaught)
   end
end

function useLogs2()
   if usingLogs then
       log("Info | Pokemons encountered: " .. wildCounter)
       log("Info | Shinies encountered: " .. shinyCounter)
       log("Info | Shellders ecountered: " .. shellderCounter)
       log("Info | Pokemons caught: " .. pokemonsCaught)
   end
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 onBattleMessage(wild)
   if not isNight() then
       if stringContains(wild, "A Wild SHINY ") then
           shinyCounter = shinyCounter + 1
           wildCounter = wildCounter + 1
           useLogs()
       elseif wild == "A Wild [FF9900]Squirtle[-] Attacks!" then
           squirtleCounter = squirtleCounter + 1
           wildCounter = wildCounter + 1
           useLogs()
       elseif wild == "A Wild [FF9900]Poliwag[-] Attacks!" then
           poliwagCounter = poliwagCounter + 1
           wildCounter = wildCounter + 1
           useLogs()
       elseif wild == "A Wild [FF9900]Tentacool[-] Attacks!" then
           tentacoolCounter = tentacoolCounter + 1
           wildCounter = wildCounter + 1
           useLogs()
       elseif wild == "A Wild [FF9900]Tentacruel[-] Attacks!" then
           tentacruelCounter = tentacruelCounter + 1
           wildCounter = wildCounter + 1
           useLogs()
       elseif stringContains(wild, "A Wild ") then
           wildCounter = wildCounter + 1
           useLogs()
       elseif stringContains(wild, "Pokedollar(s)") then
           if usingLogs then
               log("Info | Pokedollars earned: "..tostring(getMoney() - startingMoney).." (" ..tostring((getMoney() - startingMoney)/wildCounter).." average)")
           end
       elseif stringContains(wild, "Success!") then
           pokemonsCaught = pokemonsCaught + 1
       elseif stringContains(wild, "You throw") then
           pokeballCounter = pokeballCounter + 1
       end
   elseif isNight() and huntShellder then
       if stringContains(wild, "A Wild SHINY ") then
           shinyCounter = shinyCounter + 1
           wildCounter = wildCounter + 1
           useLogs2()
       elseif wild == "A Wild [FF9900]Shellder[-] Attacks!" then
           shellderCounter = shellderCounter + 1
           wildCounter = wildCounter + 1
           useLogs2()
       elseif wild == "A Wild [FF9900]Goldeen[-] Attacks!" then
           goldeenCounter = goldeenCounter + 1
           wildCounter = wildCounter + 1
           useLogs2()
       elseif wild == "A Wild [FF9900]Krabby[-] Attacks!" then
           krabbyCounter = krabbyCounter + 1
           wildCounter = wildCounter + 1
           useLogs2()
       elseif wild == "A Wild [FF9900]Magikarp[-] Attacks!" then
           magikarpCounter = magikarpCounter + 1
           wildCounter = wildCounter + 1
           useLogs2()
       elseif wild == "A Wild [FF9900]Poliwag[-] Attacks!" then
           poliwagCounter = poliwagCounter + 1
           wildCounter = wildCounter + 1
           useLogs2()
       elseif stringContains(wild, "A Wild ") then
           wildCounter = wildCounter + 1
           useLogs2()
       elseif stringContains(wild, "Pokedollar(s)") then
           if usingLogs then
               log("Info | Pokedollars earned: "..tostring(getMoney() - startingMoney).." (" ..tostring((getMoney() - startingMoney)/wildCounter).." average)")
           end
       elseif stringContains(wild, "Success!") then
           pokemonsCaught = pokemonsCaught + 1
       elseif stringContains(wild, "You throw") then
           pokeballCounter = pokeballCounter + 1
       end
   end
end

function onPause()

   if usingLogs then
   
       if not isNight() then
       
           log("Times in Pokecenter: " .. pokecenterCounter)
           log("Pokemons encountered: " .. wildCounter)
           log("Shinies encountered: " .. shinyCounter .. " (" .. 100 * (shinyCounter/wildCounter) .. "%)")
           log("Squirtles encountered: " .. squirtleCounter .. " (" .. 100 * (squirtleCounter/wildCounter) .. "%)")
           log("Poliwags encountered: " .. poliwagCounter .. " (" .. 100 * (poliwagCounter/wildCounter) .. "%)")
           log("Tentacools encountered: " .. tentacoolCounter .. " (" .. 100 * (tentacoolCounter/wildCounter) .. "%)")
           log("Tentacruels encountered: " .. tentacruelCounter .. " (" .. 100 * (tentacruelCounter/wildCounter) .. "%)")
           log("Pokedollars earned: "..tostring(getMoney() - startingMoney).." (" ..tostring((getMoney() - startingMoney)/wildCounter).." average)")
           log("Pokeballs used: " .. pokeballCounter)
           
       elseif huntShellder and isNight() then
       
           log("Times in Pokecenter: " .. pokecenterCounter)
           log("Pokemons encountered: " .. wildCounter)
           log("Shinies encountered: " .. shinyCounter .. " (" .. 100 * (shinyCounter/wildCounter) .. "%)")
           log("Shellders encountered: " .. shellderCounter .. " (" .. 100 * (shellderCounter/wildCounter) .. "%)")
           log("Magikarps encountered: " .. magikarpCounter .. " (" .. 100 * (magikarpCounter/wildCounter) .. "%)")
           log("Goldeens encountered: " .. goldeenCounter .. " (" .. 100 * (goldeenCounter/wildCounter) .. "%)")
           log("Poliwags encountered: " .. poliwagCounter .. " (" .. 100 * (poliwagCounter/wildCounter) .. "%)")
           log("Krabbys encountered: " .. krabbyCounter .. " (" .. 100 * (krabbyCounter/wildCounter) .. "%)")
           log("Pokedollars earned: "..tostring(getMoney() - startingMoney).." (" ..tostring((getMoney() - startingMoney)/wildCounter).." average)")
           log("Pokeballs used: " .. pokeballCounter)
           
       end
       
   end
   
end

function onPathAction()

   -- Switching Syncs

   if specialShellder and not isNight() and getPokemonNature(1) ~= nature1 then
       swapPokemon(indexOfSync2, indexOfSync1)
       if usingDebugLogs then
           log("Switching Sync 2 with Sync 1")
       end
   elseif specialShellder and isNight() and getPokemonNature(1) ~= nature2 then
       swapPokemon(indexOfSync1, indexOfSync2)
       if usingDebugLogs then
           log("Switching Sync 1 with Sync 2")
       end

   -- Buying Pokeballs

   elseif getItemQuantity(itemName) < atLeast and buyingPokeballs == true then
       if getMapName() == "Vermilion City" then
           moveToMap("Vermilion Pokemart")
       elseif getMapName() == "Route 6" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion Pokemart" and not isShopOpen() then
           talkToNpcOnCell(3, 5)
       elseif isShopOpen() then
           buyItem(itemName, quantity)
       end

   -- Normal Squirtle, without Special Catch and disabled hunting Shellder
   
   elseif usingSpecialCatch == false and huntShellder == false and isPokemonUsable(1) then
       if usingDebugLogs then
           log("Farming | Catch Squirtle without Special Catch | Hunting Squirtle")
       end
       if getMapName() == "Route 6" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Pokecenter Vermilion" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion Pokemart" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then
           moveToRectangle(10, 28, 17, 33)
       end
   elseif usingSpecialCatch == false and huntShellder == false and not isPokemonUsable(1) then
       if usingDebugLogs then
           log("Farming / Healing | Catch Squirtle without Special Catch")
       end
       if getMapName() == "Route 6" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion Pokemart" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then
           moveToMap("Pokecenter Vermilion")
       elseif getMapName() == "Pokecenter Vermilion" then
           usePokecenter()
       end

   -- Normal Shellder, without Special Catch
   
   elseif usingSpecialCatch == false and huntShellder and isNight() and isPokemonUsable(1) then    
       if usingDebugLogs then
           log("Farming | Catch Squirtle and Shellder without Special Catch | Hunting Shellder")
       end
       if getMapName() == "Pokecenter Vermilion" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then
           moveToMap("Route 6")
       elseif getMapName() == "Route 6" then
           if (getPlayerX() == 23 and getPlayerY() == 43) then
               useItem(usingRod)
           else
               moveToCell(23, 43)
           end
       end
   elseif not isPokemonUsable(1) and usingSpecialCatch == false then
       if usingDebugLogs then
           log("Farming / Healing | Catch Squirtle and Shellder without Special Catch")
       end
       if getMapName() == "Route 6" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion Pokemart" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then
           moveToMap("Pokecenter Vermilion")
       elseif getMapName() == "Pokecenter Vermilion" then
           usePokecenter()
       end
   
   -- Squirtle, with Special Catch and without hunting Shellder

   elseif usingSpecialCatch and huntShellder == false and not isNight() and isPokemonUsable(1) and isPokemonUsable(indexOfFalseSwiper) and isPokemonUsable(indexOfSleeper) and getRemainingPowerPoints(indexOfFalseSwiper, "False Swipe") >= 1 and getRemainingPowerPoints(indexOfSleeper, sleepAttack) >= 1 then
       if usingDebugLogs then
           log("Farming | Catch Squirtle with Special Catch")
       end
       if getPokemonNature(1) ~= "Bold" then
           swapPokemon(indexOfSync2, indexOfSync1)
       elseif getMapName() == "Route 6" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Pokecenter Vermilion" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then
           moveToRectangle(10, 28, 17, 33)
       end
   elseif huntShellder == false and not isPokemonUsable(1) or not isPokemonUsable(indexOfFalseSwiper) or not isPokemonUsable(indexOfSleeper) or getRemainingPowerPoints(indexOfFalseSwiper, "False Swipe") < 1 or getRemainingPowerPoints(indexOfSleeper, sleepAttack) < 1 then
       if usingDebugLogs then
           log("Farming / Healing | Catch Squirtle with Special Catch")
       end
       if getMapName() == "Route 6" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then
           moveToMap("Pokecenter Vermilion")
       elseif getMapName() == "Vermilion Pokemart" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Pokecenter Vermilion" then
           usePokecenter()
       end
   
   -- Squirtle and Shellder with Special Catch
   
   elseif (usingSpecialCatch and huntShellder and isNight() and isPokemonUsable(1) and isPokemonUsable(indexOfFalseSwiper) and isPokemonUsable(indexOfSleeper) and getRemainingPowerPoints(indexOfFalseSwiper, "False Swipe") >= 1 and getRemainingPowerPoints(indexOfSleeper, sleepAttack) >= 1) then
       if usingDebugLogs then
           log("Farming | Catch Squirtle and Shellder with Special Catch | Hunting Shellder")
       end
       if getMapName() == "Pokecenter Vermilion" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion Pokemart" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then
           moveToMap("Route 6")
       elseif getMapName() == "Route 6" then
           if (getPlayerX() == 23 and getPlayerY() == 43) then
               useItem(usingRod)
           else
               moveToCell(23, 43)
           end
       end
   elseif (usingSpecialCatch and not isNight() and huntShellder and isPokemonUsable(1) and isPokemonUsable(indexOfFalseSwiper) and isPokemonUsable(indexOfSleeper) and getRemainingPowerPoints(indexOfFalseSwiper, "False Swipe") >= 1 and getRemainingPowerPoints(indexOfSleeper, sleepAttack) >= 1) then
       if usingDebugLogs then
           log("Farming | Catch Squirtle and Shellder with Special Catch | Hunting Squirtle")
       end
       if getMapName() == "Route 6" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then
           moveToRectangle(10, 28, 17, 33)
       elseif getMapName() == "Vermilion Pokemart" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Pokecenter Vermilion" then
           moveToMap("Vermilion City")
       end
   elseif not isPokemonUsable(1) or not isPokemonUsable(indexOfFalseSwiper) or not isPokemonUsable(indexOfSleeper) or getRemainingPowerPoints(indexOfFalseSwiper, "False Swipe") < 1 or getRemainingPowerPoints(indexOfSleeper, sleepAttack) < 1 then
       if usingDebugLogs then
           log("Farming / Healing | Catch Squirtle and Shellder with Special Catch")
       end
       if getMapName() == "Route 6" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Vermilion City" then
           moveToMap("Pokecenter Vermilion")
       elseif getMapName() == "Vermilion Pokemart" then
           moveToMap("Vermilion City")
       elseif getMapName() == "Pokecenter Vermilion" then
           usePokecenter()
       end
   end

end

function onBattleAction()

   -- Using Special Catch

   if usingSpecialCatch and (isWildBattle() and (isOpponentShiny() or getOpponentName() == "Squirtle" or getOpponentName() == "Shellder" or getOpponentName() == "Buizel")) then
       if getActivePokemonNumber() == 1 then
           if usingDebugLogs then
               log("Battle | Sending False Swiper")
           end
           sendPokemon(indexOfFalseSwiper)
       elseif ( getActivePokemonNumber() == indexOfFalseSwiper ) and (getOpponentHealth() > 1) then
           if usingDebugLogs then
               log("Battle | Using False Swipe")
           end
           return useMove("False Swipe") or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")
       elseif ( getActivePokemonNumber() == indexOfFalseSwiper ) and (getOpponentHealth() == 1) then
           if usingDebugLogs then
               log("Battle | Sending Sleeper")
           end
           sendPokemon(indexOfSleeper)
       elseif (getActivePokemonNumber() == indexOfSleeper) and (getOpponentStatus() ~= "SLEEP") then
           if usingDebugLogs then
               log("Battle | Using a Sleep Attack")
           end
           return useMove(sleepAttack) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")
       elseif (getActivePokemonNumber() == indexOfSleeper) and ( getOpponentStatus() == "SLEEP") then
           if usingDebugLogs then
               log("Battle | Using Pokeballs")
           end
           return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")
       end
   
   
       -- Don't using Special Catch
   
   elseif usingSpecialCatch == false and isWildBattle() and (isOpponentShiny() or getOpponentName() == "Squirtle" or getOpponentName() == "Shellder" or getOpponentName() == "Buizel") then
       if usingDebugLogs then
           log("Battle | Catch Pokemon (without Special Catch)")
       end
       return useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") or sendUsablePokemon() or run()
   
   -- Attack Pokemon
   
   elseif attackPokemon and isWildBattle() and not isOpponentShiny() or not getOpponentName() == "Squirtle" or not getOpponentName() == "Shellder" or getOpponentName() == "Buizel" then
       if usingDebugLogs then
           log("Battle | Attacking Pokemon")
       end
       return attack() or sendUsablePokemon() or run()
       
       -- Run Away
   
   elseif attackPokemon == false and isWildBattle() and not isOpponentShiny() or not getOpponentName() == "Squirtle" or not getOpponentName() == "Shellder" or not getOpponentName() == "Buizel" then
       if usingDebugLogs then
           log("Battle | Run away from Pokemon")
       end
       return run() or sendUsablePokemon() or attack()
   end
   
end

[Image: Credits_Royal.jpg]

(2018-08-23, 18:48:13)Modfather hey i was wondering if this squirtle script is still working decently? id like to try to catch some clones....

[11:25:23] Switching Sync 1 with Sync 2 acho q nao
 
Reply
#89
hey guys, I keep getting this error

[12:43:41 PM] Switching Sync 1 with Sync 2
[12:43:41 PM] Switching Sync 1 with Sync 2
[12:43:41 PM] Switching Sync 1 with Sync 2
[12:43:41 PM] Switching Sync 1 with Sync 2
[12:43:41 PM] No action executed: stopping the bot.
[12:43:41 PM] Bot stopped

i have no idea what happened...
im using farfetch'd with false swipe and my poliwhirl for surf
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)