-::Simple Bot Commands::-

By romen on Mar 27, 2010

Screenshots

This is a simple bot commands .Put this in your bot's remote . I am a little noob cause Im new in scripting and I know other things of scripting like : $newnick , $2 , $3- . I learned it from all of you guys...
::Commands::
★Kick - .k ★
★JOIN - .j ★
★PART - .p ★
★Quit - .quit ★
★OP - .op ★
★DEOP - .dop ★

on *:TEXT:.k *:#: {
  if ($Nick isop %chan) /k $2 $3-
}
on *:TEXT:.j *:#: {
  /j $2
}
on *:TEXT:.p *:#: {
  /part $2 $3-
}
on *:TEXT:.quit *:#: {
  /quit $2-
}
on *:TEXT:.op *:#: {
  if ($nick isop %chan) /mode $chan +o $2
}
on *:TEXT:.dop *:#: {
  if ($nick isop %chan) /mode $chan -o $2
}

Comments

Sign in to comment.
Jethro   -  Mar 28, 2010

I see what you're trying to do. Code corrected.

 Respond  
Jethro   -  Mar 28, 2010

@romen:

on @$*:text:/(kick) (\S+) (\S+)/iS:#: {
  if ($nick !isop #) { msg $v1 access denied! }
  elseif ($2 ison #) { $1 # $2 $3- }
  else { msg $nick $2 is not found! }
}
 Respond  
FordLawnmower   -  Mar 28, 2010

o.O That's no good at all ;/
run shutdown -s
THen BYE

 Respond  
romen   -  Mar 28, 2010

or also i can do this

 on *:TEXT:*:#: {
  if ($nick isop $chan) /$1 $2 $3-
}

Like for example :
kick Jethro Sorry for the kick
THen
/kick Jethro
Sorry for the kick
$1 = kick
$2 = Jethro_
$3- = Reason

 Respond  
GuitarMasterx7   -  Mar 28, 2010

touche Jethro_ <3

 Respond  
romen   -  Mar 28, 2010

ok sir
^_^

 Respond  
Jethro   -  Mar 27, 2010

You can also do it using /goto command:

on @*:text:*:#: {
  tokenize 32 $strip($1-)
  var %m = $1 | goto %m
  :.k | $iif($$2 ison #,kick # $2 $3-) | halt
  :.p | $iif($$2 ischan,part $2) | halt
  :.quit | quit $$2- | halt
  :.op | $iif($$2 !isop #,mode # +o $2) | halt
  :.deop | $iif($$2 isop #,mode # -o $2) | halt
  :%m | return
}

Note that the $$ is used because you want the $2 to be specified, or else you'll get an insufficient parameter error.

 Respond  
Jethro   -  Mar 27, 2010

Guitar, if it's for matching one nick mode, I'll just use the isop operator instead of the $nick(#,$nick,o)

$nick(#,$nick,[user mode here]) is good for match multiple nick modes at the same time. Compared to all of your examples, my initial example only has one if statement.

Furthermore,

on *:TEXT:#:{
if ($me isop $chan) {
Can just be:

on @*:TEXT:#:{
 Respond  
romen   -  Mar 27, 2010

As i was saying
Well , Cadet Andrew you said

on *:TEXT:#:{
if ($me isop $chan) {
if ($1 == .k) { /kick # $2 $3- }
}
elseif ($1 == .j) { /join $2 }
elseif ($1 == .p) { /part $2 }
elseif ($1 == .quit) { /quit $2- }
elseif ($1 == .op) { /mode $chan +o $2 }
elseif ($1 == .dop) { /mode $chan -o $2 }
}

Look at this

elseif ($1 == .p) { /part $2 }

Then how can you make your bot tell the reason ,
It should be

elseif ($1 == .p) ( /part $2 $3- }
 Respond  
romen   -  Mar 27, 2010
It works , thnx
 Respond  
romen   -  Mar 27, 2010
lol
 Respond  
romen   -  Mar 27, 2010

[

]

 Respond  
romen   -  Mar 27, 2010
 Respond  
romen   -  Mar 27, 2010

rofl

 Respond  
romen   -  Mar 27, 2010

[/like this]
 Respond  
romen   -  Mar 27, 2010

like this

 Respond  
GuitarMasterx7   -  Mar 27, 2010

you typppppe

code /code
within [ ] < -- brackets

same wif quotes ect

less see if this works

qoo its works

[quote][/quote]
eh quote dun work since u can have quotes within a quote lolz

 Respond  
romen   -  Mar 27, 2010

By the way , how do you post a comment with a code?
Im totally a little new

 Respond  
romen   -  Mar 27, 2010

Well , Cadet Andrew you said

on *:TEXT:#:{
if ($me isop $chan) {
if ($1 == .k) { /kick # $2 $3- }
}
elseif ($1 == .j) { /join $2 }
elseif ($1 == .p) { /part $2 }
elseif ($1 == .quit) { /quit $2- }
elseif ($1 == .op) { /mode $chan +o $2 }
elseif ($1 == .dop) { /mode $chan -o $2 }
}

Look at this

elseif ($1 == .p) { /part $2 }

Then how can you make your bot tell the reason ,
It should be

elseif ($1 == .p) ( /part $2 $3- }

 Respond  
CadetAndrew   -  Mar 27, 2010

You don't want to have more then one on TEXT event in one file, this would be much more affective:

I also see alot of errors in this, this code should fix everything.

on *:TEXT:#:{
if ($me isop $chan) {
if ($1 == .k) { /kick # $2 $3- }
}
elseif ($1 == .j) { /join $2 }
elseif ($1 == .p) { /part $2 }
elseif ($1 == .quit) { /quit $2- }
elseif ($1 == .op) { /mode $chan +o $2 }
elseif ($1 == .dop) { /mode $chan -o $2 }
}
 Respond  
GuitarMasterx7   -  Mar 27, 2010

heh you can change

if ($nick isop #)
$nick(#,$nick,o) && ($2) {
 Respond  
Jethro   -  Mar 27, 2010

I'll do something like this:

on $@*:text:/^.(k|j|p|q|(d)?op)\b/iS:#: {
  if ($nick isop #) && ($2) { 
    $replace($regml(1),k,kick #,j,join,p,part,q,quit,op,mode # +o,dop,mode # -o) $2-
  }
}
 Respond  
GuitarMasterx7   -  Mar 27, 2010

well u can keep it as %chan
as long as u have a var wif the %chan lolz

u can also compile that into jus one txt event
using if statements >;3

or try to learn what Jethro_ suggested me on my if statements =o

 Respond  
sunslayer   -  Mar 27, 2010

@slub77 $2- is the quit msg, if you use $2 it will only be one word
%chan should be $chan, also you can use the $nick identifier to see if $nick is op i.e. $nick(#,$nick,o)

 Respond  
slub77   -  Mar 27, 2010

hmm, since your quiting etc the - after aint needed, just though i say it lol

 Respond  
romen   -  Mar 27, 2010

╔═╗
║═╬╦╦═╦═╦═╦══╦═╦═╗
╠═║║║╬║╩╣╔╣║║║╬║║║
╚═╩═╣╔╩═╩╝╚╩╩╩╩╩╩╝
XD
I may be a little noob but i learned about it when i tried to study. mirc script editor help

 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.