2019-01-24, 16:10:50
PHP Code:
name = "Route 30"
author = "Gandalf"
description = [[Start anywhere between the exit of the Route 30 and the Pokecenter Cherrygrove City.]]
function onPathAction()
if isPokemonUsable(1) then
if getMapName() == "Pokecenter Cherrygrove City" then
moveToCell(10, 20)
elseif getMapName() == "Cherrygrove City" then
moveToCell(36, 0)
elseif getMapName() == "Route 30" then
moveToRectangle(13, 88, 20, 88)
end
else
if getMapName() == "Route 30" then
moveToCell(8, 96)
elseif getMapName() == "Cherrygrove City" then
moveToCell(51, 6)
elseif getMapName() == "Pokecenter Cherrygrove City" 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
Script: