Hello There, Guest! Login Register


Simple Gible/Togepi catcher
#1
Hey,
this is a small Script, that catches Gibles and Togepi's on the moon.
-uses False Swipe (Slot 2)
-uses one Sync Pokemon (soon it will change the Sync on day/night) (Slot 1)
-it does not heal, it just moves a rectangle and runs away from everything exept Gible and Togepi.

Changelog:
    -added Counter
    -added Healing(testing)
    -now don't stop if the 2nd Pokemon dies


The main Script's I used as a "template" are Shinrei's Poliwag catcher, Zymu's anywhere-leveler and Daysmith's Skytower farmer.

name = "Catch Gible/Togepi on Moon"
author = "gerryxd"
description = [[Catch Gible/Togepi with Synch and False Swipe, used Shinrei's Poliwag, Zymu's anywhere-leveler and Daysmith's Skytower as template]]


function onStart()
    gibleCounter = 0
    togepiCounter = 0
    shinyCounter = 0
    log("Start botting.")
end


function onPause()
    log("Pause.")
    log("Gible Counter: " .. gibleCounter)
    log("Togepi Counter: " .. togepiCounter)
    log("Shinies Caught: " .. shinyCounter)
end


function onResume()
    log("Resumed.")
end


function onBattleMessage(wild)
    if wild == "A Wild SHINY " then
        shinyCounter = shinyCounter + 1
    elseif wild == "A Wild [FF9900]Gible[-] Attacks!" then
        gibleCounter = gibleCounter + 1
    elseif wild == "A Wild [FF9900]Togepi[-] Attacks!" then
        togepiCounter = togepiCounter + 1
    end
end


function onPathAction()
    if isPrivateMessageEnabled() then log("Private messages disabled.") return disablePrivateMessage() end
    if isPokemonUsable(1) and isPokemonUsable(2)
    then
        if getMapName() == "Moon" then
            moveToRectangle(21, 36, 24, 40)
        end

    else
        if getMapName() == "Moon" then
            moveToCell(16, 47)
        elseif getPlayerX() == 16 and getPlayerY() == 47 then
            talkToNpcOnCell(16, 47)
            pushDialogAnswer(1)
        end
    end
end


function onBattleAction()

    if isWildBattle() and ( isOpponentShiny() or not isAlreadyCaught() or getOpponentName() == "Gible" or getOpponentName() == "Togepi") then
        if getActivePokemonNumber() == 1 then
            return sendPokemon(2) or sendUsablePokemon() or run()
        elseif ( getActivePokemonNumber() == 2 ) and ( getOpponentHealth() > 1 ) then
            return useMove("False Swipe") or sendUsablePokemon() or run()
        elseif ( getOpponentHealth() == 1 ) then
            return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendUsablePokemon()
        end    
    end    
    if getActivePokemonNumber() >= 1 then
        return run() or attack() or sendUsablePokemon()        
    end    
end
 
Reply
#2
hi man! if i use 2 sync ( ex: bold and jolly ) and FS slot 2 ( parasect ). how arrangement??
 
Reply
#3
hunterdauxanh hi man! if i use 2 sync ( ex: bold and jolly ) and FS slot 2 ( parasect ). how arrangement??
sadly the script only supports one sync pokemon atm.
 
Reply
#4
bot stop when pkm with fs died Sad
 
Reply
#5
hunterdauxanh bot stop when pkm with fs died Sad
I changed it, can you test it if this works?
I try to implement to heal today.
 
Reply
#6
gerryxd
hunterdauxanh bot stop when pkm with fs died Sad
I changed it, can you test it if this works?
I try to implement to heal today.
i will test again . ty
 
Reply
#7
gerryxd
hunterdauxanh bot stop when pkm with fs died Sad
I changed it, can you test it if this works?
I try to implement to heal today.

no, i think it doens't work.

i copy your onBattleAction
function onBattleAction()

    if isWildBattle() and ( isOpponentShiny() or not isAlreadyCaught() or getOpponentName() == "Heracross") then
        if getActivePokemonNumber() == 1 then
            return sendPokemon(2) or sendUsablePokemon() or run()
        elseif ( getActivePokemonNumber() == 2 ) and ( getOpponentHealth() > 1 ) then
            return useMove("False Swipe") or sendUsablePokemon() or run()
        elseif ( getOpponentHealth() == 1 ) then
            return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendUsablePokemon()
        end    
    end    
    if getActivePokemonNumber() >= 1 then
        return run() or attack() or sendUsablePokemon()        
    end    
end

into my script
name = "Heracross catcher"
author = "PROlux"
description = [[This script will catch Heracross on National Park]]

function onStart()
    counter=0;

    if isPrivateMessageEnabled() then
        log("Private messages disabled.")
        return disablePrivateMessage()
    end
end

function onStop()
    log("Heracross caught: "..counter)
end

function onPause()
    log("Heracross caught: "..counter)
end

function onBattleMessage(message)
    if stringContains(message, "caught") then
        counter = counter +1
    end
end

function onPathAction()
    if getRemainingPowerPoints(2, "False Swipe") >= 1 and isPokemonUsable(2) then
    
        
        if getMapName() == "Pokecenter Goldenrod" then
            moveToMap("Goldenrod City")
        elseif getMapName() == "Goldenrod City" then
            if isMounted() then
            moveToMap("Route 35 Stop House")
            else
                useItem("Arcanine Mount")
                log("You are in Arcanine Mount..")
            end
        elseif getMapName() == "Route 35 Stop House" then
            moveToMap("Route 35")
        elseif getMapName() == "Route 35" then
            if isMounted() then
            moveToMap("National Park Stop House 1")
            else
                useItem("Arcanine Mount")
                log("You are in Arcanine Mount..")
            end    
        elseif getMapName() == "National Park Stop House 1" then
            moveToMap("National Park")
        elseif getMapName() == "National Park" then
            if isMounted() then
            moveToRectangle(27, 44, 32, 48)
            else
                useItem("Arcanine Mount")
                log("You are in Arcanine Mount..")
            end
        elseif getMapName() == "Route 36" then
            moveToMap("National Park Stop")
        elseif getMapName() == "National Park Stop" then
            moveToMap("National Park")
        end
                        
    else
        if getMapName() == "Route 36" or getMapName() == "National Park" then    
            return useItem("Escape Rope")
        else
            return useItem("Escape Rope")
        end
    end
end

function onBattleAction()

    if isWildBattle() and ( isOpponentShiny() or not isAlreadyCaught() or getOpponentName() == "Heracross") then
        if getActivePokemonNumber() == 1 then
            return sendPokemon(2) or sendUsablePokemon() or run()
        elseif ( getActivePokemonNumber() == 2 ) and ( getOpponentHealth() > 1 ) then
            return useMove("False Swipe") or sendUsablePokemon() or run()
        elseif ( getOpponentHealth() == 1 ) then
            return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendUsablePokemon()
        end    
    end    
    if getActivePokemonNumber() >= 1 then
        return run() or attack() or sendUsablePokemon()        
    end    
end

because my onBattleAction part doesn't work too but it stops again if the pokemon with false swipe on slot 2 died

i search since 2 days a onBattleAction part who works and dont stop but i cant find anyone Sad
 
Reply
#8
the bot run away from a gible after change false swipe pokemon and run away from
 
Reply
#9
can add sleep on this script?
 
Reply
#10
(2016-11-11, 03:05:41)Jamesllj can add sleep on this script?

Try this and see if it works.

-- Index of Pokemon with False Swipe
swiper = 2

-- Index of Pokemon with the sleep-inducing move
sleeper = 2

-- Name of sleep-inducing move
sleepMove = "Spore"

function onBattleAction()
    if isWildBattle() and (isOpponentShiny() or not isAlreadyCaught() or getOpponentName() == "Gible" or getOpponentName() == "Togepi") 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
 
Reply
#11
(2016-11-11, 06:37:37)Zonz
(2016-11-11, 03:05:41)Jamesllj can add sleep on this script?

Try this and see if it works.

-- Index of Pokemon with False Swipe
swiper = 2

-- Index of Pokemon with the sleep-inducing move
sleeper = 2

-- Name of sleep-inducing move
sleepMove = "Spore"

function onBattleAction()
    if isWildBattle() and (isOpponentShiny() or not isAlreadyCaught() or getOpponentName() == "Gible" or getOpponentName() == "Togepi") 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

just copy the function onBattleAction()?
 
Reply
#12
Yeah, just overwrite the old one, and be sure to add the variables at the top part of my addition.
 
Reply
#13
(2016-11-12, 04:17:10)Zonz Yeah, just overwrite the old one, and be sure to add the variables at the top part of my addition.

name = "Catch Gible/Togepi on Moon"
author = "gerryxd"
description = [[Catch Gible/Togepi with Synch and False Swipe, used Shinrei's Poliwag, Zymu's anywhere-leveler and Daysmith's Skytower as template]]


function onStart()
    gibleCounter = 0
    togepiCounter = 0
    shinyCounter = 0
    log("Start botting.")
end


function onPause()
    log("Pause.")
    log("Gible Counter: " .. gibleCounter)
    log("Togepi Counter: " .. togepiCounter)
    log("Shinies Caught: " .. shinyCounter)
end


function onResume()
    log("Resumed.")
end


function onBattleMessage(wild)
    if wild == "A Wild SHINY " then
        shinyCounter = shinyCounter + 1
    elseif wild == "A Wild [FF9900]Gible[-] Attacks!" then
        gibleCounter = gibleCounter + 1
    elseif wild == "A Wild [FF9900]Togepi[-] Attacks!" then
        togepiCounter = togepiCounter + 1
    end
end


function onPathAction()
    if isPrivateMessageEnabled() then log("Private messages disabled.") return disablePrivateMessage() end
    if isPokemonUsable(1) and isPokemonUsable(2)
    then
        if getMapName() == "Moon" then
            moveToRectangle(21, 36, 24, 40)
        end

    else
        if getMapName() == "Moon" then
            moveToCell(16, 47)
        elseif getPlayerX() == 16 and getPlayerY() == 47 then
            talkToNpcOnCell(16, 47)
            pushDialogAnswer(1)
        end
    end
end


-- Index of Pokemon with False Swipe
swiper = 2

-- Index of Pokemon with the sleep-inducing move
sleeper = 2

-- Name of sleep-inducing move
sleepMove = "Spore"

function onBattleAction()
    if isWildBattle() and (isOpponentShiny() or not isAlreadyCaught() or getOpponentName() == "Gible" or getOpponentName() == "Togepi") 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



is this ok ?
 
Reply
#14
Should be fine, try it out and see.
 
Reply
#15
(2016-11-12, 05:51:38)Zonz Should be fine, try it out and see.

I realize it run away from togepi..I believe same as gible
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)