From 2cbe35552c9be7d036282d0f8b4690d9922cef68 Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Thu, 4 Apr 2024 09:48:25 +0200 Subject: [PATCH] Roamers can have forms now --- .../V2/ScriptCommands/DoPokemon.vb | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/P3D/World/ActionScript/V2/ScriptCommands/DoPokemon.vb b/P3D/World/ActionScript/V2/ScriptCommands/DoPokemon.vb index f2840f092..284c99265 100644 --- a/P3D/World/ActionScript/V2/ScriptCommands/DoPokemon.vb +++ b/P3D/World/ActionScript/V2/ScriptCommands/DoPokemon.vb @@ -673,10 +673,22 @@ Core.Player.Pokemons(Index).CatchLocation = placeLocalization End If Case "newroaming" - ' PokémonID,Level,regionID,startLevelFile,MusicLoop,[Shiny] + ' PokémonID,Level,regionID,startLevelFile,MusicLoop,[Shiny],[ScriptPath] Dim data() As String = argument.Split(CChar(",")) - Dim p As Pokemon = Pokemon.GetPokemonByID(CInt(data(0))) - p.Generate(CInt(data(1)), True) + + Dim PokemonID As String = data(0) + Dim PokemonAddition As String = "xXx" + If PokemonID.Contains("_") Then + PokemonAddition = PokemonForms.GetAdditionalValueFromDataFile(data(0)) + PokemonID = data(0).GetSplit(0, "_") + End If + If PokemonID.Contains(";") Then + PokemonAddition = data(0).GetSplit(1, ";") + PokemonID = data(0).GetSplit(0, ";") + End If + + Dim p As Pokemon = Pokemon.GetPokemonByID(CInt(PokemonID), PokemonAddition) + p.Generate(CInt(data(1)), True, PokemonAddition) If data.Length > 5 AndAlso data(5) <> "" AndAlso data(5) <> "-1" Then p.IsShiny = CBool(data(5))