Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Steal/Steal_StreamlabsSystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def Init():
"command": "!steal",
"permission": "Everyone",
"cost": 5,
"winProbability":30,
"minReward": 10,
"maxReward": 20,
"useCooldown": True,
Expand Down Expand Up @@ -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:
Expand All @@ -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)

Expand Down
7 changes: 7 additions & 0 deletions Steal/UI_Config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down