Hello There, Guest! Login Register


H.a Vulpix, Charmander and magmar hunt, cinnabar mansion 3f
#1
This code using Sync on 1st slot and false swipe on 2nd slot.
The main problem is this will stuck if the 2nd pokemon faited.(i need help to fix this)
name = "H.A Vulpix, Charmander, Magmar Catcher"
author = "Kuro"
description = [[Using Synch in 1st slot, false swipe in 2nd slot. Based on LoneAcer's scripts]]

function onPathAction()
    vulpix_found = 0
    if (isPokemonUsable(2) and getPokemonHealth(2) >160 and getRemainingPowerPoints(2,"False Swipe") > 2)then
        if getMapName() == "Pokecenter Cinnabar" then
            moveToMap("Cinnabar Island")
        elseif getMapName() == "Cinnabar Island" then
            moveToMap("Cinnabar mansion 1")
        elseif getMapName() == "Cinnabar mansion 1" then
            moveToMap("Cinnabar mansion 2")
        elseif getMapName() == "Cinnabar mansion 2" then
            moveToMap("Cinnabar mansion 3")
        elseif getMapName() == "Cinnabar mansion 3" then
            moveNearExit("Cinnabar mansion 2")
        end
    else
        if getMapName() == "Cinnabar mansion 3" then
            moveToMap("Cinnabar mansion 2")
        elseif getMapName() == "Cinnabar mansion 2" then
            moveToMap("Cinnabar mansion 1")
        elseif getMapName() == "Cinnabar mansion 1" then
            moveToMap("Cinnabar Island")
        elseif getMapName() == "Cinnabar Island" then            
                moveToMap("Pokecenter Cinnabar")            
        elseif getMapName() == "Pokecenter Cinnabar" then
            usePokecenter()
        end
    end
end

function onBattleMessage(message)
    if stringContains(message, "The sunlight got bright!") then
        vulpix_found = 1
    end
end

function onBattleAction()
    if isWildBattle() and ( isOpponentShiny() or (not isAlreadyCaught()) or (getOpponentName() == "Charmander" ) or (getOpponentName() == "Magmar" )) then
        if getActivePokemonNumber() == 1 then
            return sendPokemon(2) or sendUsablePokemon()
        elseif ( getActivePokemonNumber() == 2 ) and ( getOpponentHealth() > 1 ) then
            return weakAttack() or run()
        
        elseif ( getOpponentHealth() == 1 ) then

            return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")    
        else
        return run() or sendUsablePokemon()
        end    
    elseif (getOpponentName() == "Vulpix" ) then
        if vulpix_found == 1 then        
            if getActivePokemonNumber() == 1 then
                return sendPokemon(2) or sendUsablePokemon()
            elseif getActivePokemonNumber() == 2 and ( getOpponentHealth() > 1) then
                return weakAttack()
            elseif (getOpponentHealth() == 1 ) then
                return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")
            end
        else
            return run() or sendUsablePokemon()
        end
    else
        return run() or sendUsablePokemon()
    end
end
 
Reply
#2
name = "H.A Vulpix, Charmander, Magmar Catcher"
author = "Kuro"
description = [[Using Synch in 1st slot, false swipe in 2nd slot. Based on LoneAcer's scripts]]

function onPathAction()
    vulpix_found = 0
    if (isPokemonUsable(2) and getPokemonHealth(2) >160 and getRemainingPowerPoints(2,"False Swipe") > 2)then
        if getMapName() == "Pokecenter Cinnabar" then
            moveToMap("Cinnabar Island")
        elseif getMapName() == "Cinnabar Island" then
            moveToMap("Cinnabar mansion 1")
        elseif getMapName() == "Cinnabar mansion 1" then
            moveToMap("Cinnabar mansion 2")
        elseif getMapName() == "Cinnabar mansion 2" then
            moveToMap("Cinnabar mansion 3")
        elseif getMapName() == "Cinnabar mansion 3" then
            moveNearExit("Cinnabar mansion 2")
        end
    else
        if getMapName() == "Cinnabar mansion 3" then
            moveToMap("Cinnabar mansion 2")
        elseif getMapName() == "Cinnabar mansion 2" then
            moveToMap("Cinnabar mansion 1")
        elseif getMapName() == "Cinnabar mansion 1" then
            moveToMap("Cinnabar Island")
        elseif getMapName() == "Cinnabar Island" then            
                moveToMap("Pokecenter Cinnabar")            
        elseif getMapName() == "Pokecenter Cinnabar" then
            usePokecenter()
        end
    end
end

function onBattleMessage(message)
    if stringContains(message, "The sunlight got bright!") then
        vulpix_found = 1
    end
end

function onBattleAction()
    if isWildBattle() and ( isOpponentShiny() or (not isAlreadyCaught()) or (getOpponentName() == "Charmander" ) or (getOpponentName() == "Magmar" )) then
        if getActivePokemonNumber() == 1 then
            return sendPokemon(2) or sendUsablePokemon()
        elseif ( getActivePokemonNumber() == 2 ) and ( getOpponentHealth() > 1 ) then
            return weakAttack() or run()
        
        elseif ( getOpponentHealth() == 1 ) then

            return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")    
        else
        return run() or sendUsablePokemon()
        end    
    elseif (getOpponentName() == "Vulpix" ) then
        if vulpix_found == 1 then        
            if getActivePokemonNumber() == 1 then
                return sendPokemon(2) or sendUsablePokemon()
            elseif getActivePokemonNumber() == 2 and ( getOpponentHealth() > 1) then
                return weakAttack()
            elseif (getOpponentHealth() == 1 ) then
                return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")
            end
        else
            return run() or sendUsablePokemon()
        end
    else
        return run() or sendUsablePokemon()
    end
end
Worked.
 
Reply
#3
why the bot stops when scyther dies???
everytime this happens
 
Reply
#4
So its not working good?
 
Reply
#5
nh0ciu
name = "H.A Vulpix, Charmander, Magmar Catcher"
author = "Kuro"
description = [[Using Synch in 1st slot, false swipe in 2nd slot. Based on LoneAcer's scripts]]

function onPathAction()
    vulpix_found = 0
    if (isPokemonUsable(2) and getPokemonHealth(2) >160 and getRemainingPowerPoints(2,"False Swipe") > 2)then
        if getMapName() == "Pokecenter Cinnabar" then
            moveToMap("Cinnabar Island")
        elseif getMapName() == "Cinnabar Island" then
            moveToMap("Cinnabar mansion 1")
        elseif getMapName() == "Cinnabar mansion 1" then
            moveToMap("Cinnabar mansion 2")
        elseif getMapName() == "Cinnabar mansion 2" then
            moveToMap("Cinnabar mansion 3")
        elseif getMapName() == "Cinnabar mansion 3" then
            moveNearExit("Cinnabar mansion 2")
        end
    else
        if getMapName() == "Cinnabar mansion 3" then
            moveToMap("Cinnabar mansion 2")
        elseif getMapName() == "Cinnabar mansion 2" then
            moveToMap("Cinnabar mansion 1")
        elseif getMapName() == "Cinnabar mansion 1" then
            moveToMap("Cinnabar Island")
        elseif getMapName() == "Cinnabar Island" then            
                moveToMap("Pokecenter Cinnabar")            
        elseif getMapName() == "Pokecenter Cinnabar" then
            usePokecenter()
        end
    end
end

function onBattleMessage(message)
    if stringContains(message, "The sunlight got bright!") then
        vulpix_found = 1
    end
end

function onBattleAction()
    if isWildBattle() and ( isOpponentShiny() or (not isAlreadyCaught()) or (getOpponentName() == "Charmander" ) or (getOpponentName() == "Magmar" )) then
        if getActivePokemonNumber() == 1 then
            return sendPokemon(2) or sendUsablePokemon()
        elseif ( getActivePokemonNumber() == 2 ) and ( getOpponentHealth() > 1 ) then
            return weakAttack() or run()
        
        elseif ( getOpponentHealth() == 1 ) then

            return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")    
        else
        return run() or sendUsablePokemon()
        end    
    elseif (getOpponentName() == "Vulpix" ) then
        if vulpix_found == 1 then        
            if getActivePokemonNumber() == 1 then
                return sendPokemon(2) or sendUsablePokemon()
            elseif getActivePokemonNumber() == 2 and ( getOpponentHealth() > 1) then
                return weakAttack()
            elseif (getOpponentHealth() == 1 ) then
                return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")
            end
        else
            return run() or sendUsablePokemon()
        end
    else
        return run() or sendUsablePokemon()
    end
end
Worked.
are you from vn
 
Reply
#6
i want attack with another kind , dont want run , pls help me fix
 
Reply
#7
I changed the script into fighting with others instead of running. However it still run when meet vuplix that is not an h.a and the bot stop when the Fasle Swipe pokemon die. Can anyone help me to fix it. Thanks



function onStart()
counter=0;

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

function onPathAction()
vulpix_found = 0
if (isPokemonUsable(1) and getPokemonHealth(1) >1 and getRemainingPowerPoints(2,"False Swipe") > 2)then
if getMapName() == "Pokecenter Cinnabar" then
moveToMap("Cinnabar Island")
elseif getMapName() == "Cinnabar Island" then
moveToMap("Cinnabar mansion 1")
elseif getMapName() == "Cinnabar mansion 1" then
moveToMap("Cinnabar mansion 2")
elseif getMapName() == "Cinnabar mansion 2" then
moveToMap("Cinnabar mansion 3")
elseif getMapName() == "Cinnabar mansion 3" then
moveNearExit("Cinnabar mansion 2")
end
else
if getMapName() == "Cinnabar mansion 3" then
moveToMap("Cinnabar mansion 2")
elseif getMapName() == "Cinnabar mansion 2" then
moveToMap("Cinnabar mansion 1")
elseif getMapName() == "Cinnabar mansion 1" then
moveToMap("Cinnabar Island")
elseif getMapName() == "Cinnabar Island" then
moveToMap("Pokecenter Cinnabar")
elseif getMapName() == "Pokecenter Cinnabar" then
usePokecenter()
end
end
end

function onBattleMessage(message)
if stringContains(message, "The sunlight got bright!") then
vulpix_found = 1
end
end

function onBattleAction()
if isWildBattle() and ( isOpponentShiny() or (not isAlreadyCaught()) or (getOpponentName() == "Charmander" ) or (getOpponentName() == "Magmar" )) then
if getActivePokemonNumber() == 1 then
return sendPokemon(2) or sendUsablePokemon()
elseif ( getActivePokemonNumber() == 2 ) and ( getOpponentHealth() > 1 ) then
return weakAttack() or run()

elseif ( getOpponentHealth() == 1 ) then

return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")
else
return run() or sendUsablePokemon()
end
elseif (getOpponentName() == "Vulpix" ) then
if vulpix_found == 1 then
if getActivePokemonNumber() == 1 then
return sendPokemon(2) or sendUsablePokemon()
elseif getActivePokemonNumber() == 2 and ( getOpponentHealth() > 1) then
return weakAttack()
elseif (getOpponentHealth() == 1 ) then
return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")
end
else
return run() or sendUsablePokemon()
end
end
if getActivePokemonNumber() >= 1 then
return attack() or sendAnyPokemon()
else
return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
end

end
 
Reply
#8
bump can someone help with the vulpix problem?
 
Reply
#9
(2016-08-16, 19:04:26)cr4hser bump can someone help with the vulpix problem?

i made a few modifications on this code, it seems to be working fine... 

name = "H.A Vulpix, Intimidate Growlithe, Charmander, Magmar Catcher"
author = "Kuro"
description = [[Using Synch in 1st slot, false swipe in 2nd slot. Based on LoneAcer's scripts]]
 
falseswipe = true
 
function onStart()
startime = os.time() --x
    pcCount = 0 --x
    charmander_caught = 0   --x
    magmar_caught = 0       --x
    growlithe_caught = 0 --x
    vulpix_caught = 0       --x
    shiny_count = 0         --x
    wild_count = 0          --x


--Balls config.

YourBalls = "Great Ball"  -- Pokeball, Great Ball, Ultra Ball

setBallsToBuy = 75 -- How many balls the bot will buy?

setBallsToHaveAtLeast = 25 -- How many balls to have at least befor buy more?

moneyWhatYouNeed = setBallsToBuy * 600 -- price for each ball (great ball = 600 each)
end
 
function onPause()
    log(" ")
    log("===============PAUSED STATUS===============")
    log("You found " ..wild_count.. " Wild pokemons.")
    log("You found " ..shiny_count.. " Shinies.")
    log(" ")
    log("You caught " ..vulpix_caught.. " Drought vulpixes.")
    log("You caught " ..magmar_caught.. " Magmars.")
    log("You caught " ..charmander_caught.. " Charmanders.")
    log("You caught " ..growlithe_caught.. " Growlithe.")
    log(" ")
    log("Times in Pokecenter: "..pcCount)
log(" ")
    endtime = os.time()
    log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/3600 ).. " hours")
    log("or")
    log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/60 ).. " minutes")
    log("=========================================")
end
 
function onStop()
    log(" ")
    log("===============PAUSED STATUS===============")
    log("You found " ..wild_count.. " Wild pokemons.")
    log("You found " ..shiny_count.. " Shinies.")
    log(" ")
    log("You caught " ..vulpix_caught.. " Drought vulpixes.")
    log("You caught " ..magmar_caught.. " Magmars.")
    log("You caught " ..charmander_caught.. " Charmanders.")
    log(" ")
    log("Times in Pokecenter: "..pcCount)
log(" ")
    endtime = os.time()
    log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/3600 ).. " hours")
    log("or")
    log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/60 ).. " minutes")
    log("=========================================")
end
 
function onDialogMessage(pokecenter)
    if stringContains(pokecenter, "Would you like me to heal your Pokemon?") then
        pcCount = pcCount + 1
    end
end
 
function onPathAction()
    vulpix_found = 0
growlithe_found = 0

if isOutside() and hasItem("Bicycle") and not isSurfing() and not isMounted() then
useItem("Bicycle")
log("They see me rollin' ")

    elseif ppLeft() and isPokemonUsable(1) and isPokemonUsable(2) and getItemQuantity(YourBalls) >= setBallsToHaveAtLeast then
        if getMapName() == "Pokecenter Cinnabar" then
            moveToMap("Cinnabar Island")
        elseif getMapName() == "Cinnabar Island" then
            moveToMap("Cinnabar mansion 1")
        elseif getMapName() == "Cinnabar mansion 1" then
            moveToMap("Cinnabar mansion 2")
        elseif getMapName() == "Cinnabar mansion 2" then
            moveToMap("Cinnabar mansion 3")
        elseif getMapName() == "Cinnabar mansion 3" then
            moveNearExit("Cinnabar mansion 2")
        end

elseif getItemQuantity(YourBalls) <= setBallsToHaveAtLeast and getMoney() >= moneyWhatYouNeed then
if getMapName() == "Cinnabar mansion 3" then
moveToMap("Cinnabar mansion 2")
elseif getMapName() == "Cinnabar mansion 2" then
moveToMap("Cinnabar mansion 1")
elseif getMapName() == "Cinnabar mansion 1" then
moveToMap("Cinnabar Island")
elseif getMapName() == "Pokecenter Cinnabar" then
moveToMap("Cinnabar Island")
elseif getMapName() == "Cinnabar Island" then
moveToMap("Cinnabar Pokemart")
elseif getMapName() == "Cinnabar Pokemart" then
talkToNpcOnCell(2, 5)
elseif isShopOpen() then
buyItem(YourBalls, setBallsToBuy)
end

    else
        if getMapName() == "Cinnabar mansion 3" then
            moveToMap("Cinnabar mansion 2")
        elseif getMapName() == "Cinnabar mansion 2" then
            moveToMap("Cinnabar mansion 1")
        elseif getMapName() == "Cinnabar mansion 1" then
            moveToMap("Cinnabar Island")
        elseif getMapName() == "Cinnabar Island" then          
                moveToMap("Pokecenter Cinnabar")           
        elseif getMapName() == "Pokecenter Cinnabar" then
            usePokecenter()
        end
    end
end

function onBattleMessage(message)
 
    --H.A VULPIXES
    if stringContains(message, "The sunlight got bright!") then
        vulpix_found = 1

--INTIMIDATE GROWLITHE
elseif stringContains(message, "Intimidate") then
growlithe_found = 1

--WILDS
elseif stringContains(message, "a wild") then
wild_count = wild_count + 1

    --CAUGHTS
    elseif stringContains(message, "You caught") and stringContains(message, "Charmander") then
        charmander_caught = charmander_caught + 1
    elseif stringContains(message, "You caught") and stringContains(message, "Growlithe") then
        growlithe_caught = growlithe_caught + 1
    elseif stringContains(message, "You caught") and stringContains(message, "Magmar") then
        magmar_caught = magmar_caught + 1
    elseif stringContains(message, "You caught") and stringContains(message, "Vulpix") then
        vulpix_caught = vulpix_caught + 1
   
    --SHINIES
    elseif stringContains(message, "A wild SHINY") then
        shiny_count = shiny_count + 1
    end
end

function onBattleAction()
    if isWildBattle() and ( isOpponentShiny() or getOpponentName() == "Charmander" or getOpponentName() == "Magmar" ) then
        return swipe()
elseif (getOpponentName() == "Vulpix") then
if vulpix_found == 1 then
return swipe()
else 
return run() or sendUsablePokemon() or sendAnyPokemon() 
end
elseif (getOpponentName() == "Growlithe") then
if growlithe_found == 1 then
return swipe()
else 
return run() or sendUsablePokemon() or sendAnyPokemon() 
end
    elseif falseswipe == false then
        return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")  or sendAnyPokemon() or attack() or run()
    else
        return run() or sendUsablePokemon() or sendAnyPokemon()
    end
    
end

function swipe()

    if falseswipe == true then
        if getActivePokemonNumber() == 1 then
            return sendPokemon(2) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
        elseif ( getActivePokemonNumber() == 2 ) and ( getOpponentHealth() > 1 ) then
            return weakAttack() or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
        elseif ( getActivePokemonNumber() >= 1 ) and ( getOpponentHealth() == 1 ) then
            return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")  or sendAnyPokemon() or attack() or run()
        end
    end

end

function ppLeft()

    if falseswipe == true then
        return getRemainingPowerPoints(2, "False Swipe") >= 1
    end

end
 
Reply
#10
help pls...i cant even do a copy paste..SadSad
 
Reply
#11
(2016-08-21, 02:03:22)EvilGnome
(2016-08-16, 19:04:26)cr4hser bump can someone help with the vulpix problem?

i made a few modifications on this code, it seems to be working fine... 

what do i have to change to attack other pokemon instead of running?

name = "H.A Vulpix, Intimidate Growlithe, Charmander, Magmar Catcher"
author = "Kuro"
description = [[Using Synch in 1st slot, false swipe in 2nd slot. Based on LoneAcer's scripts]]
 
falseswipe = true
 
function onStart()
startime = os.time() --x
    pcCount = 0 --x
    charmander_caught = 0   --x
    magmar_caught = 0       --x
    growlithe_caught = 0 --x
    vulpix_caught = 0       --x
    shiny_count = 0         --x
    wild_count = 0          --x


--Balls config.

YourBalls = "Great Ball"  -- Pokeball, Great Ball, Ultra Ball

setBallsToBuy = 75 -- How many balls the bot will buy?

setBallsToHaveAtLeast = 25 -- How many balls to have at least befor buy more?

moneyWhatYouNeed = setBallsToBuy * 600 -- price for each ball (great ball = 600 each)
end
 
function onPause()
    log(" ")
    log("===============PAUSED STATUS===============")
    log("You found " ..wild_count.. " Wild pokemons.")
    log("You found " ..shiny_count.. " Shinies.")
    log(" ")
    log("You caught " ..vulpix_caught.. " Drought vulpixes.")
    log("You caught " ..magmar_caught.. " Magmars.")
    log("You caught " ..charmander_caught.. " Charmanders.")
    log("You caught " ..growlithe_caught.. " Growlithe.")
    log(" ")
    log("Times in Pokecenter: "..pcCount)
log(" ")
    endtime = os.time()
    log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/3600 ).. " hours")
    log("or")
    log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/60 ).. " minutes")
    log("=========================================")
end
 
function onStop()
    log(" ")
    log("===============PAUSED STATUS===============")
    log("You found " ..wild_count.. " Wild pokemons.")
    log("You found " ..shiny_count.. " Shinies.")
    log(" ")
    log("You caught " ..vulpix_caught.. " Drought vulpixes.")
    log("You caught " ..magmar_caught.. " Magmars.")
    log("You caught " ..charmander_caught.. " Charmanders.")
    log(" ")
    log("Times in Pokecenter: "..pcCount)
log(" ")
    endtime = os.time()
    log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/3600 ).. " hours")
    log("or")
    log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/60 ).. " minutes")
    log("=========================================")
end
 
function onDialogMessage(pokecenter)
    if stringContains(pokecenter, "Would you like me to heal your Pokemon?") then
        pcCount = pcCount + 1
    end
end
 
function onPathAction()
    vulpix_found = 0
growlithe_found = 0

if isOutside() and hasItem("Bicycle") and not isSurfing() and not isMounted() then
useItem("Bicycle")
log("They see me rollin' ")

    elseif ppLeft() and isPokemonUsable(1) and isPokemonUsable(2) and getItemQuantity(YourBalls) >= setBallsToHaveAtLeast then
        if getMapName() == "Pokecenter Cinnabar" then
            moveToMap("Cinnabar Island")
        elseif getMapName() == "Cinnabar Island" then
            moveToMap("Cinnabar mansion 1")
        elseif getMapName() == "Cinnabar mansion 1" then
            moveToMap("Cinnabar mansion 2")
        elseif getMapName() == "Cinnabar mansion 2" then
            moveToMap("Cinnabar mansion 3")
        elseif getMapName() == "Cinnabar mansion 3" then
            moveNearExit("Cinnabar mansion 2")
        end

elseif getItemQuantity(YourBalls) <= setBallsToHaveAtLeast and getMoney() >= moneyWhatYouNeed then
if getMapName() == "Cinnabar mansion 3" then
moveToMap("Cinnabar mansion 2")
elseif getMapName() == "Cinnabar mansion 2" then
moveToMap("Cinnabar mansion 1")
elseif getMapName() == "Cinnabar mansion 1" then
moveToMap("Cinnabar Island")
elseif getMapName() == "Pokecenter Cinnabar" then
moveToMap("Cinnabar Island")
elseif getMapName() == "Cinnabar Island" then
moveToMap("Cinnabar Pokemart")
elseif getMapName() == "Cinnabar Pokemart" then
talkToNpcOnCell(2, 5)
elseif isShopOpen() then
buyItem(YourBalls, setBallsToBuy)
end

    else
        if getMapName() == "Cinnabar mansion 3" then
            moveToMap("Cinnabar mansion 2")
        elseif getMapName() == "Cinnabar mansion 2" then
            moveToMap("Cinnabar mansion 1")
        elseif getMapName() == "Cinnabar mansion 1" then
            moveToMap("Cinnabar Island")
        elseif getMapName() == "Cinnabar Island" then          
                moveToMap("Pokecenter Cinnabar")           
        elseif getMapName() == "Pokecenter Cinnabar" then
            usePokecenter()
        end
    end
end

function onBattleMessage(message)
 
    --H.A VULPIXES
    if stringContains(message, "The sunlight got bright!") then
        vulpix_found = 1

--INTIMIDATE GROWLITHE
elseif stringContains(message, "Intimidate") then
growlithe_found = 1

--WILDS
elseif stringContains(message, "a wild") then
wild_count = wild_count + 1

    --CAUGHTS
    elseif stringContains(message, "You caught") and stringContains(message, "Charmander") then
        charmander_caught = charmander_caught + 1
    elseif stringContains(message, "You caught") and stringContains(message, "Growlithe") then
        growlithe_caught = growlithe_caught + 1
    elseif stringContains(message, "You caught") and stringContains(message, "Magmar") then
        magmar_caught = magmar_caught + 1
    elseif stringContains(message, "You caught") and stringContains(message, "Vulpix") then
        vulpix_caught = vulpix_caught + 1
   
    --SHINIES
    elseif stringContains(message, "A wild SHINY") then
        shiny_count = shiny_count + 1
    end
end

function onBattleAction()
    if isWildBattle() and ( isOpponentShiny() or getOpponentName() == "Charmander" or getOpponentName() == "Magmar" ) then
        return swipe()
elseif (getOpponentName() == "Vulpix") then
if vulpix_found == 1 then
return swipe()
else 
return run() or sendUsablePokemon() or sendAnyPokemon() 
end
elseif (getOpponentName() == "Growlithe") then
if growlithe_found == 1 then
return swipe()
else 
return run() or sendUsablePokemon() or sendAnyPokemon() 
end
    elseif falseswipe == false then
        return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")  or sendAnyPokemon() or attack() or run()
    else
        return run() or sendUsablePokemon() or sendAnyPokemon()
    end
    
end

function swipe()

    if falseswipe == true then
        if getActivePokemonNumber() == 1 then
            return sendPokemon(2) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
        elseif ( getActivePokemonNumber() == 2 ) and ( getOpponentHealth() > 1 ) then
            return weakAttack() or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
        elseif ( getActivePokemonNumber() >= 1 ) and ( getOpponentHealth() == 1 ) then
            return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")  or sendAnyPokemon() or attack() or run()
        end
    end

end

function ppLeft()

    if falseswipe == true then
        return getRemainingPowerPoints(2, "False Swipe") >= 1
    end

end
 
Reply
#12
(2016-08-21, 11:15:03)cr4hser what do i have to change to attack other pokemon instead of running?
everytime you see somemthing like this:

return run() or sendUsablePokemon() or sendAnyPokemon()

you change for this:

return attack() or run() or sendUsablePokemon() or sendAnyPokemon()
 
Reply
#13
still flees when a vulpix appears, any solution?
 
Reply
#14
and the bot stops at 4,11 at the Cinnabar Pokemonmart, do i have to config something with the balls?
 
Reply
#15
does this script catch shinies aswell?
 
Reply
#16
doesn't work, keep runs away from vulpix and kill growlithe
 
Reply
#17
What I have to do to catch these Pokemon sleeping??
 
Reply
#18
(2016-08-21, 02:03:22)EvilGnome
(2016-08-16, 19:04:26)cr4hser bump can someone help with the vulpix problem?

i made a few modifications on this code, it seems to be working fine... 

name = "H.A Vulpix, Intimidate Growlithe, Charmander, Magmar Catcher"
author = "Kuro"
description = [[Using Synch in 1st slot, false swipe in 2nd slot. Based on LoneAcer's scripts]]
 
falseswipe = true
 
function onStart()
startime = os.time() --x
    pcCount = 0 --x
    charmander_caught = 0   --x
    magmar_caught = 0       --x
    growlithe_caught = 0 --x
    vulpix_caught = 0       --x
    shiny_count = 0         --x
    wild_count = 0          --x


--Balls config.

YourBalls = "Great Ball"  -- Pokeball, Great Ball, Ultra Ball

setBallsToBuy = 75 -- How many balls the bot will buy?

setBallsToHaveAtLeast = 25 -- How many balls to have at least befor buy more?

moneyWhatYouNeed = setBallsToBuy * 600 -- price for each ball (great ball = 600 each)
end
 
function onPause()
    log(" ")
    log("===============PAUSED STATUS===============")
    log("You found " ..wild_count.. " Wild pokemons.")
    log("You found " ..shiny_count.. " Shinies.")
    log(" ")
    log("You caught " ..vulpix_caught.. " Drought vulpixes.")
    log("You caught " ..magmar_caught.. " Magmars.")
    log("You caught " ..charmander_caught.. " Charmanders.")
    log("You caught " ..growlithe_caught.. " Growlithe.")
    log(" ")
    log("Times in Pokecenter: "..pcCount)
log(" ")
    endtime = os.time()
    log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/3600 ).. " hours")
    log("or")
    log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/60 ).. " minutes")
    log("=========================================")
end
 
function onStop()
    log(" ")
    log("===============PAUSED STATUS===============")
    log("You found " ..wild_count.. " Wild pokemons.")
    log("You found " ..shiny_count.. " Shinies.")
    log(" ")
    log("You caught " ..vulpix_caught.. " Drought vulpixes.")
    log("You caught " ..magmar_caught.. " Magmars.")
    log("You caught " ..charmander_caught.. " Charmanders.")
    log(" ")
    log("Times in Pokecenter: "..pcCount)
log(" ")
    endtime = os.time()
    log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/3600 ).. " hours")
    log("or")
    log(string.format("Bot running time: %.2f", os.difftime(endtime,startime)/60 ).. " minutes")
    log("=========================================")
end
 
function onDialogMessage(pokecenter)
    if stringContains(pokecenter, "Would you like me to heal your Pokemon?") then
        pcCount = pcCount + 1
    end
end
 
function onPathAction()
    vulpix_found = 0
growlithe_found = 0

if isOutside() and hasItem("Bicycle") and not isSurfing() and not isMounted() then
useItem("Bicycle")
log("They see me rollin' ")

    elseif ppLeft() and isPokemonUsable(1) and isPokemonUsable(2) and getItemQuantity(YourBalls) >= setBallsToHaveAtLeast then
        if getMapName() == "Pokecenter Cinnabar" then
            moveToMap("Cinnabar Island")
        elseif getMapName() == "Cinnabar Island" then
            moveToMap("Cinnabar mansion 1")
        elseif getMapName() == "Cinnabar mansion 1" then
            moveToMap("Cinnabar mansion 2")
        elseif getMapName() == "Cinnabar mansion 2" then
            moveToMap("Cinnabar mansion 3")
        elseif getMapName() == "Cinnabar mansion 3" then
            moveNearExit("Cinnabar mansion 2")
        end

elseif getItemQuantity(YourBalls) <= setBallsToHaveAtLeast and getMoney() >= moneyWhatYouNeed then
if getMapName() == "Cinnabar mansion 3" then
moveToMap("Cinnabar mansion 2")
elseif getMapName() == "Cinnabar mansion 2" then
moveToMap("Cinnabar mansion 1")
elseif getMapName() == "Cinnabar mansion 1" then
moveToMap("Cinnabar Island")
elseif getMapName() == "Pokecenter Cinnabar" then
moveToMap("Cinnabar Island")
elseif getMapName() == "Cinnabar Island" then
moveToMap("Cinnabar Pokemart")
elseif getMapName() == "Cinnabar Pokemart" then
talkToNpcOnCell(2, 5)
elseif isShopOpen() then
buyItem(YourBalls, setBallsToBuy)
end

    else
        if getMapName() == "Cinnabar mansion 3" then
            moveToMap("Cinnabar mansion 2")
        elseif getMapName() == "Cinnabar mansion 2" then
            moveToMap("Cinnabar mansion 1")
        elseif getMapName() == "Cinnabar mansion 1" then
            moveToMap("Cinnabar Island")
        elseif getMapName() == "Cinnabar Island" then          
                moveToMap("Pokecenter Cinnabar")           
        elseif getMapName() == "Pokecenter Cinnabar" then
            usePokecenter()
        end
    end
end

function onBattleMessage(message)
 
    --H.A VULPIXES
    if stringContains(message, "The sunlight got bright!") then
        vulpix_found = 1

--INTIMIDATE GROWLITHE
elseif stringContains(message, "Intimidate") then
growlithe_found = 1

--WILDS
elseif stringContains(message, "a wild") then
wild_count = wild_count + 1

    --CAUGHTS
    elseif stringContains(message, "You caught") and stringContains(message, "Charmander") then
        charmander_caught = charmander_caught + 1
    elseif stringContains(message, "You caught") and stringContains(message, "Growlithe") then
        growlithe_caught = growlithe_caught + 1
    elseif stringContains(message, "You caught") and stringContains(message, "Magmar") then
        magmar_caught = magmar_caught + 1
    elseif stringContains(message, "You caught") and stringContains(message, "Vulpix") then
        vulpix_caught = vulpix_caught + 1
   
    --SHINIES
    elseif stringContains(message, "A wild SHINY") then
        shiny_count = shiny_count + 1
    end
end

function onBattleAction()
    if isWildBattle() and ( isOpponentShiny() or getOpponentName() == "Charmander" or getOpponentName() == "Magmar" ) then
        return swipe()
elseif (getOpponentName() == "Vulpix") then
if vulpix_found == 1 then
return swipe()
else 
return run() or sendUsablePokemon() or sendAnyPokemon() 
end
elseif (getOpponentName() == "Growlithe") then
if growlithe_found == 1 then
return swipe()
else 
return run() or sendUsablePokemon() or sendAnyPokemon() 
end
    elseif falseswipe == false then
        return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")  or sendAnyPokemon() or attack() or run()
    else
        return run() or sendUsablePokemon() or sendAnyPokemon()
    end
    
end

function swipe()

    if falseswipe == true then
        if getActivePokemonNumber() == 1 then
            return sendPokemon(2) or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
        elseif ( getActivePokemonNumber() == 2 ) and ( getOpponentHealth() > 1 ) then
            return weakAttack() or useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball") or sendAnyPokemon() or run()
        elseif ( getActivePokemonNumber() >= 1 ) and ( getOpponentHealth() == 1 ) then
            return useItem("Pokeball") or useItem("Great Ball") or useItem("Ultra Ball")  or sendAnyPokemon() or attack() or run()
        end
    end

end

function ppLeft()

    if falseswipe == true then
        return getRemainingPowerPoints(2, "False Swipe") >= 1
    end

end


Is not working, repeating pokemart always!
 
Reply
#19
I want any vulpix, charmander, magmar. not required h.a please help me
 
Reply
#20
why is the bot slacking at pokecenter asking for heal ?
 
Reply
#21
When gallade dies with false swipe him for how to fix?
 
Reply
#22
Works For catch Only Shyni?
 
Reply
#23
How do I get just shiny?
 
Reply
#24
(2017-10-28, 15:49:58)Exodia How do I get just shiny?

in "function onBattleAction" leave it like this:

function onBattleAction()
   if isWildBattle() and isOpponentShiny() then

and complete with the actions you will perform followed by entering combat with some pokemon. example: if you run away or attack the wild pokemon, if you lose a shiny using False Swipe
 
Reply
#25
(2017-10-28, 22:51:39)perzeus
(2017-10-28, 15:49:58)Exodia How do I get just shiny?

in "function onBattleAction" leave it like this:

function onBattleAction()
   if isWildBattle() and isOpponentShiny() then

and complete with the actions you will perform followed by entering combat with some pokemon. example: if you run away or attack the wild pokemon, if you lose a shiny using False Swipe


I could not, I'm really bad at this.  Sad
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)