Advertisement
Guest User

Digletts Cave Leveling

a guest
Jun 16th, 2018
531
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. -- Copyright © 2018 - M4ttix
  2. -- This work is free. You can modify/change whatever you want.
  3. -- Version: v1.0
  4.  
  5. name = "Leveling: Diglett Cave"
  6. author = "M4ttix"
  7. description = [[This script will train the first pokemon of your team.
  8. It will also try to capture shinies by throwing pokeballs.
  9. Start anywhere between the exit of Vermilion City and Route 11.]]
  10.  
  11. function onPathAction()
  12. if isPokemonUsable(1) then
  13. if getMapName() == "Pokecenter Vermilion" then
  14. moveToMap("Vermilion City")
  15. elseif getMapName() == "Vermilion City" then
  16. moveToMap("Route 11")
  17. elseif getMapName() == "Route 11" then
  18. moveToMap("Digletts Cave Entrance 2")
  19. elseif getMapName() == "Digletts Cave Entrance 2" then
  20. moveToRectangle(15,19,25,27)
  21.  
  22. end
  23. else
  24. if getMapName() == "Digletts Cave Entrance 2" then
  25. moveToMap("Route 11")
  26. elseif getMapName() == "Route 11" then
  27. moveToMap("Vermilion City")
  28. elseif getMapName() == "Vermilion City" then
  29. moveToMap("Pokecenter Vermilion")
  30. elseif getMapName() == "Pokecenter Vermilion" then
  31. usePokecenter()
  32.  
  33. end
  34. end
  35. end
  36.  
  37. function onBattleAction()
  38. if isWildBattle() and isOpponentShiny() then
  39. if useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
  40. return
  41. end
  42. end
  43. if getActivePokemonNumber() == 1 then
  44. return attack() or sendUsablePokemon() or run() or sendAnyPokemon()
  45. else
  46. return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
  47. end
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement