Last active
March 27, 2024 14:16
-
-
Save scruffyfox/f129c210becfca4786c45ab5304b3733 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# CASINO | |
# | |
OnAction PayUser | |
Variable Global Load ChannelPoints | |
Param Copy ChannelPoints tmpChannelPoints | |
Param Subtract tmpChannelPoints {in2} | |
Variable Global Set ChannelPoints {tmpChannelPoints} | |
Variable Global Points {in1}_points | |
Param Copy {in1}_points temp | |
Param Add temp {in2} | |
Variable Global Set {in1}_points {temp} | |
If 1 {in3} == true | |
Chat Send "/me @{in1} You now have §{temp}. The bank now has §{ChannelPoints}." | |
OnTimer UserPrize 1100 0 | |
Param Create loopIndex 0 | |
List Empty Winners | |
List Count Chatters | |
If 1 {count} == 0 | |
Exit | |
Loop 8 {count} | |
Random Number | |
If 5 {number} == 0 | |
List Get Chatters {loopIndex} | |
List Contains Winners "@{value}" | |
If 2 {contains} == false | |
PayUser {value} 1000 false | |
List Add Winners "@{value}" | |
Param Add loopIndex 1 | |
List Count Winners | |
If 2 {count} > 0 | |
List Join Winners ", " | |
Chat Send "/me Congrats to winners {joined}, you have randomly won §1000!" | |
OnCommand e 0 !ledger !top !leaderboard | |
Variable Global Ledger | |
Chat Send "/me {ledger}" | |
OnCommand e 0 !bottom !loserboard | |
Variable Global Loser | |
Chat Send "/me {ledger}" | |
OnCommand e 0 !bank | |
Variable Global Load ChannelPoints | |
Chat Send "The bank currently has §{ChannelPoints} available" | |
OnCommand b 0 !resetbank | |
Variable Global Set ChannelPoints 1000000 | |
Chat Send "The bank now has §1000000 available" | |
OnCommand e 0 !coins !wallet !balance !points | |
Variable Global Load ChannelPoints | |
If 3 {after} != "" | |
Variable Global Points {after}_points | |
Chat Send "/me @{after} currently has §{{after}_points}. The bank has §{ChannelPoints}." | |
Exit | |
Variable Global Points {user}_points | |
Chat Send "/me @{user} You currently have §{{user}_points}. The bank has §{ChannelPoints}." | |
OnCommand b 0 !setcoins | |
Variable Global Load ChannelPoints | |
Function 'var data = [after]; return {toUser: data.split(" ")[0], amount: parseInt(data.split(" ")[1])}' | |
Variable Global Set {toUser}_points {amount} | |
Chat Send "/me @{toUser} you now have §{amount}. The bank has §{ChannelPoints}." | |
OnCommand b 0 !loancoins !givecoins | |
PayUser {arg1} {arg2} true | |
OnCommand b 0 !tax | |
PayUser {arg1} -{arg2} true | |
OnCommand b 0 !taxcheck | |
Variable Global Tax | |
List Empty TaxUsers | |
List Import Taxers {tax} | |
List Join Taxers ", " | |
List Count Taxers | |
Param Create loopIndex 0 | |
Loop 3 {count} | |
List Get Taxers {loopIndex} | |
PayUser {value} -5000 | |
Param Add loopIndex 1 | |
Chat Send "/me Sweeping tax legislation was just passed and the following were taxed §5000; {joined}" | |
OnAction CheckDeficit | |
Param Create user {in1} | |
Variable Global Load ChannelPoints | |
if 1 {ChannelPoints} > -100000 | |
Exit | |
Variable Global Tax | |
List Empty TaxUsers | |
List Import Taxers {tax} | |
List Join Taxers ", " | |
List Count Taxers | |
Param Create loopIndex 0 | |
Loop 3 {count} | |
List Get Taxers {loopIndex} | |
PayUser {value} -5000 | |
Param Add loopIndex 1 | |
Chat Send "/me @{user} has triggered a recession! The following were taxed §5000; {joined}" | |
OnChannelPoint "Buy coins for !slots" | |
PayUser {user} 1000 true | |
OnChannelPoint "Free Money" | |
Function 'return {amount: Math.floor((Math.random() + 10) * 250)}' | |
PayUser {user} {amount} true | |
OnChannelPoint "Lucky Dip" | |
Function 'return {amount: Math.floor(Math.random() * 5000), win: Math.floor(Math.random() * 100) >= 50}' | |
If 4 {win} == true | |
PayUser {user} {amount} false | |
Variable Global Load ChannelPoints | |
Chat Send '/me @{user} You won §{amount}! The bank how has §{ChannelPoints}' | |
Exit | |
Chat Send '/me @{user} You get nothing! You lose! Good day!' | |
OBS SceneSource "Clips" youlose on | |
Delay 4 | |
OBS SceneSource "Clips" youlose off | |
OnCommand bv 0 !wine | |
Chat Send "/me As a distinguished VIP, @{user} please help yourself to a glass of complimentary wine. 🍷" | |
OnCommand bvs 0 !soda | |
Chat Send "/me As a distinguished member of 2nd class, @{user} please help yourself to a can of complimentary soda. 🥤" | |
OnCommand e 0 !upgrade | |
Variable Global Points {user}_points | |
If 3 {{user}_points} >= 100000 | |
Chat Send "/me Congratulations @{user}! welcome to the VIP lounge! Complimentary wine and cheese at your service with !wine" | |
PayUser {user} -100000 false | |
Exit | |
Chat Send "/me @{user} You do not have enough money to upgrade to 1st class. (requires §100,000. You have §{{user}_points})" | |
OnCommand b 0 !ticketsplease | |
Chat Send "/me Tickets please! 🎫 Have your tickets ready soon or you might be fined! (use the channel point, or !ticket)" | |
OnCommand b 0 !checktickets | |
Param Create loopIndex 0 | |
List Empty Dodgers | |
List Count Chatters | |
If 1 {count} == 0 | |
Exit | |
Loop 6 {count} | |
List Get Chatters {loopIndex} | |
Param Add loopIndex 1 | |
List Index Tickets "{value}" | |
If 2 {index} < 0 | |
List Add Dodgers "{value}" | |
PayUser {value} -5000 false | |
List Count Dodgers | |
If 2 {count} > 0 | |
List Join Dodgers ", " | |
Chat Send "/me {joined}, you have been fined §5000 for travelling without a ticket" | |
OnCommand e 0 !gamble | |
Variable Global Points {user}_points | |
Function 'var p = Math.abs(parseInt([after].split(" ")[0])); return {invalid: (Math.abs(p) || 0) < 0 || (Math.abs(p) || 0) > parseInt({{user}_points}) && [after].split(" ")[0].indexOf("%") == -1};' | |
If 2 {invalid} == true | |
Chat Send "/me @{user} you do not have that much to gamble!" | |
Exit | |
If 2 {{user}_points} <= 0 | |
Chat Send "/me @{user} you do not have any money. Buy coins via the Channel Point redemption." | |
Exit | |
Variable Global Load ChannelPoints | |
Function 'var input = [after].split(" ")[0]; var a = input.indexOf("%") > -1 ? Math.floor((Math.abs(parseInt(input)) / 100) * {{user}_points}) : parseInt(Math.abs(input)) || 100; var t = input == "all" ? {{user}_points} : a; var c = {ChannelPoints} > t; return {amount: t, win: Math.floor(Math.random() * 100) % 3 == 0, test: c}' | |
If 8 {win} == true | |
PayUser {user} {amount} false | |
Variable Global Load ChannelPoints | |
Chat Send "/me @{user} you gambled and won §{amount}! The bank now has §{ChannelPoints}" | |
Variable Global Load topscore | |
If 2 {amount} > {topscore} | |
Variable Global Set topscore {amount} | |
Variable Global Set topscore_user "{user}" | |
Skip 3 | |
PayUser {user} -{amount} false | |
Variable Global Load ChannelPoints | |
Chat Send "/me @{user} you gambled and lost your §{amount}! The bank now has §{ChannelPoints}" | |
CheckDeficit {user} | |
OnCommand b 0 !resettop | |
Variable Global Set topscore_user "None" | |
Variable Global Set topscore 0 | |
OnCommand e 0 !top | |
Variable Global Load topscore_user | |
Variable Global Load topscore | |
Chat Send "/me Top score of §{topscore} won by @{topscore_user}" | |
OnCommand e 0 !slots | |
Variable Global Points {user}_points | |
If 2 {{user}_points} <= 0 | |
Chat Send "/me @{user} you do not have any money. Buy coins via the Channel Point redemption." | |
Exit | |
Function 'var emotes = ["scruff72Zoom", "scruff72FoxSpoon", "scruff72FoxSpin", "scruff72FoxSpun", "scruff72FoxSpan", "scruff72Wave", "scruff72Loki", "scruff72Happy"]; var i1 = emotes.length * Math.random() | 0; var i2 = emotes.length * Math.random() | 0; var i3 = emotes.length * Math.random() | 0; var slots = [emotes[i1], emotes[i2], emotes[i3]]; return {result: slots[0] + " | " + slots[1] + " | " + slots[2], win:[...new Set(slots)].length == 2, jackpot: slots[0] == slots[1] && slots[1] == slots[2], emote: slots[0], emoteIndex1: i1, emoteIndex1: i2, emoteIndex1: i3, amount: 500 + (10 * i1 *i2 * i3)}' | |
If 7 {win} == true | |
PayUser {user} {amount} false | |
Chat Send "/me @{user} you rolled {result} and won §{amount}!" | |
Variable Global Load topscore | |
If 2 {amount} > {topscore} | |
Variable Global Set topscore {amount} | |
Variable Global Set topscore_user "{user}" | |
Exit | |
If 10 {jackpot} == true | |
Variable Global Load SlotsJackpot | |
PayUser {user} {SlotsJackpot} false | |
Chat Send "/me @{user} you rolled {result} and won a jackpot of §{SlotsJackpot}!" | |
Chat Send "!scroll {emote} {emote} {emote} JACKPOT! @{user} JACKPOT! {emote} {emote} {emote} " | |
Variable Global Set SlotsJackpot 0 | |
Variable Global Load topscore | |
If 2 {SlotsJackpot} > {topscore} | |
Variable Global Set topscore {SlotsJackpot} | |
Variable Global Set topscore_user "{user}" | |
Exit | |
PayUser {user} -250 false | |
Chat Send "/me @{user} you rolled {result} and lost §250" | |
Variable Global Load SlotsJackpot | |
Param Copy SlotsJackpot tmpSlotsJackpot | |
Param Add tmpSlotsJackpot 250 | |
Variable Global Set SlotsJackpot {tmpSlotsJackpot} | |
OnCommand e 0 !jackpot | |
Variable Global Load SlotsJackpot | |
Chat Send "/me Current jackpot for !slots is: §{SlotsJackpot}" | |
OnCommand b 0 !resetjackpot | |
Variable Global Set SlotsJackpot 0 | |
OnCommand e 0 !predict | |
Variable Load Prediction | |
If 2 {Prediction} != 0 | |
Chat Send "/me There is already a prediction going!" | |
Exit | |
Function 'var rand = Math.floor(Math.random() * 100); return { num: rand }' | |
Variable Set Prediction {num} | |
Chat Send "/me Will the next number be higher or lower than {num}? You have 60s to enter the bet with !higher or !lower. §250 entry fee" | |
Delay 60 | |
Function 'var rand = Math.floor(Math.random() * 100); return { number: rand, higher: rand > {num}, lower: rand < {num} }' | |
Variable Load PredictionPool | |
List Empty Winners | |
If 4 {higher} == true | |
List Count PredictUsersHigher | |
Chat Send "/me Higher wins! the next number was {number}. §{PredictionPool} paying out to {count} users" | |
List Export PredictUsersHigher | |
List Import Winners "{PredictUsersHigher}" | |
If 4 {lower} == true | |
List Count PredictUsersLower | |
Chat Send "/me Lower wins! the next number was {number}. §{PredictionPool} paying out to {count} users" | |
List Export PredictUsersLower | |
List Import Winners "{PredictUsersLower}" | |
List Count Winners | |
If 5 {count} == 0 | |
Chat Send "/me The bank wins!" | |
Variable Set Prediction 0 | |
Variable Set PredictionPool 0 | |
List Empty PredictUsersHigher | |
List Empty PredictUsersLower | |
Function 'return { "amount": Math.floor({PredictionPool} / {count}) }' | |
Loop 2 {count} | |
List Remove Winners | |
PayUser {value} {amount} false | |
Variable Set Prediction 0 | |
Variable Set PredictionPool 0 | |
List Empty PredictUsersHigher | |
List Empty PredictUsersLower | |
OnCommand e 0 !higher | |
List Contains PredictUsersHigher {user} | |
If 1 {contains} == true | |
Exit | |
List Contains PredictUsersLower {user} | |
If 1 {contains} == true | |
Exit | |
Variable Load Prediction | |
If 2 {Prediction} == 0 | |
Chat Send "/me There is no prediction going. Use !predict to start a new game!" | |
Exit | |
List Add PredictUsersHigher {user} | |
Chat Send "/me @{user} has entered the draw by predicting higher!" | |
# subtract 250 from the user, or allow them to bet a custom amount? | |
PayUser {user} -250 false | |
Variable Load PredictionPool | |
Param Copy PredictionPool tmpPredictionPool | |
Param Add tmpPredictionPool 250 | |
Variable Set PredictionPool {tmpPredictionPool} | |
OnCommand e 0 !lower | |
List Contains PredictUsersHigher {user} | |
If 1 {contains} == true | |
Exit | |
List Contains PredictUsersLower {user} | |
If 1 {contains} == true | |
Exit | |
Variable Load Prediction | |
If 2 {Prediction} == 0 | |
Chat Send "/me There is no prediction going. Use !predict to start a new game!" | |
Exit | |
List Add PredictUsersLower {user} | |
Chat Send "/me @{user} has entered the draw by predicting lower!" | |
# subtract 250 from the user, or allow them to bet a custom amount? | |
PayUser {user} -250 false | |
Variable Load PredictionPool | |
Param Copy PredictionPool tmpPredictionPool | |
Param Add tmpPredictionPool 250 | |
Variable Set PredictionPool {tmpPredictionPool} | |
OnCommand b 0 !stock | |
List Global "vend_{arg1}" on | |
List Add vend_{arg1} "{arg2}" | |
Chat Send "/me stocks the {arg1} {index} shelf with {arg2}" | |
OnCommand e 0 !snacks !snack !vend !vending !vendingmachine !buy | |
Function 'var n = Number("{after}".replace(/[^0-9]/g, "")); return {row: "{arg1}".replace(/[^a-zA-Z]/g, "").toUpperCase(), idx: isNaN(n) ? -1 : n}' | |
If 9 {after} == "" | |
Random Number 0 100 | |
If 2 {number} < 20 | |
RandomTicket {user} | |
Exit | |
Random Equal "Param Create row 'A'" "Param Create row 'B'" "Param Create row 'C'" "Param Create row 'D'" | |
List Count vend_{row} | |
Random Number 1 {count} | |
Param Create idx {number} | |
Param Subtract idx 1 | |
If 3 {idx} == -1 | |
List Count vend_{row} | |
Random Number 0 {count} | |
Param Create idx {number} | |
List Get vend_{row} {idx} | |
If 2 {index} == -1 | |
Chat Send "/me Nothing found for {row} {idx}" | |
Exit | |
Chat Send "/me @{user} punches {row}{idx} into the vending machine and purchases a {value} for §100. Yum!" | |
PayUser {user} -100 false | |
OnAction RandomTicket | |
Random Number 0 100 | |
If 7 {number} < 25 | |
Random Number 5000 10000 | |
Chat Send "/me @{in1} You purchased a scratch card and won §{number}!" | |
PayUser {in1} {number} false | |
If 3 {number} < 50 | |
Random Number 1000 5000 | |
Chat Send "/me @{in1} You purchased a lotto ticket and won §{number}!" | |
PayUser {in1} {number} false | |
Random Number 1000 5000 | |
Chat Send "/me @{in1} You purchased a lotto ticket and lost §{number}!" | |
PayUser {in1} -{number} false | |
# | |
# CHANNEL POINTS | |
# | |
OnChannelPoint "Ticket" | |
List Global Tickets on | |
List Index Tickets {user} | |
If 2 {index} >= 0 | |
Chat Send "/me @{user} you already have a ticket!" | |
Exit | |
List Add Tickets {user} | |
PayUser {user} -1000 false | |
Chat Send "/me Thank you for purchasing a ticket for §1000 @{user}" | |
OnChannelPoint "Upgrade to First Class" | |
Variable Global Points {user}_points | |
If 3 {{user}_points} >= 100000 | |
Chat Send "/me Congratulations @{user}! welcome to the VIP lounge! Complimentary wine and cheese at your service with !wine" | |
PayUser {user} -100000 false | |
Exit | |
Chat Send "/me @{user} You do not have enough money to upgrade to 1st class. (requires §100,000. You have §{{user}_points})" | |
OnCommand e 0 !ticket | |
List Global Tickets on | |
List Index Tickets {user} | |
If 2 {index} >= 0 | |
Chat Send "/me @{user} you already have a ticket!" | |
Exit | |
List Add Tickets {user} | |
PayUser {user} -1000 false | |
Chat Send "/me Thank you for purchasing a ticket for §1000 @{user}" | |
OnChannelPoint "First" | |
Chat Send "/me @{user} congratulations on being first!" | |
Variable Global Load ChannelPoints | |
Param Copy ChannelPoints tmpChannelPoints | |
Param Subtract tmpChannelPoints 1000 | |
Variable Global Set ChannelPoints {tmpChannelPoints} | |
Variable Global Points {user}_points | |
Param Copy {user}_points temp | |
Param Add temp 1000 | |
Variable Global Set {user}_points {temp} | |
Chat Send "/me @{user} You now have §{temp}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment