Hello There, Guest! Login Register


Treecko Catch Saffari Hoenn.Lua
#1
Thanks Silv3r that helped me



name = "Saffari catch"
author = "YOudeath"
description = [[Saffari LEt's Go ]]

function onPathAction()
    if isPokemonUsable(1) then
        if getMapName() == "Pokecenter Lilycove City" then
            moveToMap("Lilycove City")
        elseif getMapName() == "Lilycove City" then
                moveToMap("Route 121")
        elseif getMapName() == "Route 121" then
                moveToMap("Hoenn Safari Zone Lobby")
        elseif getMapName() == "Hoenn Safari Zone Lobby" then
                        talkToNpcOnCell(21, 6)
        elseif getMapName() == "Hoenn Safari Zone Area 1" then
                        moveToGrass()
        end
    end
end

function onBattleAction()
    if isWildBattle() and ( isOpponentShiny() or (getOpponentName() == "Treecko" ) or (getOpponentName() == "Pikachu") ) then
        if getActivePokemonNumber() == 1 then
            return useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") or run()
        end
    end
    if (getActivePokemonNumber() >= 1 and getOpponentName() != "Pikachu" and
                                              getOpponentName() != "Duduo" and
                                              getOpponentName() != "Oddish" and
                                              getOpponentName() != "Psyduck" and
                                              getOpponentName() != "Natu" and
                                              getOpponentName() != "Gloom" and
                                          getOpponentName() != "Girafarig") then
        return attack()
        else return run()
    end
end
 
Reply
#2
Nice 1 Thank you.
Can you give more information about the script. Dont know Lua yet

Best regards
 
Reply
#3
[03:01:09] It's Super Effective!
[03:01:09] Swalot has fainted!
[03:01:11] Come Back, Swalot!
[03:01:11] Go, Swellow!
[03:01:14] You have run away from the wild Pokemon.
[03:01:24] No action executed: stopping the bot.
[03:01:24] Bot stopped
[03:01:33] Bot started
[03:01:40] A Wild Natu Attacks!
[03:01:46] Lucario Attacks Natu with Shadow Ball.
[03:01:46] It's Super Effective!
[03:01:46] Natu has fainted!
 
Reply
#4
How to order my poke use false
 
Reply
#5
guys also your script have lots of problem first you pokemon die then you can not send other pokemon to fight
finally it just for a pokemon throw the troll ball it will not move
 
Reply
#6
function onPathAction()
    if isPokemonUsable(1) then
        if getMapName() == "Pokecenter Lilycove City" then
            moveToMap("Lilycove City")
        elseif getMapName() == "Lilycove City" then
            moveToMap("Route 121")
        elseif getMapName() == "Route 121" then
            moveToMap("Hoenn Safari Zone Lobby")
        elseif getMapName() == "Hoenn Safari Zone Lobby" then
            talkToNpcOnCell(21, 6)
        elseif getMapName() == "Hoenn Safari Zone Area 1" then
            moveToGrass()
           end
    end
end

function onBattleAction()
    if isWildBattle() and isOpponentShiny() or getOpponentName() == "Treecko" or getOpponentName() == "Wobbuffet" or getOpponentName() == "Buneary" then
        if getActivePokemonNumber() == 1 then
            return useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") or run()
        end
    end
    if (getActivePokemonNumber() >= 1 and getOpponentName() != "Pikachu" and
                                              getOpponentName() != "Doduo" and
                          getOpponentName() != "Buneary" and
                                              getOpponentName() != "Oddish" and
                                              getOpponentName() != "Psyduck" and
                                              getOpponentName() != "Natu" and
                                              getOpponentName() != "Kakuna" and
                          getOpponentName() != "Gloom" and
                          getOpponentName() != "Pidgeotto" and
                                          getOpponentName() != "Girafarig") then
            return
    end
    return run ()
end

Edited to run away from all Pokemon in this area and to catch Buneary and Wobbuffet to prevent cannot escape loop.
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)