From a11f46dcd64c29730c0b9dd0731378620008e36b Mon Sep 17 00:00:00 2001 From: darkfire006 Date: Mon, 29 May 2023 20:33:16 -0500 Subject: [PATCH] coin scripts --- P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb | 10 ++++++++++ P3D/World/ActionScript/V2/ScriptConstructs/DoPlayer.vb | 2 ++ 2 files changed, 12 insertions(+) diff --git a/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb b/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb index 4b4d7ec43..815d53cd0 100644 --- a/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb +++ b/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb @@ -299,6 +299,16 @@ PlayerStatistics.Track("Obtained BP", bp) End If + IsReady = True + Case "addcoins" + Dim coins As Integer = int(argument) + + Core.Player.Coins += coins + + If coins > 0 Then + PlayerStatistics.Track("Obtained Coins", coins) + End If + IsReady = True Case "showrod" If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then diff --git a/P3D/World/ActionScript/V2/ScriptConstructs/DoPlayer.vb b/P3D/World/ActionScript/V2/ScriptConstructs/DoPlayer.vb index cc916ad18..7b77bc86e 100644 --- a/P3D/World/ActionScript/V2/ScriptConstructs/DoPlayer.vb +++ b/P3D/World/ActionScript/V2/ScriptConstructs/DoPlayer.vb @@ -75,6 +75,8 @@ Return Core.Player.Gender Case "bp" Return Core.Player.BP.ToString() + Case "coins" + Return Core.Player.Coins.ToString() Case "badges" Return Core.Player.Badges.Count Case "thirdperson"