Hello There, Guest! Login Register


Stop On level not working
#1
Hi,

I'm trying to edit the script that comes with the PROShine to learn how to make ones but I hit my first wall.

When I add "StopLevel = 9" to the script in hopes of it to stop leveling it still goes on.

I want the script to level a pokemon before it learns his new move so I thought this would work.

Can someone point me in the right direction of what I am doing wrong?


-- Copyright © 2016 Silv3r <silv3r@proshine-bot.com>
-- This work is free. You can redistribute it and/or modify it under the
-- terms of the Do What The Fuck You Want To Public License, Version 2,
-- as published by Sam Hocevar. See the LICENSE file for more details.

name = "Leveling: Route 1 (near Viridian)"
author = "Silv3r"
description = [[This script will train the first pokémon of your team.
It will also try to capture shinies by throwing pokéballs.
Start anywhere between Viridian City and Route 1.]]

StopLevel = 9

function onPathAction()
    if isPokemonUsable(1) then
        if getMapName() == "Pokecenter Viridian" then
            moveToMap("Viridian City")
        elseif getMapName() == "Viridian City" then
            moveToMap("Route 1 Stop House")
        elseif getMapName() == "Route 1 Stop House" then
            moveToMap("Route 1")
        elseif getMapName() == "Route 1" then
            moveToRectangle(7, 10, 21, 15)
        end
    else
        if getMapName() == "Route 1" then
            moveToMap("Route 1 Stop House")
        elseif getMapName() == "Route 1 Stop House" then
            moveToMap("Viridian City")
        elseif getMapName() == "Viridian City" then
            moveToMap("Pokecenter Viridian")
        elseif getMapName() == "Pokecenter Viridian" 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 then
        return attack() or sendUsablePokemon() or run() or sendAnyPokemon()
    else
        return run() or attack() or sendUsablePokemon() or sendAnyPokemon()
    end
end
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)