Hello There, Guest! Login Register


Problem with wynauts
#1
Im using this script for catch only togepis:

name = "Catch  Togepi"
author = "KArzo"
description = [[Catch Happiny And Togepi with Synch and False Swipe]]


function onstart()
pcVisits = 0
  shinyCounter = 0
  wildCounter = 0
  log("Start botting.")
end

function onPause()
  log("Shinies Caught: " .. shinyCounter)
  log("Pokemons encountered: " .. wildCounter)
  log("You have visited the PokeCenter ".. pcVisits .." times.")
  log("*********************************************************************************************")
end

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

function onPathAction()
  if isPrivateMessageEnabled() then log("Private messages disabled.") return disablePrivateMessage() end
  if isPokemonUsable(1)
    and (getRemainingPowerPoints(2, "False Swipe") == 0)
  then
     if getMapName() == "Love Island"  then    
          moveToMap("Pokecenter Love Island")
       elseif getMapName() == "Pokecenter Love Island" then
          usePokecenter()
   end
   elseif isPokemonUsable(1) then
      if getPokemonNature(1) == "Timid" then
           if getMapName () == "Pokecenter Love Island" then
             moveToMap ("Love Island") 
           elseif getMapName () == "Love Island" then
               moveToRectangle(40, 31, 42, 32)
           end
       end
   end
end    

function onBattleAction()
 if isWildBattle() and ( isOpponentShiny() or not isAlreadyCaught() or getOpponentName() == "Togepi") then
      if getActivePokemonNumber() == 1 then
          if sendPokemon(2) then return end
      end
       if getActivePokemonNumber() == 2 and getOpponentHealth() > 1 then
          if weakAttack() then return end
      end
       if useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") then return end
  end 
      if isWildBattle() and ( isOpponentShiny() or not isAlreadyCaught() or getOpponentName() == "Wynaut") then
     return attack()
  end
  return run() or sendUsablePokemon() or sendAnyPokemon()
end    

The problem is, when appears a wynaut he try to run and  i cant run from wynauts how i do for he attack the wynauts , thanks!
 
Reply
#2
function onBattleAction()
if isWildBattle() and (getOpponentName() == "Wynaut") then
return attack()
end
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)