Explosion Trigger Script

By HacknSlash on Feb 05, 2011

My second script. Here, we have a trigger of /me yawns. This one has colours and everything, and kills a random person when you /me yawns. Feel free to edit it as much as you like, drop me any tips that would be useful, thanks. UPDATE: IDK how to explain, please read comments. Thank you.

on *:action:$($iif(*yawns* iswm $strip($1),$1)):#:{
  if (!%t) { inc -u4 %t | :yawns | inc %kills
    $iif($nick(#,$r(1,$nick(#,0))) = $me,goto yawns,$&
      describe # explodes $+ $chr(44) 8 $+ $chr(44) $+ 1killing $v1) $+ . 9,6(People Killed By Exploding: %kills $+ )
  }
} 

Comments

Sign in to comment.
HacknSlash   -  Feb 08, 2011

Thanks Jethro_. You're a big help. Fixed :)

 Respond  
KilllerX   -  Feb 05, 2011

oh ok. that be what I figuring he be wanting. To explode the person that yawned. But ok. I double looked at his code and noticed the random person in the chan code. So yes. now I understand.

 Respond  
Jethro   -  Feb 05, 2011

Well killerX, adding a trigger control is a precautionary measure I adapt myself to when dealing with a snippet with one trigger to activate a routine. You never know what's gonna happen until it's too late.

Your example will merely aim for the person who triggers the code, not randomly on the channel as a whole. The intention of the original snippet here is to kill a random person when someone engages in an action yawn.

Of the strip, you can test and see for yourself by entering the word "yawn" with a control code attached to it, be that as color, bold, reverse... It won't trigger if you didn't set your mirc (the client that runs the code) options to strip out control codes from the incoming messages.

 Respond  
KilllerX   -  Feb 05, 2011

And I was going to say along with that... What happens when %yawns = 1... Nothing... So really you don't need the if %yawns != 1 And it would still work. I doubt you would have more then 3 people with in 4 seconds. doing a /me yawns So I wouldn't worry about the Flood protection. Why would you explode... I would do more of a describe # throws an explosive down $nick $+ 's throat, killing them. People killed: %kills . But other then that. I guess if you have a use for this, that is fine. I don't know how many people would. Personally I would write it out as


ON !*:action:*yawn*: {
 .inc %kills
 describe # throws an explosive down $nick $+ 's throat, killing them.  People killed: %kills $+ .
}

But I guess Jethros would work just as well.  I am not fully educated on this Striping thing.
 Respond  
Jethro   -  Feb 05, 2011

First of all, the trigger needs to be made wildcard, because your current one will only be activated with the word "yawns" and not within a sentence.

Second, the check for %yawns != 1 is not needed, because when the trigger commences, it'll be counted as 1 and increased by one from that point.

Third, you do not want to kill yourself, meaning the client that runs the code.

Forth, you need to strip out the control codes, because if your mirc wasn't set to strip incoming messages, it wouldn't recognize the command:

Finally, you may need to have a basic trigger flood control so you don't get inundated with trigger flood if someone messes with you:

on *:action:$($iif(*yawns* iswm $strip($1),$1)):#:{
  if (!%t) { inc -u4 %t | :yawns | inc %kills
    $iif($nick(#,$r(1,$nick(#,0))) = $me,goto yawns,$&
      describe # explodes $+ $chr(44) 8 $+ $chr(44) $+ 1killing $v1) . 9,6People killed: %kills 
  }
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.