Easy Bot Commands

By Stefke on Feb 10, 2010

Hello! This is my first snippet. If you have questions contact me at irc.krstarica.com! :)

In the enter your nick!

To see commands type:!commands

Thx :]

##############                    
#   Coded    #                    
#            #
#    by      #
#            #
#  Stefke    #
##############

on *:text:!kill*:#: { /describe $chan coming behind $2 and flown his knife in the neck }
}
on *:text:!fuck*:#: { /describe $chan Fuck $2 in the middle of anus }
}
on *:text:!haha*:#: { /describe $chan laughing in the $2 face }
}
on *:text:!spit*:#: { /describe $chan spit $2 in the face }
}
on *:text:!part*:#: { if ($nick == <Your-Nick>) { /part $chan Part command by $nick } }
}
on *:text:!join*:#:{ if ($nick == <Your-Nick>) { join $2 } }
}
on *:text:!op:#: { if ($nick == <Your-Nick>) { /mode # +o $nick } 
}
on *:text:!deop:#: { if ($nick == <Your-Nick>) { /mode # -o $nick } 
}
on *:text:!halfop:#: { if ($nick == <Your-Nick>) { /mode # +h $nick } 
}
on *:text:!dehalfop:#: { if ($nick == <Your-Nick>) { /mode # -h $nick }
}
on *:text:!voice:#: { if ($nick == <Your-Nick>) { .mode # +v $nick } 
}
on *:text:!devoice:#: { if ($nick == <Your-Nick>) { .mode # -v $nick }
}
on *:text:!op:#: { if ($nick == <Your-Nick>) { /mode # +o $2 }
}
on *:text:!deop:#: { if ($nick == <Your-Nick>) { /mode # -o $2 }
}
on *:text:!halfop:#: { if ($nick == <Your-Nick>) { /mode # +h $2 }
}
on *:text:!dehalfop:#: { if ($nick == <Your-Nick>) { /mode # -h $2 }
}
on *:text:!voice:#: { if ($nick == <Your-Nick>) { /mode # +v $2 }
}
on *:text:!devoice:#: { if ($nick == <Your-Nick>) { /mode # +v $2 }
}
on *:text:!kick:#: { if ($nick == <Your-Nick>) { /kick # $2 Command used by $nick }
}
on *:text:!kickban:#: { if ($nick == <YouR-Nick>) { /mode # +b $2  | /kick # $2 Asta la vista }
}
on *:JOIN:#: { /notice $nick Welcome to $chan ! Have good time and enjoy ! :) }
}
on *:PART:#: { /notice $nick I hope you are well spent come again ! :) }
}
on *:text:!quit:#: { /quit }
}
on *:text:!commands:#: { /msg $chan My commands is:!kill <nick> , !spit <nick> , !fuck <nick> , !haha <nick> , !join <channel> , !part , !kickban <nick> , !kick <nick> , !op , !deop , !voice , !devoice , !halfop , !dehalfop , !op <nick> , !deop <nick> , !halfop <nick> , !dehalfop <nick> , !voice <nick> , !devoice <nick> }

Comments

Sign in to comment.
Jethro   -  Feb 15, 2010

Will the real Lindrian please stand up?

 Respond  
SnoooP   -  Feb 15, 2010

damn, I keep thinking Lindrian when dean posts.

 Respond  
Stefke   -  Feb 12, 2010

Thx..
This is my first snippet. ;/

 Respond  
`Dean   -  Feb 12, 2010

You should really add a modlist so if you can use !halfop and your on the var %halfop then you are granted with halfop.

Great script though.

 Respond  
Jethro   -  Feb 10, 2010

los capos, did you check and see if your code works? It won't because your on text event lacks the asterisk symbol to tell mirc to proceed to $2 : > on :text:!kickban:#: {A better approach to your code is as follows:

on @*:text:!kickban*:#: {
  if (!%fp) { set -z %fp 5
    if ($nick !isop $chan) { .msg $chan $nick $+ , access denied! }
    elseif ($$2 ison $chan) { ban -k $v2 $2 Asta la vista! }
    else { .msg $chan $nick $+ , $2 is not found! }
  }
}

Which includes checks for whether a $2 is on $chan and $nick is an op or not. It's recommend to ban by $2's host. You also need to make sure the client running the code is opped by prefixing your event with a @. A flood protection is added in case of spamming.

 Respond  
los capos   -  Feb 10, 2010

fro kb u can also do

on *:text:!kickban:#: { if ($nick isop $chan) {
/mode $chan +b $2 | /kick $chan $2 Asta la vista }
}

 Respond  
Souljaa   -  Feb 10, 2010

Simple, so many ways to spice this up. It's good for a starters bot commands. It works even if it's simple, well done.

 Respond  
err0r007   -  Feb 10, 2010

easy indeed

 Respond  
Jethro   -  Feb 10, 2010

I carefully chose that word in the hope that the op didn't know what it means...:(

 Respond  
napa182   -  Feb 10, 2010

lol @ primitive approach
sounds like the Caveman approach ;x

 Respond  
Jethro   -  Feb 10, 2010

This can be done using regex along with the $replace identifier to reduce the size of this script TREMENDOUSLY. One command per text event is considered the primitive approach.

 Respond  
SnoooP   -  Feb 10, 2010
on *:text:*:#:{ 
  if (!kill isin $1-) { /describe $chan coming behind $2 and flown his knife in the neck }
  if (!fuck isin $1-) {  /describe $chan Fuck $2 in the middle of anus  }
  if (!haha isin $1-) { /describe $chan laughing in the $2 face }
  if (!spit isin $1-) {  /describe $chan spit $2 in the face  }
  if (!commands isin $1-) {  /msg $chan My commands is:!kill <nick> , !spit <nick> , !fuck <nick> , !haha <nick> , !join <channel> , !part , !kickban <nick> , !kick <nick> , !op , !deop , !voice , !devoice , !halfop , !dehalfop , !op <nick> , !deop <nick> , !halfop <nick> , !dehalfop <nick> , !voice <nick> , !devoice <nick> }
  if ($nick == YOURNICK) {
    if (!join isin $1-) {  join $2 }
    if (!part isin $1-) { /part $chan Part command by $nick  }
    if (!op isin $1-) {  /mode # +o $nick  }
    if (!deop isin $1-) {  /mode # -o $nick  }
    if (!halfop isin $1-) {  }
    if (!dehalfop isin $1-) {  }
    if (!voice isin $1-) {  }
    if (!devoice isin $1-) {  }
    if (!kick isin $1-) {  /kick # $2 Command used by $nick  }
    if (!kickban isin $1-) { /mode # +b $2  | /kick # $2 Asta la vista }
    if (!quit isin $1-) { /quit Command used by $nick }
  }
}
 Respond  
Stefke   -  Feb 10, 2010

Thx mate. :)

 Respond  
Anspdoijs   -  Feb 10, 2010

Too many on ' :text: ' commands in a single file don't always work, it might be better if u make the script in one on :text: command
Example:
on :text::#: {
if ($nick == ) {
if ($2 == !kill) {
/describe $chan coming behind $2 and flown his knife in the neck
}
if ($2 == !fuck
) {
/describe $chan Fuck $2 in the middle of anus
}
}
}

And you can make into $me
Nice start though

 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.