Bot Commands

By Kimahri on Nov 10, 2007

A little thing i decided to do when i was bored :|
just remember to set the %owner Variable
First Script -

on *:text:*+v *:*:{
  if ($nick == %owner) { mode $chan +v $2 }
  if ($nick != %owner) { Notice $nick You can't tell me what to do, Fool. }
}
on *:text:*-v *:*:{
  if ($nick == %owner) { mode $chan -v $2 }
  if ($nick != %owner) { Notice $nick You can't tell me what to do, Fool. }
}
on *:text:*+h *:*:{
  if ($nick == %owner) { mode $chan +h $2 }
  if ($nick != %owner) { Notice $nick You can't tell me what to do, Fool. }
}
on *:text:*-h *:*:{
  if ($nick == %owner) { mode $chan -h $2 }
  if ($nick != %owner) { Notice $nick You can't tell me what to do, Fool. }
}
on *:text:*+o *:*:{
  if ($nick == %owner) { mode $chan +o $2 }
  if ($nick != %owner) { Notice $nick You can't tell me what to do, Fool. }
}
on *:text:*-o *:*:{
  if ($nick == %owner) { mode $chan -v $2 }
  if ($nick != %owner) { Notice $nick You can't tell me what to do, Fool. }
}
on *:text:*+a *:*:{
  if ($nick == %owner) { mode $chan +a $2 }
  if ($nick != %owner) { Notice $nick You can't tell me what to do, Fool. }
}
on *:text:*-a *:*:{
  if ($nick == %owner) { mode $chan -a $2 }
  if ($nick != %owner) { Notice $nick You can't tell me what to do, Fool. }
}
on *:text:*+q *:*:{
  if ($nick == %owner) { mode $chan +q $2 }
  if ($nick != %owner) { Notice $nick You can't tell me what to do, Fool. }
}
on *:text:*-q *:*:{
  if ($nick == %owner) { mode $chan -q $2 }
  if ($nick != %owner) { Notice $nick You can't tell me what to do, Fool. }
}

Comments

Sign in to comment.
guest598594   -  Nov 29, 2008

You could have just done this and saved some time (I haven't tested it myself yet, but I'm pretty sure it should work) :

on :input::{
if ( $1 == +v ) { mode $chan +v $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == -v ) { mode $chan -v $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == +h ) { mode $chan +h $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == -h ) { mode $chan -h $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == +o ) { mode $chan +o $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == -o ) { mode $chan -o $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == +a ) { mode $chan +a $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == -a ) { mode $chan -a $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == +q ) { mode $chan +q $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == -q ) { mode $chan -q $2 } $msg $chan $2 You can't tell me what to do, Fool.
}
Or simply:

on *:input:#:{
  if ($regex($1,/^[+-][vhoaq]$/)) {
    mode $chan $1-2
    msg $chan You can't tell me what to do, Fool.
  }
}
 Respond  
idunnokai   -  Nov 29, 2008

You could have just done this and saved some time (I haven't tested it myself yet, but I'm pretty sure it should work) :

on :input::{
if ( $1 == +v ) { mode $chan +v $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == -v ) { mode $chan -v $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == +h ) { mode $chan +h $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == -h ) { mode $chan -h $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == +o ) { mode $chan +o $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == -o ) { mode $chan -o $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == +a ) { mode $chan +a $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == -a ) { mode $chan -a $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == +q ) { mode $chan +q $2 } $msg $chan $2 You can't tell me what to do, Fool.
if ( $1 == -q ) { mode $chan -q $2 } $msg $chan $2 You can't tell me what to do, Fool.
}

 Respond  
fire_wizard1   -  Nov 28, 2008

ok i dont see the point in having the text, sry if i sounded mean, im jw

 Respond  
guest598594   -  Nov 12, 2007

anti, that code u put is pointless

1) why would u set urself as %owner, when u can just check $me
2) if u do set urself as owner, u cant trigger ur own on text\'s
3) u put $owner, not %owner
4) u forgot the msg $chan in the You dont have...

 Respond  
guest598594   -  Nov 12, 2007

great job for ur first script, but do

on @*:text:*-v*:#:{

(checks if ur op)

also, rather than if ($nick != %owner), u can do else msg $chan blah blah blah

but the script is fine as it is, and its ur first script, so keep up the good work :)

 Respond  
Anti   -  Nov 12, 2007

Okay where is this %owner it wont work and mr_e dont make it to hard just like..

on *:START: { set $me $owner }
on ^*:TEXT:*+v*:#: { if $nick == %owner } goto ownerV
elseif {
You dont have Proper Access :P
:ownerV
.mode $chan +v $2-
}
 Respond  
Mr_E   -  Nov 11, 2007

Another idea would be just set yourself as bot owner under users and use , for example, on owner:text:!+v*:#:{ /mode # +v $2 }. Though as TopNut said this is merely a suggestion, everyone has their own way of scripting and kudos on your first script, you will get better as time progresses. Keep it up!

 Respond  
Kimahri   -  Nov 11, 2007

Thanks. :]

 Respond  
TropNul   -  Nov 11, 2007

This code can be optimized greatly. But as it is your first code, I won\'t tell you that it\'s badly coded. The note would then be \'Can Improve\'.

Here is another method of doing it:

On $@:Text:/^(([+-][vhoaq])\s(\S{2,}))/S::{
If ($nick == %owner) { MODE # $regml(2) $regml(3) }
Else { Notice $nick You can\'t tell me what to do, Fool. }
}

 Respond  
Xemnas   -  Nov 11, 2007

Fail fail fail Dammit Callum. >:\

 Respond  
Kimahri   -  Nov 10, 2007

Hope ya like it :]

 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.