JappaWakka 78cd53d745 Added <system.scripttrigger>
Returns what triggered the current script (NPCInSight, NPCInteract, ScriptBlockWalkOn, ScriptBlockInteract, Notification, PhoneReceive, PhoneCall, StartScript, ScriptCommand, StrengthTrigger, MapScript, ChatCommand).
2023-08-06 16:17:05 +02:00

29 lines
1.4 KiB
VB.net

Namespace ScriptVersion2
Partial Class ScriptCommander
' --------------------------------------------------------------------------------------------------------------------------
' Contains the @script commands.
' --------------------------------------------------------------------------------------------------------------------------
Private Shared Sub DoScript(ByVal subClass As String)
Dim command As String = ScriptComparer.GetSubClassArgumentPair(subClass).Command
Dim argument As String = ScriptComparer.GetSubClassArgumentPair(subClass).Argument
If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
Select Case command.ToLower()
Case "start"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(argument, 0, True, False, "ScriptCommand")
Case "text"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(argument, 1, True, False, "ScriptCommand")
Case "run"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(argument, 2, True, False, "ScriptCommand")
End Select
End If
IsReady = True
End Sub
End Class
End Namespace