mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2016
Posts: 50
T
TUSK3N Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Mar 2016
Posts: 50
Hello I have 0 experience with mirc scripts and I am looking to automate a thing that I do in a channel.

I do roulettes in a channel and a bot responds back to me.

So what I would like it to do is

type a start bet like this;
!roulette 1

whats gonna happen next is that the bot in the channel responds if I have won the roulette or not.

If I win go back to roulette 1 but If I lose I will go double and wait 1 minute before I send the next roulette.

So it would look something like this to give an example.


TUSK3N: !roulette 1
Bot: TUSK3N_ won 1 points in roulette and now has 5000
timer 60 seconds
TUSK3N: !roulette 1
Bot: TUSK3N lost 1 points in roulette and now has 4999 points!
timer 60 seconds
TUSK3N: !roulette 2
Bot: TUSK3N lost 2 points in roulette and now has 4997 points!
timer 60 seconds
TUSK3N: !roulette 4
Bot: TUSK3N lost 4 points in roulette and now has 4993 points!
timer 60 seconds
TUSK3N: !roulette 8
Bot: TUSK3N_ won 8 points in roulette and now has 5001
timer 60 seconds
TUSK3N: !roulette 1
Bot: TUSK3N_ won 1 points in roulette and now has 5002
timer 60 seconds

This is how the script should work, If someone would be kind to write a script that does this it would be amazing! smile

Thanks for reading.

Joined: Mar 2016
Posts: 50
T
TUSK3N Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Mar 2016
Posts: 50
I know im bad at this but I cant really start of with something good can someone help me?

Code:
:start:
on *:TEXT:*!roulette*:#: {
  if (nick == tusk3n) {
  /timerroulette 1 61 msg $chan !roulette 1
}

on *:ACTION:*TUSK3N_ won 1 points*
    if (nick == bot) {
    goto start
}

on *:ACTION:*TUSK3N lost 1 points*:#: {
     if (nick == bot) {
     /timerroulettelost 1 61 msg $chan !roulette 2
}


This is not how you do it but I am trying. smirk


EDIT: I just found out that this metod is called "Martingale" so I need a martingale script for roulette.

Last edited by TUSK3N; 09/04/16 06:40 PM.
Joined: Apr 2016
Posts: 1
C
Mostly harmless
Offline
Mostly harmless
C
Joined: Apr 2016
Posts: 1
on *:TEXT:!roulette *:#: {
var %points = $readini(%pointsFile, $findID(%pointsFile, $nick), points)
if ($2 == null) {
msg $chan $nick you must input a whole number.
return 0
} else {
if (%points < 0) {
msg $chan $nick You can't roll if you have 0 points.
return 0
} else {
if ($1 == !roulette) { | if (!%rouletteflood) {
set -u20 %rouletteflood 1
var %roulette = $rand(1,2)

if (%roulette == 1) {
msg # $nick won 1 point in roulette and now has %points points!
writeini -n %pointsFile $findID(%pointsFile, $nick) points $calc(%points + 1)

return 0
}

elseif (%roulette == 2) {
msg # $nick lost 1 point in roulette and now has %points points!
writeini -n %pointsFile $findID(%pointsFile, $nick) points $calc(%points - 1)

return 0
}
}

Haven't tested this, but it should work. You must have this in your "variables" section, obviously with your location.

%pointsFile C:\Users\User\AppData\Roaming\mIRC/points.ini


Link Copied to Clipboard