mIRC Home    About    Download    Register    News    Help

Print Thread
#251115 09/02/15 09:40 PM
Joined: Jan 2015
Posts: 8
M
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Jan 2015
Posts: 8
I looking for some one to make me a Gambling system I will pay you. So my viewers can bet for !red or !purple side. Say Jim a random viewer wants to bet on purple side he would do !bet 400 points then if that side wins they double their points. Here's the point system! Thank you for any help!



alias -l addPoints {
if ($1 !isnum) { echo 2 -st $1 is not a number. It needs to be a number. | halt }
var %topic $+($chan,.,$nick)
var %points $calc($readini(Points.ini,%topic,Points) + $1)
writeini -n Points.ini %topic Points %points
return %points
}

alias -l lookUpPoints {
var %topic $+($chan,.,$nick)
var %points $readini(Points.ini,%topic,Points)
return %points
}
alias doaddpoints {
if ($3 !isnum) { echo 2 -st $3 is not a number. It needs to be a number. | halt }
var %topic $+($1,.,$2)
var %points $calc($readini(Points.ini,%topic,Points) + $3)
writeini -n Points.ini %topic Points %points
echo -a Added points for %topic
}

alias dorempoints {
var %topic $+($1,.,$2)
remini -n Points.ini %topic Points
echo -a Removed points for %topic
}

on *:text:!madpoints:#:{
if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return }
set -u10 %floodpoints off
set -u30 %floodpoints. $+ $nick On
msg # $nick has $readini(Points.ini,$+(#,.,$nick),Points) total points.
}

on $*:text:/!madpoints (add|remove)/Si:#:{
if ($nick isop #) {
if ($0 < 3) { msg # Insufficient parameters: Use !points <add|remove> <user> [number] | return }
writeini -n Points.ini $+(#,.,$3) Points $calc($readini(Points.ini,$+(#,.,$3),Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
{ msg $chan $3 now has $readini(Points.ini,$+(#,.,$3),Points) total points. }
}
else { msg $chan This command is only available to moderators. }
}
on !*:join:#:{
$+(.timerpoints.,#,.,$nick) 0 240 add.pts $+(#,.,$nick)
add.pts $+(#,.,$nick)
msg $chan
}
on !*:part:#:$+(.timerpoints.,#,.,$nick) off
alias -l add.pts {
writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 4)
}

Joined: Nov 2014
Posts: 79
N
Babel fish
Offline
Babel fish
N
Joined: Nov 2014
Posts: 79
Code:
on *:TEXT:!bet *:#: {
  var %file bets.ini
  var %topic $+($chan,.,$nick)
  var %points $calc($readini(Points.ini,%topic,Points) + $3)
  if ($2 != close) {
    if ($2 isnum) {
      writeini %file $2 $nick $3
      writeini -n Points.ini %topic Points $calc($readini(Points.ini,%topic,Points) - $3)
      msg # $nick has wagered on color $2 for $3 dollars!
    }
  else {
    var %winners $ini(%file,$2,0)
    while (%winners) {
      var % winner $ini(%file,$2,%winners)
      var %wins %wins %winner
      writeini -n Points.ini %topic Points %points
      dec %winners
    }
    msg # The winners are: %wins 
    unset %firstdeath
  }
 }
}


Could be improved but here's a basic skeleton. I can't access MIRC right now but I'll post a better version later.

Last edited by Newbie; 09/02/15 10:39 PM.
Joined: Jan 2015
Posts: 8
M
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Jan 2015
Posts: 8
Thank you for your help it appreciate it alot! How do you use this code? Sorry frown. Also with this betting system can I make it so my chatters are betting for !red or !purple team and they can bet their points but up to a minimum of like 4000 points can be bet

Last edited by madmaxx13; 10/02/15 04:38 AM.
Joined: Nov 2014
Posts: 79
N
Babel fish
Offline
Babel fish
N
Joined: Nov 2014
Posts: 79
I can alter it a little bit to add the 4000 limit. Give me till tomorrow and I can have it finished. But the way it works is you type
!bet 100 purple to make a bet.
Typing --> !bet close purple <-- will close the bet with the indicated color (in this case purple) will close the bet and claim all the winners. The script can also incorporate other things in case you want to add more color, so people can wager on other colors/things but only the people who wagered on the correct color will win.

Joined: Jan 2015
Posts: 8
M
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Jan 2015
Posts: 8
Take your time thank you for helping me! Can you make it so the text isn't in color that would help thank you, just cause twitch.tv doesn't support colors with MIRC smile Again ty for your help!

Joined: Jan 2015
Posts: 8
M
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Jan 2015
Posts: 8
Do you think you could make some thing like this?


Gambling:
Lets users gamble currency points over different options, that's another way to earn currency.
This is commonly used for win/lose over games/matches in the stream.
Commands:
!gamble open <MinBet> <MaxBet> <WinReward> <option1> <option2> <option3> ... <optionN> - (Access Level 2) Opens a new betting pool.
MinBet - Specifies the minimum amount of currency required to make a bet, minimum value is 1.
MaxBet - Specifies the maximum amount of currency that a user can bet, minimum value is MinBet.
WinReward - Additional currency reward to give to each winner, minimum value is 0.
Options - Space separated, use quotation marks to add an option with spaces.
!gamble close - (Access Level 2) Locks the bets so that no more bets can be made.
!gamble winner <Option> - (Access Level 2) Closes the bet pool, and pays out people who bet on the correct option.
Option - The winning option, provide the name or the option id with a hashtag first (ex: #1).
!gamble cancel - (Access Level 2) Cancels the bet pool, and refunds all bets.
!bet help - (Anyone) Provides information about the availble betting options and how to bet.
!bet <Amount> <Option> - (Anyone) Bet <amount> on <option>
Amount - The amount of currency to bet.
Option - The option to bet on, can be the full option name or the id with a hashtag first (ex: #1)

Joined: Nov 2014
Posts: 79
N
Babel fish
Offline
Babel fish
N
Joined: Nov 2014
Posts: 79
The text wouldn't be in color, you said that you would choose a color as what you would bet on I.E. purple in my example would be Option 1

Joined: Jan 2015
Posts: 8
M
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Jan 2015
Posts: 8
Na Choose a team color cause in league of legends their is a blue side and a purple side and I want my chatters to bet on !red or !purple side of the map. Also when I try to close bet it doesn't work :3

Last edited by madmaxx13; 10/02/15 10:32 PM.
Joined: Sep 2014
Posts: 83
H
Babel fish
Offline
Babel fish
H
Joined: Sep 2014
Posts: 83
please PM me what exactly in full you want it to do..


Link Copied to Clipboard