mIRC Home    About    Download    Register    News    Help

Print Thread
#168581 10/01/07 07:26 PM
Joined: Dec 2006
Posts: 37
T
THE_ADZ Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2006
Posts: 37
I am writing a script. Basically what is does is, each time a command is issued to it (for example !order), it increases the variable mad by one. Then when mad is equal to 20, then it kicks the person and resets mad to 0. For some reason, it kicks on the first command. If you have any ideas tell me. Here is some of the code (there is much more)

Code:
on 1:TEXT:!*:#avatarrp:{
  if (%mad == 20) {/msg $chan * RAAR. ADZBot is mad. No more commands! | /k $nick Arg...Don't order me around that much | /msg $chan Ahh...that feels better | set %mad 0 
}
on 1:TEXT:!commands*:#avatarrp,#mirc:{ /msg $chan * ADZ's Bot can do a TON of things...you just need to know how to activate him. For an updated list of what ADZBot can do go to http://adzempire.awardspace.com/adzbot.html
  | /inc %mad 1
}

Last edited by THE_ADZ; 10/01/07 07:29 PM.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Again, a {} mismatch and an issue with the first !* overriding the !command*. You should write these like this so it's easier for you to see mistakes, but that's up to you. And, again, you may want to use describe instead of msg so that it is an action instead of a message.

Code:
on *:TEXT:!*:#avatarrp:{
  if (%mad == 20) {
    msg $chan * RAAR. ADZBot is mad. No more commands!
    k $nick Arg...Don't order me around that much
    msg $chan Ahh...that feels better
    set %mad 0
    return
  }
  if ($1 == !commands) {
    msg $chan * ADZ's Bot can do a TON of things...you just need to know how to activate him. For an updated list of what ADZBot can do go to http://adzempire.awardspace.com/adzbot.html
    inc %mad
  }
}


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2006
Posts: 37
T
THE_ADZ Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2006
Posts: 37
Thanks! It works for both of them.
I will start putting my scripts in that form smile


Link Copied to Clipboard