Hello There, Guest! Login Register


Please help me fix this script
#1
name = "Exterior Torchic"
author = "RagingDarkness Edited by RuthlessRedd"
description = [[This script will use sync and False Swipe to catch Torchic]]
function onStart()
healCounter = 0
shinyCounter = 0
torchicCounter = 0
wildCounter = 0
log("Start botting.")

end

function onPause()
log("***********************************PAUSED - SESSION STATS***********************************")
log("Shinies Caught: " .. shinyCounter)
log("Mudkip Caught: " .. mudkipCounter)
log("Pokemons encountered: " .. wildCounter)
log("You have visited the PokeCenter ".. healCounter .." times.")
log("*********************************************************************************************")
end


function goToPC()
    if getMapName() == "Mt. Summer Exterior" then
          moveToMap("Vulcan Forest")
     elseif getMapName() ==  "Vulcan Forest"  then
           moveToCell(20,0)
     elseif getMapName() == "Vulcanic Town" then
          moveToMap("Pokecenter Vulcanic Town")
     elseif getMapName() == "Pokecenter Vulcanic Town" then
         usePokecenter()
     end
  end

function onResume()
log("SESSION RESUMED")
end

function onDialogMessage(pokecenter)
 if stringContains(pokecenter, "There you go, take care of them!") then
      healCounter = healCounter + 1
      log("You have visited the PokeCenter ".. healCounter .." times.")
 end
end

function onPathAction ()
 
    if isOutside() and hasItem("Bicycle") and not isSurfing() and not isMounted() then
    log("No Handle Bars!")
    return useItem("Bicycle")
 end

 if isPokemonUsable(3) and getRemainingPowerPoints(2, "False Swipe") >= 1 then
     if getMapName() == "Pokecenter Vulcanic Town" then
          moveToMap("Vulcanic Town")
     elseif getMapName() == "Vulcanic Town" then
          moveToMap("Vulcan Forest")
     elseif getMapName() ==  "Vulcan Forest"  then
          moveToCell(0, 29)
     elseif getMapName() == "Mt. Summer Exterior" then
          moveToGrass()
  else
      if getMapName() == "Mt. Summer Exterior" then
          moveToMap("Vulcan Forest")
     elseif getMapName() ==  "Vulcan Forest"  then
           moveToCell(20,0)
     elseif getMapName() == "Vulcanic Town" then
          moveToMap("Pokecenter Vulcanic Town")
     elseif getMapName() == "Pokecenter Vulcanic Town" then
         usePokecenter()
      end
 end
end

function onBattleAction()
  if isWildBattle() and ( isOpponentShiny() or not isAlreadyCaught() or getOpponentName() == "Mudkip" or getOpponentName() == "Lotad") then
      if getActivePokemonNumber() == 1 then
          return sendPokemon(swiper) or run() or sendUsablePokemon()
      elseif getOpponentHealth() > 1 then
          return useMove("False Swipe") or run() or sendUsablePokemon()
      elseif getActivePokemonNumber() ~= sleeper then
          return sendPokemon(sleeper) or run() or sendUsablePokemon()
      elseif getOpponentStatus() ~= "SLEEP" then
          return useMove(sleepMove) or run() or sendUsablePokemon()
      else
          return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or run() or sendUsablePokemon()
      end
  else
      return run() or attack() or sendUsablePokemon()
  end
end
end
[Image: 93b46b387aab4582ada4e8a1a272ac77.png]
 
Reply
#2
You never defined what the value for "swiper" is, so you're trying to send a Pokemon at a nil index.
 
Reply
#3
(2016-12-10, 08:29:59)Zonz You never defined what the value for "swiper" is, so you're trying to send a Pokemon at a nil index.

i see, how to make it as role player?
 
Reply
#4
There's numerous ways to go about doing that. Take a look at this script for an example:
https://proshine-bot.com/thread-1621.html
 
Reply
#5
ok thx
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)