mIRC Home    About    Download    Register    News    Help

Print Thread
#181955 02/08/07 08:37 PM
M
Mpot
Mpot
M
How can I edit that to where a user with the access level bombimmune can't get timebombed?



Code:
;Bomb Game
on *:text:!timebomb*:#: {
  :start1
  if (%bombnick) {
    describe $chan points at the bulge in [ %bombnick ] $+ 's pants. They have only $timer(bomb).secs seconds left.
  }

  else {
    if ($2 == $me) { halt }
    if ($2 ison $chan) {
      set %bombnick $2
      set %colorarray red,orange,yellow,green,blue,purple,black,brown,white,neon,funky,all,lego,violet
      set %bombcolor %colorarray 
      set %bombwirecount $rand(1,14)
      set %bombwires1 0
      ; set %bombwires $gettok(%bombcolor,$rand(1,$gettok(%bombcolor,0,44))
      while (%bombwirecount > %bombwires1) {
        ;while (%bombwirecount > $gettok(%bombwires,0,44)) { 
        ; set %bombwires $addtok(%bombwires,$gettok(%bombcolor,$rand(1,$gettok(%bombcolor,0,44)),44)
        set %bombwirenew $gettok( %bombcolor , $rand(1,$gettok(%bombcolor,0,44)) , 44)
        set %bombwires %bombwires %bombwirenew 
        set %bombcolor $remtok(%bombcolor,%bombwirenew,44)
        inc %bombwires1
      }
      set %bombtime $rand(10,45)
      if (%nobomb) {
        msg $chan $nick $+ : you douche, you ran out with a timebomb and the persons pants you wanted to stuff isn't even here! FOOL! YOU HAVE THE BOMB! 
      }
      else {
        describe $chan stuffs a time bomb into $2 $+ 's pants. The display reads $chr(91) $+ %bombtime $+ $chr(93) seconds. $+ $chr(1) tick tock....
      }
      unset %nobomb
      unset %wasop
      if ($2 isop $chan) {
        mode $chan -o $2
        set %wasop 1
      }
      msg $chan $2 $+ : Diffuse the bomb by cutting the correct wire, type: !cutwire <color> -- There are $gettok(%bombwires,0,32) wires, they are: $replace(%bombwires,$chr(32),$chr(44) $+ $chr(32)) 
      set %bombright $gettok(%bombwires,$rand(1,$gettok(%bombwires,0,32)),32)
      timerbomb 1 %bombtime bombkick $chan $2 *BOOM!* (Correct wire was: %bombright $+ )
    }
    else {
      tokenize 32 timebomb $nick 
      set %nobomb 1
      goto start1
    }
  }
}
on *:text:!cutwire*:# {
  if ($nick == %bombnick) {
    timerbomb off
    if ($2 == %bombright) {
      msg $chan $nick cut the %bombright wire. Hooray! We dont have to clean your genitals from the walls! 
      if (%wasop > 0) { mode $chan +o $nick }
    }
    else {
      kick $chan $nick snip...*BOOM!* (Correct wire was: %bombright $+ )
    }
    unset %bombnick
    unset %bombwires
  }
  else { 
    if (%bombnick) {
      msg $chan You cannot decide %bombnick $+ 's future, they will need to cutwire themselves.
    }
  }
}

alias bombkick {
  kick $1-
  unset %bombnick
  unset %bombwires 
}

#181957 02/08/07 08:45 PM
L
LostShadow
LostShadow
L
Originally Posted By: Mpot
How can I edit that to where a user with the access level bombimmune can't get timebombed?


if ($nick != NickNotToGetTimeBomed) {

Or.

if ($istok(Nicks Not To Get Kicked,$nick,32)) {


#181958 02/08/07 09:33 PM
M
Mpot
Mpot
M
Where should I put that?

And also, could it to be set to where instead of editing the remote I just update the users list with bombimmune:hostmask ?

#181959 02/08/07 09:39 PM
L
LostShadow
LostShadow
L
You would put it at the very beginning of the on text event so it would immiedately know when to not trigger...

Instead of if (!$isok(Nicks Not To Be Kicked,$nick,32)) {

You could use

if (!$istok(%List,$nick,32)) {

Then in your variabes tab:

%List Nicks not to be kicked separated by character 32 (spaces)

Then there are commands to add/remove words from variables.

#181960 02/08/07 09:43 PM
M
Mpot
Mpot
M
Alright, thanks.

#181965 02/08/07 10:02 PM
Joined: Nov 2006
Posts: 1,552
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,552
From the mIRC help file (Access Levels):
Quote:
The ! suffix

You can prevent commands for a certain event level from being processed by using the ! suffix.

so, add this line above your bomb script
Code:
on @bombimmune:text:!timebomb*:#:!
and gain the appropriate access levels

#181990 03/08/07 04:03 AM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
I think one person didn't understand your request regarding access levels as the answer didn't use access levels and the other didn't understand what the script does as that just prevented the "immune" person from using the command rather than preventing that person from being the target of the command. Rather than those suggestions, do this instead:

Code:
on *:text:!timebomb*:#: {
  if ($level($address($nick,2)) == bombimmune) { return }
  :start1


Just add that one line. Then, in your user list, do:

bombimmune:*!*@host

Alternatively, you can change $address($nick,2) to use a different mask, or you can just use $nick. If you don't understand that, just ask.

#182007 03/08/07 12:13 PM
Joined: Nov 2006
Posts: 1,552
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,552
/me admits... one of my late-night-posts.
Ty, Riamus2

Horstl #182313 07/08/07 08:23 PM
M
Mpot
Mpot
M
Much thanks, guys.


Link Copied to Clipboard