Bot Command Creator

By Numuruzero on Aug 07, 2008

Well, it's a simple script, what can I say. It's basically another "I was bored" story. Maybe it's not that useful or anything, but maybe it hasn't been done before. I wouldn't know. I''m not even going to take the time to search if it has. Ain't I evil? Anyway, it basically creates BASIC commands from the user. There are some bugs, I didn't work on it for too long. I'll take feedback, that's what I learn on. !cmdp will create the command prompt, ex; " !cmdp !example | The command prompt has been set as !example" That will then be your command. Next, !cmd is the spine of it all as this is your command. Ex; " !cmd msg #GamesRoom This is an example. Seriously. | Confirmation: msg #GamesRoom This is an example. Seriously." From that point on, whenever anyone says your command, it will carry it out. " !example | This is an example. Seriously." Also, if you simply want a message, you can create it with the simple syntax "say". Ex; " !cmd say This is an example. Seriously. | Confirmation: say This is an example. Seriously. | Confirmation: msgd" The only thing it does however is keep you from having to state the room.

BUGS: There are some extremely obvious bugs. When using the "say" syntax, it messages with the new variable. I could probably work that out myself, but I don't want to ;) Also, I haven't been able to use the describe command or variables in my commands. Thusly SIMPLE commands. But it's mainly a joke anyway, so why not?

on *:text:*:#: {
 if ($strip($1) == !cmdp) { set %cmdprompt $2- | msg $chan The command prompt has been set as %cmdprompt }
 if ($strip($1) == !cmd) { set %cmd $2- | msg $chan Confirmation: %cmd }
 if ($strip($1) == !cmd) && ($2 == say) { set %cmdmsg $3- | set %cmd msgd | msg $chan Confirmation: %cmd }
 if ($strip($1) == %cmdprompt) { %cmd }
 if ($strip($1) == %cmdprompt) && (%cmd == msgd) { msg $chan %cmdmsg }
}

Comments

Sign in to comment.
Sentry   -  Aug 08, 2008

Haha i used to have the same problem, Numuruzero.
I had to like read crap 5 times. :] You get better at it though.

 Respond  
Numuruzero   -  Aug 07, 2008

Thanks, I\'ll see if I can use that in this script. I mean, not that I understand a word the help file ever says. I think the most I\'ve gotten from it was.. $read. Maybe.

 Respond  
Soulkeeper   -  Aug 07, 2008

/help hash tables

 Respond  
Numuruzero   -  Aug 07, 2008

Well that\'s assuming you\'re not a n00b and actually know what things like hash tables are, and or how to use them..

 Respond  
Soulkeeper   -  Aug 07, 2008

Iunno. I woulda done it with a hash table so it could store more than 1 command.
Just looks a lil underdone to me. :/

 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.