A1 BOT ~UrZBot 2.0~

By UrZTruly on Jun 18, 2010

This is a bot script Ive been working on . Type .Commands to see what commands are .

  • Where ** is put your bots password !

-Where n1 2 3 4 and 5 on (nick) put the Alternative names for your bot .
< EX. <~UrZTruly> .n2

  • R_2D2 is now known as Bot_HeaD > See on:#:TeXt:.n2 the nick I put was Bot_head So the bot Changed his nick .

-To use commands Right click on your nick With your bot and Make u owner .

Think you for using my bot , I am In progress of 3.0 . Also For whom Thas has helped me on this project I think you too ! :D Please rate !
Help list : Prefix , Ghost_Writer !
Edited 6/19/10 .... Think for the help ! :P

menu nicklist {
  Auth User:
  Set user
  .Bot Botserv $1:/guser 50 $1
  Set Admin
  .Bot Admin $1:/guser 100 $1
  Set owner
  .Bot owner $1:/guser 200 $1

}

menu channel {

  Control Channel Modes

  .Set Mod Bot Owner: { set %mbotowner $?="Bot owner ?" | echo -a The bot Owner is %mbotowner }

}

;Bot user , Admin , owner !

on 50:TEXT:.bsay *:#: { botserv say $2 $3- }

on 100:TEXT:.commands:#: { notice $nick .bsay , .hop , .id , .invite , .gkick , .BInfo , .Fuckoff , .N- 1 2 3 4 , .ban , GetYourAssHere , .update , .v , .dv , .owner , .k , .lilop , .out , .j , .add  !!!. }

on 100:JOIN:#: { msg $chan 2,14 $nick <-*'; <3 ;'*->  UrZBoT 2.0 !!! |  mode $chan +o $nick | halt }

on 200:TEXT:.hop:#: { hop $chan }

on 200:TEXT:.id:#: { ns identify ****** }

on 200:TEXT:.invite *:#: { invite $2 $chan }

on 200:TEXT:.gKick *:#: {  gkick $2 }

on 200*:TEXT:.BInfo:#: { Msg $Chan Hey I am $nick , I am UrZBot . Im Version 2.0 , I was created by UrZTruly . And is currently getting worked on for 3.0 .   }

on 200:TEXT:.Fuckoff:#: { /quit $network }

;Set nick1/nick2/nick3/nick4/nick5 to w/e
on $200:TEXT:[.!@]N(1|2|3|4|5)/Si:#: nick $eval($+(%,nick,$regml(1)),3)

on 200:TEXT:.ban *:#: { cs ban $chan $2- | cs kick $chan $2 }

on 200:TEXT:.k *:#: { cs kick $chan $2- }

on 200:TEXT:.update:#: { ns update }

on 200:TEXT:.say *:#: { msg $2 $3- }

on 200:TEXT:.low:#: { cs dehalfop $chan $me | cs deop $chan $me | cs deprotect $chan $me | cs deowner $chan $me }

on 200:TEXT:.high:#: { cs halfop $chan $me | cs op $chan $me | cs protect $chan $me | cs owner $chan $me }

on 200:TEXT:.v *:#: { mode #chan +v $2 }

on 200:TEXT:.dv *:#: { mode #chan -v $2 }

on 200:TEXT:.owner *:#: { mode # +q $2 }

on 200:TEXT:.lilop *:#: { mode # +h $2 }

on 200:TEXT:.Out:#: { part $chan }

on 200:TEXT:.j *:#: { join $2- }

on 200:TEXT:.add*:#: { cs access $chan add $2- }

Comments

Sign in to comment.
UrZTruly   -  Jul 01, 2010

LOL Thinks Prefix !!!

 Respond  
Epik-Fail   -  Jul 01, 2010

Nice script, I know who you got it from :P

 Respond  
Bielie   -  Jun 23, 2010

Lol isnt cs access a function with servers that have botserv only?

He used a lot of cs commands

 Respond  
WorldDMT   -  Jun 20, 2010

Jethro_ yes i see but it's just once at startup so it does not disturb too much
but of course you're right you had to use a limit order not too abused :D

 Respond  
Jethro   -  Jun 20, 2010

WorldDMT. That is a nice approach using a hash table. But by using the -m switch, you make it limitless...I believe the default limit is 100 slots. It's kind of a waste to use a hash table that big for as few commands as these. You should use

if !$hget(bot_cmd) { hmake bot_cmd 20 } 

Then just use

hadd bot_cmd item data

upon starting and loading the data instead. 10 or 20 slots is more than enough.

 Respond  
WorldDMT   -  Jun 20, 2010

why not use hash tables?
i think it's faster and shorter

alias -l cmd {
  return bininfo|low|high|say|hop|id|invite|gkick|bininfo|!@#$|$&
  $+ ban|GetYourAssHere|update|v|dv|owner|k|lilop|out|j|add|owner|out|add
}
alias bot_data {
  hadd -m bot_cmd .hop hop #
  hadd -m bot_cmd .id ns identify ******
  hadd -m bot_cmd .invite invite $$!2 #
  hadd -m bot_cmd .gkick gkick $$!2
  hadd -m bot_cmd .bininfo msg # Hey I'm $!nick $+ , and I'm UrZBot. Im Version 2.0; I was created by UrZTruly. It's currently getting worked on for 3.0.
  hadd -m bot_cmd .!@#$ quit
  hadd -m bot_cmd .ban cs ban $$!2 | cs kick # $$!2-
  hadd -m bot_cmd .k cs kick # $$!2-
  hadd -m bot_cmd .update ns update
  hadd -m bot_cmd .say msg # $$!2-
  hadd -m bot_cmd .low cs dehalfop # $!me
  hadd -m bot_cmd .high cs halfop # $!me
  hadd -m bot_cmd .v $!iif($2 ison #,mode # +v $!2)
  hadd -m bot_cmd .dv $!iif($2 ison #,mode # -v $!2)
  hadd -m bot_cmd .owner $!iif($2 ison #,mode # +q $!2)
  hadd -m bot_cmd .lilop $!iif($2 ison #,mode # +h $!2)
  hadd -m bot_cmd .out part $$!2-
  hadd -m bot_cmd .j join $$!2-
  hadd -m bot_cmd .add cs access # add $$!2-
  hadd -m bot_cmd .n1 nick nick1
  hadd -m bot_cmd .n2 nick nick2
  hadd -m bot_cmd .n3 nick nick3
  hadd -m bot_cmd .n4 nick nick4
  hadd -m bot_cmd .n5 nick nick5
}
on *:start:bot_data
on $200:text:$(/^.( $+ $cmd $+ |N(1|2|3|4|5))/iS):#$(,$hget(bot_cmd,$1))
 Respond  
UrZTruly   -  Jun 19, 2010

Well Good Job Jethro Besides u forgot .NC ( Nickchange ) ! but yea if u add that ill post that and add you to the Help list . :D

 Respond  
UrZTruly   -  Jun 19, 2010

Lol .... But Really Thinks Jethro . Ill Test that out ... If it works ill post it And Add you to the help list ! :D

 Respond  
Jethro   -  Jun 19, 2010

Perhaps I'm being too nice. Here is what you can do to consolidate all the text events with level 200 into one:

alias -l cmd {
  return bininfo|low|high|say|hop|id|invite|gkick|bininfo|Fuckoff|$&
    $+ ban|GetYourAssHere|update|v|dv|owner|k|lilop|out|j|add|owner|out|add
}
on 50:text:.bsay & &:#: { botserv say $2 $3- }
on 100:join:#: { msg $chan 2,14 $nick <-*'; <3 ;'*->  UrZBoT 2.0 !!! |  mode $chan +o $nick }
on 100:text:.commands:#: { 
  notice $nick .bsay , .hop , .id , .invite , .gkick , .BInfo , .Fuckoff , .N- 1 2 3 4 , .ban , $&
    GetYourAssHere , .update , .v , .dv , .owner , .k , .lilop , .out , .j , .add  !!!. 
}
on $200:text:$(/^.( $+ $cmd $+ |N(1|2|3|4|5))/iS):#:{
  goto $regml(1)
  :hop | hop # | halt
  :id | ns identify ****** | halt
  :invite | invite $$2 # | halt
  :gkick | gkick $$2 | halt
  :bininfo 
  msg # Hey I'm $nick $+ , and I'm UrZBot. Im Version 2.0; $&
    I was created by UrZTruly. It's currently getting worked on for 3.0. 
  halt
  :fuckoff | quit | halt
  :ban | cs ban # $$2- | cs kick # $$2 | halt
  :k | cs kick $chan $$2- | halt
  :update | ns update | halt
  :say | msg # $$2- | halt
  :low | cs dehalfop # $me | cs deop # $me | cs deprotect # $me | cs deowner # $me | halt
  :high | cs halfop # $me | cs op # $me | cs protect # $me | cs owner # $me | halt
  :v | $iif($2 ison #,mode # +v $2) | halt
  :dv | $iif($2 ison #,mode # -v $2) | halt
  :owner | $iif($2 ison #,mode # +q $2) | halt
  :lilop | $iif($2 ison #,mode # +h $2) | halt
  :out | part # | halt
  :j | join $$2- | halt
  :add | cs access # add $2- | halt
  :n1 | nick nick1 | halt
  :n2 | nick nick2 | halt
  :n3 | nick nick3 | halt
  :n4 | nick nick4 | halt
  :n5 | nick nick5 | halt
}

I may have missed something. But that's because your code is rather disorderly...lol

 Respond  
UrZTruly   -  Jun 19, 2010

I would if I knew how lol .... Im new at this ! ( My very first bot script ! )

 Respond  
napa182   -  Jun 19, 2010

you should really limit all them text events into one.

 Respond  
UrZTruly   -  Jun 19, 2010

Well TY for the help u guys . This was my First bot script I've made , Also Ive only been scripting for 3 weeks now . I will fix those problems right away ! :D

 Respond  
Jethro   -  Jun 18, 2010

sunslayer, don't forget the dollar sign. You don't want it triggered by anything following the number: /^[.!@]n([1-5])$/iS

 Respond  
TheNitelyfe   -  Jun 18, 2010

Yeah, THAT'S the problem.

 Respond  
Ghost-writer   -  Jun 18, 2010

Thanks sunslayer, i havent scripted msl in a while.

 Respond  
sunslayer   -  Jun 18, 2010

your regex can be shortened to

/[.!@]n([1-5])/Si
 Respond  
Ghost-writer   -  Jun 18, 2010

Wow, the codes very repetitive, some of the stuff could be shortend like this

on 200:TEXT:.n:#: { nick (nick) }

on 200:TEXT:.n1:#: { nick (nick) }

on 200:TEXT:.n2:#: { nick (nick) }

on 200:TEXT:.n3:#: { nick (nick) }

on 200:TEXT:.n4:#: { nick (nick) }

on 200:TEXT:.n5:#: { nick (nick) }

Could be turned to somthing like..

;Set nick1/nick2/nick3/nick4/nick5 to w/e 
on $200:TEXT:[.!@]N(1|2|3|4|5)/Si:#: nick $eval($+(%,nick,$regml(1)),3)
 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.