2018-11-28, 13:00:34
function onPathAction()
if isPokemonUsable(1) then
if getMapName() == "Pokecenter Cerulean" then
moveToCell(9, 22)
elseif getMapName() == "Cerulean City" then
moveToRectangle(0, 19, 0, 21)
elseif getMapName() == "Route 4" then
moveToRectangle(71, 20, 79, 28)
end
else
if getMapName() == "Route 4" then
moveToRectangle(96, 20, 96, 22)
elseif getMapName() == "Cerulean City" then
moveToCell(26, 30)
elseif getMapName() == "Pokecenter Cerulean" then
usePokecenter()
end
end
end
function onBattleAction()
if isWildBattle() and (isOpponentShiny() or isAlreadyCaught() == false) then
if useItem("Ultra Ball") or useItem("Great Ball") or 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