mIRC Home    About    Download    Register    News    Help

Print Thread
#247706 23/08/14 12:20 AM
Joined: Apr 2014
Posts: 4
T
Toot Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Apr 2014
Posts: 4
Hello I am a skrub coder and i would like to figure out how to set a string for my stream.

I would like to be the only one able to use this command (which i have already done)

The thing I would like to know is how you can do something like !swbs 1 and then when i say !whitebags it says I have found 1 whitebag(s)

This is the code.
Code:
on *:TEXT:!whitebags:#: {
  if ((%wb) || ($($+(%,wb.,$nick),2))) { return }
  set -u30 %wb On
  msg $chan I have found %wbs whitebag(s)
}

on *:TEXT:!swbs $input:#:
if $nick == im_bad_atoot { $input = %wbs }


Please help me figure out how to do this. smile

Last edited by Toot; 23/08/14 12:33 AM.
Joined: Apr 2014
Posts: 4
T
Toot Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Apr 2014
Posts: 4
I am still figuring this out but I am a bit farther I think so please tell me what I'm doing wrong :3
Code:
on *:TEXT:!swbs:#: {
  if $nick == im_bad_atoot {
    if ($2 == 0) { set %wbs 0 } Return 
    if ($2 == 1) { set %wbs 1 } Return
    if ($2 == 2) { set %wbs 2 } Return
    if ($2 == 3) { set %wbs 3 } Return
    if ($2 == 4) { set %wbs 4 } Return
    if ($2 == 5) { set %wbs 5 } Return
    if ($2 == 6) { set %wbs 6 } Return
    if ($2 == 7) { set %wbs 7 } Return
    if ($2 == 8) { set %wbs 8 } Return
    if ($2 == 9) { set %wbs 9 } Return
    if ($2 == 10) { set %wbs 10 } Return
    if ($2 == 11) { set %wbs 11 } Return
    if ($2 == 12) { set %wbs 12 } Return
    if ($2 == 13) { set %wbs 13 } Return
    if ($2 == 14) { set %wbs 14 } Return
    if ($2 == 15) { set %wbs 15 } Return
    if ($2 == 16) { set %wbs 16 } Return
    if ($2 == 17) { set %wbs 17 } Return
    if ($2 == 18) { set %wbs 18 } Return
    if ($2 == 19) { set %wbs 19 } Return
    if ($2 == 20) { set %wbs 20 } Return
} }

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Try this code,

Code:
ON *:TEXT:!whitebags:#: {
  if ((%wb) || ($($+(%,wb.,$nick),2))) { return }
  set -u30 %wb On
  msg $chan [ $+ $nick $+ ]: I have found %wbs whitebag(s).
}

ON *:TEXT:!swbs:#: {
  if ($nick == im_bad_atoot) {
    if (!$2) { msg $chan [ $+ $nick $+ ]: Error, Incorrect parameters, try again and enter an number! | return }
    if ($2 !isnum) { msg $chan [ $+ $nick $+ ]: Error, Incorrect parameters, try again and use only numbers and not any letters! | return }
    if ($2 == %wbs) { msg $chan [ $+ $nick $+ ]: Error, Already the same, try again and enter an other number! | return }
    set %wbs $2
    msg $chan [ $+ $nick $+ ]: You have set %wbs successfully.
  } 
}


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-

Link Copied to Clipboard