2019-01-26, 16:11:22
PHP Code:
name = "Route 37"
author = "Gandalf"
description = [[Start anywhere between the exit of the Route 37 and the Pokecenter Ecruteak.]]
movesNotToForget = {} --add moves here
function onPathAction()
if isPokemonUsable(1) then
if getMapName() == "Pokecenter Ecruteak" then
moveToCell(10, 20)
elseif getMapName() == "Ecruteak City" then
moveToCell(38, 47)
elseif getMapName() == "Route 37" then
moveToRectangle(18, 7, 18, 14)
end
else
if getMapName() == "Route 37" then
moveToCell(18, 4)
elseif getMapName() == "Ecruteak City" then
moveToCell(43, 39)
elseif getMapName() == "Pokecenter Ecruteak" then
talkToNpcOnCell(10, 12)
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