diff --git a/Steal/Steal_StreamlabsSystem.py b/Steal/Steal_StreamlabsSystem.py index d6443c8..1598e1f 100644 --- a/Steal/Steal_StreamlabsSystem.py +++ b/Steal/Steal_StreamlabsSystem.py @@ -30,6 +30,7 @@ def Init(): "command": "!steal", "permission": "Everyone", "cost": 5, + "winProbability":30, "minReward": 10, "maxReward": 20, "useCooldown": True, @@ -67,7 +68,9 @@ def Execute(data): outputMessage = "" else: Parent.RemovePoints(userId, username, settings["costs"]) - isStealing = Parent.GetRandom(0, 2) + currentChance = Parent.GetRandom(0, 100) + winProbablity = settings["winProbability"] + lossProbability = 100 - winProbablity userList = Parent.GetViewerList() while True: @@ -82,7 +85,7 @@ def Execute(data): if reward > points: reward = points - if isStealing == 1: + if currentChance>lossProbability: Parent.AddPoints(userId, username, reward) Parent.RemovePoints(victimId, victim, reward) diff --git a/Steal/UI_Config.json b/Steal/UI_Config.json index 451a26a..140618f 100644 --- a/Steal/UI_Config.json +++ b/Steal/UI_Config.json @@ -30,6 +30,13 @@ "tooltip": "Set the default cost for this command.", "group": "General" }, + "winProbability": { + "type": "numberbox", + "value": 30, + "label": "Percentage Win Rate", + "tooltip": "Set the default cost for this command.", + "group": "General" + }, "minReward": { "type": "numberbox", "value": 10,