2019-01-30, 17:20:37
PHP Code:
name = "Route 103"
author = "Gandalf"
description = [[Start anywhere between the exit of the Route 103 and the Pokecenter Oldale Town.]]
movesNotToForget = {} --add moves here
function onPathAction()
if isPokemonUsable(1) then
if getMapName() == "Pokecenter Oldale Town" then
moveToCell(8, 22)
elseif getMapName() == "Oldale Town" then
moveToCell(22, 0)
elseif getMapName() == "Route 103" then
moveToRectangle(31, 28, 40, 28)
end
else
if getMapName() == "Route 103" then
moveToCell(27, 35)
elseif getMapName() == "Oldale Town" then
moveToCell(16, 26)
elseif getMapName() == "Pokecenter Oldale Town" then
talkToNpcOnCell(8, 14)
end
end
end
function onBattleAction()
if isWildBattle() and (isOpponentShiny() or isAlreadyCaught() == false) then
if 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
function onLearningMove(moveName, pokemonIndex)
forgetAnyMoveExcept(movesNotToForget)
end