2019-02-02, 17:00:00
PHP Code:
name = "Route 15"
author = "Gandalf"
description = [[Start anywhere between the exit of the Route 15 and the Pokecenter Fuchsia.]]
movesNotToForget = {} --add moves here
function onPathAction()
if isPokemonUsable(1) then
if getMapName() == "Pokecenter Fuchsia" then
moveToCell(9, 22)
elseif getMapName() == "Fuchsia City" then
moveToCell(67, 26)
elseif getMapName() == "Route 15 Stop House" then
moveToCell(10, 7)
elseif getMapName() == "Route 15" then
moveToRectangle(10, 24, 17, 24)
end
else
if getMapName() == "Route 15" then
moveToCell(6, 17)
elseif getMapName() == "Route 15 Stop House" then
moveToCell(0, 7)
elseif getMapName() == "Fuchsia City" then
moveToCell(30, 39)
elseif getMapName() == "Pokecenter Fuchsia" then
talkToNpcOnCell(9, 15)
end
end
end
function onBattleAction()
if isWildBattle() and (isOpponentShiny() or isAlreadyCaught() == false) then
if useItem("Ultraball") 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