Hello There, Guest! Login Register


Anywhere-Leveler, Anywhere any pokemon catcher
Hi everyone, I just registered to Reply my version of this script. I just want a Level Bot that helps me to level my pokemons, but I don't want them to die or to Black out. So I decided to make some improvements there.

When a pokemon is below a % health, it SWAPS to the next pokemon until the last, then when every pokemon is low, goes to a pokecenter. 
It also helps leveling the first pokemon (sorted ascending = the lower level one) because it is the first in every battle (unless it is faint) and it will swap to other with high health (so it still receive some exp from that battle). 

I just tested with 2 pokemons (and it worked fine), so maybe there will be errors. Also this is my first attempt and I dont want to be banned so I have some fear to test it more Big Grin


Here is the Script (example for Route 2):

Show ContentX-Men83 : Everywhere Lvl Bot:
 
Reply
[4:23:24 AM] Running PROShine by Silv3r, version 2.8.0.1
[4:26:51 AM] Connecting to the server...
[4:26:52 AM] Connected, authenticating...
[4:26:52 AM] Authenticated successfully!
[4:26:52 AM] System: Welcome to Pokemon Revolution! (Silver Server)
[4:26:52 AM] Position updated: Pokecenter Snowpoint City (8, 8) [OK]
[4:27:12 AM] Script "Level-Script | Anywhere" by "Zymu - Credit to Royal for providing the base framework" successfully loaded
[4:27:12 AM] Training at Route 216 and healing at Pokecenter Snowpoint City. Leveling all pokemon in teams to 100.
[4:27:28 AM] Bot started
[4:27:34 AM] Position updated: Snowpoint City (30, 37) [OK]
[4:27:36 AM] Getting on bike.
[4:27:46 AM] No action executed: stopping the bot.
[4:27:46 AM] Bot stopped

-------



--supports up to 5 stops, leave unused stops blank--
 city = "Snowpoint City"
 pokecenter = "Pokecenter Snowpoint City"
 stop1 = "Route 217"
 stop2 = "Route 216"
 stop3 = ""
 stop4 = ""
 stop5 = ""
 endLocation = "Route 216"
--if no city, and pokecenter is on route, change this to true, and leave city blank--
 pokecenterOnRoute = false
--Leave this true unless you are not fighting/catching in grass--
 lookForGrass = true
--If the above is false, what rectangle do you want to walk within at your endLocation?--
 rectX1 = 1
 rectX2 = 13
 rectY1 = 13
 rectY2 = 19
--the below will be the percentage of your opponent's health we'll start throwing balls at--
--DEFAULT: 30--
 percentToStartThrowing = 30
--DEFAULT: 50--
 percentToStartThrowingIfShiny = 50
--Do you want to catch shineys and uncaught pokemon?--
 catchShineys = true
 catchNotCaught = true
--Do you only want to catch pokemon, and not level?--
 onlyCatch = false
--the below is case-sensitive, add more moves by adding commas. ex : onlyCatchThesePokemon = {"Pokemon 1", "Pokemon 2", "Pokemon 3"}--
--Even if you set all other capture variables to false, we'll still try to catch these/this pokemon--
--Leave an empty "" here if you aren't using it--
 catchThesePokemon = {"Beartic", "Bergmite"}
--the below will be the percentage of your last alive poke's health that we'll stop fighting at--
--DEFAULT: 20--
 healthToRunAt = 20
--Level to stop levelling mons, set to a value over 100 if you are just catching and have a lvl 100 team--
 levelPokesTo = 100
--the below is case-sensitive, add more moves by adding commas. ex : movesNotToForget = {"Move 1", "Move 2", "Move 3"}--
--Leave an empty "" here if you aren't using it--
 movesNotToForget = {"Earthquake", "Double-Edge", "Ice Fang", "Thunder Fang", "Fire Fang", "Play Rough", "Bite", "Covet", "Low Kick", "Quick Attack", "Ice Punch", "Thunder Punch", "Fire Punch", "Sky Uppercut", "Thunderbolt", "Thunder", "Thrash", "Horn Attack", "Poison Jab"}
--Start Script--
 name = "Level-Script | Anywhere"
 author = "Zymu - Credit to Royal for providing the base framework"
 description = "Training at " .. endLocation .. " and healing at " .. pokecenter .. "." .. " Leveling all pokemon in teams to " .. levelPokesTo .. "."
 stops = 0
function onStart()
     shinyCounter = 0
     wildCounter = 0
     pokecenterCounter = 0
     if stop1 ~= "" then
     stops = stops + 1
     end
     if stop2 ~= "" then
     stops = stops + 1
     end
     if stop3 ~= "" then
     stops = stops + 1
     end
     if stop4 ~= "" then
     stops = stops + 1
     end
     if stop5 ~= "" then
     stops = stops + 1
     end
end
function onBattleMessage(wild)
     if stringContains(wild, "A Wild SHINY ") then
         shinyCounter = shinyCounter + 1
         wildCounter = wildCounter + 1
         log("Info | Shineys encountered: " .. shinyCounter)
         log("Info | Pokemon encountered: " .. wildCounter)
     elseif stringContains(wild, "A Wild ") then
         wildCounter = wildCounter + 1
         log("Info | Shineys encountered: " .. shinyCounter)
         log("Info | Pokemon encountered: " .. wildCounter)
     end
end
function onDialogMessage(pokecenter)
     if stringContains(pokecenter, "Would you like me to heal your Pokemon?") then
         pokecenterCounter = pokecenterCounter + 1
         log("Info | Times in Pokecenter: " .. pokecenterCounter)
     end
end
function onPause()
     log("Info | Shineys encountered: " .. shinyCounter)
     log("Info | Pokemon encountered: " .. wildCounter)
     log("Info | Times in Pokecenter: " .. pokecenterCounter)
end
function IsSorted()
     if getTeamSize() == 1 then
         return true
     elseif getTeamSize() == 2 then
         if getPokemonLevel(1) <= getPokemonLevel(2) then
             return true
         else
             return false
         end
     elseif getTeamSize() == 3 then
         if getPokemonLevel(1) <= getPokemonLevel(2) and getPokemonLevel(2) <= getPokemonLevel(3) then
             return true
         else
             return false
         end
     elseif getTeamSize() == 4 then
         if getPokemonLevel(1) <= getPokemonLevel(2) and getPokemonLevel(2) <= getPokemonLevel(3) and getPokemonLevel(3) <= getPokemonLevel(4) then
             return true
         else
             return false
         end
     elseif getTeamSize() == 5 then
         if getPokemonLevel(1) <= getPokemonLevel(2) and getPokemonLevel(2) <= getPokemonLevel(3) and getPokemonLevel(3) <= getPokemonLevel(4) and getPokemonLevel(4) <= getPokemonLevel(5) then
             return true
         else
             return false
         end
     elseif getTeamSize() == 6 then
         if getPokemonLevel(1) <= getPokemonLevel(2) and getPokemonLevel(2) <= getPokemonLevel(3) and getPokemonLevel(3) <= getPokemonLevel(4) and getPokemonLevel(4) <= getPokemonLevel(5) and getPokemonLevel(5) <= getPokemonLevel(6) then
             return true
         else
             return false
         end
     end
end
function ReturnHighestIndexUnderLevel()
     result = 0
     for i = 1, getTeamSize(), 1 do
         if getPokemonLevel(i) < levelPokesTo then
             result = i
         end
     end
     return result
end
function IsPokemonOnCaptureList()
     result = false
     if catchThesePokemon[1] ~= "" then
     for i = 1, TableLength(catchThesePokemon), 1 do
         if getOpponentName() == catchThesePokemon[i] then
             result = true
             break
         end
     end
     end
     return result
end
function TableLength(T)
   local count = 0
   for _ in pairs(T) do count = count + 1 end
   return count
end
function onPathAction()
if getUsablePokemonCount() >= 1 and getPokemonHealthPercent(getTeamSize()) >= healthToRunAt and isPokemonUsable(ReturnHighestIndexUnderLevel()) then
    
     if not onlyCatch and not IsSorted() then
         sortTeamByLevelAscending()
     elseif not isMounted() and hasItem("Bicycle") and not string.find(getMapName(), "Pokecenter") and not string.find(getMapName(), "Tunnel") and not string.find(getMapName(), "Stop") and not string.find(getMapName(), "Cave") and not string.find(getMapName(), "Mt") and not string.find(getMapName(), "Tower") and not string.find(getMapName(), "mansion") and not string.find(getMapName(), "Victory") then
         useItem("Bicycle")
         log("Getting on bike.")
     elseif stops == 0 and pokecenterOnRoute then
         if getMapName() == pokecenter then
             moveToMap(endLocation)
         elseif getMapName() == endLocation then
             if lookForGrass then
                 moveToGrass()
             else
                 moveToRectangle(rectX1, rectY1, rectX2, rectY2)
             end
         end
    
     elseif stops == 0 and not pokecenterOnRoute then
         if getMapName() == pokecenter then
             moveToMap(city)
         elseif getMapName() == city then
             moveToMap(endLocation)
         elseif getMapName() == endLocation then
             if lookForGrass then
                 moveToGrass()
             else
                 moveToRectangle(rectX1, rectY1, rectX2, rectY2)
             end
         end
    
     elseif stops == 1 then
         if getMapName() == pokecenter then
             moveToMap(city)
         elseif getMapName() == city then
             moveToMap(stop1)
         elseif getMapName() == stop1 then
             moveToMap(endLocation)
         elseif getMapName() == endLocation then
             if lookForGrass then
                 moveToGrass()
             else
                 moveToRectangle(rectX1, rectY1, rectX2, rectY2)
             end
         end
        
     elseif stops == 2 then
         if getMapName() == pokecenter then
             moveToMap(city)
         elseif getMapName() == city then
             moveToMap(stop1)
         elseif getMapName() == stop1 then
             moveToMap(stop2)
         elseif getMapName() == stop2 then
             moveToMap(endLocation)
         elseif getMapName() == endLocation then
             if lookForGrass then
                 moveToGrass()
             else
                 moveToRectangle(rectX1, rectY1, rectX2, rectY2)
             end
         end
    
     elseif stops == 3 then
         if getMapName() == pokecenter then
             moveToMap(city)
         elseif getMapName() == city then
             moveToMap(stop1)
         elseif getMapName() == stop1 then
             moveToMap(stop2)
         elseif getMapName() == stop2 then
             moveToMap(stop3)
         elseif getMapName() == stop3 then
             moveToMap(endLocation)
         elseif getMapName() == endLocation then
             if lookForGrass then
                 moveToGrass()
             else
                 moveToRectangle(rectX1, rectY1, rectX2, rectY2)
             end
         end
    
     elseif stops == 4 then
         if getMapName() == pokecenter then
             moveToMap(city)
         elseif getMapName() == city then
             moveToMap(stop1)
         elseif getMapName() == stop1 then
             moveToMap(stop2)
         elseif getMapName() == stop2 then
             moveToMap(stop3)
         elseif getMapName() == stop3 then
             moveToMap(stop4)
         elseif getMapName() == stop4 then
             moveToMap(endLocation)
         elseif getMapName() == endLocation then
             if lookForGrass then
                 moveToGrass()
             else
                 moveToRectangle(rectX1, rectY1, rectX2, rectY2)
             end
         end
        
     elseif stops == 5 then
         if getMapName() == pokecenter then
             moveToMap(city)
         elseif getMapName() == city then
             moveToMap(stop1)
         elseif getMapName() == stop1 then
             moveToMap(stop2)
         elseif getMapName() == stop2 then
             moveToMap(stop3)
         elseif getMapName() == stop3 then
             moveToMap(stop4)
         elseif getMapName() == stop4 then
             moveToMap(stop5)
         elseif getMapName() == stop5 then
             moveToMap(endLocation)
         elseif getMapName() == endLocation then
             if lookForGrass then
                 moveToGrass()
             else
                 moveToRectangle(rectX1, rectY1, rectX2, rectY2)
             end
         end
     end
        
        
else
    
    
     if stops == 0 and pokecenterOnRoute then
         if getMapName() == endLocation then
             moveToMap(pokecenter)
         elseif getMapName() == pokecenter then
             usePokecenter()
         end
        
     elseif not isMounted() and hasItem("Bicycle") and not string.find(getMapName(), "Pokecenter") and not string.find(getMapName(), "Tunnel") and not string.find(getMapName(), "Stop") and not string.find(getMapName(), "Cave") and not string.find(getMapName(), "Mt") and not string.find(getMapName(), "Tower") and not string.find(getMapName(), "mansion") and not string.find(getMapName(), "Victory") then
         useItem("Bicycle")
         log("Getting on bike.")
    
     elseif stops == 0 and not pokecenterOnRoute then
         if getMapName() == endLocation then
             moveToMap(city)
         elseif getMapName() == city then
             moveToMap(pokecenter)
         elseif getMapName() == pokecenter then
             usePokecenter()
         end
    
     elseif stops == 1 then
         if getMapName() == endLocation then
             moveToMap(stop1)
         elseif getMapName() == stop1 then
             moveToMap(city)
         elseif getMapName() == city then
             moveToMap(pokecenter)
         elseif getMapName() == pokecenter then
             usePokecenter()
         end
        
     elseif stops == 2 then
         if getMapName() == endLocation then
             moveToMap(stop2)
         elseif getMapName() == stop2 then
             moveToMap(stop1)
         elseif getMapName() == stop1 then
             moveToMap(city)
         elseif getMapName() == city then
             moveToMap(pokecenter)
         elseif getMapName() == pokecenter then
             usePokecenter()
         end
    
     elseif stops == 3 then
         if getMapName() == endLocation then
             moveToMap(stop3)
         elseif getMapName() == stop3 then
             moveToMap(stop2)
         elseif getMapName() == stop2 then
             moveToMap(stop1)
         elseif getMapName() == stop1 then
             moveToMap(city)
         elseif getMapName() == city then
             moveToMap(pokecenter)
         elseif getMapName() == pokecenter then
             usePokecenter()
         end
    
     elseif stops == 4 then
         if getMapName() == endLocation then
             moveToMap(stop4)
         elseif getMapName() == stop4 then
             moveToMap(stop3)
         elseif getMapName() == stop3 then
             moveToMap(stop2)
         elseif getMapName() == stop2 then
             moveToMap(stop1)
         elseif getMapName() == stop1 then
             moveToMap(city)
         elseif getMapName() == city then
             moveToMap(pokecenter)
         elseif getMapName() == pokecenter then
             usePokecenter()
         end
        
     elseif stops == 5 then
         if getMapName() == endLocation then
             moveToMap(stop5)
         elseif getMapName() == stop5 then
             moveToMap(stop4)
         elseif getMapName() == stop4 then
             moveToMap(stop3)
         elseif getMapName() == stop3 then
             moveToMap(stop2)
         elseif getMapName() == stop2 then
             moveToMap(stop1)
         elseif getMapName() == stop1 then
             moveToMap(city)
         elseif getMapName() == city then
             moveToMap(pokecenter)
         elseif getMapName() == pokecenter then
             usePokecenter()
         end
     end
end --condition--
end --func--
function onBattleAction()
     if getActivePokemonNumber() <= getTeamSize() then
         if isWildBattle() and ((isOpponentShiny() and catchShineys) or (catchNotCaught and not isAlreadyCaught())) or IsPokemonOnCaptureList() then
             if getPokemonHealthPercent(getTeamSize()) > healthToRunAt then
                 if isPokemonUsable(getActivePokemonNumber()) then
                     if getOpponentHealthPercent() >= percentToStartThrowing and not isOpponentShiny then
                         return weakAttack()
                     else
                         if useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
                             return
                         else
                             return attack() or sendUsablePokemon() or run()
                         end
                     end
                     if getOpponentHealthPercent() >= percentToStartThrowingIfShiny and isOpponentShiny then
                         return weakAttack()
                     else
                         if useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
                             return
                         else
                             return attack() or sendUsablePokemon() or run()
                         end
                     end
                 else
                     return sendUsablePokemon()
                 end
             else
                 return run()
             end
         else
             if getPokemonHealthPercent(getTeamSize()) < healthToRunAt or onlyCatch then
                 return run()
             else
                 return attack() or sendUsablePokemon() or run()
             end
         end
     end
end
function onLearningMove(moveName, pokemonIndex)
     forgetAnyMoveExcept(movesNotToForget)
end




help me pleaseeeeeeee
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)