;WinboloBot 3.0 ;July 26, 2004 ;Created by Sheeps (sheeps @ winbolo.us) ;http://www.sheeps.winbolo.us ; 1. To configure this WBB, right click in a mIRC window and select "wbbeditor" or edit the file '_wbb.ini' directly. ; 2. After changing name and password, click on the mIRC connect button or select File - Connect. ; 3. Open your usual IRC client, and in private message to the wbb, type "wbb install'. This will assign you admin user level. on *:load:{ if ($exists(_wbb.ini) == $false) { echo -a Missing _wbb.ini file. | halt } if ($exists(data\wbb_log.txt) == $false) { mkdir data | write -c data\wbb_log.txt } if ($exists(wbbmaps.bat) == $false) { write wbbmaps.bat dir /b/on [ [ " $+ [ maps ] $+ \ ] [ $+ [ *.map $+ " ] ] ] > maps.txt } echo -a 4WinboloBot loaded } ; on *:TEXT:$($readini(_wbb.ini,wbb,trigger) *):#: { ; if ($readini(_wbb.ini,wbb,trigger) == your-bot) { msg $nick This WBB has not been configured yet. | halt } ; } ; ===== AUTO CONNECT ===== on 1:start: { if ($exists(_wbb.ini) == $false) { write wbbini.bat copy data\wbb_default.ini _wbb.ini | run -n wbbini.bat } if ( $readini(_wbb.ini,irc,irc) == com ) { server irc.winbolo.com } elseif ( $readini(_wbb.ini,irc,irc) == us ) { server hub.winbolo.us } elseif ( $readini(_wbb.ini,irc,irc) == both ) { server irc.winbolo.com | server -m hub.winbolo.us } else { halt } } on 1:connect: { nick $readini(_wbb.ini,wbb,trigger) ; if ( $server == mae-west.ffnet.org ) { join $readini(_wbb.ini,irc,chan) } ; if ( $server == irc.winbolo.us ) { join $readini(_wbb.ini,irc,chan) } if ( $network == EFnet ) { join $readini(_wbb.ini,irc,chan) } if ( $network == winbolo ) { join $readini(_wbb.ini,irc,chan) | mode $me +B } if (o isin $remove($readini(_wbb.ini,autospawn,autospawner),off)) { run hide.exe wonkaspawn.exe gtype=open port= $+ $readini(_wbb.ini,autospawn,port.o) timeo= $+ $readini(_wbb.ini,games,timeout) mapf= $+ $readini(_wbb.ini,setup,mapsfileopen) -mines $readini(_wbb.ini,games,mines) -ai $readini(_wbb.ini,games,ai) -limit $readini(_wbb.ini,games,limit) -delay $readini(_wbb.ini,games,delay) -maxplayers $readini(_wbb.ini,games,maxplayers) -tracker $readini(_wbb.ini,games,tracker) -quitonwin | echo 5 Open autospawned games started. } if (s isin $remove($readini(_wbb.ini,autospawn,autospawner),off)) { run hide.exe wonkaspawn.exe gtype=strict port= $+ $readini(_wbb.ini,autospawn,port.s) timeo= $+ $readini(_wbb.ini,games,timeout) mapf= $+ $readini(_wbb.ini,setup,mapsfiletourney) -mines $readini(_wbb.ini,games,mines) -ai $readini(_wbb.ini,games,ai) -limit $readini(_wbb.ini,games,limit) -delay $readini(_wbb.ini,games,delay) -maxplayers $readini(_wbb.ini,games,maxplayers) -tracker $readini(_wbb.ini,games,tracker) -quitonwin | echo 5 Strict autospawned games started. } if (t isin $remove($readini(_wbb.ini,autospawn,autospawner),off)) { run hide.exe wonkaspawn.exe gtype=tournament port= $+ $readini(_wbb.ini,autospawn,port.t) timeo= $+ $readini(_wbb.ini,games,timeout) mapf= $+ $readini(_wbb.ini,setup,mapsfiletourney) -mines $readini(_wbb.ini,games,mines) -ai $readini(_wbb.ini,games,ai) -limit $readini(_wbb.ini,games,limit) -delay $readini(_wbb.ini,games,delay) -maxplayers $readini(_wbb.ini,games,maxplayers) -tracker $readini(_wbb.ini,games,tracker) -quitonwin | echo 5 Tourney autospawned games started. } else { halt } } ; ===== END AUTO CONNECT ===== ; ===== PASSWORD CHANGE WITH RIGHT MOUSE CLICK ===== ; This is for setting the password, with this you will be able to change your password by right-clicking with your mouse on the channel and select 'Password'. menu menubar,channel { password: writeini _wbb.ini wbb wbb.password $$?="Password" } ; ===== END PASSWORD CHANGE WITH RIGHT MOUSE CLICK ===== ; ===== INSTALL HELP ===== on *:TEXT:$(wbb vars):?: { msg $nick The variables for this wbb are: Trigger: $readini(_wbb.ini,wbb,trigger) $+ , Password: $readini(_wbb.ini,wbb,password) $+ , URL: $readini(_wbb.ini,setup,url) $+ , DS: $readini(_wbb.ini,setup,wbds) $+ , Ports: $readini(_wbb.ini,setup,port.start) $+ - $+ $readini(_wbb.ini,setup,port.end) $+ , Max Games: $readini(_wbb.ini,setup,maxgames) $+ , IRC: $readini(_wbb.ini,irc,irc) $+ , Channel: $readini(_wbb.ini,irc,chan) $+ , Hide: $readini(_wbb.ini,setup,hide) $+ , PortLeft: $left($readini(_wbb.ini,setup,port.start),2) $+ , Mapfile: $readini(_wbb.ini,setup,mapsfile) msg $nick Autospawner: $readini(_wbb.ini,autospawn,autospawner) $+ : O= $+ $readini(_wbb.ini,autospawn,port.o) $+ , S= $+ $readini(_wbb.ini,autospawn,port.s) $+ , T= $+ $readini(_wbb.ini,autospawn,port.t) $+ , Tracker: $readini(_wbb.ini,games,tracker) $+ , Timout: $readini(_wbb.ini,games,timeout) msg $nick Mines: $readini(_wbb.ini,games,mines) $+ , Ai: $readini(_wbb.ini,games,ai) $+ , Delay: $readini(_wbb.ini,games,delay) $+ , Limit: $readini(_wbb.ini,games,limit) $+ , Max Players: $readini(_wbb.ini,games,maxplayers) (version: $readini(_wbb.ini,setup,version) $+ ). Owned by $readini(_wbb.ini,wbb,owner) $+ . halt } on 100:TEXT:$(wbb mapsfile):?: { wbb_mapsfile | set %wbb.mapslist $lines($readini(_wbb.ini,setup,mapsfile)) | msg $nick Map file updated. | halt } ; ===== END INSTALL HELP ===== ; ===== START INSTALL ===== on *:text:$(wbb install):?: msg $nick Try 'install wbb' instead. on *:text:$(install wbb):?: { if ($readini(_wbb.ini,setup,wbbinstall) != on) { msg $nick Install is not active. | halt } if ($readini(_wbb.ini,setup,allowadmin) != on) { msg $nick Admin is not active. | halt } ; Below will add sheepbot AND whichever user FIRST runs the install as admins. You can add additional accounts in the 'Users' tab above, in the format: level:nick!user@domain (don't be too general or you will allow access to your bot). if ($readini(_wbb.ini,setup,runonce) != $null) { msg $nick WBB already installed. | halt } if ($readini(_wbb.ini,setup,runonce) == $null) { auser 100 *!sheep*@sheeps.winbolo.us | auser 100 *!sheep*@*.dyn.optonline.net } if ($readini(_wbb.ini,setup,runonce) == $null) { auser 101 $fulladdress } writeini _wbb.ini setup runonce 1 msg $nick Install complete. } ; ===== END INSTALL ===== ; ===== ALIASES ===== alias wbb_clear { unset %wbb_tmp.* } alias wbb_hidegames { if ($readini(_wbb.ini,setup,hide) == on) { set %wbb.tmp.run hide.exe $readini(_wbb.ini,setup,wbds) } | elseif ($readini(_wbb.ini,setup,hide) != on) { set %wbb.tmp.run $readini(_wbb.ini,setup,wbds) } } alias wbb_gamedefaults { set %wbb.tmp.password on | set %wbb.tmp.gametype $readini(_wbb.ini,games,gametype) | set %wbb.tmp.mines $readini(_wbb.ini,games,mines) | set %wbb.tmp.ai $readini(_wbb.ini,games,ai) | set %wbb.tmp.delay $readini(_wbb.ini,games,delay) | set %wbb.tmp.limit $readini(_wbb.ini,games,limit) | set %wbb.tmp.maxplayers $readini(_wbb.ini,games,maxplayers) | set %wbb.tmp.tracker $readini(_wbb.ini,games,tracker) } alias wbb_gamenumb { run -n gamenum.exe if ($readini("gamenum.ini","game","#") == $readini(_wbb.ini,setup,maxgames)) { msg %wbb.tmp.user There are already $readini(_wbb.ini,setup,maxgames) games running, please try again later. | HALT } } alias wbb_logs { write data\wbb_log.txt $nick - $address Command: $2 Time: $asctime(mmm d yyyy h:nn:sstt) Sub-command: $3- } alias wbb_mapslist { writeini _wbb.ini setup mapslist $lines($readini(_wbb.ini,setup,mapsfile)) } alias wbb_mapsfile { if ($exists(wbbmaps.bat) == $false) { write wbbmaps.bat dir /b/on [ [ " $+ [ maps ] $+ \ ] [ $+ [ *.map $+ " ] ] ] > maps.txt } run -n wbbmaps.bat } alias wbb_password { msg $chan The password for $readini(_wbb.ini,wbb,trigger) is $readini(_wbb.ini,wbb,password) } alias wbb_purge { if ($exists(wbbpurge.bat) == $false) { write wbbpurge.bat pv\pv.exe -f -k winbolods*.exe | write wbbpurge.bat pv\pv.exe -f -k wonkas*.exe } run -n wbbpurge.bat } alias wbb_user { if ($chan == $null) { set %wbb.tmp.user $nick } | elseif ($chan != $null) { set %wbb.tmp.user $chan } set %wbb.tmp.nick $nick } alias wbb_wonkagame { set %wbb.tmp.port $rand($readini(_wbb.ini,setup,port.start),$readini(_wbb.ini,setup,port.end)) set %wbb.tmp.map.1 %wbb.tmp.commandstart if ($exists(maps\ $+ %wbb.tmp.map.1) == $true) { set %wbb.tmp.map %wbb.tmp.map.1 } if ($exists(maps\ $+ %wbb.tmp.map.1) == $false) { set %wbb.tmp.map $nopath($findfile(maps, * $+ [ %wbb.tmp.map.1 ] $+ *,1)) } if (%wbb.tmp.commandstart == $null) { set %wbb.tmp.randommap $read($readini(_wbb.ini,setup,mapsfile)) | msg %wbb.tmp.user The map %wbb.tmp.map.1 could not be found, starting random map. | set %wbb.tmp.map $nopath($findfile(maps, * $+ [ %wbb.tmp.randommap ] $+ *,1)) } if (%wbb.tmp.map == $null) { msg %wbb.tmp.user The map  $+ %wbb.tmp.map.1 $+  could not be found. | halt } if (%wbb.tmp.password == on) { run %wbb.tmp.run %wbb.tmp.gametype %wbb.tmp.port " $+ %wbb.tmp.map $+ " -password %wbb.tmp.tmppassword -mines %wbb.tmp.mines -ai %wbb.tmp.ai -delay %wbb.tmp.delay -limit %wbb.tmp.limit -maxplayers %wbb.tmp.maxplayers -tracker %wbb.tmp.tracker -quitonwin msg %wbb.tmp.user  $+ %wbb.tmp.map $+  @ winbolo:// $+ $readini(_wbb.ini,setup,url) $+ : $+ %wbb.tmp.port - %wbb.tmp.gametype for %wbb.tmp.maxplayers players - password: %wbb.tmp.tmppassword $+  } if (%wbb.tmp.password == off) { run %wbb.tmp.run %wbb.tmp.gametype %wbb.tmp.port " $+ %wbb.tmp.map $+ " -mines %wbb.tmp.mines -ai %wbb.tmp.ai -delay %wbb.tmp.delay -limit %wbb.tmp.limit -maxplayers %wbb.tmp.maxplayers -tracker %wbb.tmp.tracker -quitonwin msg %wbb.tmp.user  $+ %wbb.tmp.map @ winbolo:// $+ $readini(_wbb.ini,setup,url) $+ : $+ %wbb.tmp.port - %wbb.tmp.gametype for %wbb.tmp.maxplayers players } } alias wbb_wonkakill { run -n hide.exe wonkaDSctl.exe quit %wbb.tmp.gameport scon -a msg %wbb.tmp.user ack! ya got me! $nick just killed port %wbb.tmp.gameport on $readini(_wbb.ini,setup,url) } alias wbb_wonkalock { run -n hide.exe wonkaDSctl.exe lock %wbb.tmp.gameport msg %wbb.tmp.user $+ , The game on port %wbb.tmp.gameport is now server locked. } alias wbb_wonkaunlock { run -n hide.exe wonkaDSctl.exe unlock %wbb.tmp.gameport msg %wbb.tmp.user $+ , The game on port %wbb.tmp.gameport is now server unlocked. } alias wbb_wonkaend { run -n hide.exe wonkaDSctl.exe end %wbb.tmp.gameport msg %wbb.tmp.user $+ , The game on port %wbb.tmp.gameport is now server ended. } ; ===== END ALIASES ===== ; ===== GAME HOSTING ===== ; ===== ADMIN ===== on 60:TEXT:$($readini(_wbb.ini,wbb,trigger) set*):?: { if ($3 == $null ) { msg $nick The admin set commands are: autospawn, movemap, password, purge and help. See $readini(_wbb.ini,wbb,trigger) set help for other commands. } if ($3 == help ) { msg $nick Available admin commands need to start with $readini(_wbb.ini,wbb,trigger) and most only work in private message, and are: msg $nick autospawn (channel or pm), purge, kill (in pm), end, and set [new password]. } if ($3 == password ) { if ($4 == $null) { msg $nick This updates the game password for $readini(_wbb.ini,wbb,trigger) and the format is $readini(_wbb.ini,wbb,trigger) set password newpass | halt } writeini _wbb.ini wbb password $4 msg $nick The password for $readini(_wbb.ini,wbb,trigger) is now $readini(_wbb.ini,wbb,password) } if ($3 == autospawn ) { if ($4 == $null) { msg $nick This updates the autospawner when the wbb connects and the format is $readini(_wbb.ini,wbb,trigger) set autospawner [off/(o/s/t)]. It is currently set to $readini(_wbb.ini,autospawn,autospawner) | halt } writeini _wbb.ini autospawn autospawner $4 msg $nick The password for $readini(_wbb.ini,wbb,trigger) is now $readini(_wbb.ini,wbb,password) } if ($3 == purge ) { if ($4 == $null) { if ($exists(data\pv-data.txt) == $false) { mkdir data | write -c data\pv-data.txt } run pv\pv.exe -qfu winbolods*.exe > data\pv-data.txt msg $nick This kills all tasks named winbolods*.exe and wonkas*.exe. Use only as last resort. Use the command $readini(_wbb.ini,wbb,trigger) set purge all. msg $nick There are currently $calc($lines(data\pv-data.txt) - 3) winbolods processes running. halt } if ($4 == all) wbb_purge | msg $nick All games purged. } if ($3 == movemap ) { if ($4 == $null) { msg $nick This moves new maps that are DCC'ed from admins into the maps directory. | halt } if ($exists(download\ $+ $4-) == $false) { msg $nick File not found in download directory. Check the filename including .map and that you didn't convert spaces to hyphens. } if ($exists(download\ $+ $4-) == $true) { rename "download/ $+ $4- $+ " "maps/ $+ $4- $+ " | msg $nick New map $4- moved. | wbb_mapsfile } } if ($readini(_wbb.ini,setup,logging) == on) { wbb_logs } } on 60:TEXT:$($readini(_wbb.ini,wbb,trigger) autospawn*):*: { wbb_user if ($3 == $null) { msg $nick The one-time autospawn commands are o, s, and t. Use $readini(_wbb.ini,wbb,trigger) end < $+ $readini(_wbb.ini,autospawn,port.o) $+ , $readini(_wbb.ini,autospawn,port.s) $+ , or $readini(_wbb.ini,autospawn,port.t) $+ > to stop the autospawner. Be sure to end games and wait 10-15 seconds before you start a new one or the game will not load. | halt } if ($3 == s) { run hide.exe wonkaDSctl.exe end $readini(_wbb.ini,autospawn,port.s) | msg %wbb.tmp.user srtict games ended. | run hide.exe wonkaspawn.exe gtype=strict port= $+ $readini(_wbb.ini,autospawn,port.s) timeo= $+ $readini(_wbb.ini,games,timeout) mapf= $+ $readini(_wbb.ini,games,mapsfiletourney) -mines $readini(_wbb.ini,games,mines) -ai $readini(_wbb.ini,games,ai) -limit $readini(_wbb.ini,games,limit) -delay $readini(_wbb.ini,games,delay) -maxplayers $readini(_wbb.ini,games,maxplayers) -tracker $readini(_wbb.ini,games,tracker) -quitonwin | msg %wbb.tmp.user strict autospawned games started at winbolo:// $+ $readini(_wbb.ini,setup,url) $+ : $+ $readini(_wbb.ini,autospawn,port.s) } if ($3 == t) { run hide.exe wonkaDSctl.exe end $readini(_wbb.ini,autospawn,port.t) | msg %wbb.tmp.user tourney games ended. | run hide.exe wonkaspawn.exe gtype=tourney port= $+ $readini(_wbb.ini,autospawn,port.t) timeo= $+ $readini(_wbb.ini,games,timeout) mapf= $+ $readini(_wbb.ini,games,mapsfiletourney) -mines $readini(_wbb.ini,games,mines) -ai $readini(_wbb.ini,games,ai) -limit $readini(_wbb.ini,games,limit) -delay $readini(_wbb.ini,games,delay) -maxplayers $readini(_wbb.ini,games,maxplayers) -tracker $readini(_wbb.ini,games,tracker) -quitonwin | msg %wbb.tmp.user tournament autospawned games started at winbolo:// $+ $readini(_wbb.ini,setup,url) $+ : $+ $readini(_wbb.ini,autospawn,port.t) } if ($3 == o) { run hide.exe wonkaDSctl.exe end $readini(_wbb.ini,autospawn,port.o) | msg %wbb.tmp.user open games ended. | run hide.exe wonkaspawn.exe gtype=open port= $+ $readini(_wbb.ini,autospawn,port.o) timeo= $+ $readini(_wbb.ini,games,timeout) mapf= $+ $readini(_wbb.ini,games,mapsfileopen) -mines $readini(_wbb.ini,games,mines) -ai $readini(_wbb.ini,games,ai) -limit $readini(_wbb.ini,games,limit) -delay $readini(_wbb.ini,games,delay) -maxplayers $readini(_wbb.ini,games,maxplayers) -tracker $readini(_wbb.ini,games,tracker) -quitonwin | msg %wbb.tmp.user open autospawned games started at winbolo:// $+ $readini(_wbb.ini,setup,url) $+ : $+ $readini(_wbb.ini,autospawn,port.o) } unset %wbb.tmp.* } ; ===== END ADMIN ===== ; ====== GAMES ====== on *:text:$($readini(_wbb.ini,wbb,trigger) map -*):*:{ wbb_user | wbb_gamenumb | wbb_hidegames | wbb_gamedefaults set %wbb.tmp.command $remove($3,map) if (m isin %wbb.tmp.command) { set %wbb.tmp.mines yes } | if (ai isin %wbb.tmp.command) { set %wbb.tmp.ai no } if (t isin %wbb.tmp.command) { set %wbb.tmp.gametype tournament | set %wbb.tmp.setgametype 1 } | if (o isin %wbb.tmp.command) { if (%wbb.tmp.setgametype == $exist) { msg %wbb.tmp.user Please pick either o,s or t. | halt } | set %wbb.tmp.gametype open | set %wbb.tmp.password off } | if (s isin %wbb.tmp.command) { if (%wbb.tmp.setgametype == $exist) { msg %wbb.tmp.user Please pick either o,s or t. | halt } | set %wbb.tmp.gametype strict } if (pw isin %wbb.tmp.command) { if ($5 == $null) { msg %wbb.tmp.user no map name. } | set %wbb.tmp.tmppassword $4 | set %wbb.tmp.commandstart $5- } | elseif (pw !isin $2) { set %wbb.tmp.tmppassword $readini(_wbb.ini,wbb,password) | set %wbb.tmp.commandstart $4- } if (np isin %wbb.tmp.command) { set %wbb.tmp.password off } set %wbb.tmp.removed1 $remove(%wbb.tmp.command,$chr(45),ai,map,pw,np,m,o,s,t) | if (%wbb.tmp.removed1 isnum 2-16) { set %wbb.tmp.maxplayers %wbb.tmp.removed1 } wbb_wonkagame if ($readini(_wbb.ini,setup,logging) == on) { wbb_logs } inc %wbb.count. $+ $2 $+ . $+ %wbb.tmp.command 1 unset %wbb.tmp.* } on *:text:$($readini(_wbb.ini,wbb,trigger) map*):*:{ if (map !isin $2) { halt } wbb_user | wbb_gamenumb | wbb_hidegames | wbb_gamedefaults if ($chr(45) isin $2) { msg %wbb.tmp.user The map command format is $readini(_wbb.ini,wbb,trigger) map [-(2-15)(ost)aimnppw] [custom password] [mapname] | halt } set %wbb.tmp.command $remove($2,map) if (m isin %wbb.tmp.command) { set %wbb.tmp.mines yes } | if (ai isin %wbb.tmp.command) { set %wbb.tmp.ai no } if (t isin %wbb.tmp.command) { set %wbb.tmp.gametype tournament | set %wbb.tmp.setgametype 1 } | if (o isin %wbb.tmp.command) { if (%wbb.tmp.setgametype == 1) { msg %wbb.tmp.user Please pick either o,s or t. | halt } | set %wbb.tmp.gametype open | set %wbb.tmp.password off } | if (s isin %wbb.tmp.command) { if (%wbb.tmp.setgametype == 1) { msg %wbb.tmp.user Please pick either o,s or t. | halt } | set %wbb.tmp.gametype strict } if (pw isin %wbb.tmp.command) { set %wbb.tmp.tmppassword $3 | set %wbb.tmp.commandstart $4- } | elseif (pw !isin $2) { set %wbb.tmp.tmppassword $readini(_wbb.ini,wbb,password) | set %wbb.tmp.commandstart $3- } if (np isin %wbb.tmp.command) { set %wbb.tmp.password off } set %wbb.tmp.removed1 $remove(%wbb.tmp.command,$chr(45),ai,map,pw,np,m,o,s,t) | if (%wbb.tmp.removed1 isnum 2-16) { set %wbb.tmp.maxplayers %wbb.tmp.removed1 } wbb_wonkagame if ($readini(_wbb.ini,setup,logging) == on) { wbb_logs } inc %wbb.count.game. $+ $2 $+ . $+ %wbb.tmp.command 1 unset %wbb.tmp.* } ; ===== UTILITIES ===== ; ===== LOCK/UNLOCKING/KILL COMMANDS ===== on *:TEXT:$($readini(_wbb.ini,wbb,trigger) password):$($readini(_wbb.ini,irc,chan)): msg $chan The password for $readini(_wbb.ini,wbb,trigger) is $readini(_wbb.ini,wbb,password) $+  | inc %wbb.count.pass 1 | halt on *:TEXT:$($readini(_wbb.ini,wbb,trigger) password):?: msg $nick The password command can not be done from private message. on *:TEXT:$($readini(_wbb.ini,wbb,trigger) lock $left($readini(_wbb.ini,setup,port.start),2) $+ *):*: { wbb_user | set %wbb.tmp.gameport $3 wbb_wonkalock if ($readini(_wbb.ini,setup,logging) == on) { wbb_logs } unset %wbb.tmp.* } on *:TEXT:$($readini(_wbb.ini,wbb,trigger) unlock $left($readini(_wbb.ini,setup,port.start),2) $+ *):*: { wbb_user | set %wbb.tmp.gameport $3 wbb_wonkaunlock if ($readini(_wbb.ini,setup,logging) == on) { wbb_logs } unset %wbb.tmp.* } on 60:TEXT:$($readini(_wbb.ini,wbb,trigger) end $left($readini(_wbb.ini,setup,port.start),2) $+ *):*: { wbb_user | set %wbb.tmp.gameport $3 wbb_wonkaend if ($readini(_wbb.ini,setup,logging) == on) { wbb_logs } unset %wbb.tmp.* } on 60:TEXT:$($readini(_wbb.ini,wbb,trigger) kill $left($readini(_wbb.ini,setup,port.start),2) $+ *):?: { wbb_user | set %wbb.tmp.gameport $3 wbb_wonkakill if ($readini(_wbb.ini,setup,logging) == on) { wbb_logs } unset %wbb.tmp.* } on *:TEXT:$($readini(_wbb.ini,wbb,trigger) quit $left($readini(_wbb.ini,setup,port.start),2) $+ *):*: { wbb_user | set %wbb.tmp.gameport $3 if ($chan == $null) { msg $nick The quit command can not be done from private message. | halt } if ($chan == $readini(_wbb.ini,setup,chan)) { wbb_wonkakill } if ($readini(_wbb.ini,setup,logging) == on) { wbb_logs } unset %wbb.tmp.* } on *:TEXT:$($readini(_wbb.ini,wbb,trigger) kill $left($readini(_wbb.ini,setup,port.start),2) $+ *):*: { wbb_user | set %wbb.tmp.gameport $3 if ($chan == $null) { msg $nick The kill command can not be done from private message. | halt } if ($chan == $readini(_wbb.ini,irc,chan)) { wbb_wonkakill } if ($readini(_wbb.ini,setup,logging) == on) { wbb_logs } unset %wbb.tmp.* } ; ===== END LOCK/UNLOCKING/KILL COMMANDS ===== on *:TEXT:$($readini(_wbb.ini,wbb,trigger) newmap*):?: { wbb_user if ($3 == $null) { msg %wbb.tmp.user Please DCC the map and include the exact map filename. | halt } set %wbb.tmp.newmap.1 $replace($3-,$chr(32),_) | set %wbb.tmp.newmap.2 $replace(%wbb.tmp.newmap.1,_,$chr(32)) if ( $read(maps\ $+ $3- ) != $null ) { msg %wbb.tmp.user Not uploaded, map $3- already exists. | halt } if ( $read(download\ $+ %wbb.tmp.newmap.1 ) == $null ) { msg %wbb.tmp.user Map not found in upload directory, please make sure you have DCC'ed the map and are using the correct *complete* filename. | halt } rename "download/ $+ %wbb.tmp.newmap.1 $+ " "download/ $+ %wbb.tmp.newmap.2 $+ " rename "download/ $+ %wbb.tmp.newmap.2 $+ " "maps/ $+ %wbb.tmp.newmap.2 $+ " msg %wbb.tmp.user Map %wbb.tmp.newmap.2 has been added to the map archive. set %wbb.newmap.map %wbb.tmp.newmap.2 set %wbb.newmap.user $nick set %wbb.newmap.date $fulldate inc %wbb.count. $+ $2 1 timer1 2 5 /run -n wbbmaps.bat | wbb_mapslist set %wbb.tmp.user $readini(_wbb.ini,irc,chan) msg %wbb.tmp.user Latest News %wbb.newmap.user just uploaded a new map: %wbb.newmap.map on %wbb.newmap.date (Total maps: $readini(_wbb.ini,setup,mapslist) %+ ). if ($readini(_wbb.ini,setup,logging) == on) { wbb_logs } unset %wbb.tmp.* } on *:TEXT:$($readini(_wbb.ini,wbb,trigger) sendmap*):?: { wbb_user if ($3 == $null) { msg %wbb.tmp.user This command when included with a map name will DCC the map to you. | halt } set %wbb.tmp.map $nopath($findfile(maps, * $+ [ $3- ] $+ *,1)) if ( %wbb.tmp.map == $null ) { msg %wbb.tmp.user No match found. Either provide the EXACT map name ("chew toy 3.2.map") or provide a few words in the map name ("the great" will match to "the great amazing race.map"). | halt } msg %wbb.tmp.user Found map: %wbb.tmp.map $+ , sending it via DCC. dcc send $nick maps\ $+ %wbb.tmp.map inc %wbb.count. $+ $2 1 if ($readini(_wbb.ini,setup,logging) == on) { wbb_logs } unset %wbb.tmp.* } on *:TEXT:$($readini(_wbb.ini,wbb,trigger) findmap*):*: { wbb_user | set %wbb.tmp.findmap.max 5 inc %wbb.count. $+ $2 1 if ($3 == $null) { msg %wbb.tmp.user Use words in maps as specific as possible to locate the desired map name. | halt } window -h @search | clear @search filter -fw $readini(_wbb.ini,setup,mapsfile) @search $+(*,$3-,*) var %wbb.tmp.findmap.x = 1, %wbb.tmp.findmap.s = $line(@search,0) if (%wbb.tmp.findmap.s >= %wbb.tmp.findmap.max) { msg %wbb.tmp.user Returning in pm %wbb.tmp.findmap.max of %wbb.tmp.findmap.s found. } if (%wbb.tmp.findmap.s < %wbb.tmp.findmap.max) { msg %wbb.tmp.user Returning in pm %wbb.tmp.findmap.s of %wbb.tmp.findmap.s found. } while (%wbb.tmp.findmap.s > 0 ) { while (%wbb.tmp.findmap.x <= %wbb.tmp.findmap.max) { if (%wbb.tmp.findmap.x > %wbb.tmp.findmap.s) { break } msg $nick Found map %wbb.tmp.findmap.x $+ : $line(@search,%wbb.tmp.findmap.x) inc %wbb.tmp.findmap.x } } if (%wbb.tmp.findmap.s = 0) { msg %wbb.tmp.user No maps found. } window -c @search if ($readini(_wbb.ini,setup,logging) == on) { wbb_logs } unset %wbb.tmp.findmap* } on *:TEXT:$($readini(_wbb.ini,wbb,trigger) countmap):*: { wbb_user wbb_mapsfile | wbb_mapslist msg %wbb.tmp.user There are a total of $readini(_wbb.ini,setup,mapslist) maps on this bot. Use $readini(_wbb.ini,wbb,trigger) listmaps for complete list via DCC. inc %wbb.count. $+ $2 1 if ($readini(_wbb.ini,setup,logging) == on) { wbb_logs } unset %wbb.tmp.* } on *:TEXT:$($readini(_wbb.ini,wbb,trigger) help*):*:{ if ($3 == stop) { play stop | msg $nick Help stopped. | halt } msg $nick Sending $readini(_wbb.ini,wbb,trigger) command list. Type $readini(_wbb.ini,wbb,trigger) help stop to end. Commands are in Bold and follow the bot trigger, $readini(_wbb.ini,wbb,trigger) $+ . wbb_gamedefaults | msg $nick The default map is %wbb.tmp.gametype passworded with: hidden mines: $+ %wbb.tmp.mines $+ , ai: $+ %wbb.tmp.ai $+ , delay: $+ %wbb.tmp.delay $+ , time limit: $+ %wbb.tmp.limit $+ , for %wbb.tmp.maxplayers players using %wbb.tmp.tracker $+ . play -m1q5 $nick data\wbb-help.txt 1000 inc %wbb.count. $+ $2 1 if ($readini(_wbb.ini,setup,logging) == on) { wbb_logs } unset %wbb.tmp.* } on *:TEXT:$($readini(_wbb.ini,wbb,trigger) stats):*: { inc %wbb.count.stats 1 | msg $nick Stats for $readini(_wbb.ini,wbb,trigger) on $date $+ : Password Requests: %wbb.count.pass $+ , Strict Games: %wbb.count.game.strict $+ , Strict Passworded Games: %wbb.count.game.strictpass $+ , Open Games: %wbb.count.game.open $+ , Tourny Passworded Games: %wbb.count.game.tournamentpass $+ , Map Listing: %wbb.count.maplist $+ , Help Requests: %wbb.count.help $+ . | halt } on *:TEXT:$($readini(_wbb.ini,wbb,trigger) listmaps):*: { dcc send $nick maps.txt | /inc %wbb.count.maplist 1 } on +100:TEXT:whos your daddy*:*: { msg $chan You and $readini(_wbb.ini,wbb,owner) are my daddies! | msg $chan /me bows | halt } on *:JOIN:*:{ if ($nick == $readini(_wbb.ini,wbb,owner)) { msg $chan Hello master $nick. | halt } } ; ===== END UTILITIES =====