2016-06-28, 06:35:20
This is a leveling script I modified from one of silver's scripts. This script will level the first of your team in route 34 and heal up in Goldenrod. Till now there are no issues feel free to give any advice. Hope you like my first modifying script. Copyrights to Silver again. The script went wrong catching all pokemon it meets what should I do.
Script:
Script:
-- Copyright © 2016 KimoK <misterotaku77@gmail.com>
-- This work is free. You can redistribute it and/or modify it under the
-- terms of the Do What The Fuck You Want To Public License, Version 2,
-- as published by Sam Hocevar. See the LICENSE file for more details.
name = "Leveling: Route 34"
author = "KimoK"
description = [[This script will train the first pokémon of your team.
It will also try to capture shinies by throwing pokéballs.
Start anywhere between Goldenrod City and the Route 34.]]
function onPathAction()
if isPokemonUsable(1) then
if getMapName() == "Pokecenter Goldenrod" then
moveToMap("Goldenrod City")
elseif getMapName() == "Goldenrod City" then
moveToMap("Route 34")
elseif getMapName() == "Route 34" then
moveToGrass()
end
else
if getMapName() == "Route 34" then
moveToMap("Goldenrod City")
elseif getMapName() == "Goldenrod City" then
moveToMap("Pokecenter Goldenrod")
elseif getMapName() == "Pokecenter Goldenrod" then
usePokecenter()
end
end
end
function onBattleAction()
if isWildBattle() and ( isOpponentShiny() or (not isAlreadyCaught()) or (getOpponentName() == "Abra" ) or (getOpponentName() == "Ditto" )) 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