More effectively parse pkmn add commands
This commit is contained in:
parent
0eddb70011
commit
062b14220c
|
@ -78,11 +78,7 @@
|
||||||
|
|
||||||
Dim catchMethod As String = "random reason"
|
Dim catchMethod As String = "random reason"
|
||||||
If commas > 1 Then
|
If commas > 1 Then
|
||||||
Dim catchMethodLocalization As String = argument.GetSplit(2)
|
catchMethod = ScriptCommander.Parse(argument.GetSplit(2)).ToString()
|
||||||
If argument.GetSplit(2).StartsWith("<system.token(") AndAlso argument.GetSplit(2).EndsWith(")>") Then
|
|
||||||
catchMethodLocalization = Localization.GetString(catchMethodLocalization.Remove(0, "<system.token(".Length).Remove(argument.GetSplit(2).Length - 2, 2))
|
|
||||||
End If
|
|
||||||
catchMethod = catchMethodLocalization
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim catchBall As Item = Item.GetItemByID(5.ToString)
|
Dim catchBall As Item = Item.GetItemByID(5.ToString)
|
||||||
|
@ -92,11 +88,7 @@
|
||||||
|
|
||||||
Dim catchLocation As String = Screen.Level.MapName
|
Dim catchLocation As String = Screen.Level.MapName
|
||||||
If commas > 3 Then
|
If commas > 3 Then
|
||||||
Dim catchLocationLocalization As String = argument.GetSplit(4)
|
catchLocation = ScriptCommander.Parse(argument.GetSplit(4)).ToString()
|
||||||
If argument.GetSplit(4).StartsWith("<system.token(") AndAlso argument.GetSplit(4).EndsWith(")>") Then
|
|
||||||
catchLocationLocalization = Localization.GetString(catchLocationLocalization.Remove(0, "<system.token(".Length).Remove(argument.GetSplit(4).Length - 2, 2))
|
|
||||||
End If
|
|
||||||
catchLocation = catchLocationLocalization
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim isEgg As Boolean = False
|
Dim isEgg As Boolean = False
|
||||||
|
@ -106,7 +98,7 @@
|
||||||
|
|
||||||
Dim catchTrainer As String = Core.Player.Name
|
Dim catchTrainer As String = Core.Player.Name
|
||||||
If commas > 5 And argument.GetSplit(6) <> "<playername>" And argument.GetSplit(6) <> "<player.name>" Then
|
If commas > 5 And argument.GetSplit(6) <> "<playername>" And argument.GetSplit(6) <> "<player.name>" Then
|
||||||
catchTrainer = argument.GetSplit(6)
|
catchTrainer = ScriptCommander.Parse(argument.GetSplit(6)).ToString()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim heldItem As String = 0.ToString
|
Dim heldItem As String = 0.ToString
|
||||||
|
@ -915,11 +907,7 @@
|
||||||
|
|
||||||
Dim catchMethod As String = "random reason"
|
Dim catchMethod As String = "random reason"
|
||||||
If commas > 1 Then
|
If commas > 1 Then
|
||||||
Dim catchMethodLocalization As String = argument.GetSplit(2)
|
catchMethod = ScriptCommander.Parse(argument.GetSplit(2)).ToString()
|
||||||
If argument.GetSplit(2).StartsWith("<system.token(") AndAlso argument.GetSplit(2).EndsWith(")>") Then
|
|
||||||
catchMethodLocalization = Localization.GetString(catchMethodLocalization.Remove(0, "<system.token(".Length).Remove(argument.GetSplit(2).Length - 2, 2))
|
|
||||||
End If
|
|
||||||
catchMethod = catchMethodLocalization
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim catchBall As Item = Item.GetItemByID(5.ToString)
|
Dim catchBall As Item = Item.GetItemByID(5.ToString)
|
||||||
|
@ -929,11 +917,7 @@
|
||||||
|
|
||||||
Dim catchLocation As String = Screen.Level.MapName
|
Dim catchLocation As String = Screen.Level.MapName
|
||||||
If commas > 3 Then
|
If commas > 3 Then
|
||||||
Dim catchLocationLocalization As String = argument.GetSplit(4)
|
catchLocation = ScriptCommander.Parse(argument.GetSplit(4)).ToString()
|
||||||
If argument.GetSplit(4).StartsWith("<system.token(") AndAlso argument.GetSplit(4).EndsWith(")>") Then
|
|
||||||
catchLocationLocalization = Localization.GetString(catchLocationLocalization.Remove(0, "<system.token(".Length).Remove(argument.GetSplit(4).Length - 2, 2))
|
|
||||||
End If
|
|
||||||
catchLocation = catchLocationLocalization
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim isEgg As Boolean = False
|
Dim isEgg As Boolean = False
|
||||||
|
@ -943,7 +927,7 @@
|
||||||
|
|
||||||
Dim catchTrainer As String = Core.Player.Name
|
Dim catchTrainer As String = Core.Player.Name
|
||||||
If commas > 5 And argument.GetSplit(6) <> "<playername>" And argument.GetSplit(6) <> "<player.name>" Then
|
If commas > 5 And argument.GetSplit(6) <> "<playername>" And argument.GetSplit(6) <> "<player.name>" Then
|
||||||
catchTrainer = argument.GetSplit(6)
|
catchTrainer = ScriptCommander.Parse(argument.GetSplit(6)).ToString()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim heldItem As String = 0.ToString
|
Dim heldItem As String = 0.ToString
|
||||||
|
|
Loading…
Reference in New Issue