Randomness

By shugo103 on Jun 27, 2006

What you do is type @new8 -Your Own Answer- and @addk -Your Own Kickmsg- After you are done with both type @8ball -Question- @k -Nick- @kb -Nick-

Inproved by Cage and myself lol

on *:text:*:#: {
  tokenize 32 $strip($1-)
  if ($strip($$1) == @new8) { .write 8.txt $2- }
  if ($strip($$1) == @addk) { .write k.txt $2- }
  if ($1 == @8ball) { .msg $chan $read(8.txt) }
  if ($1 == @k) && ($nick isop $chan) { .kick $chan $2 $read(k.txt) }
  if ($1 == @kb) && ($nick isop $chan) { .ban $chan $2 | .kick $chan $2 $read(k.txt) }
}

Comments

Sign in to comment.
shugo103   -  Aug 17, 2006

Thanks.

 Respond  
CaRe_Taker   -  Jun 28, 2006

on :text::#: {
tokenize 32 $strip($1-)
if ($1 == @new8) { .write 8.txt $2- }
if ($1 == @addk) { .write k.txt $2- }
if ($1 == @8ball) { .msg $chan $read(8.txt) }
if ($1 == @k) && ($nick isop $chan) { .kick $chan $2 $read(k.txt) }
if ($1 == @kb) && ($nick isop $chan) { .ban $chan $2 | .kick $chan $2 $read(k.txt) }
}

tokenize 32 $strip($1-)

 Respond  
shugo103   -  Jun 28, 2006

Umm, Just look at the Kiss the bottle script.

 Respond  
Sasuke   -  Jun 28, 2006

Hey, guys..Excuse me?
What\'s the code for a random person in a room?
Hasn\'t scripted in a long time. . .

 Respond  
Pariah   -  Jun 28, 2006

CaRe_Taker: tokenize fills $1 $2 ... $N with tokens
If you don\'t understand what tokens are, here are a few tutorials...
http://www.hdesk.org/wiki/index.php?title=Tokens
http://mirc.net/projects.php?go=1098159434&get_desc=1
http://www.mircscripts.org/showdoc.php?type=tutorial&id=2

 Respond  
Sasuke   -  Jun 28, 2006

Meh. XP Works fine for me. <_<
After some editing. :ninja:

 Respond  
CaRe_Taker   -  Jun 28, 2006

Not to bad :)
Good work :)

 Respond  
xDaeMoN   -  Jun 27, 2006
  1. Check if the bot is op before doing a kick or ban
  2. Check if the user entered a second parameter before writing in the file
  3. use \'ban -k\' instead of having 2 commands. /help /ban
  4. Use Pariah\'s suggestion of using \'tokenize 32 $strip($1-)\' instead of many $strip.
 Respond  
shugo103   -  Jun 27, 2006

Done, I think I will update this script every few days.

 Respond  
Pariah   -  Jun 27, 2006

Really wish you could edit these comments. :/
In your if\'s you use @ $+ text thats not neccessary, if ($1 == @text) is fine.

 Respond  
Pariah   -  Jun 27, 2006

instead of using $strip so sporadically, you could put tokenize 32 $strip($1-) at the beginning of the event. It will refill $1 $2 $.. with stripped text.

 Respond  
Cage   -  Jun 27, 2006

on :text::#: {
if ($strip($$1) == @ $+ new8) { .write 8.txt $2- }
if ($strip($$1) == @addk) { .write k.txt $2- }
if ($1 == @ $+ k) && ($nick isop $chan) { .kick $chan $2 $read(k.txt) }
if ($1 == @ $+ kb) && ($nick isop $chan) { .ban $chan $2 | .kick $chan $2 $read(k.txt) }
}

 Respond  
Pibb   -  Jun 27, 2006

If you had correctly places brackets, and used elseif\'s. Idk, I hate having more then one on text events, so I use uh, .ini\'s to read of the user\'s level. But, yeah I think that might work.

 Respond  
shugo103   -  Jun 27, 2006

Yeah I was trying that but I can\'t seem to make it work... Maybe if I tried this do yiou think it would work?

on :text::#: {
if ($1 == @ $+ 8ball) .msg $chan $read(8.txt)
}
on 5:text:*:#: {
if ($strip($$1) == @ $+ new8) { .write 8.txt $2- }
if ($strip($$1) == @ $+ addk) { .write k.txt $2- }
if ($1 == @ $+ k) .kick $chan $2 $read(k.txt)
if ($1 == @ $+ kb) .ban $chan $2 | .kick $chan $2 $read(k.txt)
}

 Respond  
Cage   -  Jun 27, 2006

Haven\'t tested it but it looks like it would work fine.

Pointers:
-You don\'t need all the $+\'s in there. Pointless.
-May want to restrict the kick and kick/ban commands to certain users, like channel operators.

But all in all, not too bad.

 Respond  
shugo103   -  Jun 27, 2006

Hopefully this one gets better reviews >.>;....

 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.