Hello There, Guest! Login Register


Convert your script to Proshine V3
#1
Hi All,

Silv3r did a great job of making PROShine working again so now it is up to us to update the scripts with the new function.

MoveToMap is no longer working so we need to convert that to MoveToCell and/or MoveToRectangle

Example:
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

This won't work since it uses moveToMap. This needs to be replaced with moveToCell.

So to make it work it looks like:
function onPathAction()
    if isPokemonUsable(1) then
        if getMapName() == "Pokecenter Viridian" then
            moveToCell(9, 22)
        elseif getMapName() == "Viridian City" then
            moveToRectangle(48, 61, 49, 61)
        elseif getMapName() == "Route 1 Stop House" then
            moveToRectangle(3, 12, 4, 12)
        elseif getMapName() == "Route 1" then
            moveToRectangle(7, 10, 21, 15)
        end

For example you can see we changed moveToMap("Viridian City") to  moveToCell(9, 22)to make it work again.

So basicly when you make a new script you must start using moveToCell/moveToRectangle. Or when editing an excisting script you must replace the moveToMap's with moveToCell's / moveToRectangle's

Full Scipts:
Old <==2 (NOT WORKING)
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

New 3> WORKING
function onPathAction()
    if isPokemonUsable(1) then
        if getMapName() == "Pokecenter Viridian" then
            moveToCell(9, 22)
        elseif getMapName() == "Viridian City" then
            moveToRectangle(48, 61, 49, 61)
        elseif getMapName() == "Route 1 Stop House" then
            moveToRectangle(3, 12, 4, 12)
        elseif getMapName() == "Route 1" then
            moveToRectangle(7, 10, 21, 15)
        end
    else
        if getMapName() == "Route 1" then
            moveToRectangle(13, 4, 14, 4)
        elseif getMapName() == "Route 1 Stop House" then
            moveToCell(3, 2, 4, 2)
        elseif getMapName() == "Viridian City" then
            moveToCell(44, 43)
        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)