Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Copyright © 2018 - M4ttix
- -- This work is free. You can modify/change whatever you want.
- -- Version: v1.0
- name = "Leveling: Diglett Cave"
- author = "M4ttix"
- description = [[This script will train the first pokemon of your team.
- It will also try to capture shinies by throwing pokeballs.
- Start anywhere between the exit of Vermilion City and Route 11.]]
- function onPathAction()
- if isPokemonUsable(1) then
- if getMapName() == "Pokecenter Vermilion" then
- moveToMap("Vermilion City")
- elseif getMapName() == "Vermilion City" then
- moveToMap("Route 11")
- elseif getMapName() == "Route 11" then
- moveToMap("Digletts Cave Entrance 2")
- elseif getMapName() == "Digletts Cave Entrance 2" then
- moveToRectangle(15,19,25,27)
- end
- else
- if getMapName() == "Digletts Cave Entrance 2" then
- moveToMap("Route 11")
- elseif getMapName() == "Route 11" then
- moveToMap("Vermilion City")
- elseif getMapName() == "Vermilion City" then
- moveToMap("Pokecenter Vermilion")
- elseif getMapName() == "Pokecenter Vermilion" then
- usePokecenter()
- end
- end
- end
- function onBattleAction()
- if isWildBattle() and isOpponentShiny() 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement