Hello There, Guest! Login Register


Riolu Catcher Granite Cave 1F (+ leveler in Granite Cave)
#1
name = "Riolu Catcher"
author= "Evil"

function onPathAction()
    if isPokemonUsable(1) then
        if getMapName() == "Pokecenter Dewford Town" then
                moveToMap("Dewford Town")
        elseif getMapName() == "Dewford Town" then
            if not isMounted() and hasItem("Bicycle") then
                            return useItem("Bicycle")
            else
                moveToMap("Route 106")
            end
        elseif getMapName() == "Route 106" then
            moveToMap("Granite Cave 1F")
        elseif getMapName() == "Granite Cave 1F" then
            moveToRectangle(38, 14, 40, 14)
        end
    else
        if getMapName() == "Granite Cave 1F" then
            moveToMap("Route 106")
        elseif getMapName() == "Route 106" then
            if not isMounted() and hasItem("Bicycle") then
                            return useItem("Bicycle")
            else
                moveToMap("Dewford Town")
            end
        elseif getMapName() == "Dewford Town" then
            moveToMap("Pokecenter Dewford Town")
        elseif getMapName() == "Pokecenter Dewford Town" then
            usePokecenter()
        end
    end
end

function onBattleAction()
    if isWildBattle() and ( isOpponentShiny() or (getOpponentName() == "Riolu" ) ) then
        if useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
            return
        end
    end
    if getActivePokemonNumber() == 1 then
        return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
    else
        return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
    end
end

If you want to catch Riolu while leveling up your first pokemon in Granite Cave 1F, you just have to change:

if getActivePokemonNumber() == 1 then
        return run() or attack() or sendUsablePokemon() or sendAnyPokemon()

to:

if getActivePokemonNumber() == 1 then
               return attack() or sendUsablePokemon() or run() or sendAnyPokemon()
 
Reply
#2
thanks mr evil
i was looking for that one
it is possible to put the pokemon to only attack "speed evs pokemons"?? (if appears an geodude, he runs intead of killing)
 
Reply
#3
updated as u wanted
if ( getActivePokemonNumber() == 1 and getOpponentName() != "Geodude" ) then

name = "Riolu Catcher"
author= "Evil"

function onPathAction()
    if isPokemonUsable(1) then
        if getMapName() == "Pokecenter Dewford Town" then
                moveToMap("Dewford Town")
        elseif getMapName() == "Dewford Town" then
            if not isMounted() and hasItem("Bicycle") then
                            return useItem("Bicycle")
            else
                moveToMap("Route 106")
            end
        elseif getMapName() == "Route 106" then
            moveToMap("Granite Cave 1F")
        elseif getMapName() == "Granite Cave 1F" then
            moveToRectangle(38, 14, 40, 14)
        end
    else
        if getMapName() == "Granite Cave 1F" then
            moveToMap("Route 106")
        elseif getMapName() == "Route 106" then
            if not isMounted() and hasItem("Bicycle") then
                            return useItem("Bicycle")
            else
                moveToMap("Dewford Town")
            end
        elseif getMapName() == "Dewford Town" then
            moveToMap("Pokecenter Dewford Town")
        elseif getMapName() == "Pokecenter Dewford Town" then
            usePokecenter()
        end
    end
end

function onBattleAction()
    if isWildBattle() and ( isOpponentShiny() or (getOpponentName() == "Riolu" ) ) then
        if useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
            return
        end
    end
    if ( getActivePokemonNumber() == 1 and getOpponentName() != "Geodude" ) then
        return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
    else
        return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
    end
end
 
Reply
#4
thanks mr alex
good job
 
Reply
#5
butt, thats actually made me run from everypokemon, and not just geodude instead
 
Reply
#6
name = "Riolu Catcher"
author= "Evil"

function onPathAction()
    if isPokemonUsable(1) then
        if getMapName() == "Pokecenter Dewford Town" then
                moveToMap("Dewford Town")
        elseif getMapName() == "Dewford Town" then
            if not isMounted() and hasItem("Bicycle") then
                            return useItem("Bicycle")
            else
                moveToMap("Route 106")
            end
        elseif getMapName() == "Route 106" then
            moveToMap("Granite Cave 1F")
        elseif getMapName() == "Granite Cave 1F" then
            moveToRectangle(38, 14, 40, 14)
        end
    else
        if getMapName() == "Granite Cave 1F" then
            moveToMap("Route 106")
        elseif getMapName() == "Route 106" then
            if not isMounted() and hasItem("Bicycle") then
                            return useItem("Bicycle")
            else
                moveToMap("Dewford Town")
            end
        elseif getMapName() == "Dewford Town" then
            moveToMap("Pokecenter Dewford Town")
        elseif getMapName() == "Pokecenter Dewford Town" then
            usePokecenter()
        end
    end
end

function onBattleAction()
    if isWildBattle() and ( isOpponentShiny() or (getOpponentName() == "Riolu" ) ) then
        if useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
            return
        end
    end
    if ( getActivePokemonNumber() == 1 and getOpponentName() != "Geodude" ) then
        return attack() or sendUsablePokemon() or run() or sendAnyPokemon()
    else
        return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
    end
end


the problem was this

if ( getActivePokemonNumber() == 1 and getOpponentName() != "Geodude" ) then
return run() or attack() or sendUsablePokemon() or sendAnyPokemon()

just replaced it with this

if ( getActivePokemonNumber() == 1 and getOpponentName() != "Geodude" ) then
return attack() or sendUsablePokemon() or run() or sendAnyPokemon()

night i haven't seen it completely just added geodude to script
now it works as u intend
 
Reply
#7
thanks, =DD
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)