Hello There, Guest! Login Register


Johto EV Training Health - Ruins of Alph
#1
I Think this is perfectly working now i hope you guys like ^^

name = "Health EV: Ruins of Alph (near Violet City)"
author = "The7L"
description = [[This script will train the first pokémon of your team.
It will only attack pokémon giving Health EV.
It will also try to capture shinies by throwing pokéballs.
Start anywhere between Violet City and Ruins of Alph.]]

function onPathAction()
    if isPokemonUsable(1) then
        if getMapName() == "Pokecenter Violet City" then
            moveToMap("Violet City")
        elseif getMapName() == "Violet City" then
            moveToMap("Route 36 Stop")
        elseif getMapName() == "Route 36 Stop" then
            moveToMap("Route 36")
        elseif getMapName() == "Route 36" then
            moveToMap("Ruins Of Alph Stop House 1")
        elseif getMapName() == "Ruins Of Alph Stop House 1" then
            moveToMap("Ruins Of Alph")
        elseif getMapName() == "Ruins Of Alph" then        
            moveToWater()
        end
    else
        if getMapName() == "Ruins Of Alph" then
            moveToMap("Ruins Of Alph Stop House 1")
        elseif getMapName() == "Ruins Of Alph Stop House 1" then
            moveToMap("Route 36")
        elseif getMapName() == "Route 36" then
            moveToMap("Route 36 Stop")
        elseif getMapName() == "Route 36 Stop" then
            moveToMap("Violet City")
        elseif getMapName() == "Violet City" then
            moveToMap("Pokecenter Violet City")
        elseif getMapName() == "Pokecenter Violet City" then
            usePokecenter()
        end
    end
end

function onBattleAction()
    if isWildBattle() and isOpponentShiny() then
        if useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
            return
        end
    end
    if getActivePokemonNumber() == 1 and isOpponentEffortValue("Health") then
        return attack() or run() or sendUsablePokemon() or sendAnyPokemon()
    else
        return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
    end
end
 
Reply
#2
thanks for sharing Smile..... was in need of such script Smile
 
Reply
#3
Nice script;
You can also add Macho Brace if the user has it Wink.
if hasItem("Macho Brace") and getPokemonHeldItem(1) != "Macho Brace" then giveItemToPokemon("Macho Brace", 1) end
You can also remove it when the pokemon is at 252 with takeItemFromPokemon()
I do NOT publish script and don't accept script requests.
I just help people do their own scripts.
 
Reply
#4
how i can put in script a way to change the pkm when he had 252 evs? oo, i'm glad you guys like ^^
 
Reply
#5
I gave the solution here :
https://proshine-bot.com/viewtopic.php?id=917
Have fun!
I do NOT publish script and don't accept script requests.
I just help people do their own scripts.
 
Reply
#6
Thanks for your script, used it and improved it;
[Image: iog7jFO.png]
name = "Health EV: Ruins of Alph (near Violet City)"
author = "The7L (edited by Someone)"
description = [[This script will train the first pokémon of your team.
It will only attack pokémon giving Health EV.
It will also try to capture shinies by throwing pokéballs.
Start anywhere between Violet City and Ruins of Alph.]]

function onPathAction()
        if hasItem("Macho Brace") and getPokemonHeldItem(1) != "Macho Brace" then
        log("Equipping Macho Brace on "..getPokemonName(1))
        return giveItemToPokemon("Macho Brace", 1)
    end

    if getPokemonEffortValue(1, "Health") >= 252 then
        if getPokemonHeldItem(1) == "Macho Brace" then takeItemFromPokemon(1) end
        return fatal("EV Train finished. Your "..getPokemonName(1).." have "..getPokemonEffortValue(1,"Health").. " HP EVs.")
    end

    if isPokemonUsable(1) then        
        if getMapName() == "Pokecenter Violet City" then
            moveToMap("Violet City")
        elseif getMapName() == "Violet City" then
            moveToMap("Route 36 Stop")
        elseif getMapName() == "Route 36 Stop" then
            moveToMap("Route 36")
        elseif getMapName() == "Route 36" then
            moveToMap("Ruins Of Alph Stop House 1")
        elseif getMapName() == "Ruins Of Alph Stop House 1" then
            moveToMap("Ruins Of Alph")
        elseif getMapName() == "Ruins Of Alph" then
            moveToWater()
        end
    else
        if getMapName() == "Ruins Of Alph" then
            moveToMap("Ruins Of Alph Stop House 1")
        elseif getMapName() == "Ruins Of Alph Stop House 1" then
            moveToMap("Route 36")
        elseif getMapName() == "Route 36" then
            moveToMap("Route 36 Stop")
        elseif getMapName() == "Route 36 Stop" then
            moveToMap("Violet City")
        elseif getMapName() == "Violet City" then
            moveToMap("Pokecenter Violet City")
        elseif getMapName() == "Pokecenter Violet City" then
            usePokecenter()
        end
    end
end

function onBattleAction()
    if isWildBattle() and isOpponentShiny() then
        if useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
            return
        end
    end
    if getActivePokemonNumber() == 1 and isOpponentEffortValue("Health") and getPokemonEffortValue(1,"Health") < 252 then
        log("Your "..getPokemonName(1).." have "..getPokemonEffortValue(1,"Health").. " HP EVs.")
        return attack() or run() or sendUsablePokemon() or sendAnyPokemon()
    else
        return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
    end
end

Features :
+Logs in real time;
+Stops at 252 HP;
+Equip Macho Brace at start;
+Remove Macho Brace at end;

Have fun!
I do NOT publish script and don't accept script requests.
I just help people do their own scripts.
 
Reply
#7
thanks this will be very useful in the script Big Grin
 
Reply
#8
No problem Smile
Feel free to use it in your other scripts Wink.
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)