2019-01-23, 18:21:38
Hello, can anyone help? I edit this script, but after the first 3 Pokemon die, and the character leaves the "Victory Road Kanto 3F" location, he sees no further action and stops the bot. How can i fix this?
name = "Victory Road"
author = "Gandalf"
description = [[Start anywhere between the exit of the Victory Road and the Indigo Plateau.]]
function onPathAction()
if not (isPokemonUsable(1)) and isPokemonUsable(2) then
swapPokemon(1,2)
elseif not (isPokemonUsable(1)) and isPokemonUsable(3) then
swapPokemon(1,3)
elseif isPokemonUsable(1)or isPokemonUsable(2)or isPokemonUsable(3) then
if getMapName() == "Indigo Plateau Center" then
moveToCell(10, 28)
elseif getMapName() == "Indigo Plateau" then
moveToCell(21, 31)
elseif getMapName() == "Victory Road Kanto 3F" then
moveToRectangle(20, 29, 25, 35)
end
else
if getMapName() == "Victory Road Kanto 3F" then
moveToCell(46, 13)
elseif getMapName() == "Indigo Plateau" then
moveToCell(33, 12)
elseif getMapName() == "Indigo Plateau Center" then
talkToNpcOnCell(4, 22)
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
name = "Victory Road"
author = "Gandalf"
description = [[Start anywhere between the exit of the Victory Road and the Indigo Plateau.]]
function onPathAction()
if not (isPokemonUsable(1)) and isPokemonUsable(2) then
swapPokemon(1,2)
elseif not (isPokemonUsable(1)) and isPokemonUsable(3) then
swapPokemon(1,3)
elseif isPokemonUsable(1)or isPokemonUsable(2)or isPokemonUsable(3) then
if getMapName() == "Indigo Plateau Center" then
moveToCell(10, 28)
elseif getMapName() == "Indigo Plateau" then
moveToCell(21, 31)
elseif getMapName() == "Victory Road Kanto 3F" then
moveToRectangle(20, 29, 25, 35)
end
else
if getMapName() == "Victory Road Kanto 3F" then
moveToCell(46, 13)
elseif getMapName() == "Indigo Plateau" then
moveToCell(33, 12)
elseif getMapName() == "Indigo Plateau Center" then
talkToNpcOnCell(4, 22)
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