Hello There, Guest! Login Register


Pokemon can't attack
#1
Hi can anyone help me? my pokemon wont attack during battle. it keeps saying these No action executed: stopping the bot.

function onPathAction()
if getPokemonLevel(1) ==70 then
             swapping()
             elseif isPokemonUsable(1) and getRemainingPowerPoints(2, "False Swipe") >= 1 then
if getMapName() == "Pokecenter Vermilion"  then    
                moveToMap("Vermilion City")
            elseif getMapName() == "Vermilion City" then
                if not isMounted() then
                return useItem("Bicycle")
            else
                    moveToMap("Route 11")
                end
            elseif getMapName() == "Route 11" then
                moveToMap("Route 11 Stop House")
            elseif getMapName() == "Route 11 Stop House" then
                moveToMap("Route 12")
            elseif getMapName() == "Route 12" then
                moveToCell(24, 92)
            elseif getMapName() == "Route 13" then
                moveToGrass()
            end
elseif not  isPokemonUsable(1)then    
        if getMapName() == "Route 13" then
            if not isMounted() then
                return useItem("Bicycle")
            else
                moveToMap("Route 12")    
            end
        elseif getMapName() == "Route 12" then
            moveToMap("Route 11 Stop House")
        elseif getMapName() == "Route 11 Stop House" then
            moveToMap("Route 11")    
            elseif getMapName() == "Route 11" then
            if not isMounted() then
                return useItem("Bicycle")
                 else
                moveToCell(0, 13)
                end
        elseif getMapName() == "Vermilion City" then
        if not isMounted() then
                return useItem("Bicycle")
                else
                moveToMap("Pokecenter Vermilion")    
            end
        elseif getMapName() == "Pokecenter Vermilion" then
            usePokecenter()
    end

function onBattleAction()
    if isWildBattle() and isOpponentShiny() or isAlreadyCaught() == false then
    if getActivePokemonNumber() == 1 and getOpponentHealth() > 20 then
    return weakAttack() or run() or sendUsablePokemon() or sendAnyPokemon()
        elseif useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
            return
        end
    end
    if isPokemonUsable(1) or isPokemonUsable(2)  then
log("ready to fight")
        return attack() or sendUsablePokemon() or run() or sendAnyPokemon()
    else
log("not ready to fight")
        return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
    end
end
 
Reply
#2
if isWildBattle() and isOpponentShiny() or isAlreadyCaught() == false then
    if getActivePokemonNumber() == 1 and getOpponentHealth() > 20 then
    return weakAttack() or run() or sendUsablePokemon() or sendAnyPokemon()
        elseif useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
            return
        end
    end
if isPokemonUsable(1) or isPokemonUsable(2)  then
log("ready to fight")
        return attack() or sendUsablePokemon() or run() or sendAnyPokemon()
    else
log("not ready to fight")
        return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
    end
It attacks only if your pokemon 1 or 2 are usable.
I do NOT publish script and don't accept script requests.
I just help people do their own scripts.
 
Reply
#3
Someone
if isWildBattle() and isOpponentShiny() or isAlreadyCaught() == false then
    if getActivePokemonNumber() == 1 and getOpponentHealth() > 20 then
    return weakAttack() or run() or sendUsablePokemon() or sendAnyPokemon()
        elseif useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
            return
        end
    end
if isPokemonUsable(1) or isPokemonUsable(2)  then
log("ready to fight")
        return attack() or sendUsablePokemon() or run() or sendAnyPokemon()
    else
log("not ready to fight")
        return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
    end
It attacks only if your pokemon 1 or 2 are usable.

They have max hp and pp but they still wont fight Sad
 
Reply
#4
They for sure don't have any offensive attacks.
I do NOT publish script and don't accept script requests.
I just help people do their own scripts.
 
Reply
#5
Someone They for sure don't have any offensive attacks.

They have offensive move like headbutt, boomerang,false swipe and thrash
 
Reply
#6
I don't know from where it comes, sorry.
Try to debug it by adding logs everywhere;
I guess you're not giving enough useful informations.
I do NOT publish script and don't accept script requests.
I just help people do their own scripts.
 
Reply
#7
Try this
function onBattleAction()
    if isWildBattle() and isOpponentShiny() or isAlreadyCaught() == false then
    if getActivePokemonNumber() == 1 and getOpponentHealth() > 20 then
    return weakAttack() or run() or sendUsablePokemon() or sendAnyPokemon()
        elseif useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
            return
        end
    end

        return attack() or sendUsablePokemon() or sendAnyPokemon()

end
God Karp Trainer loading... *splash*splash Huh

 
Reply
#8
redskhie Try this
function onBattleAction()
    if isWildBattle() and isOpponentShiny() or isAlreadyCaught() == false then
    if getActivePokemonNumber() == 1 and getOpponentHealth() > 20 then
    return weakAttack() or run() or sendUsablePokemon() or sendAnyPokemon()
        elseif useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
            return
        end
    end

        return attack() or sendUsablePokemon() or sendAnyPokemon()

end

hi, i still have the same error, No action executed: stopping the bot
 
Reply
#9
Ok what EXACTLY do you want to do with this script? Levelling 1st Poke when it reach level 70 then swap it? Then...

if getPokemonLevel(1) ==70 then
             swapping()
You can change this to
if getPokemonLevel(1) ==70 then
             swapPokemon(1,3)
etc..

Then use this battle script
function onBattleAction()
    if isWildBattle() and isOpponentShiny() or isAlreadyCaught() == false then
    if getActivePokemonNumber() == 1 and getOpponentHealth() > 20 then
    return weakAttack() or run() or sendUsablePokemon() or sendAnyPokemon()
        elseif useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
            return
        end
    end

        return attack() or sendUsablePokemon() or sendAnyPokemon()

end
God Karp Trainer loading... *splash*splash Huh

 
Reply
#10
redskhie Ok what EXACTLY do you want to do with this script? Levelling 1st Poke when it reach level 70 then swap it? Then...

if getPokemonLevel(1) ==70 then
             swapping()
You can change this to
if getPokemonLevel(1) ==70 then
             swapPokemon(1,3)
etc..

Then use this battle script
function onBattleAction()
    if isWildBattle() and isOpponentShiny() or isAlreadyCaught() == false then
    if getActivePokemonNumber() == 1 and getOpponentHealth() > 20 then
    return weakAttack() or run() or sendUsablePokemon() or sendAnyPokemon()
        elseif useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
            return
        end
    end

        return attack() or sendUsablePokemon() or sendAnyPokemon()

end
This battle code works when in other area, but not this area (Same pokemon used)
 
Reply
#11
Back read -.-
God Karp Trainer loading... *splash*splash Huh

 
Reply
#12
wishworks Hi can anyone help me? my pokemon wont attack during battle. it keeps saying these No action executed: stopping the bot.

function onPathAction()
if getPokemonLevel(1) ==70 then
             swapping()
             elseif isPokemonUsable(1) and getRemainingPowerPoints(2, "False Swipe") >= 1 then
if getMapName() == "Pokecenter Vermilion"  then    
                moveToMap("Vermilion City")
            elseif getMapName() == "Vermilion City" then
                if not isMounted() then
                return useItem("Bicycle")
            else
                    moveToMap("Route 11")
                end
            elseif getMapName() == "Route 11" then
                moveToMap("Route 11 Stop House")
            elseif getMapName() == "Route 11 Stop House" then
                moveToMap("Route 12")
            elseif getMapName() == "Route 12" then
                moveToCell(24, 92)
            elseif getMapName() == "Route 13" then
                moveToGrass()
            end
elseif not  isPokemonUsable(1)then    
        if getMapName() == "Route 13" then
            if not isMounted() then
                return useItem("Bicycle")
            else
                moveToMap("Route 12")    
            end
        elseif getMapName() == "Route 12" then
            moveToMap("Route 11 Stop House")
        elseif getMapName() == "Route 11 Stop House" then
            moveToMap("Route 11")    
            elseif getMapName() == "Route 11" then
            if not isMounted() then
                return useItem("Bicycle")
                 else
                moveToCell(0, 13)
                end
        elseif getMapName() == "Vermilion City" then
        if not isMounted() then
                return useItem("Bicycle")
                else
                moveToMap("Pokecenter Vermilion")    
            end
        elseif getMapName() == "Pokecenter Vermilion" then
            usePokecenter()
    end

function onBattleAction()
    if isWildBattle() and isOpponentShiny() or isAlreadyCaught() == false then
    if getActivePokemonNumber() == 1 and getOpponentHealth() > 20 then
    return weakAttack() or run() or sendUsablePokemon() or sendAnyPokemon()
        elseif useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
            return
        end
    end
    if isPokemonUsable(1) or isPokemonUsable(2)  then
log("ready to fight")
        return attack() or sendUsablePokemon() or run() or sendAnyPokemon()
    else
log("not ready to fight")
        return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
    end
end

Hello, I have taken your script and edited it assuming the kind of behavior you want and they kind of pokemon you have, feel free to ask if there's anything you don't understand, here's the script:

name = "Vermilion City - Route 13"
author = "wishworks (edited by Emuuung)"
function onPathAction()
-- Use Mount
    if isOutside() and isMounted() == false then
        return useItem("Bicycle")
    end    
-- Path Movement
    if isPokemonUsable(1) and isPokemonUsable(2) and getRemainingPowerPoints(2, "False Swipe") >= 1 then
        if getMapName() == "Pokecenter Vermilion"  then    
            moveToMap("Vermilion City")
        elseif getMapName() == "Vermilion City" then
            moveToMap("Route 11")
        elseif getMapName() == "Route 11" then
            moveToMap("Route 11 Stop House")
        elseif getMapName() == "Route 11 Stop House" then
            moveToMap("Route 12")
        elseif getMapName() == "Route 12" then
            moveToCell(24, 92)
        elseif getMapName() == "Route 13" then
            moveToGrass()
        end
    elseif getMapName() == "Route 13" then
        moveToMap("Route 12")
    elseif getMapName() == "Route 12" then
        moveToMap("Route 11 Stop House")
    elseif getMapName() == "Route 11 Stop House" then
        moveToMap("Route 11")    
    elseif getMapName() == "Route 11" then
        moveToCell(0, 13)
    elseif getMapName() == "Vermilion City" then
        moveToMap("Pokecenter Vermilion")
    elseif getMapName() == "Pokecenter Vermilion" then
        usePokecenter()
    end
end
function onBattleAction()
-- Shiny and/or Uncaught Pokemon
    if isWildBattle() and (isOpponentShiny() or isAlreadyCaught() == false) then
        if (getActivePokemonNumber() == 1 or getActivePokemonNumber(2)) and getOpponentHealth() > 20 then
            return weakAttack() or sendUsablePokemon() or sendAnyPokemon() or run()
        elseif getOpponentHealth() <= 20 then
            if useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") or sendUsablePokemon() or sendAnyPokemon() or run() then
            return
        end
    end
-- Attack Protocol    
    if getActivePokemonNumber(1) or getActivePokemonNumber(2) then
        return attack() or sendUsablePokemon() or run() or sendAnyPokemon()
    else
        return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
    end
end

Enjoy!
 
Reply
#13
Emuuung
wishworks Hi can anyone help me? my pokemon wont attack during battle. it keeps saying these No action executed: stopping the bot.

function onPathAction()
if getPokemonLevel(1) ==70 then
             swapping()
             elseif isPokemonUsable(1) and getRemainingPowerPoints(2, "False Swipe") >= 1 then
if getMapName() == "Pokecenter Vermilion"  then    
                moveToMap("Vermilion City")
            elseif getMapName() == "Vermilion City" then
                if not isMounted() then
                return useItem("Bicycle")
            else
                    moveToMap("Route 11")
                end
            elseif getMapName() == "Route 11" then
                moveToMap("Route 11 Stop House")
            elseif getMapName() == "Route 11 Stop House" then
                moveToMap("Route 12")
            elseif getMapName() == "Route 12" then
                moveToCell(24, 92)
            elseif getMapName() == "Route 13" then
                moveToGrass()
            end
elseif not  isPokemonUsable(1)then    
        if getMapName() == "Route 13" then
            if not isMounted() then
                return useItem("Bicycle")
            else
                moveToMap("Route 12")    
            end
        elseif getMapName() == "Route 12" then
            moveToMap("Route 11 Stop House")
        elseif getMapName() == "Route 11 Stop House" then
            moveToMap("Route 11")    
            elseif getMapName() == "Route 11" then
            if not isMounted() then
                return useItem("Bicycle")
                 else
                moveToCell(0, 13)
                end
        elseif getMapName() == "Vermilion City" then
        if not isMounted() then
                return useItem("Bicycle")
                else
                moveToMap("Pokecenter Vermilion")    
            end
        elseif getMapName() == "Pokecenter Vermilion" then
            usePokecenter()
    end

function onBattleAction()
    if isWildBattle() and isOpponentShiny() or isAlreadyCaught() == false then
    if getActivePokemonNumber() == 1 and getOpponentHealth() > 20 then
    return weakAttack() or run() or sendUsablePokemon() or sendAnyPokemon()
        elseif useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
            return
        end
    end
    if isPokemonUsable(1) or isPokemonUsable(2)  then
log("ready to fight")
        return attack() or sendUsablePokemon() or run() or sendAnyPokemon()
    else
log("not ready to fight")
        return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
    end
end

Hello, I have taken your script and edited it assuming the kind of behavior you want and they kind of pokemon you have, feel free to ask if there's anything you don't understand, here's the script:

name = "Vermilion City - Route 13"
author = "wishworks (edited by Emuuung)"
function onPathAction()
-- Use Mount
    if isOutside() and isMounted() == false then
        return useItem("Bicycle")
    end    
-- Path Movement
    if isPokemonUsable(1) and isPokemonUsable(2) and getRemainingPowerPoints(2, "False Swipe") >= 1 then
        if getMapName() == "Pokecenter Vermilion"  then    
            moveToMap("Vermilion City")
        elseif getMapName() == "Vermilion City" then
            moveToMap("Route 11")
        elseif getMapName() == "Route 11" then
            moveToMap("Route 11 Stop House")
        elseif getMapName() == "Route 11 Stop House" then
            moveToMap("Route 12")
        elseif getMapName() == "Route 12" then
            moveToCell(24, 92)
        elseif getMapName() == "Route 13" then
            moveToGrass()
        end
    elseif getMapName() == "Route 13" then
        moveToMap("Route 12")
    elseif getMapName() == "Route 12" then
        moveToMap("Route 11 Stop House")
    elseif getMapName() == "Route 11 Stop House" then
        moveToMap("Route 11")    
    elseif getMapName() == "Route 11" then
        moveToCell(0, 13)
    elseif getMapName() == "Vermilion City" then
        moveToMap("Pokecenter Vermilion")
    elseif getMapName() == "Pokecenter Vermilion" then
        usePokecenter()
    end
end
function onBattleAction()
-- Shiny and/or Uncaught Pokemon
    if isWildBattle() and (isOpponentShiny() or isAlreadyCaught() == false) then
        if (getActivePokemonNumber() == 1 or getActivePokemonNumber(2)) and getOpponentHealth() > 20 then
            return weakAttack() or sendUsablePokemon() or sendAnyPokemon() or run()
        elseif getOpponentHealth() <= 20 then
            if useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") or sendUsablePokemon() or sendAnyPokemon() or run() then
            return
        end
    end
-- Attack Protocol    
    if getActivePokemonNumber(1) or getActivePokemonNumber(2) then
        return attack() or sendUsablePokemon() or run() or sendAnyPokemon()
    else
        return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
    end
end

Enjoy!

Hi Emuuung, thanks for helping me to correct my Script! your script is working fine until the character reached Route 12 coordinate(12,47). It keeps saying ''System: You can't do this while surfing!''. I do have a pokemon that can surf but i dont understand why the character needs to surf as he could just travel on land to reach the destination. Is there anything i can do do fix that?
Thanks in advance
Cheers!
 
Reply
#14
if isOutside() and isMounted() == false then
        return useItem("Bicycle")
    end
The script tries to use the mount, even on water.
I do NOT publish script and don't accept script requests.
I just help people do their own scripts.
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)