2016-06-13, 08:04:37
I dont know if work

name = "Granite Cave and Riolu Catcher"
author = "Mrshiny"
description = "Leveling in Granite cave and catch riolu"
function onStart()
pcVisits = 0
shinyCounter = 0
wildCounter = 0
startLevel1 = getPokemonLevel(1)
startLevel = getPokemonLevel(1)
startMoney = getMoney()
log("You have currently " .. getMoney() .. " Pokedollars.")
log("Your " .. getPokemonName(1) .. " is Level " .. startLevel1 .. ".")
log("Start botting.")
end
function onPause()
log("***********************************PAUSED - SESSION STATS***********************************")
log("Your First Pokemon, ".. getPokemonName(1) ..", has gained ".. (getPokemonLevel(1) - startLevel1) .." levels!")
log("You have earned ".. tostring(getMoney() - startMoney) .." PokeDollars!")
log("Shinies Caught: " .. shinyCounter)
log("Pokemons encountered: " .. wildCounter)
log("You have visited the PokeCenter ".. pcVisits .." times.")
log("*********************************************************************************************")
end
function onResume()
log("SESSION RESUMED")
end
function onStop()
log("Total PokeDollars Earned: ".. tostring(getMoney() - startMoney) ..".")
log("Total Pokemon Defeated: ".. wildCounter ..".")
log("Total Shiny Pokemon Caught: ".. shinyCounter ..".")
end
function onPathAction()
if isPokemonUsable(1) then
if getMapName() == "Pokecenter Dewford Town" then
moveToMap("Dewford Town")
elseif getMapName() == "Dewford Town" then
moveToMap("Route 106")
elseif getMapName() == "Route 106" then
moveToMap("Granite Cave 1F")
elseif getMapName() == "Granite Cave 1F" then
moveToRectangle(38, 14, 40, 14)
end
else
if getMapName() == "Granite Cave 1F" then
moveToMap("Route 106")
elseif getMapName() == "Route 106" then
moveToMap("Dewford Town")
elseif getMapName() == "Dewford Town" then
moveToMap("Pokecenter Dewford Town")
elseif getMapName() == "Pokecenter Dewford Town" then
usePokecenter()
end
end
end
function onBattleAction()
if isWildBattle() and ( isOpponentShiny() or (getOpponentName() == "Riolu" ) ) then
if useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
return
end
end
if getActivePokemonNumber() == 1 then
return attack() or sendUsablePokemon() or run() or sendAnyPokemon()
else
return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
end
end