Hello There, Guest! Login Register


Activating Bycicle
#1
Is there a way to activate the bycicle when possible?
I've looked around a bit but haven't seen anything that supports this method.

Thanks,
Ced
 
Reply
#2
function onPathAction()
    if isPokemonUsable(1) and getRemainingPowerPoints(1, "Sleep Powder") >= 1 then
        if getMapName() == "Pokecenter Vermilion" then
            moveToMap("Vermilion City")
        elseif getMapName() == "Vermilion City" then
            if not hasItem("Bicycle") then
                moveToMap("Route 6")
            elseif hasItem("Bicycle") and not isMounted() then
                useItem("Bicycle")
            elseif hasItem("Bicycle") and isMounted() then
                moveToMap("Route 6")
            end
        elseif getMapName() == "Route 6" then
            if not hasItem("Bicycle") then
                moveToGrass()
            elseif hasItem("Bicycle") and not isMounted() then
                useItem("Bicycle")
            elseif hasItem("Bicycle") and isMounted() then
                moveToGrass()
            end
        end
    elseif not isPokemonUsable(1) or getRemainingPowerPoints(1, "Sleep Powder") < 1 then
        if getMapName() == "Route 6" then
            if not hasItem("Bicycle") then
                moveToMap("Vermilion City")
            elseif hasItem("Bicycle") and not isMounted() then
                useItem("Bicycle")
            elseif hasItem("Bicycle") and isMounted() then
                moveToMap("Vermilion City")
            end
        elseif getMapName() == "Vermilion City" then
            if not hasItem("Bicycle") then
                moveToMap("Pokecenter Vermilion")
            elseif hasItem("Bicycle") and not isMounted() then
                useItem("Bicycle")
            elseif hasItem("Bicycle") and isMounted() then
                moveToMap("Pokecenter Vermilion")
            end
        elseif getMapName() == "Pokecenter Vermilion" then
            usePokecenter()
        end
    end
end

Its possible. If you have a mount and want to use it you just have to change the "useItem" and "hasItem" function.
 
Reply
#3
Thanks alot!
 
Reply
#4
After implementing this code into the script and looking at the coordinate changes, it seems that it doesn't work.
Is there something wrong with my code?

Code:
function onPathAction()
    -- [[ Change the following as needed]] --

    if isPokemonUsable(1) and isPokemonUsable(2) and
           getRemainingPowerPoints(1, "Confusion") >= 1 then
        if getMapName() == "Pokecenter Fuchsia" then
            moveToMap("Fuchsia City")
        elseif getMapName() == "Fuchsia City" then
            if not hasItem("Bycicle") then
                moveToMap("Route 15 Stop House")
            elseif hasItem("Bycicle") and not isMounted() then
                useItem("Bycicle")
            elseif hasItem("Bicycle") and isMounted() then
                moveToMap("Route 15 Stop House")
            end    
        elseif getMapName() == "Route 15 Stop House" then
            moveToMap("Route 15")
        elseif getMapName() == "Route 15" then
            if not hasItem("Bycicle") then
                moveToGrass()
            elseif hasItem("Bycicle") and not isMounted() then
                useItem("Bycicle")
            elseif hasItem("Bicycle") and isMounted() then
                moveToGrass()
            end    
        end
    else
        if getMapName() == "Route 15" then
            if not hasItem("Bycicle") then
                moveToMap("Route 15 Stop House")
            elseif hasItem("Bycicle") and not isMounted() then
                useItem("Bycicle")
            elseif hasItem("Bicycle") and isMounted() then
                moveToMap("Route 15 Stop House")
            end    
        elseif getMapName() == "Route 15 Stop House" then
            moveToMap("Fuchsia City")    
        elseif getMapName() == "Fuchsia City" then
            if not hasItem("Bycicle") then
                moveToMap("Pokecenter Fuchsia")
            elseif hasItem("Bycicle") and not isMounted() then
                useItem("Bycicle")
            elseif hasItem("Bicycle") and isMounted() then
                moveToMap("Pokecenter Fuchsia")
            end    
        elseif getMapName() == "Pokecenter Fuchsia" then
            usePokecenter()
        end
    end
end

function onBattleAction()
    if isWildBattle() and isOpponentShiny() or getOpponentName() == "minun" then
        if useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
            return
        end
    end
    if getActivePokemonNumber() == 1 then
        return attack() or sendUsablePokemon() or run() or sendAnyPokemon()
    else
        return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
    end
end
 
Reply
#5
It's Bicycle, not Bycicle Smile.
I do NOT publish script and don't accept script requests.
I just help people do their own scripts.
 
Reply
#6
Yea I figured that out the hard way haha.
Even used the wrong form in the thread title Big Grin
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)