Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set %pot1
- set %pot2
- set %pot_total
- set %winner
- set %loser
- set %betters
- set %odds
- !saltybrett on
- !saltybrett off
- !saltybrett open
- -timer based
- on *:TEXT:!saltybrett open:#: {
- if ($nick isop $chan) {
- set %betters ""
- msg # Salty Brett is now active for the next 60 seconds! Bet by typing !bet <1p / 2p> <amount>
- }
- .enable #saltybrett
- /timer 1 60 .disable #saltybrett
- /timer 1 60 Betting is now closed!
- }
- on *:TEXT:!winner *:#: {
- if ($nick isop $chan) {
- if ($2 == 1p) {
- %odds = $calc(%pot1 / %pot2)
- /msg # 1p was the winner. The odds returned are %odds
- }
- else if ($2 == 2p) {
- %odds = $calc(%pot2 / %pot1)
- /msg # 2p was the winner. The odds returned are %odds
- }
- var %count = $numtok(%betters, 32)
- while (%count > 0) {
- var %curName = $gettok(%betters,%count,32)
- /echo %curName bet $getvar(%curName,bet) dollars, odds were %odds giving back bet + $getvar(%curName,bet)*%odds)
- setvar %curName cash $calc($getvar(%curName,cash) + $getvar(%curName,bet) + $getvar(%curName,bet)*%odds)
- dec %count
- /echo lowering count
- }
- }
- }
- on *:TEXT:!saltybrett odds:#: {
- msg # $nick <- the odds are $calc(%pot2 / %pot1)
- }
- on *:TEXT:!saltybrett status:#: {
- if ($getvar($nick,virgin) == 0) {
- msg # $nick <- $nick has $getvar($nick,cash) dollars. Currently a virgin. Currently betting $getvar($nick,bet) on $getvar($nick,beton).
- }
- else {
- msg # $nick <- $nick has $getvar($nick,cash) dollars. Currently betting $getvar($nick,bet) on $getvar($nick,beton). The pot is %pot1 and %pot2. .
- }
- }
- #saltybrett off
- #saltybrett off
- /*
- on *:text:!like:#: {
- if ( %oldsong != %currentsong) {
- set %likers ""
- set %skipcount 0
- }
- ;//echo function evalutes to: $findtok(%likers, thebrett, 32)
- if ( $findtok(%likers, $nick, 32) != $null ) {
- ;//echo exists already
- ;//echo likers is now %likers
- msg # $nick -> You just used !like
- }
- else {
- set %likers %likers $nick
- ;//echo adding! likers is now %likers
- }
- setvar %songlink like $calc($getvar(%songlink, like) + 1)
- if ((%wait.ctime !isnum) || ((%wait.ctime isnum) && (%wait.ctime < $ctime))) {
- set %wait.ctime $calc($ctime + 10)
- if ( %skipcount > 0) {
- msg # Processed multiple likes. This song has been liked $getvar(%songlink, like) times.
- }
- else {
- msg # This song has been liked $getvar(%songlink, like) times.
- }
- set %skipcount 0
- }
- else {
- inc %skipcount 1
- }
- }
- */
- when bet closes,
- %winner
- %loser
- %odds winner/loser
- payout = name_bet * %odds
- alias for {
- var %n = $1
- if (%n isnum) {
- while (%n != 0) {
- $2-
- dec %n
- }
- }
- else { for.error }
- }
- alias try_for {
- $for($1,echo -s Hello World!!!)
- }
- alias -l for.error { echo -s 4Error in For Loop }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement