2018-06-30, 14:26:50
name = "Leveling: Route 32(Near Violet City)"
author = "PreciousTrainer"
description = [[This script will train the first pokemon of your team.
It will also try to capture shinies by throwing pokeballs.
Start anywhere between Violet City and Route 32.]]
function onPathAction()
if isPokemonUsable(1) then
if getMapName() == "Pokecenter Ecruteak" then
moveToMap("Ecruteak city")
elseif getMapName() == "Ecruteak city" then
moveToMap("Route 37")
elseif getMapName() == "Route 37" then
moveToGrass()
end
else
if getMapName() == "Route 37" then
moveToMap("Ecruteak city")
elseif getMapName() == "Ecruteak city" then
moveToMap("Pokecenter Ecruteak")
elseif getMapName() == "Pokecenter Ecruteak" then
usePokecenter()
end
end
end
function onBattleAction()
if isWildBattle() and isOpponentShiny() 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
author = "PreciousTrainer"
description = [[This script will train the first pokemon of your team.
It will also try to capture shinies by throwing pokeballs.
Start anywhere between Violet City and Route 32.]]
function onPathAction()
if isPokemonUsable(1) then
if getMapName() == "Pokecenter Ecruteak" then
moveToMap("Ecruteak city")
elseif getMapName() == "Ecruteak city" then
moveToMap("Route 37")
elseif getMapName() == "Route 37" then
moveToGrass()
end
else
if getMapName() == "Route 37" then
moveToMap("Ecruteak city")
elseif getMapName() == "Ecruteak city" then
moveToMap("Pokecenter Ecruteak")
elseif getMapName() == "Pokecenter Ecruteak" then
usePokecenter()
end
end
end
function onBattleAction()
if isWildBattle() and isOpponentShiny() 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