From 7eac4b34eff6c855c2b04ad5caa69cec5842796a Mon Sep 17 00:00:00 2001 From: jianmingyong Date: Sat, 12 Nov 2016 03:04:58 +0800 Subject: [PATCH] Add @Pokemon.SendToStorage() More Info below: Usage: @Pokemon.SendToStorage(PokeIndex) @Pokemon.SendToStorage(PokeIndex, BoxIndex) BoxIndex is the selected box you wish to dump into. They start from 0. --- .../V2/ScriptCommands/DoPokemon.vb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/2.5DHero/2.5DHero/World/ActionScript/V2/ScriptCommands/DoPokemon.vb b/2.5DHero/2.5DHero/World/ActionScript/V2/ScriptCommands/DoPokemon.vb index d00f1d7a5..63b17cd4b 100644 --- a/2.5DHero/2.5DHero/World/ActionScript/V2/ScriptCommands/DoPokemon.vb +++ b/2.5DHero/2.5DHero/World/ActionScript/V2/ScriptCommands/DoPokemon.vb @@ -583,6 +583,25 @@ If Core.Player.Pokemons.Count - 1 >= PokemonIndex And Core.Player.Pokemons.Count < 6 Then Core.Player.Pokemons.Add(Core.Player.Pokemons(PokemonIndex)) End If + Case "sendtostorage" + ' @Pokemon.SendToStorage(PokeIndex, [BoxIndex]) + Dim Data() As String = argument.Split(CChar(",")) + + If Data.Length = 1 Then + Dim PokemonIndex As Integer = int(Data(0)) + + If Core.Player.Pokemons.Count - 1 >= PokemonIndex Then + StorageSystemScreen.DepositPokemon(Core.Player.Pokemons(PokemonIndex)) + Core.Player.Pokemons.RemoveAt(PokemonIndex) + End If + ElseIf Data.Length = 2 Then + Dim PokemonIndex As Integer = int(Data(0)) + + If Core.Player.Pokemons.Count - 1 >= PokemonIndex Then + StorageSystemScreen.DepositPokemon(Core.Player.Pokemons(PokemonIndex), int(Data(1))) + Core.Player.Pokemons.RemoveAt(PokemonIndex) + End If + End If End Select IsReady = True