Punch someone

By bld-bot on Jun 26, 2009

Well I've recently joined mIRC scriping, 3 days ago, and made a pretty nice script/bot for IRC :)

Most of the help came from you guys!, Thanks!

But this is something, someone asked me to make them..

(i've never touched any coding in my life btw lol)

I made this all by myself, from scratch and am proud!

comments would be good.

on *:text:'punch *:#:{
  if ($2 == $me) {
    msg $chan you cannot punch $2 
    describe $chan Knocked out $nick for trying to punch! | halt
  }
  if ($2 ison $chan) {
    msg $chan $me swings to punch $2 
    timer 1 2 describe $chan just punched $2 !
    timer 1 4 msg $chan you got knocked out in one bat! FAIL!
  }
}

Comments

Sign in to comment.
bld-bot   -  Jun 26, 2009

Cool, thanks again.

And hope some people do use it as a bit of fun xD

(forums takes a while to answer lol)

 Respond  
guest598594   -  Jun 26, 2009
 Respond  
bld-bot   -  Jun 26, 2009

@mountaindew thanks, I've been looking how to do that ...:)

 Respond  
guest598594   -  Jun 26, 2009
 Respond  
bld-bot   -  Jun 26, 2009

Thanks for you comments guys.

@Slickone: what do "." infront of timers actually do, and why name them?

Also, not so sure on the flood bit, what does this do ?

 Respond  
Jethro   -  Jun 26, 2009

Here is another method:

if ($strip($1-2) == 'punch $me) {
 Respond  
Slickone   -  Jun 26, 2009

good job on ur first script
you should add abit of flood protection to it an as well as adding some color stripping.
cuz if someone tried to use it useing color text it wont work. i know you are new to making scripts, but read up in the help file /help $iif /help $strip an also silence the timers by placing a " . " in front of them like .timer as well as naming the timers.

I hope you dont mind but i came up with somthing like this. only as an example

on $*:text:/^'punch\s(\w+)/iS:#:{
  if (!%flood.punch) {
    set -u5 %flood.punch $nick
    if ($regml(1) != $me && $regml(1) ison #) {
      describe # swings to punch $regml(1)
      .timer.punch.1 1 2 describe # just punched $+($regml(1),!)
      .timer.punch.2 1 4 msg # you got knocked out in one bat! FAIL!
    }
    else { msg # $iif($regml(1) == $me,you cannot make me punch my self,$regml(1) is not in the room) }
  }
}

im in no way saying to make it like this at all, nore do i expect you to know how to. im just showing one of many ways to make somthing like this..

 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.