Hello There, Guest! Login Register


Hoenn -Sky Pillar 1F Level Up
#1
PHP Code:
name "Leveling in Sky Pillar 1F"
author "whtmn"
description "Leveling in Sky Pillar 1F, Start anywhere between Sky Pillar 1F and Pokecenter Pacifidlog Town."
movesNotToForget ={""} --add moves here

mounts
= { ""}

rectanglesCount 4
rectangles 
= {
 
   {110611}, 
 
   {113513}, 
    {
8101410}, 
    {
6596 
}

selectedRectangle 0

function onStart()
 
   selectRandomRectangle()
 
   for _mountName in ipairs(mounts) do
 
       if hasItem(mountNamethen
            setMount
(mountName)
 
           break
        end
    end
end

function onPathAction()
 
  if isPokemonUsable(1then
       
if getMapName() == "Pokecenter Pacifidlog Town" then
           moveToCell
(822)
 
      elseif getMapName() == "Pacifidlog Town" then
           moveToCell
(4015)
     
  elseif getMapName() == "Route 131" then
           moveToCell
(411)
 
      elseif getMapName() == "Sky Pillar Entrance" then
       
if getPlayerY() > 32 then
           moveToCell
(2632)
         
  else
 
          moveToCell(276)    
 
      end            
       
elseif getMapName() == "Sky Pillar Entrance Cave 1F" then
           moveToCell
(176)
 
      elseif getMapName() == "Sky Pillar 1F" then 
           moveToRectangle
(
         
                rectangles[selectedRectangle][1],
 
                        rectangles[selectedRectangle][2],
         
                rectangles[selectedRectangle][3],
         
                rectangles[selectedRectangle][4]
         
  )
 
             end              

   
else
 
      if getMapName() == "Sky Pillar 1F" then
           moveToCell
(813)
     
  elseif getMapName() == "Sky Pillar Entrance" then
           
if getPlayerY() < 8 then
              moveToCell
(3523)
         
  else
 
             moveToCell(2749)
             
 end
       
elseif getMapName() == "Sky Pillar Entrance Cave 1F" then
              moveToCell
(717)
 
      
       
elseif getMapName() == "Route 131" then
           moveToCell
(030)
 
      elseif getMapName() == "Pacifidlog Town" then
           moveToCell
(1912)
 
      elseif getMapName() == "Pokecenter Pacifidlog Town" then
           talkToNpcOnCell
(814)
 
      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 run() or sendUsablePokemon() or sendAnyPokemon()
 
  else
 
      return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
 
  end
end
function onLearningMove(moveNamepokemonIndex)
 
  forgetAnyMoveExcept(movesNotToForget)
end 

function onBattleMessage(message)
 
   -- Switch rectangle after each battle.
 
   if stringContains(message"you have won"then
        selectRandomRectangle
()
 
   end
end

function selectRandomRectangle()
 
   selectedRectangle math.random(1rectanglesCount)
 
   log("Using rectangle " .. selectedRectangle .. ".")
end 
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)