Hello There, Guest! Login Register


help me
#1
i use that script and during the training i found a shiny. the script use a pokeball and it failed and the poke attack my first pokemon and he died. the bot stopped.
the question is, the script failed cause my poke die or because the pokeball that the script use is only for one time?


the code is:
name = "test"
author = "simoncino"
description = [[Cattura anche shiny. CONSIGLIO : inserire come primo pokemon uno con mosse che uccidono i pokemon selvatici in un solo colpo]]

function onPathAction()
   
   if isPokemonUsable(1) then
       if getMapName() == "Mt. Silver Pokecenter" then
           moveToMap("Mt. Silver Exterior")
       elseif getMapName() == "Mt. Silver Exterior" then
          moveToGrass()
       end
   
   else
    if  getMapName() == "Mt. Silver Exterior" then    
           moveToMap("Mt. Silver Pokecenter")
           elseif getMapName() == "Mt. Silver Pokecenter" then
           usePokecenter()
       end
end
end

function onBattleAction()
   if isWildBattle() and ( isOpponentShiny() ) then    
       return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or attack() or run()
   else
     return attack() or run() or sendUsablePokemon() or sendAnyPokemon()

    end
   
 
       
     
end
 
Reply
#2
The script failed when your Pokemon died because you didn't tell it to send any other Pokemon if it can't use a Pokeball, attack, or run. All you needed was one more function call after all the others.

return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or attack() or run() or sendAnyPokemon()
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)