I was going through some old files the other night and found a bank script i made from when i started scripting
mIRC. I decided to post it on hawkee since i have no use for it once so ever. When i was looking through this script there was some very advanced code snippets randomly post in the middle of functions and i THINK i removed all of it. Other than that this bot should work how it should :D. This is a bad scripting technique(i know) but i quit mIRC scripting and dont know how to make this code better.. If anyone wants to fix this up a bit and PM it to me id be more than happy to update this.
This bot was entirely made from scratch other than a few problems i ran into.
For the bot commands type /notice [BOTNAME] cmds and it should send you the command list :)
I didnt put much effort into this topic, sorry.
on !*:PART:#: {
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini airsoftbot.ini $nick logged OUT
}
}
on !*:NICK:#: {
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini airsoftbot.ini $nick logged OUT | notice $nick You have changed your nick you have been logged out.
}
}
on !*:QUIT:#: {
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini airsoftbot.ini $nick logged OUT
}
}
on *:NOTICE:logout*:?: {
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are already logged out D!
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini airsoftbot.ini $nick logged OUT | notice $nick You are logged out.
}
}
on *:NOTICE:Changepass*:?: {
if ($readini(airsoftbot.ini,$nick,Banned) == 1) {
msg $chan $nick you are banned from useing airsoftbot! Reason $readini(airsoftbot.ini,$nick,BannedBy)
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You must be logged in to use this command.
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini airsoftbot.ini $nick password $2 | notice $nick You changed your password to $readini(airsoftbot.ini,$nick,password) remember it!
}
}
on *:NOTICE:cmds*:?: {
if ($readini(airsoftbot.ini,$nick,CMDLEVEL) == 1) {
notice $nick User cmds: !mystats !statsof !settext !setstats !setzone !deposit !gc !wire
}
if ($readini(airsoftbot.ini,$nick,CMDLEVEL) == 2) {
notice $nick 2User cmds: !mystats !statsof !settext !setstats !setzone !deposit !gc !wire.
notice $nick 3Admin cmds: @setzone @ban @unban @setstatus @addnoob @delnoob @sethand @setbank
}
if ($readini(airsoftbot.ini,$nick,CMDLEVEL) == 3) {
notice $nick 2User cmds: !mystats !statsof !settext !setstats !setzone !deposit !gc !wire.
notice $nick 3Admin cmds: @setzone @ban @unban @setstatus @addnoob @delnoob @sethand @setbank
notice $nick 4Owner cmds: @setadmin @deladmin @delacc @setowner @reload @hop @raw @say @setvar @unsetvar @join @part @addacc
}
}
on *:NOTICE:DELACC*:?: {
if ($readini(airsoftbot.ini,$nick,Banned) == 1) {
msg $chan $nick you are banned from useing airsoftbot! Reason $readini(airsoftbot.ini,$nick,BannedBy)
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You must be logged in to use this command.
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
remini airsoftbot.ini $nick | notice $nick You have 100% deleted your account.
}
}
on *:NOTICE:register*:?: {
if ($readini(airsoftbot.ini,$nick,password) != $null) {
msg $nick Error! Account already exists!
halt
}
if (!$2) {
msg $nick Please specify a password!
halt
}
writeini airsoftbot.ini $nick password $2
writeini airsoftbot.ini $nick username $nick
writeini airsoftbot.ini $nick logged IN
writeini airsoftbot.ini $nick BankCash 5000
writeini airsoftbot.ini $nick HandCash 500
writeini airsoftbot.ini $nick Message Changeme with !settext
writeini airsoftbot.ini $nick Banned 0
writeini airsoftbot.ini $nick Status Changeme with !setstatus
writeini airsoftbot.ini $nick Noob Is not a noob.
writeini airsoftbot.ini $nick TimeZone Changeme with !setzone
writeini airsoftbot.ini $nick Admin $nick is not one of my admins
writeini airsoftbot.ini $nick Owner $nick is not one of my owners
writeini airsoftbot.ini $nick CMDLEVEL 1
notice $nick You have successfully registered! Welcome to the megadome biatch!
notice $nick Your password is $readini(airsoftbot.ini,$nick,password) - remember this for later use.
}
on *:NOTICE:identify*:?: {
if ($readini(airsoftbot.ini,$nick,Banned) == 1) {
msg $chan $nick you are banned from useing airsoftbot! Reason $readini(airsoftbot.ini,$nick,BannedBy)
halt
}
if ($readini(airsoftbot.ini,$nick,password) == $null) {
notice $nick You have not yet registered, please use notice airsoftbot register (password)
halt
}
if (!$2) {
notice $nick Please enter a password.
halt
}
if ($readini(airsoftbot.ini,$nick,password) != $2) {
notice $nick You have entered an invalid password.
halt
}
notice $nick Successfully logged in as $nick $+ .
writeini airsoftbot.ini $nick logged IN
}
;;;;;;usercmds;;;;;;;
on *:TEXT:!mystats*:#: { ;*:TEXT:!status*:#:
if ($readini(airsoftbot.ini,$nick,Banned) == 1) {
msg $chan $nick you are banned from useing airsoftbot! Reason $readini(airsoftbot.ini,$nick,BannedBy)
halt
}
if ($readini(airsoftbot.ini,$nick,password) == $null) {
notice $nick There is no user matching $nick $+ ... notice airsoftbot register (password)
halt
}
msg $chan 7.. $nick $+ 's Stats ..
msg $chan 11Hand Cash » $readini(airsoftbot.ini,$nick,HandCash)
msg $chan 6Bank Cash » $readini(airsoftbot.ini,$nick,BankCash)
msg $chan 3Personal Text » $readini(airsoftbot.ini,$nick,Message)
msg $chan 2Status » $readini(airsoftbot.ini,$nick,Status)
msg $chan 12TimeZone » $readini(airsoftbot.ini,$nick,TimeZone) GMT
msg $chan 2Noob » $readini(airsoftbot.ini,$nick,Noob)
msg $chan 5Admin » $readini(airsoftbot.ini,$nick,Admin)
msg $chan 5Owner » $readini(airsoftbot.ini,$nick,Owner)
msg $chan 13.. End Of $nick $+ 's Stats ..
}
on *:TEXT:!statsof*:#: {
if ($readini(airsoftbot.ini,$nick,Banned) == 1) {
msg $chan $nick you are banned from useing airsoftbot! Reason $readini(airsoftbot.ini,$nick,BannedBy)
halt
}
if ($2 == $null) {
msg $chan 4USSAGE !statsof (nick) halt
}
if ($readini(airsoftbot.ini,$2,password) == $null) {
notice $nick There is no user matching $2 $+ ...
halt
}
msg $chan 7.. $2 $+ 's Stats ..
msg $chan 11Hand Cash » $readini(airsoftbot.ini,$2,HandCash)
msg $chan 6Bank Cash » $readini(airsoftbot.ini,$2,BankCash)
msg $chan 3Personal Text » $readini(airsoftbot.ini,$2,Message)
msg $chan 2Status » $readini(airsoftbot.ini,$2,Status)
msg $chan 12TimeZone » $readini(airsoftbot.ini,$2,TimeZone) GMT
msg $chan 5Admin » $readini(airsoftbot.ini,$2,Admin)
msg $chan 5Owner » $readini(airsoftbot.ini,$2,Owner)
msg $chan 13.. End Of $2 $+ 's Stats ..
}
on *:TEXT:!settext*:#: {
if ($readini(airsoftbot.ini,$nick,Banned) == 1) {
msg $chan $nick you are banned from useing airsoftbot! Reason $readini(airsoftbot.ini,$nick,BannedBy)
halt
}
if ($2 == $null) {
msg $chan 4USSAGE !settext (text) | halt
}
if ($readini(airsoftbot.ini,$nick,password) == $null) {
notice $nick you are not registered. /notice airsoftbot register (password)
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! /notice airsoftbot identify (password) | halt
}
if ($chr(36) isin $2-) {
msg $chan 4ERROR You may not have $ in your text. Further abuse will result to a ban from the channel! | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $nick Message $2- | msg $chan 9SUCCESS $nick $+ , You have successfully set you Personal Text to $2- $+ .
}
}
on *:TEXT:!setstatus*:#: {
if ($readini(airsoftbot.ini,$nick,Banned) == 1) {
msg $chan $nick you are banned from useing airsoftbot! Reason $readini(airsoftbot.ini,$nick,BannedBy)
halt
}
if ($2 == $null) {
msg $chan 4USSAGE !setstatus (text) | halt
}
if ($readini(airsoftbot.ini,$nick,password) == $null) {
notice $nick you are not registered. notice airsoftbot register (password)
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($chr(36) isin $2-) {
msg $chan 4ERROR You may not have $ in your status. Further abuse will result to a ban from the channel! | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $nick Status $2- | msg $chan 9SUCCESS $nick $+ , You have successfully set you Status to $2- $+ .
}
}
on *:TEXT:!SetZone*:#: {
if ($readini(airsoftbot.ini,$nick,Banned) == 1) {
msg $chan $nick you are banned from useing airsoftbot! Reason $readini(airsoftbot.ini,$nick,BannedBy)
halt
}
if ($2 == $null) {
msg $chan 4USSAGE !setzone (zone) | halt
}
if ($readini(airsoftbot.ini,$nick,password) == $null) {
notice $nick you are not registered. notice airsoftbot register (password)
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($chr(36) isin $2-) {
msg $chan 4ERROR You may not have $ in your Zone. Further abuse will result to a ban from the channel! | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $nick TimeZone $2 | msg $chan 9SUCCESS $nick $+ , You have successfully set you Status to $2 $+ .
}
}
on *:TEXT:!deposit*:#: {
if ($readini(airsoftbot.ini,$nick,Banned) == 1) {
msg $chan $nick you are banned from useing airsoftbot! Reason $readini(airsoftbot.ini,$nick,BannedBy)
halt
}
if ($2 == $null) {
msg $chan 4USSAGE !deposit (amount) | halt
}
if ($readini(airsoftbot.ini,$nick,password) == $null) {
notice $nick you are not registered. notice airsoftbot register (password)
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($readini(airsoftbot.ini,$nick,HandCash) = $2) {
msg $chan 4ERROR You dont have $2 in your pocket!! | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $nick HandCash $calc($readini(airsoftbot.ini,$nick,HandCash) - $2) | writeini -n airsoftbot.ini $nick BankCash $calc($readini(airsoftbot.ini,$nick,BankCash) + $2) | msg $chan 9SUCCESS $nick $+ , You have successfully deposited $2 $+ .
}
}
on *:TEXT:!gc*:#: {
if ($readini(airsoftbot.ini,$nick,Banned) == 1) {
msg $chan $nick you are banned from useing airsoftbot! Reason $readini(airsoftbot.ini,$nick,BannedBy)
halt
}
if ($2 == $null) {
msg $chan 4USSAGE !gc (user) (amount) | halt
}
if ($readini(airsoftbot.ini,$nick,password) == $null) {
notice $nick you are not registered. notice airsoftbot register (password)
halt
}
if ($readini(airsoftbot.ini,$2,password) == $null) {
notice $nick $2 is not registered.
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($readini(airsoftbot.ini,$nick,HandCash) = $2) {
msg $chan 4ERROR You dont have $2 in your pocket to give!! | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $nick HandCash $calc($readini(airsoftbot.ini,$nick,HandCash) - $2) | writeini -n airsoftbot.ini $2 HandCash $calc($readini(airsoftbot.ini,$2,HandCash) + $2) | msg $chan 9SUCCESS $nick $+ , You have successfully given $2 $3 dollars $+ .
}
}
on *:TEXT:!wire*:#: {
if ($readini(airsoftbot.ini,$nick,Banned) == 1) {
msg $chan $nick you are banned from useing airsoftbot! Reason $readini(airsoftbot.ini,$nick,BannedBy)
halt
}
if ($2 == $null) {
msg $chan 4USSAGE !wire (user) (amount) | halt
}
if ($readini(airsoftbot.ini,$nick,password) == $null) {
notice $nick you are not registered. notice airsoftbot register (password)
halt
}
if ($readini(airsoftbot.ini,$2,password) == $null) {
notice $nick $2 is not registered.
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($readini(airsoftbot.ini,$nick,BankCash) = $3) {
msg $chan 4ERROR You dont have $3 in your bank to give!! | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $nick BankCash $calc($readini(airsoftbot.ini,$nick,BankCash) - $3) | writeini -n airsoftbot.ini $2 BankCash $calc($readini(airsoftbot.ini,$2,BankCash) + $3) | msg $chan 9SUCCESS $nick $+ , You have successfully wired $2 $3 dollars $+ .
}
}
;;;;;;usercmds end;;;;;;
;;;;;;admincmds;;;;;;
on *:TEXT:@SetZone*:#: {
if ($readini(airsoftbot.ini,$nick,Admin) == $nick is not one of my admins) {
msg $chan 4ERROR You must be one of my admins to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @setzone (user) (zone) | halt
}
if ($readini(airsoftbot.ini,$2,password) == $null) {
msg $chan $2 is not registered.
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($chr(36) isin $3-) {
msg $chan 4ERROR You may not have $ in your Zone. Further abuse will result to a ban from the channel and demotion!! | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $2 TimeZone $3 | msg $chan 9SUCCESS $nick $+ , You have successfully set $2 $+ 's Timezone to $3 $+ .
}
}
on *:TEXT:@Ban*:#: {
if ($readini(airsoftbot.ini,$nick,Admin) == $nick is not one of my admins) {
msg $chan 4ERROR You must be one of my admins to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @ban (user) (reason) | halt
}
if ($readini(airsoftbot.ini,$2,password) == $null) {
msg $chan $2 is not registered.
halt
}
if ($readini(airsoftbot.ini,$nick,Banned) == 1) {
msg $chan $nick is already banned from airsoftbot!
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $2 Banned 1 | writeini -n airsoftbot.ini $2 BannedBy $3- $+ . Admin that banned you $nick | msg $chan 9SUCCESS $nick $+ , You have successfully banned $2 from airsoftbot
}
}
on *:TEXT:@Unban*:#: {
if ($readini(airsoftbot.ini,$nick,Admin) == $nick is not one of my admins) {
msg $chan 4ERROR You must be one of my admins to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @unban (user) | halt
}
if ($readini(airsoftbot.ini,$2,password) == $null) {
msg $chan $2 is not registered.
halt
}
if ($readini(airsoftbot.ini,$nick,Banned) == 0) {
msg $chan $nick is already unbanned from airsoftbot!
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $2 Banned 0 | remini airsoftbot.ini BannedBy | msg $chan 9SUCCESS $nick $+ , You have successfully unbanned $2 from airsoftbot
}
}
on *:TEXT:@Settext*:#: {
if ($readini(airsoftbot.ini,$nick,Admin) == $nick is not one of my admins) {
msg $chan 4ERROR You must be one of my admins to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @settext (user) (text) | halt
}
if ($readini(airsoftbot.ini,$2,password) == $null) {
msg $chan $2 is not registered.
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($chr(36) isin $3-) {
msg $chan 4ERROR You may not have $ in your Text. Further abuse will result to a ban from the channel and demotion!! | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $2 Message $3- | msg $chan 9SUCCESS $nick $+ , You have successfully set $2 $+ 's Text to $3- $+ .
}
}
on *:TEXT:@SetStatus*:#: {
if ($readini(airsoftbot.ini,$nick,Admin) == $nick is not one of my admins) {
msg $chan 4ERROR You must be one of my admins to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @setstatus (user) (status) | halt
}
if ($readini(airsoftbot.ini,$2,password) == $null) {
msg $chan $2 is not registered.
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($chr(36) isin $3-) {
msg $chan 4ERROR You may not have $ in your status. Further abuse will result to a ban from the channel and demotion!! | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $2 Status $3- | msg $chan 9SUCCESS $nick $+ , You have successfully set $2 $+ 's Status to $3 $+ .
}
}
on *:TEXT:@AddNoob*:#: {
if ($readini(airsoftbot.ini,$nick,Admin) == $nick is not one of my admins) {
msg $chan 4ERROR You must be one of my admins to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @setnoob (user) | halt
}
if ($readini(airsoftbot.ini,$2,password) == $null) {
msg $chan $2 is not registered.
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($chr(36) isin $3-) {
msg $chan 4ERROR You may not have $ in your noob. Further abuse will result to a ban from the channel and demotion!! | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $2 Noob Yes | msg $chan 9SUCCESS $nick $+ , You have successfully made $2 a noob $+ .
}
}
on *:TEXT:@DelNoob*:#: {
if ($readini(airsoftbot.ini,$nick,Admin) == $nick is not one of my admins) {
msg $chan 4ERROR You must be one of my admins to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @delnoob (user) | halt
}
if ($readini(airsoftbot.ini,$2,password) == $null) {
msg $chan $2 is not registered.
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($chr(36) isin $3-) {
msg $chan 4ERROR You may not have $ in your noob. Further abuse will result to a ban from the channel and demotion!! | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $2 Noob No | msg $chan 9SUCCESS $nick $+ , You have successfully unmade $2 a noob $+ .
}
}
on *:TEXT:@SetHand*:#: {
if ($readini(airsoftbot.ini,$nick,Admin) == $nick is not one of my admins) {
msg $chan 4ERROR You must be one of my admins to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @sethand (user) (ammount) | halt
}
if ($readini(airsoftbot.ini,$2,password) == $null) {
msg $chan 4 $+ $2 is not registered.
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($chr(36) isin $3-) {
msg $chan 4ERROR You may not have $ in your money. Further abuse will result to a ban from the channel and demotion!! | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $2 HandCash $3 | msg $chan 9SUCCESS $nick $+ , You have successfully set $2 $+ 's handcash to $3 $+ .
}
}
on *:TEXT:@SetBank*:#: {
if ($readini(airsoftbot.ini,$nick,Admin) == $nick is not one of my admins) {
msg $chan 4ERROR You must be one of my admins to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @setbank (user) (ammount) | halt
}
if ($readini(airsoftbot.ini,$2,password) == $null) {
msg $chan 4 $+ $2 is not registered.
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($chr(36) isin $3-) {
msg $chan 4ERROR You may not have $ in your bank. Further abuse will result to a ban from the channel and demotion!! | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $2 BankCash $3 | msg $chan 9SUCCESS $nick $+ , You have successfully set $2 $+ 's bankcash to $3 $+ .
}
}
;;;;;;admincmds end;;;;;;
;;;;;;ownercmds;;;;;;
on *:TEXT:@Setadmin*:#: {
if ($readini(airsoftbot.ini,$nick,Owner) == $nick is not one of my owners) {
msg $chan 4ERROR You must be one of my owners to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @setadmin (user) | halt
}
if ($readini(airsoftbot.ini,$2,password) == $null) {
msg $chan $2 is not registered.
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $2 Admin $2 is one of my admins | msg $chan 9SUCCESS $nick $+ , You have successfully set $2 as an admin!! | notice $2 CONGRATZ YOU ARE NOW AN ADMIN ON AIRSOFTBOT!
}
}
on *:TEXT:@deladmin*:#: {
if ($readini(airsoftbot.ini,$nick,Owner) == $nick is not one of my owners) {
msg $chan 4ERROR You must be one of my owners to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @deladmin (user) | halt
}
if ($readini(airsoftbot.ini,$2,password) == $null) {
msg $chan $2 is not registered.
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $2 Admin $2 is not one of my admins | msg $chan 9SUCCESS $nick $+ , You have successfully unset $2 as an admin!!
}
}
on *:TEXT:@delacc*:#: {
if ($readini(airsoftbot.ini,$nick,Owner) == $nick is not one of my owners) {
msg $chan 4ERROR You must be one of my owners to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @delacc (user) | halt
}
if ($readini(airsoftbot.ini,$2,password) == $null) {
msg $chan $2 is not registered.
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
remini airsoftbot.ini $2 | msg $chan 9SUCCESS $nick $+ , You have successfully deleted $2 account.
}
}
on *:TEXT:@setowner*:#: {
if ($readini(airsoftbot.ini,$nick,Owner) == $nick is not one of my owners) {
msg $chan 4ERROR You must be one of my owners to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @setowner (user) | halt
}
if ($readini(airsoftbot.ini,$2,password) == $null) {
msg $chan $2 is not registered.
halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini -n airsoftbot.ini $2 Owner $2 is one of my owners | writeini -n airsoftbot.ini $2 Admin $2 is one of my admins | msg $chan 9SUCCESS $nick $+ , You have successfully made $2 an owner.
}
}
on *:TEXT:@reload*:#: {
if ($readini(airsoftbot.ini,$nick,Owner) == $nick is not one of my owners) {
msg $chan 4ERROR You must be one of my owners to use this command. | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
reload -rs airsoftbot.ini | msg $chan 9SUCCESS $nick $+ , You have successfully Reloaded airsoftbot.ini.
}
}
on *:TEXT:@hop*:#: {
if ($readini(airsoftbot.ini,$nick,Owner) == $nick is not one of my owners) {
msg $chan 4ERROR You must be one of my owners to use this command. | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
msg $chan 9SUCCESS $nick $+ , You have hopped me. | hop $chan
}
}
on *:TEXT:@raw*:#: {
if ($readini(airsoftbot.ini,$nick,Owner) == $nick is not one of my owners) {
msg $chan 4ERROR You must be one of my owners to use this command. | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
$2- | msg $chan 9SUCCESS $nick $+ , you have executed the raw command $2- $+ .
}
}
on *:TEXT:@say*:#: {
if ($readini(airsoftbot.ini,$nick,Owner) == $nick is not one of my owners) {
msg $chan 4ERROR You must be one of my owners to use this command. | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
msg $chan $2-
}
}
on *:TEXT:@Setvar*:#: {
if ($readini(airsoftbot.ini,$nick,Owner) == $nick is not one of my owners) {
msg $chan 4ERROR You must be one of my owners to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @setvar (var) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
set $2- | msg $chan 9SUCCESS $nick $+ , You have successfully set $2 as a variable.
}
}
on *:TEXT:@Unsetvar*:#: {
if ($readini(airsoftbot.ini,$nick,Owner) == $nick is not one of my owners) {
msg $chan 4ERROR You must be one of my owners to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @unsetvar (var) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
unset $2- | msg $chan 9SUCCESS $nick $+ , You have successfully unset $2 as a variable.
}
}
on *:TEXT:@join*:#: {
if ($readini(airsoftbot.ini,$nick,Owner) == $nick is not one of my owners) {
msg $chan 4ERROR You must be one of my owners to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @join (chan) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
join $2 | msg $chan 9SUCCESS $nick $+ , You have successfully made me join $2 $+ !
}
}
on *:TEXT:@part*:#: {
if ($readini(airsoftbot.ini,$nick,Owner) == $nick is not one of my owners) {
msg $chan 4ERROR You must be one of my owners to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @part (chan) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
part $2 | msg $chan 9SUCCESS $nick $+ , You have successfully made me part $2 $+ .
}
}
on *:TEXT:@Addacc*:#: {
if ($readini(airsoftbot.ini,$nick,Owner) == $nick is not one of my owners) {
msg $chan 4ERROR You must be one of my owners to use this command. | halt
}
if ($2 == $null) {
msg $chan 4USSAGE @addacc (user) | halt
}
if ($readini(airsoftbot.ini,$nick,logged) == OUT) {
notice $nick You are not logged in! notice airsoftbot identify (password)| halt
}
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini airsoftbot.ini $2 password password
writeini airsoftbot.ini $2 username $2
writeini airsoftbot.ini $2 logged OUT
writeini airsoftbot.ini $2 BankCash 5000
writeini airsoftbot.ini $2 HandCash 500
writeini airsoftbot.ini $2 Message Changeme with !settext
writeini airsoftbot.ini $2 Status Changeme with !setstatus
writeini airsoftbot.ini $2 Noob Is not a noob.
writeini airsoftbot.ini $2 TimeZone Changeme with !setzone
writeini airsoftbot.ini $2 Admin $2 is not one of my admins
writeini airsoftbot.ini $2 Owner $2 is not one of my owners | msg $chan 9SUCCESS $nick $+ , you have registered the account $2 $+ . notice $nick Defalt password is password.
}
}
on !*:NICK:#: {
if ($readini(airsoftbot.ini,$nick,logged) == IN) {
writeini airsoftbot.ini $nick logged OUT | notice $nick You have changed your nick you have been logged out.
}
}
the on nick event will recognize $nick as the nick who triggered the event
you need to use notice $newnick, to notice now the new nick, if not, it will return an error