2019-01-28, 16:35:28
PHP Code:
name = "Route 48"
author = "Gandalf"
description = [[Start anywhere between the exit of the Route 48 and the Pokecenter Route 48.]]
movesNotToForget = {} --add moves here
function onPathAction()
if isPokemonUsable(1) then
if getMapName() == "Pokecenter Route 48" then
moveToCell(10, 20)
elseif getMapName() == "Route 48" then
moveToRectangle(27, 60, 27, 67)
end
else
if getMapName() == "Route 48" then
moveToCell(15, 15)
elseif getMapName() == "Pokecenter Route 48" 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