Hello There, Guest! Login Register


Level up script Mt.moon working on V3
#1
name = "New Mt Moon"
description = "Updated Mt Moon script"

function onPathAction()
usable = hasUsablePokemon()
if usable then
  if atArea("Mt. Moon") then
    moveToRectangle(37, 51, 39, 57)
  else
    moveToArea("Mt. Moon")
  end
else
  if atArea("Pokecenter") then
    usePokecenter()
  else
    moveToArea("Pokecenter")
  end
end
end

function hasUsablePokemon()
size = getTeamSize()
for i=1,size+0,1 do
  if isPokemonUsable(i) then
    return true
  end
end
return false
end

function atArea(area)
name = getMapName()
if area == "Pokecenter" and name == "Pokecenter Route 3" then
  return true
elseif area == "Mt. Moon" and name == "Mt. Moon 1F" then
  return true
end
return false
end

function moveToArea(area)
name = getMapName()
if name == "Pokecenter Route 3" or name == "Mt. Moon 1F" then
  moveToCell(8,22)
elseif name == "Route 3" then
  if area == "Pokecenter Route 3" then
    moveToCell(79,21)
  else
    moveToCell(84,16)
  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()
  end
end
This script is modified from original script created by Cody/CaptWAR
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)