mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2014
Posts: 19
D
Dcease Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Jul 2014
Posts: 19
So basically I made a roulette script sort off. And I made few of the randnumber to not timeout the player but apparently it times out even with no timeout

on *:TEXT:!Roulette:#: {
if ((%floodroulette) || ($($+(%,floodroulette.,$nick),2))) { return }
set -u60 %floodroulette On
set -u120 %floodroulette. $+ $nick On
if ($nick isop #) {
var %randmods = $rand(1,2)
if (%randmods == 1) msg $chan The gun jambs up! Do you have special powers, $nick ?
if (%randmods == 2) msg $chan BANG! ... The bullet was deflected off your mod armor, and killed a random viewer, but you live! There must be secret powers in your mod armor $nick
}
else {
var %randnumber = $rand(1,4)
if (%randnumber == 1) { msg $chan $nick tries to pull the trigger... but is too afraid and drops the gun, apparently the gun triggers itself and shoot $nick in the dick... Kreygasm
msg $chan /timeout $nick 120 }
msg $chan /timeout $nick 120 }
if (%randnumber == 2) msg $chan Roulette clicks!...Empty...You live to see another day $nick
if (%randnumber == 3) { msg $chan Click!... Nothing happened but... $nick got so scared that $nick shit in his/her pants and died.
msg $chan /timeout $nick 120 }
if (%randnumber == 4){ msg $chan $nick starts to shake, $nick tries to pull the trigger but can't. $nick drops the gun, $nick isn't up for the challenge Roulette..
}

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
Your spaces and braces are all messed up. Use the mIRC editor and you'll see that things don't align properly.

This is the correct way to use multiline if blocks:

Code:
if (%randnumber == 1) {
  cmd
  cmd
}
elseif (%randnumber == 2) {
  cmd
  cmd
}
else {
  cmd
}


Please surround your code with [code][ /code] to place it into a code block (remove the space).

Joined: Jul 2014
Posts: 19
D
Dcease Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Jul 2014
Posts: 19
I seem to not being able to make it work, and it fucked up all my scripts. Except for the just on *:TEXT:*!

Joined: Jan 2014
Posts: 107
M
Vogon poet
Offline
Vogon poet
M
Joined: Jan 2014
Posts: 107
So basically you copied the roulette script I had posted and merely deleted the 'timeout' portion of the script? and now can't get it to work and are asking for help saying its your original work?

newsflash for you.. it wasn't even my original work.

so you stole a script that was stolen. lol

just a heads up before you claim things as your own.

Code:
On *:TEXT:!Roulette:#: {
  if ((%floodroulette) || ($($+(%,floodroulette.,$nick),2))) { return }
  set -u60 %floodroulette On
  set -u180 %floodroulette. $+ $nick On
  if ($nick isop #) {
    var %randmods = $rand(1,4)
    if (%randmods == 1) msg $chan The gun jambs up! Do you have special powers, $nick ?
    if (%randmods == 2) msg $chan BANG! ... The bullet was deflected off your mod armor, and killed a random viewer, but you live! There must be secret powers in your mod armor $nick
    if (%randmods == 3) msg $chan BANG! ... The bullet missed, you only have your born moderation powers to thank $nick
    if (%randmods == 4) msg $chan $nick dodges bullets better than Neo, it must be the mod armor.
  }
  else {
    var %randnumber = $rand(1,4)
    if (%randnumber == 1) { msg $chan BANG!... Roulette claims another soul. R.I.P $nick }
    if (%randnumber == 2) { msg $chan Roulette clicks!...Empty...You live to see another day $nick }
    if (%randnumber == 3) { msg $chan BANG!... $nick Was caught trying to steal from TheBlueMuzzy's Karma coffers. }
    if (%randnumber == 4) { msg $chan $nick starts to shake, $nick tries to pull the trigger but can't. $nick drops the gun, $nick isn't up to the challenge of Roulette. }
  }
}


Just threw that together for you quick.. you may want to check brackets.

Last edited by Majeye; 24/07/14 02:52 AM.
Joined: Jul 2014
Posts: 19
D
Dcease Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Jul 2014
Posts: 19
That's what I had from the beginning, but dont I have to do

{
CMD
CMD
}

Joined: Jul 2014
Posts: 19
D
Dcease Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Jul 2014
Posts: 19
Originally Posted By: Majeye
So basically you copied the roulette script I had posted and merely deleted the 'timeout' portion of the script? and now can't get it to work and are asking for help saying its your original work?

newsflash for you.. it wasn't even my original work.

so you stole a script that was stolen. lol

just a heads up before you claim things as your own.

Code:
On *:TEXT:!Roulette:#: {
  if ((%floodroulette) || ($($+(%,floodroulette.,$nick),2))) { return }
  set -u60 %floodroulette On
  set -u180 %floodroulette. $+ $nick On
  if ($nick isop #) {
    var %randmods = $rand(1,4)
    if (%randmods == 1) msg $chan The gun jambs up! Do you have special powers, $nick ?
    if (%randmods == 2) msg $chan BANG! ... The bullet was deflected off your mod armor, and killed a random viewer, but you live! There must be secret powers in your mod armor $nick
    if (%randmods == 3) msg $chan BANG! ... The bullet missed, you only have your born moderation powers to thank $nick
    if (%randmods == 4) msg $chan $nick dodges bullets better than Neo, it must be the mod armor.
  }
  else {
    var %randnumber = $rand(1,4)
    if (%randnumber == 1) { msg $chan BANG!... Roulette claims another soul. R.I.P $nick }
    if (%randnumber == 2) { msg $chan Roulette clicks!...Empty...You live to see another day $nick }
    if (%randnumber == 3) { msg $chan BANG!... $nick Was caught trying to steal from TheBlueMuzzy's Karma coffers. }
    if (%randnumber == 4) { msg $chan $nick starts to shake, $nick tries to pull the trigger but can't. $nick drops the gun, $nick isn't up to the challenge of Roulette. }
  }
}


Just threw that together for you quick.. you may want to check brackets.

That script right there, there's no timeout? I tried to add something like $chan /timeout $nick 120 but it wont work.

Joined: Jul 2014
Posts: 19
D
Dcease Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Jul 2014
Posts: 19
i didnt claim it was "MINE" nor is there any credits anywhere. Altho I make cooldown 1 and 1 to test the script without having to wait obviously... And I once made it work for both mods and non mods, now the script you sent only work for mods/ the script I sent. When I had the working roulette script, it would give both the mod message and a normal viewer message. Which was kinda odd.

Joined: Jul 2014
Posts: 48
A
Ameglian cow
Offline
Ameglian cow
A
Joined: Jul 2014
Posts: 48
the if statements are bad, or the brackets are bad, or both

Joined: Apr 2014
Posts: 191
B
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
Braces are messed up.
Here is the correction.
Code:
on *:TEXT:!Roulette:#: {
  if ((%floodroulette) || ($($+(%,floodroulette.,$nick),2))) { return }
  set -u60 %floodroulette On
  set -u120 %floodroulette. $+ $nick On
  if ($nick isop #) {
    var %randmods = $rand(1,2)
    if (%randmods == 1) {
      msg $chan The gun jambs up! Do you have special powers, $nick ?
    }
    if (%randmods == 2) {
      msg $chan BANG! ... The bullet was deflected off your mod armor, and killed a random viewer, but you live! There must be secret powers in your mod armor $nick
    }
  }
  else {
    var %randnumber = $rand(1,4)
    if (%randnumber == 1) { 
      msg $chan $nick tries to pull the trigger... but is too afraid and drops the gun, apparently the gun triggers itself and shoot $nick in the dick... Kreygasm
      msg $chan /timeout $nick 120 
    }
    if (%randnumber == 2) { 
      msg $chan Roulette clicks!...Empty...You live to see another day $nick
    }
    if (%randnumber == 3) { 
      msg $chan Click!... Nothing happened but... $nick got so scared that $nick shit in his/her pants and died.
      msg $chan /timeout $nick 120 
    }
    if (%randnumber == 4) {
      msg $chan $nick starts to shake, $nick tries to pull the trigger but can't. $nick drops the gun, $nick isn't up for the challenge Roulette..
    }
  }
}


Link Copied to Clipboard