-
Posts
5998 -
Joined
-
Last visited
-
Days Won
17
Content Type
Profiles
Forums
Downloads
Gallery
Events
Articles
Everything posted by chain
-
Auto Connect/Join/Identify v1.0 [ source: http://www.hawkee.com/snippet/565/ ] had a lot of features and was easy to use, but unfortunately it had a lot of bugs and was written REALLY badly (Sorry to the author, but come on, hard coding 50 join statements for 5 servers each with 10 channels each is absurd). By right clicking on a Status, Query or Channel, you'll have the option of popping up the dialog for the script. There are five tabs, one for each server, each with the ability of storing channels to autojoin, a primary and secondary nick and a nickserv password. You have the option of setting to automatically join each independent server, to automatically be named the nicks supplied, to automatically ident, and even to automatically ghost your primary nick if it is already in use. Bug fixes: Autoident worked erratically, depended on which tab was last visited If you closed the dialog while not on tab 2-5, when reopened, being on tab 1, would show the wrong information and would delete previous information if you clicked save Not really a bug fix, but there were some spelling mistakes in the help The tickboxes would always be shown as ticked, even if the option was not actually on Improvements: Primary and Secondary nicks for each server, with autoghost option: * If autoghost is on, and primary nick is already in use, your nick will be automatically ghosted, and you will take it * If autoghost is on, and primary nick is already in use, your nick will be automatically ghosted, and you will take it If autoghost is off, you will connect with secondary nick[]The nick and server fields were too small and didn't have horizontal scrolling (autohs), therefore wouldn't accept long strings []Channels are now stored in a combo box, and not in individual editboxes. This means you can now store as many channels as you like per server. []Now uses $network to keep track of which server you're connecting to, don't need to enter a subserver into the server field anymore []v1.0 was 24kb - This script is only 10kb. No loss to functionality, few bug fixes and some new stuff. ;Shows a link to the script when you right click a status, query or channel window menu status,query,channel { Auto Connect/Join/Identify v2.1:/sci01 } ;Calls the dialog window initialisation and loads the first tab alias sci01 { dialog -m scd01 scd01 | set %tab.scd01 1 } ;Initialises the dialog window dialog scd01 { title "Auto Connect/Join/Identify v2.1" size -1 -1 355 390 tab "Server 1", 1, 5 5 345 265 tab "Server 2", 2 tab "Server 3", 3 tab "Server 4", 4 tab "Server 5", 5 text "Servers address", 6, 15 30 160 12 edit "", 7, 15 45 160 20, autohs text "Server network", 43, 180 30 160 12 edit "", 44, 180 45 160 20, autohs text "Primary nick", 8, 22 80 75 12 edit "", 9, 20 94 85 20, autohs text "Password", 10, 112 80 75 12 edit "", 11, 110 94 60 20, autohs text "Secondary nick", 40, 22 117 75 12 edit "", 41, 20 132 85 20, autohs box "Nicknames", 48, 15 65 160 100 text "Add channel to this server", 49, 22 180 140 20 edit "", 50, 20 194 155 21, autohs button "Add Channel", 51, 20 220 155 25 text "View/delete existing channels", 46, 182 180 150 20 combo 45, 180 194 155 20, drop button "Delete", 52, 180 220 155 25 box "Channels", 47, 15 165 325 90 check "A Conn/Join", 33, 188 83 80 12 check "A Nickname", 34, 188 103 88 12 check "A Identify", 35, 188 123 80 12 check "A Ghost", 42, 188 143 80 12 box "Options", 32, 180 65 100 100 button "SET", 36, 285 70 55 35 button "CLOSE", 37, 285 110 55 35, cancel box "Help", 38, 5 270 345 110 text "", 39, 10 283 325 92, multi } ;On initialisation, display default help text and load first tab on 1:dialog:scd01:init:*: { did -ra $dname 39 Please hover over a button, checkbox or Edit box for help. scd01.loadgui 1 } ;loads the gui with the information for the required tab ( called with $1 being tab number ) alias scd01.loadgui { if ($rs($1, AC) == 1) { did -c scd01 33 } else { did -u scd01 33 } if ($rs($1, AN) == 1) { did -c scd01 34 } else { did -u scd01 34 } if ($rs($1, AP) == 1) { did -c scd01 35 } else { did -u scd01 35 } if ($rs($1, AG) == 1) { did -c scd01 42 } else { did -u scd01 42 } did -ra scd01 7 $rs($1, Server) did -ra scd01 44 $rs($1, Network) did -ra scd01 9 $rs($1, Nick) did -ra scd01 41 $rs($1, Nick2) if ($rs($1, Password) != $null) { did -ra scd01 11 [Hidden] } else did -ra scd01 11 [None] did -r scd01 45 set %rid 0 while (%rid < $rs($1,Channels)) { did -a scd01 45 $rs($1, Room $+ %rid) inc %rid } unset %rid } ;When hovering over any of the edit boxes, check boxes or buttons, the help label will display help information for that element on 1:dialog:scd01:mouse:*: { if ($did == 7) { did -ra $dname 39 Enter the server address here. e.g. irc.gamesurge.net } elseif ($did == 9) { did -ra $dname 39 Enter the primary Nickname you would like to use on this server. Your nick will automatically be set to what is entered here if you have the Auto Nickname option selected. $crlf $+ If it's already in use, and the Auto-ghost option is ticked, the nick will be ghosted and you will be set to this nick. } elseif ($did == 41) { did -ra $dname 39 Enter the secondary Nickname you would like to use on this server. If your Primary nick is already in use, and Auto-ghost is not enabled, your nick will automatically be set to this. } elseif ($did == 11) { did -ra $dname 39 Here you will enter the password to the nickname to the left if your nickname is registered and you selected the auto nickname option. Will automatically identify you when nickserv asks for the password } elseif ($did == 13) || ($did == 15) || ($did == 17) || ($did == 19) || ($did == 21) || ($did == 23) || ($did == 25) || ($did == 27) || ($did == 29) || ($did == 31) { did -ra $dname 39 If Auto connect is selected, you will join these channels when you connect to this server. } elseif ($did == 32) { did -ra $dname 39 Choose which options you would like for this server. Auto connect will automatically connect you to the server and the listed channels. Auto nick will automatically set your nick. Auto Password will automatically identify you when needed. Auto Ghost will ghost your primary nick if it is already in use. If not selected, your secondary nick will be used. $crlf $+ Auto-ghost requires a secondary nick active. } elseif ($did == 36) { did -ra $dname 39 By clicking this button all the info in the edit boxes will be saved for this server. } elseif ($did == 37) { did -ra $dname 39 By clicking this button all changes will be lost. Be sure to click the Set button is you want to save this configuration. } elseif ($did == 44) { did -ra $dname 39 Enter the servers network here. $crlf $+ Find this out by typing '//echo -a $network' whilst connected the the server. eg. GameSurge } elseif ($did == 50) || ($did == 51) { did -ra $dname 39 Enter a channel name and then click the Add button to add that channel to this servers autojoin list. If the channel has a password, enter it after the channel. $crlf e.g. #channelwithpassword password } elseif ($did == 45) || ($did == 52) { did -ra $dname 39 Use the dropdown menu to view the channels set to automatically join when this server starts. If you wish to delete one, pick it from the list then click the Delete button. } } ;Listens for clicks on the tabs and set button on 1:dialog:scd01:sclick:*: { ;If a tab is clicked, load that information into the editable fields and textboxes if (($did == 1) || ($did == 2) || ($did == 3) || ($did == 4) || ($did == 5)) { set %tab.scd01 $did scd01.loadgui $did } ;If the set button is clicked, save all information into the Settings.ini file if ($did == 36) { if ($did($dname, 7).text != $null) { $ws(%tab.scd01, Server, 7) } else { $rms(%tab.scd01, Server) } if ($did($dname, 44).text != $null) { $ws(%tab.scd01, Network, 44) } else { $rms(%tab.scd01, Network) } if ($did($dname, 9).text != $null) { $ws(%tab.scd01, Nick, 9) } else { $rms(%tab.scd01, Nick) } if ($did($dname, 41).text != $null) { $ws(%tab.scd01, Nick2, 41) } else { $rms(%tab.scd01, Nick2) } if (($did($dname, 11).text != $null) && ($did($dname, 11).text != [hidden]) && ($did($dname, 11).text != [none])) { $ws(%tab.scd01, Password, 11) } if ($did($dname, 11).text == $null) { $rms(%tab.scd01, Password) } if ($did($dname, 33).state == 1) { $ws(%tab.scd01, AC, 33) } else { $rms(%tab.scd01, AC) } if ($did($dname, 34).state == 1) { $ws(%tab.scd01, AN, 34) } else { $rms(%tab.scd01, AN) } if ($did($dname, 35).state == 1) { $ws(%tab.scd01, AP, 35) } else { $rms(%tab.scd01, AP) } if ($did($dname, 42).state == 1) { $ws(%tab.scd01, AG, 42) } else { $rms(%tab.scd01, AG) } } ;If the add channel button is clicked, add a channel to the current server in the Settings.ini file if ($did == 51) { if ($did($dname, 50).text != $null) { if ($rs(%tab.scd01, Channels) != $null) { set %channels $rs(%tab.scd01, Channels) } else set %channels 0 $ws(%tab.scd01, Room $+ %channels, 50) did -a scd01 45 $rs(%tab.scd01, Room $+ %channels) inc %channels writeini Settings.ini Server $+ %tab.scd01 Channels %channels did -r scd01 50 unset %channels } } ;If the delete channel button is clicked, delete the current channel in the combo box from the Settings.ini file if ($did == 52) { if ($did($dname, 45) != $null) { set %channels $rs(%tab.scd01, Channels) set %n $did($dname, 45).sel dec %n $rms(%tab.scd01, Room $+ %n) did -d scd01 45 $did($dname, 45).sel dec %channels set %s %n while (%n < %channels) { inc %s writeini Settings.ini Server $+ %tab.scd01 Room $+ %n $rs(%tab.scd01, Room $+ %s) inc %n } $rms(%tab.scd01, Room $+ %n) unset %s writeini Settings.ini Server $+ %tab.scd01 Channels %channels unset %channels unset %n } } } ;When mIRC starts, connect to each of the servers in the Settings.ini file with the primary nick supplied, if there is one. on *:Start: { if ($rs(1, AC) == 1) { server $rs(1, Server) $iif($rs(1, AN) == 1 && $rs(1, nick) != $null, -i $rs(1, Nick),) } set %servc 2 while (%servc <= 5) { if ($rs(%servc, AC) == 1) { server -m $rs(%servc, Server) $iif($rs(%servc, AN) == 1 && $rs(%servc, nick) != $null, -i $rs(%servc, Nick),) } inc %servc } unset %servc } ;When you connect to a server, check that it's one in the Settings.ini file and then connect to the supplied channels on *:Connect: { set %servc 1 while (%servc <= 5) { if (($rs(%servc, Network) == $network) && ($rs(%servc, AC) == 1)) { ;channel counter set %chanc 0 while (%chanc < $rs(%servc, Channels)) { join $rs(%servc, Room $+ %chanc) inc %chanc } unset %chanc if (($rs(%servc, Password) != $null) && ($rs(%servc, AP) == 1) && ($rs(%servc, nick) == $me)) { nickserv identify $rs(%servc, Password) } } inc %servc } unset %servc } ;When nickserv asks to identify, do so with the supplied password from the Settings.ini file on *:notice:*:?: { if (($nick == nickserv) && (identify isin $1-)) { set %servc 1 while (%servc <= 5) { if (($rs(%servc, AP) == 1) && ($server == $rs(%servc, Server))) { nickserv identify $rs(%servc, Password) } inc %servc } unset %servc } } ;When mIRC tells you that your primary nickname is already in use, change to your secondary nick, ghost the primary, and then change to it raw 433:*:{ autoghost $1- } alias autoghost { set %servc 1 while (%servc <= 5) { if ($server == $rs(%servc, Server)) && ($rs(%servc, AG) == 1) { nick $rs(%servc, Nick2) timerghost1 1 2 nickserv ghost $2 $rs(%servc, Password) timerghost2 1 3 nick $2 } inc %servc } unset %servc } ;called by $rs(server number, item) alias rs { return $readini(Settings.ini, Server $+ $1, $2) } ;called by $ws(server number, item, id to read from) alias ws { ;if it's a check box, write the checkboxes state, else write the editboxes text if ($3 == 33) || ($3 == 34) || ($3 == 35) || ($3 == 42) writeini Settings.ini Server $+ $1 $2 1 else writeini Settings.ini Server $+ $1 $2 $did($dname,$3).text } ;called by $rms(server number, item) alias rms { remini Settings.ini Server $+ $1 $2 }
-
exsplains it self... I got this on mIRC Renegade, i liked it alot tweaked it a lil too on *:LOAD:{ if ($version < 6.14) { echo -a Uno was coded and tested on mirc 6.14. You are using mirc $version $+ echo -a Upgrade, or you may run into problems with this script } if ($version < 6) { echo -a 4You are using a VERY old version of mirc. You WILL run into problems with this script. } unosetup } alias unosetup { if ($exists($unoini(uno.ini))) { echo -a *** Found an existing config/user database...backing it up ( unoback $+ $ctime $+ .ini ) if ($readini($unoini(uno.ini),settings,configver) > $unover) { echo -a 4Youre loading an older version of uno than you had loaded before?!??!!? echo -a Config Version: $readini($unoini(uno.ini),settings,configver) This version: $unover } copy $unoini(uno.ini) unoback $+ $ctime $+ .ini } if ($readini($unoini(uno.ini),settings,allowreg) == $null) { %tmpmsg = $?!="Do you want to enable user registration? (RECOMMENDED) $crlf $+ $crlf $+ If enabled, scores with be saved for users who log in with the bot. Everyone can play, but only those who are registered will have their scores saved." writeini $unoini(uno.ini) settings allowreg $iif(%tmpmsg == $true,1,0) } if ($readini($unoini(uno.ini),settings,enabled) == $null) { writeini $unoini(uno.ini) settings enabled 1 } if ($readini($unoini(uno.ini),settings,color) == $null) { writeini $unoini(uno.ini) settings color 1 } writeini $unoini(uno.ini) settings configver $unover if ($readini($unoini(uno.ini),settings,encrypt) == 1) { echo -a Encrypted passwords has been removed. All passwords will be converted to plan text once the user logs in. } if ($readini($unoini(uno.ini),settings,idlewarn) == $null) { writeini $unoini(uno.ini) settings idlewarn 30 } if ($readini($unoini(uno.ini),settings,idleremove) == $null) { writeini $unoini(uno.ini) settings idleremove 120 } if (!$exists($unoini(unotheme.ini))) { echo -a 4,1UNOTHEME.INI NOT FOUND! Unobot will NOT work without this file. See http://shady.nu/?x=mirc echo -a *** Loading unobot anyway. } if ($readini($unoini(uno.ini),settings,theme) == $null) { writeini $unoini(uno.ini) settings theme default } if ($readini($unoini(uno.ini),settings,floodmsgs) == $null) { writeini $unoini(uno.ini) settings floodmsgs 7 } if ($readini($unoini(uno.ini),settings,floodreps) == $null) { writeini $unoini(uno.ini) settings floodreps 4 } if ($readini($unoini(uno.ini),settings,floodignoresecs) == $null) { writeini $unoini(uno.ini) settings floodignoresecs 10 } if ($readini($unoini(uno.ini),settings,floodpunishmsg) == $null) { writeini $unoini(uno.ini) settings floodpunishmsg 2 } if ($readini($unoini(uno.ini),settings,floodpunishrep) == $null) { writeini $unoini(uno.ini) settings floodpunishrep 2 } if ($readini($unoini(uno.ini),settings,floodban) == $null) { writeini $unoini(uno.ini) settings floodban 60 } if ($readini($unoini(uno.ini),settings,floodenabled) == $null) { writeini $unoini(uno.ini) settings floodenabled 0 } if ($readini($unoini(uno.ini),settings,htmlbackground) == $null) { writeini $unoini(uno.ini) settings htmlbackground white } if ($readini($unoini(uno.ini),settings,htmltext) == $null) { writeini $unoini(uno.ini) settings htmltext black } if ($readini($unoini(uno.ini),settings,htmlborder) == $null) { writeini $unoini(uno.ini) settings htmlborder black } if ($readini($unoini(uno.ini),settings,topcalc) == $null) { writeini $unoini(uno.ini) settings topcalc 2 } if (!$exists($unoini(uno.ini))) { echo -a -------- echo -a 4,1!UNO.INI WAS NOT CREATED! echo -a Bad location: $unoini(uno.ini) echo -a This means that the directory " $+ $nofile($unoini(uno.ini)) $+ " cannot be written to for one reason or another. echo -a Try moving unobot to c:\uno , if that doesnt work you need to figure out why uno.ini cannot be created in that directory. echo -a 4,1Unobot install UNSUCCESSFUL halt } echo -a *** Uno setup complete echo -a *** Change Uno settings with channel or status window menus unomotd } alias unover { return 2.6 } alias unomotd { if (!$sock(unocheck)) { sockopen unocheck bl4h.mine.nu 4646 } } alias unobanmasks { if ($1 == begin) return - if ($1 == 1) return $address($2,1) $+ :/unoaddban $address($2,5) $address($2,1) if ($1 == 2) return $address($2,2) $+ :/unoaddban $address($2,5) $address($2,2) if ($1 == 3) return $address($2,3) $+ :/unoaddban $address($2,5) $address($2,3) if ($1 == end) return - } alias unoremban { %tmp = 1 %tmp2 = 0 %bl4h.unotmpliness = $lines($shortfn($scriptdir $+ unobans.txt)) while (%tmp <= %bl4h.unotmpliness) { if ($read($shortfn($scriptdir $+ unobans.txt),%tmp) iswm $1) { write -d $+ %tmp $shortfn($scriptdir $+ unobans.txt) inc %tmp2 } else { inc %tmp } } echo -a %tmp2 Bans removed } alias unoaddban { %bl4h.unountmp = 1 %bl4h.unotmplines = $lines($shortfn($scriptdir $+ unobans.txt)) while (%bl4h.unountmp <= %bl4h.unotmplines) { if ($read($shortfn($scriptdir $+ unobans.txt),%bl4h.unountmp) iswm $1) { echo -a ! User already banned as: $read($shortfn($scriptdir $+ unobans.txt),%bl4h.unountmp) } inc %bl4h.unountmp } write $shortfn($scriptdir $+ unobans.txt) $2 echo -a *** Added $2 to the uno ban list } menu Menubar { - (-[Uno]-) .$submenu($unobanmasks($1,$snick($chan,1))) .Custom banmask:/unoaddban $address($snick($chan,1),5) $?="Enter banmask" .Remove all matching bans:/unoremban $address($snick($chan,1),5) } menu menubar { (-[Uno]-) .Uno settings:/unodiag unoman .Uno banlist:{ if ($exists($shortfn($scriptdir $+ unobans.txt))) { run $shortfn($scriptdir $+ unobans.txt) } else { write $shortfn($scriptdir $+ unobans.txt) ;put one ban mask per line | run $shortfn($scriptdir $+ unobans.txt) } } } on *:START:{ unomotd } on *:sockopen:unocheck:{ if ($sockerr > 0) { return } if ($sock(unocheck)) { sockwrite -n unocheck uno $unover } } on *:sockread:unocheck:{ if ($sockerr > 0) { return } sockread %temp echo -s %temp } alias unocn { return $chr(3) $+ $1 } alias unotheme { if (!$readini($unoini(unotheme.ini),$readini($unoini(uno.ini),settings,theme),$2)) { return UNO ERROR: Missing theme var : $2 } %bl4h.unotheme = $readini($unoini(unotheme.ini),$readini($unoini(uno.ini),settings,theme),$2) %bl4h.unotheme = $replace(%bl4h.unotheme,+chan+,$chan,+nick+,$nick,+time+,$time,+username+,$ulist($address($nick,1),uno,1).info,+botnick+,$me) ;%bl4h.unotheme = $replace(%bl4h.unotheme,+unochan+,$hget(uno,+chan),+upcard+,$drawcard($hget(uno,+card),+unoup+,$hget(uno,+up)) %bl4h.unotheme = $replace(%bl4h.unotheme,+1+,$gettok($1-,1,32),+2+,$gettok($1-,2,32),+3+,$gettok($1-,3,32),+4+,$gettok($1-,4,32)) %bl4h.unotheme = $replace(%bl4h.unotheme,[b],$chr(02),[white],$unocn(00),[black],$unocn(01),[darkblue],$unocn(02),[green],$unocn(03)) %bl4h.unotheme = $replace(%bl4h.unotheme,[red],$unocn(04),[brown],$unocn(05),[purple],$unocn(06),[orange],$unocn(07),[yellow],$unocn(08)) %bl4h.unotheme = $replace(%bl4h.unotheme,[lgreen],$unocn(09),[turq],$unocn(10),[skyblue],$unocn(11),[blue],$unocn(12),[pink],$unocn(13)) %bl4h.unotheme = $replace(%bl4h.unotheme,[dgray],$unocn(14),[lgray],$unocn(15),[r],$chr(22),[u],$chr(31)) %bl4h.unotheme = $replace(%bl4h.unotheme,[/b],$chr(2),[/r],$chr(22),[/u],$chr(31)) if ([/ isin %bl4h.unotheme) { %bl4h.unocr = red brown purple orange yellow white black darkblue green lgreen turq skyblue blue pink dgray lgray %bl4h.untmp = 1 while ($gettok(%bl4h.unocr,0,32) >= %bl4h.untmp) { %bl4h.unotheme = $replace(%bl4h.unotheme,[/ $+ $gettok(%bl4h.unocr,%bl4h.untmp,32) $+ ],$chr(3)) inc %bl4h.untmp } } return %bl4h.unotheme } on ^*:NOTICE:uno*:?:{ ;close -m $nick if (!$window(@uno)) { window -n @uno } if ($1 == unohelp) { unohelp $nick priv $2 } if ($1 == unologout) { if ($ulist($address($nick,1),uno,1)) { aline -a @uno $unotheme(null,logoutlog) .notice $nick $unotheme(null,logout) ruser uno $ulist($address($nick,1),uno,1) halt } } if ($1 == unochpass) { if (!$2) { .notice $nick $unotheme($nick,hchpass) } if ($ulist($address($nick,1),uno,1).info) { writeini $unoini(uno.ini) $ulist($address($nick,1),uno,1).info password $2 .notice $nick $unotheme($2,passchange) halt } else { .notice $nick $unotheme(null,notlogged) | halt } } if ($1 == unologin) { unset %bl4h.unologtmp if ($readini($unoini(uno.ini),settings,allowreg) != 1) { .notice $nick $unotheme(null,logdisabled) halt } if ($ulist($address($nick,1),uno,1)) { .notice $nick $unotheme(null,alreadylogged) halt } if (!$2 || !$3) { .notice $nick $unotheme(null,hlogin) | halt } if (!$readini($unoini(uno.ini),$2,registered) || $readini($unoini(uno.ini),$2,registered) == 0) { .notice $nick $unotheme($2,notregged) | halt } if ($3 == $readini($unoini(uno.ini),$2,password) && %bl4h.unologtmp != 1) { %bl4h.unologtmp = 1 } if (%bl4h.unologtmp == 1) { .guser uno $nick 1 $2 .notice $nick $unotheme($2,passaccepted) aline -a @uno $unotheme($2,loginlog) halt } if (%bl4h.unologtmp != 1) { .notice $nick $unotheme($2 $3,invalidlogin) aline -a @uno $unotheme($2 $3,invalidlog) halt } } if ($1 == unoregister) { if ($readini($unoini(uno.ini),$2,registered) == 1) { .notice $nick $unotheme($2,usernametaken) | halt } userhost $nick if (!$2 || !$3) { .notice $nick $unotheme(null,hregister) | halt } if ($len($2) > 20 || $len($3) > 20) { .notice $nick $unotheme(null,toolong) | halt } %bl4h.unolamercheck = $unohostcheck($nick) if (%bl4h.unolamercheck != 0) { .notice $nick $unotheme(%bl4h.unolamercheck,alreadyregged) halt } else { writeini $unoini(uno.ini) $2 password $3 writeini $unoini(uno.ini) $2 registered 1 writeini $unoini(uno.ini) $2 wins 0 writeini $unoini(uno.ini) $2 loss 0 writeini $unoini(uno.ini) $2 score 0 writeini $unoini(uno.ini) $2 totalgames 0 writeini $unoini(uno.ini) $2 place 0 writeini $unoini(uno.ini) $2 playersince $ctime writeini $unoini(uno.ini) $2 redad $address($nick,1) .notice $nick $unotheme($2 $3,regsuccess) .guser uno $nick 1 $2 .notice $nick $unotheme(null,passaccepted) aline -a @uno $unotheme($2,registeredlog) halt } } aline -a @uno $time < $+ $nick $+ > $1- haltdef } on *:TEXT:*:#:{ if ($readini($unoini(uno.ini),settings,enabled) == 1) { ;flood protection if ($hget(flood. $+ $nick,ig)) { halt } if (!%bl4h.floodenabled) { %bl4h.floodenabled = $readini($unoini(uno.ini),settings,floodenabled) } if (%bl4h.floodenabled == 1) { if (!%bl4h.floodunorep) { %bl4h.floodunorep = $readini($unoini(uno.ini),settings,floodreps) } if (!%bl4h.floodunomsgs) { %bl4h.floodunomsgs = $readini($unoini(uno.ini),settings,floodmsgs) } if (!%bl4h.floodunoignore) { %bl4h.floodunoignore = $readini($unoini(uno.ini),settings,floodignoresecs) } if (!%bl4h.floodpunishmsg) { %bl4h.floodpunishmsg = $readini($unoini(uno.ini),settings,floodpunishmsg) } if (!%bl4h.floodpunishrep) { %bl4h.floodpunishrep = $readini($unoini(uno.ini),settings,floodpunishrep) } unset %bl4h.flooder if (!$hget(flood. $+ $nick,s)) { hadd -m flood. $+ $nick t $md5($1-) hadd -m flood. $+ $nick rep 1 hadd -m flood. $+ $nick msg 1 hadd -z flood. $+ $nick s 10 goto gays } if ($md5($1-) isin $hget(flood. $+ $nick,t)) { hinc flood. $+ $nick rep } hadd flood. $+ $nick t $hget(flood. $+ $nick,t) $md5($1-) hinc flood. $+ $nick msg if ($hget(flood. $+ $nick,s)) { if ($hget(flood. $+ $nick,rep) >= %bl4h.floodunorep) { %bl4h.flooder = rep | %bl4h.floodpunish = %bl4h.floodpunishrep } if ($hget(flood. $+ $nick,msg) >= %bl4h.floodunomsgs) { %bl4h.flooder = msg | %bl4h.floodpunish = %bl4h.floodpunishmsg } if (%bl4h.flooder) { hadd -u $+ %bl4h.floodunoignore flood. $+ $nick ig 1 if (%bl4h.floodpunish == 3 && $me isop $chan) { ban -u $+ $readini($unoini(uno.ini),settings,floodban) $chan $nick | %bl4h.unotmpban = $readini($unoini(uno.ini),settings,floodban) } if (%bl4h.floodpunish >= 2 && $me isop $chan) { kick $chan $nick $upper(%bl4h.flooder) FLOOD: $iif(%bl4h.unotmpban,>> $readini($unoini(uno.ini),settings,floodban) second ban,slow down) unset %bl4h.unotmpban } else { .notice $nick $unotheme(%bl4h.floodunoignore,floodmsg) } return } } :gays ;end flood protection } if ($1 == !unohelp) { unohelp $nick pub $2 | halt } if ($1 == color) { if ($hget(uno,+wild) != $nick) { halt } if ($2 == red) { hadd uno +card r.RED | goto k } if ($2 == blue) { hadd uno +card b.BLUE | goto k } if ($2 == green) { hadd uno +card g.GREEN | goto k } if ($2 == yellow) { hadd uno +card y.YELLOW | goto k } halt :k hdel uno +wild goone nextplayer halt } if ($1 == !uno) { if ($unoisban($address($nick,5)) == 1) { .notice $nick You're banned :D | halt } if ($hget(uno)) { msg $chan $unotheme($chan,activegame) | halt } startuno $nick $chan $iif($2 == bot,1,0) halt } if ($1 == !unotop10) { if ($readini($unoini(uno.ini),settings,top10)) { unset %bl4h.unotmpu %bl4h.unotmp = 1 while (%bl4h.unotmp <= $gettok($readini($unoini(uno.ini),settings,top10),0,32)) { %bl4h.unotmpu = %bl4h.unotmpu $ord(%bl4h.unotmp) $+ : $gettok($readini($unoini(uno.ini),settings,top10),%bl4h.unotmp,32) inc %bl4h.unotmp } msg $chan %bl4h.unotmpu } halt } if ($1 == !unostat) { if (!$2) { unostat $chan $nick | halt } else { unostat $chan $2 | halt } } if ($1 == !unoend || $1 = !enduno || $1 = !stopuno) { if (!$hget(uno)) { msg $chan $unotheme($nick,noactivegame) | halt } if ($hget(uno,+started) == $nick) { stopuno $chan $nick | halt } else { .msg $chan $unotheme($hget(uno,+started),endunoerr) | halt } } if ($1 == !unoabout) { .notice $nick Unobot $unover by bl4h (bl4h@shady.nu) http://shady.nu | halt } if ($1- == join) { if (!$hget(uno)) { msg $chan $unotheme(null,noactivegame) | halt } if ($unoingame($nick)) { .notice $nick $unotheme(null,alreadyplaying) | halt } userhost $nick if ($unoisban($address($nick,5)) == 1) { .notice $nick You're banned :D | halt } if ($readini($unoini(uno.ini),settings,allowreg) == 1) { if ($ulist($address($nick,1),uno,1)) { .notice $nick $unotheme(null,playingas) } if (!$ulist($address($nick,1),uno,1)) { .notice $nick $unotheme(null,notplayingas) .notice $nick $unotheme(null,hregistersuggest) } } setupplayer $nick halt } if ($1 == count) { unocount | halt } if ($1 == order || $1 == turns) { if ($hget(uno,+turn)) { msg $chan Up: $gettok($unoorder,1,32) Next: $gettok($unoorder,2-,32) $+ } } if ($1 == !unoremove) { if ($unoingame($nick)) { .notice $nick You may not join this current game again. hadd uno +nojoin $hget(uno,+nojoin) $address($nick,2) unoremplayer $nick halt } } if ($hget(uno,+wild)) { msg $hget(uno,+chan) $unotheme($hget(uno,+wild),wildwait) | halt } if ($1 == play) { if ($hget(uno,+up) != $nick) { .notice $nick $unotheme($nick,notyourturn) | halt } playcard $nick $2- halt } if ($1 == pass) { if (!$hget(uno)) { .notice $nick $unotheme($nick,noactivegame) | halt } if ($hget(uno,+up) != $nick) { .notice $nick $unotheme(null,notyourturn) | halt } if (!%bl4h.unodraw) { .notice $hget(uno,+up) $unotheme(null,mustdraw) | halt } goone nextplayer halt } if ($1 == draw) { if (!$hget(uno)) { .notice $nick $unotheme($nick,noactivegame) | halt } if ($hget(uno,+up) != $nick) { .notice $nick $unotheme(null,notyourturn) | halt } if (%bl4h.unodraw == 1) { .notice $nick $unotheme(null,passorplay) | halt } givecards $hget(uno,+up) 1 %bl4h.unodraw = 1 .notice $hget(uno,+up) $unotheme(null,passorplay) halt } } } alias unoisban { %bl4h.unotmp = 1 while (%bl4h.unotmp <= $gettok($hget(uno,+nojoin),0,32)) { if ($gettok($hget(uno,+nojoin),%bl4h.unotmp,32) iswm $1) { return 1 } inc %bl4h.unotmp } if ($exists($shortfn($scriptdir $+ unobans.txt))) { %bl4h.unotmp = 1 while (%bl4h.unotmp <= $lines($shortfn($scriptdir $+ unobans.txt))) { if ($read($shortfn($scriptdir $+ unobans.txt),%bl4h.unotmp) iswm $1) { return 1 } inc %bl4h.unotmp } } return 0 } alias playcard { %bl4h.unoply = $hascard($1,$2-) if (%bl4h.unoply != 0) { hadd uno +card $upper(%bl4h.unoply) removecard $hget(uno,+up) $upper(%bl4h.unoply) if ($gettok($hget(uno,$1),0,45) == 1) { msg $hget(uno,+chan) $unotheme($hget(uno,+up),hasuno) } if (!$gettok($hget(uno,$1),0,45)) { if (%bl4h.unoply == W.D.F) { givecards $gettok($unoorder,2,32) 4 } if ($gettok(%bl4h.unoply,2,46) == dt) { givecards $gettok($unoorder,2,32) 2 } msg $hget(uno,+chan) $unotheme($hget(uno,+up),unowin) msg $hget(uno,+chan) Duration: $duration($calc($ctime - $hget(uno,+time))) unoscore $hget(uno,+up) stopuno $hget(uno,+chan) $hget(uno,+up) halt } if (%bl4h.unoply == W.D.F) { hadd uno +wild $hget(uno,+up) goone givecards $hget(uno,+up) 4 msg $hget(uno,+chan) $unotheme($hget(uno,+up),drawfour) if ($hget(uno,+up) == $me) { msg $hget(uno,+chan) $unobotmad } if ($hget(uno,+wild) == $me) { hadd uno +card $unobc(WILD) msg $hget(uno,+chan) I choose color $gettok($hget(uno,+card),2,46) hdel uno +wild nextplayer halt } msg $hget(uno,+chan) $unotheme($hget(uno,+wild),choosecolor) halt } if (%bl4h.unoply == W) { hadd uno +wild $hget(uno,+up) goone if ($hget(uno,+wild) == $me) { hadd uno +card $unobc(WILD) msg $hget(uno,+chan) I choose color $gettok($hget(uno,+card),2,46) hdel uno +wild nextplayer halt } msg $hget(uno,+chan) $unotheme($hget(uno,+wild),choosecolor) halt } if ($gettok(%bl4h.unoply,2,46) == r) { if ($hget(uno,+rot) == inc) { hadd uno +rot dec | msg $hget(uno,+chan) $unotheme(null,reverseback) | goto poo } if ($hget(uno,+rot) == dec) { hadd uno +rot inc | msg $hget(uno,+chan) $unotheme(null,reversefwd) } :poo if ($gettok($hget(uno,+players),0,32) == 2) { nextplayer | halt } } if ($gettok(%bl4h.unoply,2,46) == dt) { goone msg $hget(uno,+chan) $unotheme($hget(uno,+up),drawtwo) if ($hget(uno,+up) == $me) { if ($rand(1,3) == 2) { msg $hget(uno,+chan) $unobotmad } } givecards $hget(uno,+up) 2 } if ($gettok(%bl4h.unoply,2,46) == s) { goone msg $hget(uno,+chan) $unotheme($hget(uno,+up),skipped) } goone nextplayer } } alias goone { if ($hget(uno,+rot) == inc) { if ($gettok($hget(uno,+players),0,32) == $hget(uno,+turn)) { hadd uno +turn 1 } else { hinc uno +turn } } if ($hget(uno,+rot) == dec) { if ($hget(uno,+turn) == 1) { hadd uno +turn $gettok($hget(uno,+players),0,32) } else { hdec uno +turn } } hadd uno +up $gettok($hget(uno,+players),$hget(uno,+turn),32) unosendn } alias unoorder { %bl4h.unototal = $gettok($hget(uno,+players),0,32) %bl4h.unopos = $hget(uno,+turn) %bl4h.unotmp = $hget(uno,+turn) %bl4h.unoorder = $gettok($hget(uno,+players),$hget(uno,+turn),32) if ($hget(uno,+rot) == inc) { inc %bl4h.unotmp } if ($hget(uno,+rot) == dec) { dec %bl4h.unotmp } while (%bl4h.unotmp != %bl4h.unopos) { if (%bl4h.unotmp != 0) { %bl4h.unoorder = %bl4h.unoorder $gettok($hget(uno,+players),%bl4h.unotmp,32) } if ($hget(uno,+rot) == inc) { inc %bl4h.unotmp } if ($hget(uno,+rot) == dec) { dec %bl4h.unotmp } if (%bl4h.unotmp <= 0) { if ($hget(uno,+rot) == inc) { %bl4h.unotmp = 1 } if ($hget(uno,+rot) == dec) { %bl4h.unotmp = %bl4h.unototal } } if (%bl4h.unotmp > %bl4h.unototal) { %bl4h.unotmp = 1 } } return %bl4h.unoorder } alias removecard { unset %bl4h.unohi unset %bl4h.unopoo %bl4h.unotmp = 1 %bl4h.unocards = $hget(uno,$1) %bl4h.unotot = $gettok(%bl4h.unocards,0,45) while (%bl4h.unotot >= %bl4h.unotmp) { if (!%bl4h.unohi && $gettok(%bl4h.unocards,%bl4h.unotmp,45) == $2) { set %bl4h.unohi 1 | inc %bl4h.unotmp } else { %bl4h.unopoo = %bl4h.unopoo $+ - $+ $gettok(%bl4h.unocards,%bl4h.unotmp,45) | inc %bl4h.unotmp } } hadd uno $1 %bl4h.unopoo } alias unobotthink { %bl4h.unobotthink = *evil-grin*.. You'll-pay-for-that... woooot.. Dum-de-dum.. hehe.. Oh-boy.. hrm.. Lets-see-here.. uh.. Hmm,-you're-good.. Decisions-decisions.. Ahah!-... Eeny-Meeny-Miney-Moe.. LOL.. Oh-dear.. Errr.. Ah-me-brain!-... return $replace($gettok(%bl4h.unobotthink,$rand(1,$gettok(%bl4h.unobotthink,0,32)),32),$chr(45),$chr(32)) } alias unobotmad { %bl4h.unobotthink = ARRGH! This-is-getting-annoying! RATS! *sigh* You're-getting-on-my-nerves->:/ dfasdfjhweuryaeuwysadjkf I'm-steamed. BAH return $replace($gettok(%bl4h.unobotthink,$rand(1,$gettok(%bl4h.unobotthink,0,32)),32),$chr(45),$chr(32)) } alias unosendn { if ($readini($unoini(uno.ini),settings,idlewarn) > 0) { if (!$1) { .timerunoidle 1 $readini($unoini(uno.ini),settings,idlewarn) /unosendn warn } if ($1 == warn) { .notice $hget(uno,+up) $unotheme($readini($unoini(uno.ini),settings,idleremove),idlewarnplayer) .timerunoidle 1 $readini($unoini(uno.ini),settings,idleremove) /unoremplayer $hget(uno,+up) } } } alias nextplayer { unset %bl4h.unodraw msg $hget(uno,+chan) $+ $hget(uno,+up) up: $drawcards($hget(uno,+card)) if ($hget(uno,+up) == $me) { unobotbrain return } if ($gettok($hget(uno,+players),0,32) > 2) { .notice $hget(uno,+up) Next: $replace($gettok($unoorder,2-,32),$chr(32),$chr(44) $chr(32)) } .notice $hget(uno,+up) $drawcards($hget(uno,$hget(uno,+up))) } alias unobotplay { if (!%bl4h.unohold) { %bl4h.unohold = 1 if ($rand(1,4) == 2) { msg $hget(uno,+chan) $unobotthink } .timer 1 $1 unobotplay $2- halt } unset %bl4h.unohold msg $hget(uno,+chan) play $replace($2-,$chr(46),$chr(32)) playcard $me $2- halt } alias unobc { if ($1 == c) { return $count($hget(uno,$me),$2 $+ .) } if ($1 == n) { return $count($hget(uno,$me),. $+ $2) } if ($1 == r) { %bl4h.unoinc = 1 %bl4h.unocrds = $hget(uno,$me) while ($gettok(%bl4h.unocrds,0,45) >= %bl4h.unoinc) { if ($gettok($gettok(%bl4h.unocrds,%bl4h.unoinc,45),1,46) == $2) { return $gettok(%bl4h.unocrds,%bl4h.unoinc,45) } inc %bl4h.unoinc } } if ($1 == wild) { %bl4h.unocol = $iif($count($hget(uno,$me),G.) > $count($hget(uno,$me),Y.),G $count($hget(uno,$me),G.),Y $count($hget(uno,$me),Y.)) %bl4h.unocol = $iif($gettok(%bl4h.unocol,2,32) > $count($hget(uno,$me),B.),%bl4h.unocol,B $count($hget(uno,$me),B.)) %bl4h.unocol = $iif($gettok(%bl4h.unocol,2,32) > $count($hget(uno,$me),R.),%bl4h.unocol,R $count($hget(uno,$me),R.)) return $gettok(%bl4h.unocol,1,32) $+ . $+ $replace($gettok(%bl4h.unocol,1,32),r,RED,y,YELLOW,b,BLUE,g,GREEN) } if ($1 == best) { %bl4h.unoinc = 1 %bl4h.unocrds = $hget(uno,$me) %bl4h.unowow = 0 0 while ($gettok(%bl4h.unocrds,0,45) >= %bl4h.unoinc) { if ($gettok($gettok(%bl4h.unocrds,%bl4h.unoinc,45),2,46) == $2) { if ($count($hget(uno,$me),$gettok($gettok(%bl4h.unocrds,%bl4h.unoinc,45),1,46) $+ .) > $gettok(%bl4h.unowow,2,32)) { %bl4h.unowow = $gettok(%bl4h.unocrds,%bl4h.unoinc,45) $count($hget(uno,$me),$gettok($gettok(%bl4h.unocrds,%bl4h.unoinc,45),1,46) $+ .) } } inc %bl4h.unoinc } return $gettok(%bl4h.unowow,1,32) } } alias unobotbrain { if ($unobc(c,$gettok($hget(uno,+card),1,46)) > 0) { if ($count($hget(uno,unobot),$gettok($hget(uno,+card),1,46) $+ .S) > 0) { unobotplay $rand(2,5) play $gettok($hget(uno,+card),1,46) S halt } if ($count($hget(uno,unobot),$gettok($hget(uno,+card),1,46) $+ .DT) > 0) { unobotplay $rand(2,5) play $gettok($hget(uno,+card),1,46) DT halt } unobotplay $rand(2,5) play $unobc(r,$gettok($hget(uno,+card),1,46)) halt } if ($unobc(n,$gettok($hget(uno,+card),2,46)) > 0) { unobotplay $rand(2,5) play $replace($unobc(best,$gettok($hget(uno,+card),2,46)),$chr(46),$chr(32)) halt } if ($count($hget(uno,$me),W) > 0) { unobotplay $rand(2,5) play $iif($count($hget(uno,$me),W.D) > 0,WD4,W) halt } if (%bl4h.unodraw != 1) { describe $hget(uno,+chan) draws a card givecards $hget(uno,+up) 1 set %bl4h.unodraw 1 .timer 1 1 unobotbrain halt } if ($rand(1,5) == 2) { msg $hget(uno,+chan) $unobotmad } goone nextplayer } alias hascard { %bl4h.unoinc = 1 %bl4h.unocrds = $hget(uno,$1) %bl4h.unocart = $replace($2-,w,W,wild,W,wd4,W.D.F,wdf,W.D.F,w d 4,W.D.F,w d f,W.D.F) %bl4h.unocart = $replace(%bl4h.unocart,$chr(32),$chr(46)) while ($gettok(%bl4h.unocrds,0,45) >= %bl4h.unoinc) { if ($gettok(%bl4h.unocrds,%bl4h.unoinc,45) == %bl4h.unocart) { if ($gettok(%bl4h.unocart,1,46) == $gettok($hget(uno,+card),1,46) || $gettok(%bl4h.unocart,2,46) == $gettok($hget(uno,+card),2,46) || %bl4h.unocart == W || %bl4h.unocart == W.D.F) { return %bl4h.unocart } } inc %bl4h.unoinc } return 0 } alias makedeck { hmake unocards 500 %bl4h.unotmp = 1 %bl4h.unotmp2 = 1 %bl4h.unotimes = 1 while (%bl4h.unotmp <= 9) { if (%bl4h.unotmp2 > 4) { break } hadd unocards $gettok(G R B Y,%bl4h.unotmp2,32) $+ . $+ %bl4h.unotmp 2 inc %bl4h.unotmp if (%bl4h.unotmp > 9) { set %bl4h.unotmp 1 | inc %bl4h.unotmp2 } } hadd unocards R.0 1 hadd unocards G.0 1 hadd unocards B.0 1 hadd unocards Y.0 1 hadd unocards R.DT 2 hadd unocards G.DT 2 hadd unocards B.DT 2 hadd unocards Y.DT 2 hadd unocards G.R 2 hadd unocards R.R 2 hadd unocards B.R 2 hadd unocards Y.R 2 hadd unocards G.S 2 hadd unocards R.S 2 hadd unocards Y.S 2 hadd unocards B.S 2 hadd unocards W.D.F 4 hadd unocards W 4 } alias stopuno { .timeruno* off msg $hget(uno,+chan) $unotheme($2,stopuno) unset %bl4h.uno* hfree -w uno* } alias startuno { unset %bl4h.uno* hfree -w uno* hmake uno hadd uno +started $1 hadd uno +turn 1 hadd uno +chan $2 hadd uno +rot inc hadd uno +color $readini($unoini(uno.ini),settings,color) if ($3 == 1) { hadd uno +bot 1 } makedeck msg $2 $unotheme($1,unostart) $iif($hget(uno,+bot),$unotheme(null,unostartbot),) .timeruno 1 30 begingame $2 } alias begingame { if (!$gettok($hget(uno,+players),0,32)) { stopuno $1 $me | halt } if ($gettok($hget(uno,+players),0,32) == 1) { hadd uno +bot 1 } if ($hget(uno,+bot) == 1) { setupplayer $me } if ($gettok($hget(uno,+players),0,32) >= 2) { msg $hget(uno,+chan) Playing this round: $hget(uno,+players) %bl4h.unofirst = $hfind(unocards, *, $rand(1,$hfind(unocards, *, 0, w)), w) } ;er remind me to fix this below if ($gettok(%bl4h.unofirst,1,46) == W) { hdec unocards %bl4h.unofirst %bl4h.unofirst = r.RED goto eh } hdec unocards %bl4h.unofirst :eh hadd uno +card %bl4h.unofirst hadd uno +time $ctime if ($hget(unocards,%bl4h.unofirst) == 0) { hdel unocards %bl4h.unofirst } hadd uno +up $gettok($hget(uno,+players),$hget(uno,+turn),32) nextplayer } alias setupplayer { if ($hget(uno,$1)) { halt } hadd uno +players $hget(uno,+players) $1 hadd uno $1 msg $hget(uno,+chan) $unotheme($1,willplay) givecards $1 7 } alias givecards { if ($hget(uno,+up) == $1) { unset %bl4h.unodraw } %bl4h.unotmp = 1 unset %bl4h.unocard* while (%bl4h.unotmp <= $2) { if (!$hget(unocards,0).item) { msg $hget(uno,+chan) $unotheme(null,shuffledeck) | hfree unocards | makedeck } %bl4h.unocard = $hfind(unocards, *, $rand(1,$hfind(unocards, *, 0, w)), w) %bl4h.unocardz = %bl4h.unocardz $+ - $+ %bl4h.unocard hdec unocards %bl4h.unocard if ($hget(unocards,%bl4h.unocard) == 0) { hdel unocards %bl4h.unocard } inc %bl4h.unotmp } hadd uno $1 $hget(uno,$1) $+ %bl4h.unocardz if ($1 == $me) { return } .notice $1 You drew: $drawcards(%bl4h.unocardz) } alias drawcards { unset %bl4h.unofix.* unset %bl4h.unofix %bl4h.unototcar = $gettok($1-,0,45) %bl4h.unotmpp = 1 while (%bl4h.unotmpp <= %bl4h.unototcar) { if ($left($gettok($1-,%bl4h.unotmpp,45),1) == W) { if ($gettok($1-,%bl4h.unotmpp,45) == W.D.F) { if ($hget(uno,+color) == 1) { %bl4h.unofix = %bl4h.unofix 0[8,1W12D0440] } if ($hget(uno,+color) == 0) { %bl4h.unofix = %bl4h.unofix [W D F] } inc %bl4h.unotmpp } if ($gettok($1-,%bl4h.unotmpp,45) == W) { if ($hget(uno,+color) == 1) { %bl4h.unofix = %bl4h.unofix 0[8,1W12I04L9D0] } if ($hget(uno,+color) == 0) { %bl4h.unofix = %bl4h.unofix [WILD] } inc %bl4h.unotmpp } } else { if ($hget(uno,+color) == 1) { if ($left($gettok($1-,%bl4h.unotmpp,45),1) == r) { %bl4h.unofix.r = %bl4h.unofix.r $+ 0[4,01 $+ $chr(32) $+ $gettok($gettok($1-,%bl4h.unotmpp,45),2,46) $+ $chr(32) $+ 0] } if ($left($gettok($1-,%bl4h.unotmpp,45),1) == b) { %bl4h.unofix.b = %bl4h.unofix.b $+ 0[12,01 $+ $chr(32) $+ $gettok($gettok($1-,%bl4h.unotmpp,45),2,46) $+ $chr(32) $+ 0] } if ($left($gettok($1-,%bl4h.unotmpp,45),1) == y) { %bl4h.unofix.y = %bl4h.unofix.y $+ 0[8,01 $+ $chr(32) $+ $gettok($gettok($1-,%bl4h.unotmpp,45),2,46) $+ $chr(32) $+ 0] } if ($left($gettok($1-,%bl4h.unotmpp,45),1) == g) { %bl4h.unofix.g = %bl4h.unofix.g $+ 0[9,01 $+ $chr(32) $+ $gettok($gettok($1-,%bl4h.unotmpp,45),2,46) $+ $chr(32) $+ 0] } } if ($hget(uno,+color) == 0) { %bl4h.unofix = %bl4h.unofix $+ $chr(91) $+ $left($gettok($1-,%bl4h.unotmpp,45),1) $+ $chr(32) $+ $gettok($gettok($1-,%bl4h.unotmpp,45),2,46) $+ $chr(93) } inc %bl4h.unotmpp } } %bl4h.unofix = %bl4h.unofix $+ %bl4h.unofix.r $+ %bl4h.unofix.b $+ %bl4h.unofix.y $+ %bl4h.unofix.g return %bl4h.unofix } alias unoscore { %bl4h.unoscore = 0 %bl4h.unotmp = 1 while ($gettok($hget(uno,+players),0,32) >= %bl4h.unotmp) { if ($gettok($hget(uno,+players),%bl4h.unotmp,32) == $1) { inc %bl4h.unotmp } %bl4h.unotmp2 = 1 while (%bl4h.unotmp2 <= $gettok($hget(uno,$gettok($hget(uno,+players),%bl4h.unotmp,32)),0,45)) { %bl4h.unocrd = $gettok($gettok($hget(uno,$gettok($hget(uno,+players),%bl4h.unotmp,32)),%bl4h.unotmp2,45),2,46) %bl4h.unocrd2 = $gettok($gettok($hget(uno,$gettok($hget(uno,+players),%bl4h.unotmp,32)),%bl4h.unotmp2,45),1,46) if (%bl4h.unocrd2 == W) { inc %bl4h.unoscore 50 } if (%bl4h.unocrd == S) { inc %bl4h.unoscore 20 } if (%bl4h.unocrd == R) { inc %bl4h.unoscore 20 } if (%bl4h.unocrd == DT) { inc %bl4h.unoscore 20 } if (%bl4h.unocrd isnum) { inc %bl4h.unoscore %bl4h.unocrd } inc %bl4h.unotmp2 } inc %bl4h.unotmp } %bl4h.unotmp3 = 1 while ($gettok($hget(uno,+players),0,32) >= %bl4h.unotmp3) { if ($gettok($hget(uno,+players),%bl4h.unotmp3,32) == $1) { inc %bl4h.unotmp3 } else { if ($gettok($hget(uno,+players),%bl4h.unotmp3,32) == $me) { goto lame } if ($ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1)) { if ($readini($unoini(uno.ini),settings,allowreg) == 1) { %bl4h.unosloss = $calc($readini($unoini(uno.ini),$ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1).info,loss) + 1) %bl4h.unoswin = $readini($unoini(uno.ini),$ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1).info,wins) writeini $unoini(uno.ini) $ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1).info loss %bl4h.unosloss writeini $unoini(uno.ini) $ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1).info totalgames $calc(%bl4h.unosloss + %bl4h.unoswin) writeini $unoini(uno.ini) $ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1).info lastgame $ctime } } :lame msg $hget(uno,+chan) $gettok($hget(uno,+players),%bl4h.unotmp3,32) $+ : $drawcards($hget(uno,$gettok($hget(uno,+players),%bl4h.unotmp3,32))) inc %bl4h.unotmp3 } } msg $hget(uno,+chan) $unotheme($1 %bl4h.unoscore,endscore) if ($1 == $me) { parseunotop | goto skip } if ($readini($unoini(uno.ini),settings,allowreg) == 1) { if ($ulist($address($1,1),uno,1)) { %bl4h.unoscoretot = $calc($readini($unoini(uno.ini),$ulist($address($1,1),uno,1).info,score) + %bl4h.unoscore) %bl4h.unoscorewins = $calc($readini($unoini(uno.ini),$ulist($address($1,1),uno,1).info,wins) + 1) %bl4h.unoscoreloss = $readini($unoini(uno.ini),$ulist($address($1,1),uno,1).info,loss) writeini $unoini(uno.ini) $ulist($address($1,1),uno,1).info totalgames $calc(%bl4h.unoscorewins + %bl4h.unoscoreloss) writeini $unoini(uno.ini) $ulist($address($1,1),uno,1).info score %bl4h.unoscoretot writeini $unoini(uno.ini) $ulist($address($1,1),uno,1).info wins %bl4h.unoscorewins writeini $unoini(uno.ini) $ulist($address($1,1),uno,1).info lastgame $ctime parseunotop msg $hget(uno,+chan) $1 ( $+ $ulist($address($1,1),uno,1).info $+ ): $+ %bl4h.unoscoretot points $+ < $+ %bl4h.unoscorewins wins / %bl4h.unoscoreloss losses> Place:04 $ord($readini($unoini(uno.ini),$ulist($address($1,1),uno,1).info,place)) } else { .notice $1 $unotheme($1,mustreg) } } :skip } alias unocount { unset %bl4h.unocount %bl4h.unoscore = 0 %bl4h.unotmp = 1 while ($gettok($hget(uno,+players),0,32) >= %bl4h.unotmp) { %bl4h.unotmp2 = 1 %bl4h.unonick = $gettok($hget(uno,+players),%bl4h.unotmp,32) while (%bl4h.unotmp2 <= $gettok($hget(uno,$gettok($hget(uno,+players),%bl4h.unotmp,32)),0,45)) { inc %bl4h.unotmp2 } set %bl4h.unocount %bl4h.unocount %bl4h.unonick $+ : $calc(%bl4h.unotmp2 - 1) inc %bl4h.unotmp } msg $hget(uno,+chan) %bl4h.unocount } alias unostat { if ($ulist($address($2,1),uno,1).info) { %bl4h.unotmp = $ulist($address($2,1),uno,1).info } if (!$ulist($address($2,1),uno,1).info) { %bl4h.unotmp = $2 } if ($readini($unoini(uno.ini),%bl4h.unotmp,totalgames)) { if ($readini($unoini(uno.ini),%bl4h.unotmp,place) == 1) { msg $1 %bl4h.unotmp is $1 $+ 's 8U12N4O master! } if ($readini($unoini(uno.ini),%bl4h.unotmp,place) == 2 || $readini($unoini(uno.ini),%bl4h.unotmp,place) == 3) { msg $1 %bl4h.unotmp is a top 3 player! } msg $1 $+ %bl4h.unotmp $+ : $readini($unoini(uno.ini),%bl4h.unotmp,score) $+ < $+ $readini($unoini(uno.ini),%bl4h.unotmp,wins) $+ W/ $+ $readini($unoini(uno.ini),%bl4h.unotmp,loss) $+ L $+ > Place:4 $ord($readini($unoini(uno.ini),%bl4h.unotmp,place)) } else { msg $1 $+ $2 $+ no such user/no games played } } alias unohelp { if ($2 == pub && !$3) { .notice $1 For official uno rules visit: http://hometown.aol.com/babso00001/unorules.html .notice $1 Use /notice $me unohelp for private commands. .notice $1 Commands: !uno , !unoremove , !unoend , join , play , draw , pass , order , count , !unostat , !unotop10, !unoabout .notice $1 Type !unohelp <command> for help on a specific command return } if ($2 == priv && !$3) { .notice $1 You must register a username to have your scores saved. .notice $1 Commands: unoregister , unologin , unochpass , unologout .notice $1 Use unohelp <command> for help on a specific command return } if ($readini($unoini(unohelp.ini),help,$3) != $null) { .notice $nick $readini($unoini(unohelp.ini),help,$3) } else { .notice $nick No help on that command } } alias unoingame { %bl4h.unod = 1 while ($gettok($hget(uno,+players),0,32) >= %bl4h.unod) { if ($gettok($hget(uno,+players),%bl4h.unod,32) == $1) { return 1 } inc %bl4h.unod } return 0 } alias unohtmlscore { parseunotop %bl4h.unotmp = 1 write -c unotop10.html write unotop10.html <html> write unotop10.html <!-- Generated by unobot $unover ( http://shady.nu ) --> write unotop10.html <head><title>UNO! Top 10 players</title></head> write unotop10.html <STYLE id=default type=text/css> .tabel $chr(123) BORDER-RIGHT: $readini($unoini(uno.ini),settings,htmlborder) 2px solid; BORDER-TOP: $readini($unoini(uno.ini),settings,htmlborder) 2px solid; BORDER-LEFT: $readini($unoini(uno.ini),settings,htmlborder) 2px solid; BORDER-BOTTOM: $readini($unoini(uno.ini),settings,htmlborder) 2px solid $chr(125) write unotop10.html .tdb $chr(123) BORDER-BOTTOM: $readini($unoini(uno.ini),settings,htmlborder) 2px solid; BORDER-RIGHT: $readini($unoini(uno.ini),settings,htmlborder) 2px solid; $chr(125) </style> write unotop10.html <body bgcolor=" $+ $readini($unoini(uno.ini),settings,htmlbackground) $+ " text=" $+ $readini($unoini(uno.ini),settings,htmltext) $+ "> write unotop10.html <center><table width="70%" class=tabel><tr><td class=tdb>Place</td><td class=tdb>User</td><td class=tdb>Wins</td><td class=tdb>Loss</td><td class=tdb>Score</td></tr> if ($readini($unoini(uno.ini),settings,top10)) { while (%bl4h.unotmp <= $gettok($readini($unoini(uno.ini),settings,top10),0,32)) { %bl4h.unotmpu = $gettok($readini($unoini(uno.ini),settings,top10),%bl4h.unotmp,32) write unotop10.html <tr><td> $ord(%bl4h.unotmp) </td><td> %bl4h.unotmpu </td> write unotop10.html <td> $readini($unoini(uno.ini),%bl4h.unotmpu,wins) </td><td> $readini($unoini(uno.ini),%bl4h.unotmpu,loss) </td> write unotop10.html <td><b> $readini($unoini(uno.ini),%bl4h.unotmpu,score) </b></td></tr> inc %bl4h.unotmp } write unotop10.html </table><br><br><a href="http://shady.nu/?x=mirc">Unobot $unover </a></center></html> run unotop10.html } } alias parseunotop { %bl4h.parsetmp = 1 %bl4h.parsetotal = $ini($unoini(uno.ini),0) if ($ini($unoini(uno.ini),0) > 101 && $hget(uno,+chan)) { msg $hget(uno,+chan) Calculating... } while (%bl4h.parsetmp <= %bl4h.parsetotal) { window -n @sorting if ($ini($unoini(uno.ini),%bl4h.parsetmp) == settings) { goto skip } if ($readini($unoini(uno.ini),settings,topcalc) == 1) { aline @sorting $calc($readini($unoini(uno.ini),$ini($unoini(uno.ini),%bl4h.parsetmp),score) / $readini($unoini(uno.ini),$ini($unoini(uno.ini),%bl4h.parsetmp),totalgames)) $ini($unoini(uno.ini),%bl4h.parsetmp) } if ($readini($unoini(uno.ini),settings,topcalc) == 2) { aline @sorting $readini($unoini(uno.ini),$ini($unoini(uno.ini),%bl4h.parsetmp),score) $ini($unoini(uno.ini),%bl4h.parsetmp) } :skip inc %bl4h.parsetmp } filter -eutc 1 32 @sorting @sorting %bl4h.parsetmp = 1 if ($readini($unoini(uno.ini),settings,top10)) { remini $unoini(uno.ini) settings top10 } while (%bl4h.parsetmp <= $line(@sorting,0)) { writeini $unoini(uno.ini) $gettok($line(@sorting,%bl4h.parsetmp),2,32) place %bl4h.parsetmp if (%bl4h.parsetmp <= 10) { writeini $unoini(uno.ini) settings top10 $readini($unoini(uno.ini),settings,top10) $gettok($line(@sorting,%bl4h.parsetmp),2,32) } :error reseterror inc %bl4h.parsetmp } close -@ @sorting } on *:NICK:{ if ($unoingame($nick)) { hadd uno +players $hget(uno,+players) $newnick hadd uno $newnick $hget(uno,$nick) if ($hget(uno,+up) == $nick) { hadd uno +up $newnick } if ($hget(uno,+wild) == $nick) { hadd uno +wild $newnick } if ($hget(uno,+started) == $nick) { hadd uno +started $newnick } unodelplayer $nick } } on *:JOIN:#:{ if ($unoingame($nick) && $chan == $hget(uno,+chan)) { msg $hget(uno,+chan) WB $nick $+ , Game is still on! Its $hget(uno,+up) $+ 's turn. } } alias unodelplayer { unset %bl4h.unop %bl4h.unol = 1 %bl4h.unone = $gettok($unoorder,2,32) while (%bl4h.unol <= $gettok($hget(uno,+players),0,32)) { if ($gettok($hget(uno,+players),%bl4h.unol,32) != $1) { %bl4h.unop = %bl4h.unop $gettok($hget(uno,+players),%bl4h.unol,32) } inc %bl4h.unol } hdel uno $1 hadd uno +players %bl4h.unop if ($hget(uno,+wild) == $1) { hdel uno +wild | hadd uno +card r.RED } if ($hget(uno,+started) == $1) { hadd uno +started $gettok($hget(uno,+players),1,32) } if ($hget(uno,+up) == $1) { hadd uno +up %bl4h.unone hadd uno +turn $findtok($hget(uno,+players),%bl4h.unone,1,32) nextplayer } } alias unoremplayer { if ($gettok($hget(uno,+players),0,32) > 2) { unodelplayer $1 msg $hget(uno,+chan) $1 has been removed from the game! } else { stopuno $hget(uno,+chan) $1 } } on *:QUIT:{ if ($unoingame($nick)) { unoremplayer $nick } } dialog unouser { title "Uno users" size -1 -1 142 126 option dbu list 1, 6 10 50 88, size vsbar ;button "ADD", 2, 6 104 23 12 box "Group Box", 3, 2 2 58 120 button "DEL", 4, 34 104 21 12 edit "", 5, 88 12 50 10 edit "", 6, 88 28 22 10 edit "", 7, 116 28 22 10 text "Pass:", 8, 66 14 19 8 text "W/L", 9, 66 30 19 8 button "Apply change", 10, 94 66 37 12 edit "", 11, 88 44 50 10 text "Score:", 12, 66 46 21 8 } alias unodref { %tmp = 1 did -r unouser 1 while (%tmp <= $ini($unoini(uno.ini),0)) { if ($ini($unoini(uno.ini),%tmp) != settings) { did -a unouser 1 $ini($unoini(uno.ini),%tmp) } inc %tmp } if (%tmp <= 2) { did -a unouser 1 [No Users yet] did -b unouser 10,4 } } alias unodiag { if ($dialog($1)) { dialog -v $1 | halt } dialog -m $1 $1 } alias unohostcheck { %tmp2 = $address($1,1) %tmp = 1 while (%tmp <= $ini($unoini(uno.ini),0)) { if ($readini($unoini(uno.ini),$ini($unoini(uno.ini),%tmp),redad) iswm %tmp2) { return $ini($unoini(uno.ini),%tmp) } inc %tmp } return 0 } dialog unothemeedit { title "Unobot Theme Editor" size -1 -1 196 68 option dbu list 1, 4 4 54 44, size vsbar edit "", 2, 66 10 120 10, autohs combo 3, 2 52 60 50, drop button "Save", 4, 70 28 37 12, flat button "Preview", 5, 108 28 37 12, flat button "Convert", 6, 146 28 37 12, flat } on *:DIALOG:*:*:*:{ if ($dname == unothemeedit) { if ($devent == init) { %tmp = 1 while ($ini($unoini(unotheme.ini),0) >= %tmp) { did -a unothemeedit 3 $ini($unoini(unotheme.ini),%tmp) inc %tmp } } if ($devent = sclick) { if ($did == 3) { if ($did(3).seltext) { did -r unothemeedit 1 %tmp = 1 while ($ini($unoini(unotheme.ini),$did(3).seltext,0) >= %tmp) { did -a unothemeedit 1 $ini($unoini(unotheme.ini),$did(3).seltext,%tmp) inc %tmp } } } if ($did = 1 && $did(1).seltext) { did -ra unothemeedit 2 $readini($unoini(unotheme.ini),$did(3).seltext,$did(1).seltext) } if ($did = 5 && $did(1).seltext && $did(2).text) { if (!$window(@prev)) { window @prev } aline -a @prev $unotheme(TEST1 TEST2 TEST3 TEST4,$did(1).seltext) } } } if ($dname == unoman) { if ($devent == sclick || $devent == init) { if ($did == 11) { unodiag unouser } if ($did == 13) { unodiag unoabout } if ($did == 12) { unodiag unomisc } if ($did == 3) { writeini $unoini(uno.ini) settings enabled 1 } if ($did == 4) { writeini $unoini(uno.ini) settings enabled 0 } if ($did == 6) { writeini $unoini(uno.ini) settings color 1 } if ($did == 7) { writeini $unoini(uno.ini) settings color 0 } if ($did == 9) { writeini $unoini(uno.ini) settings allowreg 1 } if ($did == 10) { writeini $unoini(uno.ini) settings allowreg 0 } if ($readini($unoini(uno.ini),settings,enabled) == 1) { did -e unoman 4 | did -b unoman 3 } else { did -e unoman 3 | did -b unoman 4 } if ($readini($unoini(uno.ini),settings,allowreg) == 1) { did -e unoman 10 | did -b unoman 9 } else { did -e unoman 9 | did -b unoman 10 } if ($readini($unoini(uno.ini),settings,color) == 1) { did -e unoman 7 | did -b unoman 6 } else { did -e unoman 6 | did -b unoman 7 } } } if ($dname == unoabout) { if ($devent == sclick) { if ($did == 3) { run http://shady.nu } if ($did == 4) { run mailto:bl4h@shady.nu } } } if ($dname == unouser) { if ($devent == init) { unodref } if ($devent == sclick) { if ($did == 1) { did -r unouser 5,6,7,11 did -a unouser 5 $readini($unoini(uno.ini),$did(1).seltext,password) did -a unouser 6 $readini($unoini(uno.ini),$did(1).seltext,wins) did -a unouser 7 $readini($unoini(uno.ini),$did(1).seltext,loss) did -a unouser 11 $readini($unoini(uno.ini),$did(1).seltext,score) } if ($did == 10) { if (!$did(1).seltext) { %tmp = $input(No username selected!,o,Fail) | halt } if ($did(5).text) { writeini $unoini(uno.ini) $did(1).seltext password $did(5).text } if ($did(6).text isnum) { writeini $unoini(uno.ini) $did(1).seltext wins $did(6).text } if ($did(7).text isnum) { writeini $unoini(uno.ini) $did(1).seltext loss $did(7).text } if ($did(11).text isnum) { writeini $unoini(uno.ini) $did(1).seltext score $did(11).text } %tmp = $input(Applied,o,Applied) } if ($did = 4 && $did(1).seltext) { %tmp = $?!="DELETE $did(1).seltext $+ ?" if (%tmp == $true) { remini $unoini(uno.ini) $did(1).seltext } unodref } } } if ($dname == unomisc) { if ($devent == init) { unset %bl4h.flood* did -i unomisc 5,8 1 ignore did -i unomisc 5,8 2 kick did -i unomisc 5,8 3 ban+kick did -i unomisc 12 1 Score / games played did -i unomisc 12 2 Score only did -c unomisc 12 $readini($unoini(uno.ini),settings,topcalc) did -c unomisc 5 $iif($readini($unoini(uno.ini),settings,floodpunishmsg),$readini($unoini(uno.ini),settings,floodpunishmsg),1) did -c unomisc 8 $iif($readini($unoini(uno.ini),settings,floodpunishrep),$readini($unoini(uno.ini),settings,floodpunishrep),1) did -a unomisc 2 $iif($readini($unoini(uno.ini),settings,floodmsgs),$readini($unoini(uno.ini),settings,floodmsgs),5) did -a unomisc 10 $iif($readini($unoini(uno.ini),settings,floodreps),$readini($unoini(uno.ini),settings,floodreps),3) did -a unomisc 17 $iif($readini($unoini(uno.ini),settings,idlewarn),$readini($unoini(uno.ini),settings,idlewarn),60) did -a unomisc 19 $iif($readini($unoini(uno.ini),settings,idleremove),$readini($unoini(uno.ini),settings,idleremove),120) did -a unomisc 22 $iif($readini($unoini(uno.ini),settings,floodban),$readini($unoini(uno.ini),settings,floodban),30) if ($readini($unoini(uno.ini),settings,floodenabled) != $null) { if ($readini($unoini(uno.ini),settings,floodenabled) == 1) { did -c unomisc 24 } else { did -b unomisc 5,8,2,10 } } } if ($devent == sclick) { if ($did == 24) { if ($did(unomisc,24).state == 1) { writeini $unoini(uno.ini) settings floodenabled 1 | did -e unomisc 5,8,2,10 } else { writeini $unoini(uno.ini) settings floodenabled 0 | did -b unomisc 5,8,2,10 } } if ($did == 21) { if ($did(unomisc,2).text isnum && $did(unomisc,10).text isnum && $did(unomisc,17).text isnum && $did(unomisc,19).text isnum && $did(unomisc,22).text isnum) { writeini $unoini(uno.ini) settings floodpunishmsg $did(unomisc,5).sel writeini $unoini(uno.ini) settings floodpunishrep $did(unomisc,8).sel writeini $unoini(uno.ini) settings topcalc $did(unomisc,12).sel writeini $unoini(uno.ini) settings floodmsgs $did(unomisc,2).text writeini $unoini(uno.ini) settings floodreps $did(unomisc,10).text writeini $unoini(uno.ini) settings idlewarn $did(unomisc,17).text writeini $unoini(uno.ini) settings idleremove $did(unomisc,19).text writeini $unoini(uno.ini) settings floodban $did(unomisc,22).text %tmp = $input(Saved,o,Saved) } else { %tmp = $input(invalid numbers,o,error) } } } } } alias unoini { return " $+ $shortfn($scriptdir $+ $1) $+ " } dialog unoman { title "Unobot Manager" size -1 -1 148 82 option dbu notheme icon $shortfn($mircexe), 18 box "Settings", 1, 2 4 144 56 text "Uno On/Off:", 2, 8 14 39 8 button "ON", 3, 60 12 37 12, disable button "OFF", 4, 104 12 37 12, disable text "Card coloring:", 5, 8 30 35 8 button "ON", 6, 60 28 37 12, disable button "OFF", 7, 104 28 37 12, disable text "Registration:", 8, 8 48 35 8 button "ON", 9, 60 44 37 12, disable button "OFF", 10, 104 44 37 12, disable button "User Manager", 11, 2 66 37 12, flat button "Misc Settings", 12, 54 66 37 12, flat button "About", 13, 108 66 37 12, flat } dialog unomisc { title "Unobot" size -1 -1 144 162 option dbu box "Flood settings", 1, 2 2 140 62 edit "", 2, 58 12 14 10 text "Lines in 10 seconds", 3, 74 14 53 8 combo 5, 6 12 36 35, size drop text "after", 6, 44 14 13 8 combo 8, 6 32 36 35, size drop text "after", 9, 44 34 13 8 edit "", 10, 58 32 14 10 text "Repeats in 10 seconds", 11, 74 34 59 8 box "Timer settings", 16, 2 66 140 50 edit "", 17, 106 74 24 10 text "Seconds before idle player is warned:", 18, 8 76 91 8 edit "", 19, 106 88 24 10 text "After warning, player is removed after:", 20, 8 90 91 8 button "Save", 21, 56 146 37 12 edit "", 22, 106 102 24 10 text "Flood ban time in seconds:", 23, 34 104 67 8 check "Enabled?", 24, 46 50 46 10 box "Misc", 4, 2 118 140 24 text "Top 10 by:", 7, 10 128 31 8 combo 12, 60 126 60 32, drop } dialog unoabout { title "Unobot" size -1 -1 132 30 option dbu notheme icon $shortfn($mircexe), $rand(1,21) icon 1, 4 4 15 15, $shortfn($mircexe), $rand(1,21) text Unobot $unover, 2, 30 4 97 10 link "http://shady.nu", 3, 30 18 40 8 link "bl4h@shady.nu", 4, 76 18 50 8
-
Hello, this is my first serious gather bot for counter-strike or counter-strike: source. What is different from others bots? It has admins. U cant start the game if u didnt identify yourself for admin. To register to admins u have to type in bot private chat .addhost nick password_to_become_admin your_identify_password and identify same but .admin your_identify_password All admins have stats. I mean how many games they done. Everyone can see this by typing in channel .gstats All players have points. They rise it buy playing games. They can buy things with that points. Points will be decreased. Btw u have to set all things available to buy (name(without spaces),needed points,command(this can be with spaces. Ex: /cs access #channel add %nick(this is the name of nick who wants to buy) 3) all players can see their points buy typing !rank or !rank nick they can see all commands for simple users by typing !commands in channel for admins options u have to type .commands in private chat. bot will make raindom teams bot can do commands like .kick nick .voice nick ect... please make a feedback what is wrong here or what i should make ect. on *:text:.start*:?:{ if ($2) && ($3) && ($4) && ($5) && ($6) && ($nick = %admin) { .set %server.ip $2 .set %server.pass $3 .set %server.map $4 .set %server.kom.vienas $5 .set %server.kom.du $6 .set %zaidejai.dabar 0 if (%kova != $null) { .set %kova $calc(%kova + 1) } elseif (%kova = $null) { .set %kova 1 } start } else { .msg $nick Wrong syntax. } close -m $nick } alias start { .set %gather.on 1 .set %last.player 0 .set %zaidejai.dabar 0 .set %p1 x | .set %p2 x | .set %p3 x | .set %p4 x | .set %p5 x | .set %p6 x | .set %p7 x | .set %p8 x | .set %p9 x | .set %p10 x .msg %chan 0,1Gather Bot: 10 $+ %server.kom.vienas 0 $+ vs 10 $+ %server.kom.du $+ 0. Admin: 8 $+ %admin $+ 0. Map: 10 $+ %server.map 0 $+ . Simple game. [ $+ %kova $+ ] Match .msg %chan 0,1Players [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 } on *:text:!add*:#:{ if (%gather.on = 1) { if ($2) { if ($2 ison $chan) && ($nick = %admin) { if (%p1 != $2) && (%p2 != $2) && (%p3 != $2) && (%p4 != $2) && (%p5 != $2) && (%p6 != $2) && (%p7 != $2) && (%p8 != $2) && (%p9 != $2) && (%p10 != $2) { if (%p10 = x) && (%last.player != 10) { .set %p $+ $calc(%last.player + 1) $2- .set %last.player $calc(%last.player + 1) .write gather.txt $2- .set %zaidejai.dabar $calc(%zaidejai.dabar + 1) .msg %chan 0,1Players [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 if (%last.player = 10) { .msg $chan 8,1 15Gather 4begins15. Password and other information players will get in 2 minutes | /make.teams } } } else { .msg %chan 0,1 $2- is already in game. } } elseif ($2 !ison $chan) { .msg %chan 0,1 $2 is not in the channel } } else { if (%p1 != $nick) && (%p2 != $nick) && (%p3 != $nick) && (%p4 != $nick) && (%p5 != $nick) && (%p6 != $nick) && (%p7 != $nick) && (%p8 != $nick) && (%p9 != $nick) && (%p10 != $nick) { if (%p10 = x) && (%last.player != 10) { .set %p $+ $calc(%last.player + 1) $nick .set %last.player $calc(%last.player + 1) .write gather.txt $nick .set %zaidejai.dabar $calc(%zaidejai.dabar + 1) .msg %chan 0,1Players [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 if (%last.player = 10) { make.teams } } } else { .msg %chan 0,1You are already in the game. } } } } on *:text:!rem*:#:{ if (%gather.on = 1) { if ($2) && ($nick = %admin) { if (%p1 = $2) { .set %p1 %p2 | .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt } elseif (%p2 = $2) { .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt } elseif (%p3 = $2) { .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt } elseif (%p4 = $2) { .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt } elseif (%p5 = $2) { .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt } elseif (%p6 = $2) { .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt } elseif (%p7 = $2) { .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1 | /.write -ds $+ $2- gather.txt) } elseif (%p8 = $2) { .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) } elseif (%p9 = $2) { .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) } } else { if (%p1 = $nick) { .set %p1 %p2 | .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p2 = $nick) { .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p3 = $nick) { .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p4 = $nick) { .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p5 = $nick) { .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p6 = $nick) { .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p7 = $nick) { .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p8 = $nick) { .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p9 = $nick) { .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } } } } on *:part:#:{ if (%gather.on = 1) { if (%p1 = $nick) { .set %p1 %p2 | .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p2 = $nick) { .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p3 = $nick) { .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p4 = $nick) { .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p5 = $nick) { .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p6 = $nick) { .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p7 = $nick) { .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p8 = $nick) { .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p9 = $nick) { .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } } } alias make.teams { if ($len(gather.txt) = 10) { .set %i 1 .set %last.num 1 while (%i <= 10) { .set %tmp $read(gather.txt) .set %p $+ %last.num %tmp inc %i .set %last.num $calc(%last.num + 1) if ($readini(taskai.ini,taskai,%tmp) = $null) { .writeini -n taskai.ini taskai %tmp 1 } elseif ($readini(taskai.ini,taskai,%tmp) != $null) { .set %taskai $readini(taskai.ini,taskai,%tmp) .writeini -n taskai.ini taskai %tmp $calc(%taskai + 1) .unset %taskai } /.write -ds $+ %tmp gather.txt .unset %tmp } .set %adm.taskai $readini(taskai.ini,adminai,%admin) .writeini -n taskai.ini adminai %admin $calc(%adm.taskai + 1) msg $chan 0,1Match begins. Teams: 8 $+ %server.kom.vienas $+ 0:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 8 $+ %server.kom.du $+ 0:11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 $+ 0. Please wait till we send you an information. If you wont get it please tell to game administrator [8 $+ %admin $+ 0] /send.pass .unset %adm.taskai } } on *:text:!off:#:{ if ($nick = %admin) { if (%gather.on = 1) { .set %gather.on 0 .msg $chan 0,1Gather game is now off .set %p1 x | .set %p2 x | .set %p3 x | .set %p4 x | .set %p5 x | .set %p6 x | .set %p7 x | .set %p8 x | .set %p9 x | .set %p10 x .unset %nick .unset %pass.typed | .unset %last.player | .unset %last.num /.remove gather.txt .set %online 0 } elseif (%gather.on = 0) { msg $chan 0,1Gather is not turned on. } } } alias send.pass { .write gather.txt %p1 | .write gather.txt %p2 | .write gather.txt %p3 | .write gather.txt %p4 | .write gather.txt %p5 | .write gather.txt %p6 | .write gather.txt %p7 | .write gather.txt %p8 | .write gather.txt %p9 | .write gather.txt %p10 .set %i 1 while (%i <= 10) { .set %tmp $read(gather.txt,%i) inc %i if (%tmp != $null) { .msg %tmp 0,1Hi, server ip: 8 $+ %server.ip 0 and pass 8 $+ %server.pass .msg %tmp 0,1Good luck & have fun } .unset %tmp } .msg %chan 0,1Information is sent. /.remove gather.txt if (%gather.on = 1) { .set %gather.on 0 .set %p1 x | .set %p2 x | .set %p3 x | .set %p4 x | .set %p5 x | .set %p6 x | .set %p7 x | .set %p8 x | .set %p9 x | .set %p10 x .unset %ip | .unset %port | .unset %chan | .unset %nick .unset %pass.typed | .unset %last.player | .unset %last.num /.remove gather.txt .set %online 0 } } menu menubar { Gather .Password(needed for become admin) ( %pass ):/.set %pass $?="Kodas" .Password(to become admin) ( %admin.pass.tapti ):/.set %admin.pass.tapti $?="Kodas" .- .Channel ( %chan ):/.set %chan $?="Kanalas?" .- .Buy options:/dialog -m gth.buy gth.buy } on *:text:!rank*:#:{ if (!$2) { .set %nick $nick if ($readini(taskai.ini,taskai,%nick) != $null) { .msg $chan 0,1Nick: %nick $chr(124) Points: $readini(taskai.ini,taskai,%nick) } elseif ($readini(taskai.ini,taskai,%nick) = $null) { .msg $chan 0,1 $+ %nick didn't play eny matches. } } elseif ($2) { .set %nick $2- if ($readini(taskai.ini,taskai,%nick) != $null) { msg $chan 0,1Nick: %nick $chr(124) Points: $readini(taskai.ini,taskai,%nick) } elseif ($readini(taskai.ini,taskai,%nick) = $null) { .msg $chan 0,1 $+ %nick didn't play eny matches. } } } on *:text:!buy:#:{ .notice $nick You can buy: .set %end $lines(items.txt) .set %i 1 while (%i <= %end) { .set %gth.buy $read(items.txt,%i) .notice $nick $+(%i,$chr(41)) $gettok(%gth.buy,1,32) $gettok(%gth.buy,2,32) inc %i } .notice $nick Write to the private what do you want to buy. Format: !buy number. Ex: !buy 1 (points will be detracted.) .unset %gth.buy | .unset %i | .unset %end } on *:text:!buy*:?:{ .set %nick $nick .set %pirkti.num $2- if ($readini(taskai.ini,taskai,%nick) != $null) { .set %taskai $readini(taskai.ini,taskai,%nick) .set %tmp.gth $read(items.txt,%pirkti.num) if (%taskai = $gettok(%tmp.gth,2,32)) { .remini taskai.ini taskai %nick .set %action.gth $gettok(%tmp.gth,3-,32) %action.gth .msg %nick You have no more points. .close -m %nick } elseif (%taskai > $gettok(%tmp.gth,2,32)) { .remini taskai.ini taskai %nick .writeini -n taskai.ini taskai %nick $calc(%taskai - $gettok(%tmp.gth,2,32)) .set %action.gth $gettok(%tmp.gth,3-,32) %action.gth .msg %nick You have $readini(taskai.ini,taskai,%nick) points .close -m %nick } elseif (%taskai < $gettok(%tmp.gth,2,32)) { .msg %nick You don't have enough points. .close -m %nick } } else { .msg %nick You have no points. .close -m %nick } .unset %nick | .unset %action.gth | .unset %taskai | .unset %pirkti.num } on *:text:.addhost*:?:{ .set %nick $2 .set %admin.pass.new $4 if ($3 != %admin.pass.tapti) { .msg %nick ne toks kodas. | .close -m %nick } elseif ($3 = %admin.pass.tapti) { .writeini -n taskai.ini adminai %nick 0 .writeini -n taskai.ini adminai.pass %nick %admin.pass.new .msg %nick You are registered to gather admins. To be the game admin type in private .admin passowrd ex: .admin hello .close -m %nick } } on *:text:.admin*:?:{ .set %nick $nick .set %pass $2 if ($readini(taskai.ini,adminai.pass,%nick) = %pass) { .msg %nick You are now the game administrator. | .set %admin %nick | .close -m %nick } elseif ($readini(taskai.ini,adminai.pass,%nick) != %pass) { .msg %nick Wrong password. } .close -m %nick .unset %pass | .unset %nick } on *:text:.commands:?:{ .msg $nick 0,1Start game: type in private .start IP Server_Pass Map Team_1 Team_2 .msg $nick 0,1End game: Type in channel !off .msg $nick 0,1Registration for admins: Type in private .addhost nick password your_password .msg $nick 0,1Be an admin: Type in private .admin your_password .close -m $nick } on *:text:!kick*:#:{ if ($nick isop $chan) { if ($2 ison $chan) { if ($3) { .kick $chan $2 $3 } elseif (!$3) { .kick $chan $2 } } } } on *:text:!ban*:#:{ if ($nick isop $chan) { if ($2 ison $chan) { .ban $chan $2 } } } on *:text:!kb*:#:{ if ($nick isop $chan) { if ($2 ison $chan) { if ($3) { .ban $chan $2 | .kick $chan $2 $3 } elseif (!$3) { .ban $chan $2 | .kick $chan $2 } } } } on *:text:!voice*:#:{ if ($nick isop $chan) { if ($2 ison $chan) { .mode $chan +v $2 } } } on *:text:!devoice*:#:{ if ($nick isop $chan) { if ($2 ison $chan) { .mode $chan -v $2 } } } on *:text:!op*:#:{ if ($nick isop $chan) { if ($2 ison $chan) { .mode $chan +o $2 } } } on *:text:!deop*:#:{ if ($nick isop $chan) { if ($2 ison $chan) { .mode $chan -o $2 } } } on *:text:.gstats:#:{ .set %end $ini(taskai.ini,adminai,0) .set %i 1 while (%i <= %end) { .set %tmp $ini(taskai.ini,adminai,%i) .write adminai.txt %tmp $readini(taskai.ini,adminai,%tmp) inc %i } .set %end $lines(adminai.txt) .set %admin_num 0 .set %output 0,1Admins Stats: goto admin.tikrinimas :admin.tikrinimas if (%admin_num < %end) { .set %admin_num $calc(%admin_num + 1) | goto make.admin.list } elseif (%admin_num = %end) { .msg %chan %output | .remove adminai.txt | halt } :make.admin.list .set %output %output $chr(32) $+(11,$read(adminai.txt,%admin_num)) $readini(taskai.ini,adminai,%admin_num) $+(0,$chr(124)) | goto admin.tikrinimas } dialog gth.buy { title "Gather Bot Buy Dialog" size -1 -1 160 104 option dbu box "List", 1, 1 1 86 101 list 2, 3 10 81 89, size hsbar vsbar box "Price", 3, 90 26 70 23 edit "", 4, 91 11 67 10, center autohs box "Name", 5, 90 3 70 23 edit "", 6, 91 34 67 10, center autohs button "ADD", 7, 89 76 34 12 button "DEL", 8, 125 76 34 12 button "OK", 9, 88 90 71 12, ok edit "", 10, 91 58 67 10, center autohs box "Action", 11, 90 50 70 23 } on *:dialog:gth.buy:sclick:7:{ .set %name $did(4) .set %price $did(6) .set %action $did(10) if (%name != $null) && (%price != $null) { .write items.txt %name %price %action did -a $dname 2 %name %price %action } .unset %name | .unset %price | .unset %action did -r $dname 4,6,10 } on *:dialog:gth.buy:init:*:{ did -r $dname 2 .set %end $lines(items.txt) .set %i 1 while (%i <= %end) { .set %tmp.buy $read(items.txt,%i) .did -a $dname 2 %tmp.buy inc %i } .unset %i | .unset %tmp.buy | .unset %end } on *:dialog:gth.buy:sclick:2:{ .set %tmp.buy $did(2).seltext .set %name $gettok(%tmp.buy,1,32) .set %price $gettok(%tmp.buy,2,32) .set %action $gettok(%tmp.buy,3-,32) did -ra $dname 4 %name did -ra $dname 6 %price did -ra $dname 10 %action } on *:dialog:gth.buy:sclick:8:{ .set %end $lines(items.txt) .set %i 1 while (%i <= %end) { .set %tmp.gth $read(items.txt,%i) if (%tmp.gth = %tmp.buy) { .write $+(-dl,%i) items.txt did -r $dname 2 } inc %i } .set %end2 $lines(items.txt) .set %ii 1 while (%ii <= %end2) { .set %tmp.gth $read(items.txt,%ii) did -a $dname 2 %tmp.gth inc %ii } did -r $dname 4,6,10 .unset %name | .unset %price | .unset %tmp.buy | .unset %i | .unset %tmp.gth | .unset %ii | .unset %end2 } on *:text:!commands:#:{ .notice $nick 0,1Admins stats: Type .gstats .notice $nick 0,1Players stats: Type !rank or !rank name }
-
COMMANDS - !high - go high !low - go low !stats user - See the stats of any user !hilo - Start game !start solo - Start a solo game , i.e, play alone. !start multi : Start a multiplayer game with given number of players ############################################################ ## Hi-Lo Multiplayer Version Script ( with Stats and AI Players) ## ## Version: 1.0 ## ## By: manish17 ## ## irc.lunarirc.net #LunarIRC User - manish Follow my blog : https://manishsnippets.blogspot.com ## ############################################################ on *:TEXT:!hilo*:#: { if ( %hilo != on ) && (%ongoing == $null) { set %hilo on set %chan $chan set %o 0 msg $chan 3 Hi-Lo game has been started. 13 cards are taken, and a random card is drawn and removed every time. You need to guess whether the next card is higher or lower than the previous card. msg $chan 9 Type !start Solo or !start multi to start a Solo Game or a Multiplayer Game respectively. } else { msg $chan 9 Type !start Solo or !start multi to start a Solo Game or a Multiplayer Game respectively. } } on *:TEXT:!start*:#: { if ( %hilo == on ) && ( %o == 0 ) && ( $2 == solo ) { inc %o set %gamemode solo set %nick $nick set %chan $chan msg $chan 6 Game of High-Low has been started by $nick . Current champion: %champ . startg msg %chan 4,0♥ $+ %oldcard 4,010 has been chosen! 12 cards remaining in the deck. msg %chan 6 $nick may choose to go !high or go !low timer 1 30 timeout } elseif ( %hilo == on ) && ( %o == 0 ) && ( $2 == multi ) { inc %o set %chan $chan set %gamemode multiplayer unset %game set %multi started set %cards 2.3.4.5.6.7.8.9.10.J.Q.K.A set %AInames ProMan LucyFir StupidTolga if ( $3 isnum ) && ( $3 >= 2 ) && ( $3 <= 4 ) { set %playing $3 } else { set %playing 4 } msg %chan 6 A game of Hi-Lo Multiplayer has been started. Type !join to join. You have 30 seconds.. set %joining on timer 1 15 msg %chan 10 15 seconds left... If enough players do not join, AI Players will be joining. timer 1 30 timeup } elseif ( %o == 1 ) { msg $chan 7 A game of High-Low %gamemode is already in progress in %chan . } else { msg $chan 6 Please start a game of High-Low by typing !hilo . } } alias startg { getinfo %nick inc %sgp makedata %nick set %score 0 set %cards 2.3.4.5.6.7.8.9.10.J.Q.K.A set %total $numtok(%cards,46) set %x $rand(1,%total) set %oldcard $gettok(%cards,%x,46) %cards = $deltok(%cards,%x,46) } on *:TEXT:!stophilo*:#: { if ( $nick isop %chan ) { end msg %chan 14 Game has been stopped by $nick . } } on *:TEXT:!high*:#: { timers off if ( $nick == %tplayer ) { go high } elseif ( $nick == %nick) { ignore %nick timer 1 1 msg %chan 10 $nick goes for high. set %total $numtok(%cards,46) set %x $rand(1,%total) set %newcard $gettok(%cards,%x,46) %cards = $deltok(%cards,%x,46) set %oldval $value(%oldcard) set %newval $value(%newcard) if ( %newval > %oldval ) { inc %score timer 1 5 msg %chan 14 The next card is 4,0♥ $+ %newcard 4,0 . timer 1 5 msg %chan 6 $numtok(%cards,46) cards remaining in the deck. timer 1 5 msg %chan 6 $nick makes a correct choice and is still in the game. timer 1 7 msg %chan 10 Current score of $nick : %score timer 1 7 ignore -r %nick timer 1 37 timeout if ( %score == 12 ) { timer 1 8 msg %chan 9 $nick has won the game of High-Low with a top-class score of 12, and is the new champion! getinfo %nick if ( %score > %hs ) { set %hs %score } makedata %nick set %champ $nick unset %o set %hilo off unset %nick timers off } } else { timer 1 4 msg %chan 14 The next card is 4,0♥ $+ %newcard 4,0 . timer 1 5 msg %chan 4 Game Over! $nick loses the game with a total score of %score . Well played! ignore -r %nick getinfo %nick if ( %score > %hs ) { set %hs %score } makedata %nick unset %o set %hilo off unset %nick } set %oldcard %newcard } } on *:TEXT:!low*:#: { timers off if ( $nick == %tplayer ) { go low } elseif ( $nick == %nick) { ignore %nick timer 1 1 msg $chan 10 $nick goes for low. set %total $numtok(%cards,46) set %x $rand(1,%total) set %newcard $gettok(%cards,%x,46) %cards = $deltok(%cards,%x,46) set %oldval $value(%oldcard) set %newval $value(%newcard) if ( %newval < %oldval ) { inc %score timer 1 5 msg %chan 14 The next card is 4,0♥ $+ %newcard 4,0 . timer 1 5 msg %chan 6 $numtok(%cards,46) cards remaining in the deck. timer 1 5 msg %chan 6 $nick makes a correct choice and is still in the game. timer 1 7 msg %chan 10 Current score of $nick : %score timer 1 7 ignore -r %nick timer 1 37 timeout if ( %score == 12) { timer 1 8 msg %chan 9 $nick has won the game of High-Low with a top-class score of 12, and is the new champion! getinfo %nick if ( %score > %hs ) { set %hs %score } makedata %nick set %champ $nick unset %o set %hilo off unset %nick timers off } } else { timer 1 4 msg %chan 14 The next card is 4,0♥ $+ %newcard 4,0 . timer 1 5 msg %chan 4 Game Over! $nick loses the game with a total score of %score . Well played! ignore -r %nick getinfo %nick if ( %score > %hs ) { set %hs %score } makedata %nick unset %o set %hilo off unset %nick } set %oldcard %newcard } } alias -l value return $iif($1 isnum,$1,$+(1,$pos(JQKA,$1,1))) alias timeout { msg %chan 4 Sorry %nick , you ran out of the time-limit (30 seconds) and eventually lose the game with the score %score . getinfo %nick if ( %score > %hs ) { set %hs %score } makedata %nick unset %o set %hilo off notice %nick Please Wait 30 seconds if you want to play again. ignore -cu30 %nick unset %nick } alias go { timers off ignore %tplayer timer 1 1 msg %chan 10 %tplayer decides to go $1 . getnewcard set %decision $1 set %oldval $value(%oldcard) set %newval $value(%newcard) timer 1 3 msg %chan The next card is 4,0♥ $+ %newcard 4,0 . if ( %decision == high ) && ( %newval > %oldval ) { timer 1 4 msg %chan 9 %tplayer makes a correct choice and is still in the game. set %mcb $gettok(%corr,%turn,46) inc %mcb set %corr $deltok(%corr,%turn,46) set %corr $instok(%corr,%mcb,%turn,46) } elseif ( %decision == low ) && ( %newval < %oldval ) { timer 1 4 msg %chan 9 %tplayer makes a correct choice and is still in the game. set %mcb $gettok(%corr,%turn,46) inc %mcb set %corr $deltok(%corr,%turn,46) set %corr $instok(%corr,%mcb,%turn,46) } else { timer 1 4 msg %chan 4 %tplayer makes a wrong choice and loses a life. %life = $gettok(%lifes,%turn,46) set %life $calc(%life - 1) set %lifes $deltok(%lifes,%turn,46) set %lifes $instok(%lifes,%life,%turn,46) } timer 1 6 showlifes timer 1 8 getout } alias -l showlifes { var %pk = 1 while ( %pk <= %playing ) { set %display %display 6 $gettok(%players,%pk,32) $+ : $gettok(%lifes,%pk,46) inc %pk } msg %chan 3 Current Lives : %display unset %display } alias -l getout { if ( $istok(%lifes,0,46) ) { getinfo %tplayer set %correct $gettok(%corr,%turn,46) set %cg $calc(%cg + %correct) set %wg $calc(%wg + 3) set %corr $deltok(%corr,%turn,46) makedata %tplayer set %lifes $remtok(%lifes,0,0,46) msg %chan 4 %tplayer has lost all their lives and is now out of the game, finishing with 10 coins. Adieu! coins %tplayer 10 ignore -r %tplayer set %players $remtok(%players,%tplayer,0,32) set %playing $calc(%playing - 1) set %turn $calc(%turn - 1) } if ( %playing == 1 ) { timer 1 2 winner } else { continuegame } } alias -l shuffle { if ( $numtok(%cards,46) == 0 ) { msg %chan 13 The other cards are being taken again and re-shuffled! set %cards 2.3.4.5.6.7.8.9.10.J.Q.K.A set %cards $remtok(%cards,%newcard,1,46) } } alias -l aiornot { if ( $1 == $gettok(%AInames,1,32) ) { var %highchance = 0 var %lowchance = 0 var %p = 1 while ( %p <= $numtok(%cards,46) ) { set %curcard $gettok(%cards,%p,46) set %curvalue $value(%curcard) if ( %curvalue > $value(%newcard) ) { inc %highchance } else { inc %lowchance } inc %p } if ( %highchance > %lowchance ) { go high } else { go low } } elseif ( $1 == $gettok(%AInames,2,32) ) { set %newval $value(%newcard) var %highchance = 14 - %newval var %lowchance = %newval - 2 if ( %highchance > %lowchance ) { go high } else { go low } } elseif ( $1 == $gettok(%AInames,3,32) ) { set %y $rand(1,2) if ( %y == 1 ) { go high } else { go low } } } alias -l winner { set %winner $gettok(%players,1,32) msg %chan 10 $gettok(%players,1,32) has won the game with %lifes lives remaining, earning 25 coins. coins %winner 25 ignore -r %winner getinfo %players set %correct %corr set %cg $calc(%cg + %correct) set %wg $calc(3 - %lifes) inc %mgw makedata %players end } alias -l end { timers off ignore -r unset %players %ongoing %turn %tplayer %multi %playing %ai %life %lifes %m %hilo %o %corr set %game over } alias -l continuegame { if ( %game == $null ) { inc %turn if ( %turn > %playing ) { set %turn 1 ignoreall } set %tplayer $gettok(%players,%turn,32) msg %chan 10 Its %tplayer 's turn to continue. They may choose to go !high or go !low . ignore -r %tplayer timer 1 20 gone aiornot %tplayer } } alias -l getnewcard { if ( $numtok(%cards,32) == 0 ) { shuffle } set %oldcard %newcard set %total $numtok(%cards,46) set %x $rand(1,%total) set %newcard $gettok(%cards,%x,46) %cards = $deltok(%cards,%x,46) } alias -l getai { var %i = 1 while ( %i <= 3 ) { set %ai $gettok(%AInames,%i,32) set %players %players %ai inc %i } set %players $gettok(%players,1- $+ %playing $+ ,32) msg %chan 9 AI Player(s) have joined the game. } on *:TEXT:!join*:#: { if ( %playing != $null ) && ( %joining == on ) { if ( $nick isin %players ) { notice $nick You are already playing. } elseif ( $istok(%AInames,$nick,32) ) { notice $nick You cannot use that nickname. } else { getinfo $nick inc %mgp makedata $nick msg %chan 3 $nick has joined the game. set %players %players $nick if ( $numtok(%players,32) == %playing ) { msg %chan 13 The game may be started now. set %joining off timers off start } } } } alias -l timeup { msg %chan 10 Time is up! if ( $numtok(%players,32) == 0 ) { msg %chan 10 Nobody has joined. Game is turning off. unset %playing unset %multi end } else { getai set %joining off start } } alias -l start { set %turn 1 set %tplayer $gettok(%players,1,32) set %lifes $left(3.3.3.3, $+ $calc(2 * %playing - 1)) set %corr $replace(%lifes,3,0) set %total $numtok(%cards,46) set %x $rand(1,%total) set %oldcard $gettok(%cards,%x,46) %cards = $deltok(%cards,%x,46) set %newcard %oldcard msg %chan 4,0♥ $+ %oldcard 4,010 has been chosen! 12 cards remaining. msg %chan 6 Its %tplayer 's turn to start the game. They may choose to go !high or go !low . timer 1 20 gone } alias -l gone { msg %chan 4 %tplayer ran out of time to make a choice and loses a life. ignoreall %life = $gettok(%lifes,%turn,46) set %life $calc(%life - 1) set %lifes $deltok(%lifes,%turn,46) set %lifes $instok(%lifes,%life,%turn,46) showlifes getout } alias -l ignoreall { var %pq = 1 while ( %pq <= %playing ) { if ( $1 == $null ) { ignore $gettok(%players,%pq,32) } else { ignore -r $gettok(%players,%pq,32) } inc %pq } } alias getinfo { if ( $istok(%AInames,$1,32) ) { return } elseif (!$read(hilo.txt,w,* $+ $1 $+ * ) ) { write hilo.txt $1 0 0 0 0 0 0 | getinfo $1 } set %info $read(hilo.txt,w,* $+ $1 $+ * ) set %in $gettok(%info,1,32) set %mgp $gettok(%info,2,32) set %mgw $gettok(%info,3,32) set %cg $gettok(%info,4,32) set %wg $gettok(%info,5,32) set %sgp $gettok(%info,6,32) set %hs $gettok(%info,7,32) } alias -l makedata { if ( $istok(%AInames,$1,32) ) { return } set %todel $read(hilo.txt,w,* $+ $1 $+ * ) set %no $readn $+ write -dl $+ %no hilo.txt write hilo.txt $1 %mgp %mgw %cg %wg %sgp %hs } alias -l coins { if ( $istok(%AInames,$1,32) ) { return } elseif ($read(coins.txt,w,* $+ $1 $+ *)) { set %n $readn $+ set %data $read(coins.txt,w,* $+ $1 $+ *) set %current $gettok(%data,2,32) set %new $calc(%current + $2) set %data $replace(%data,%current,%new) write -dl $+ %n coins.txt write coins.txt %data } else { write coins.txt $1 $2 } } on *:TEXT:!stats*:#: { if ( $2 == $null) { return } getinfo $2 msg $chan 6 Hi-Lo Stats for %in : msg $chan 10⚔Multiplayer:11 ❂Games Played:6 %mgp 11 ✬Games Won:6 %mgw 11 ☠Guesses (9☑/4☒): 6 %cg $+ / $+ %wg msg $chan 10☃Solo:11 ♙Games Played:6 %sgp 11 ❆Highest Score:6 %hs }
-
UPDATE: If you are using this script on Twitch, you will need SReject's JSON and mTwitch scripts (Core and DisplayName). This is a modified version of my Casino Roulette script found on my GitHub at https://github.com/Blasman/mIRC-Twitch-Scripts The original script is designed to be used on Twitch with AnkhBot's point system. I have spent a few hours modifying the script so that it uses it's own point system and can be used on any mIRC server. I could not find a good Casino Roulette game for mIRC anywhere online, so I hope that someone finds this script useful. IMPORTANT: Edit the variables and read the info at the beginning of the script before you load the script. Otherwise, you will have to un-load and re-load the script for the changes to take effect. This is a classic single-zero Casino Roulette table. You can set a maximum amount of "dollars" that a user can bet for the entire table, as well as a minimum bet for any option on the table. Therefor, a user can make multiple bets at the table on different options, just like at a real Casino. See http://i.imgur.com/j7Fwytt.jpg for all betting options. To create an account with the game, either make a bet at the table, or type !money to check your money. Command List: !rbet on ::: Mod Only. This command will enable the game in your channel. !rbet off ::: Mod Only. This command will disable the game in your channel. !rbet ::: This command will give an info message about how to play the game as well as additional commands. !rbet [option] [amount] ::: Example: !rbet red 100. This is to make a wager at the table. The example simply means that you bet 100 dollars on "red." !money ::: Check how much money you have. Use the name of another player after the command to check another players money. !reset ::: Any user may reset their money back to the starting amount. Mods may use this command with the name of another player to reset that players money as well. !top5 ::: Show the top 5 players with the most money. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; VARIABLES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; /* HEY! LOOK HERE! This is what you need to change in this script... Change the %roul_chan variable to the channel that you are running the game on. Change the %roul_newplayer variable to the amount of money that a new player starts with. Change the %roul_minbet and %roul_maxbet to the minimum and maximum amount of points that must be spent in order to play Roulette. The %roul_minbet is the minimum amount of points that a user must spend on any betting option. The %roul_maxbet is the maximum amount of points that a user can spend on the entire roulette table. The %roul_cd variable is the amount of time (in seconds) before another roulette game can be played after a game has just finished. Set this to 0 for there to be no cooldown. The %roul_repeat variable is the amount of time (in seconds) that the bot will repeat the message that the game is open in the channel if no on has started a game yet. Set this to 0 to disable this message. You will need to UNLOAD and RE-LOAD this script for any changes to the variables below to take effect. This can be done by pressing ALT-R in mIRC > Select "View" > Select "roulette.mrc" > Click on "File" > "Unload." Then, click on "File" and "Load..." and select the roulette.mrc file again. Have fun!!! */ ON *:LOAD: { SET %roul_chan #my_channel SET %roul_newplayer 10000 SET %roul_minbet 200 SET %roul_maxbet 1000 SET %roul_cd 60 SET %roul_repeat 1800 SET %roul_options red black odd even less more doz1 doz2 doz3 row1 row2 row3 line1 line2 line3 line4 line5 line6 line7 line8 line9 line10 line11 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 } ON *:UNLOAD: { UNSET %roul_* | .timer.roul.* off } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ROULETTE GAME ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ON $*:TEXT:/^!(roulette|rbet)\s(on|off)$/iS:%roul_chan: { IF ($nick isop $chan) { IF ($2 == on) { IF (!%GAMES_ROUL_ACTIVE) { SET %GAMES_ROUL_ACTIVE On IF ($isfile(roulbets.txt)) REMOVE roulbets.txt MSG $chan $nick $+ , the Roulette game is now enabled! Type !rbet for more info! Have fun! } ELSE MSG $chan $nick $+ , !rbet is already enabled. } ELSEIF ($2 == off) { IF (%GAMES_ROUL_ACTIVE) { UNSET %GAMES_ROUL_ACTIVE .timer.roul.* off IF ($isfile(roulbets.txt)) REMOVE roulbets.txt MSG $chan $nick $+ , the Roulette game is now disabled. } ELSE MSG $chan $nick $+ , Roulette is already disabled. } } } ON $*:TEXT:/^!(roulette|rbet)(\s|$)/iS:%roul_chan: { IF (!%GAMES_ROUL_ACTIVE) { IF ((%floodROUL_ACTIVE) || ($($+(%,floodROUL_ACTIVE.,$nick),2))) halt SET -u15 %floodROUL_ACTIVE On SET -u120 %floodROUL_ACTIVE. $+ $nick On MSG $chan $nick $+ , the Roulette game is currently disabled. } ELSEIF ($timer(.roul.reopen)) { IF ((%floodROULreopen) || ($($+(%,floodROULreopen.,$nick),2))) halt SET -u15 %floodROULreopen On SET -u60 %floodROULreopen. $+ $nick On MSG $chan Relax, $nick $+ ! I will announce the next Roulette game in $duration($timer(.roul.reopen).secs) $+ ! } ELSEIF (%roul.closed) halt ELSEIF (($istok(%roul_options,$2,32)) && ($3 isnum %roul_minbet - %roul_maxbet) && (%roul.bet. [ $+ [ $nick ] ] != 0) && (($calc(%roul.bet. [ $+ [ $nick ] ] - $3) >= 0) || (!%roul.bet. [ $+ [ $nick ] ]))) { VAR %wager $floor($3) IF (!$ini(roulette.ini,$nick)) WRITEINI roulette.ini $nick money %roul_newplayer IF ($readini(roulette.ini,$nick,money) < %wager) { MSG $nick $nick $+ , you do not have $chr(36) $+ %wager to wager at this table! | halt } WRITEINI roulette.ini $nick money $calc($readini(roulette.ini,$nick,money) - %wager) IF ($isfile(roulbets.txt)) { VAR %x = 1 WHILE ($read(roulbets.txt, %x) != $null) { VAR %rnick $gettok($read(roulbets.txt, %x), 1, 32) VAR %bet $gettok($read(roulbets.txt, %x), 2, 32) VAR %amount $gettok($read(roulbets.txt, %x), 3, 32) IF (($nick == %rnick) && ($2 == %bet)) { WRITE -l $+ %x roulbets.txt $nick $2 $calc(%amount + %wager) VAR %roul.rebet $true } IF (%roul.rebet) break INC %x } IF (!%roul.rebet) WRITE roulbets.txt $nick $2 %wager } ELSE { IF ($timer(.roul.repeat)) timer.roul.repeat off WRITE roulbets.txt $nick $2 %wager .timer.roul.begin1 1 120 MSG $chan All bets for the Roulette game are now closed! The ball is dropped into the wheel, and the wheel begins spinning! .timer.roul.begin2 1 120 SET %roul.closed On .timer.roul.begin3 1 132 roulspin MSG $chan $nick has started a game of Roulette! Everyone has two minutes to get in their bets! Bet any amount of money from %roul_minbet to %roul_maxbet $+ ! ▌ Use: !rbet [option] [amount] ▌ Example: !rbet red %roul_minbet ▌ For all betting options, see http://i.imgur.com/j7Fwytt.jpg } IF (!%roul.bet. [ $+ [ $nick ] ]) SET %roul.bet. [ $+ [ $nick ] ] $calc(%roul_maxbet - %wager) ELSE SET %roul.bet. [ $+ [ $nick ] ] $calc(%roul.bet. [ $+ [ $nick ] ] - %wager) IF (%roul.bet. [ $+ [ $nick ] ] >= %roul_minbet) MSG $nick $nick $+ , you have bet $chr(36) $+ %wager on $2 $+ . You can spend $chr(36) $+ %roul.bet. [ $+ [ $nick ] ] more at this table. Good luck! ELSE MSG $nick $nick $+ , you have bet $chr(36) $+ %wager on $2 $+ . You have bet all that you can for this table! Good luck! } ELSEIF (($istok(%roul_options,$2,32)) && ($3 isnum) && ($3 !isnum %roul_minbet - %roul_maxbet) && (%roul.bet. [ $+ [ $nick ] ] != 0) && (($calc(%roul.bet. [ $+ [ $nick ] ] - %roul_minbet) >= 0) || (!%roul.bet. [ $+ [ $nick ] ]))) { IF ($($+(%,floodROULwager.,$nick),2)) halt SET -u15 %floodROULwager. $+ $nick On MSG $nick $nick $+ , please make a valid wager between %roul_minbet and %roul_maxbet dollars. } ELSEIF (($3 isnum %roul_minbet - %roul_maxbet) && (%roul.bet. [ $+ [ $nick ] ] != 0) && (($calc(%roul.bet. [ $+ [ $nick ] ] - $3) >= 0) || (!%roul.bet. [ $+ [ $nick ] ]))) { IF ($($+(%,floodROULoption.,$nick),2)) halt SET -u15 %floodROULoption. $+ $nick On MSG $nick $nick $+ , please bet on a valid betting option. See http://i.imgur.com/j7Fwytt.jpg for options. } ELSEIF (($istok(%roul_options,$2,32)) && ($3 isnum %roul_minbet - %roul_maxbet) && ($calc(%roul.bet. [ $+ [ $nick ] ] - $3) < 0)) { IF ($($+(%,floodROULmaxwager.,$nick),2)) halt SET -u15 %floodROULmaxwager. $+ $nick On IF (%roul.bet. [ $+ [ $nick ] ] >= %roul_minbet) MSG $nick $nick $+ , you can only bet up to %roul.bet. [ $+ [ $nick ] ] more money at this table. ELSE MSG $nick $nick $+ , the minimum bet is $chr(36) $+ %roul_minbet on any bet at Roulette, the max bet for the entire table is $chr(36) $+ %roul_maxbet $+ . You cannot bet any more at this table. } ELSEIF ((%roul.bet. [ $+ [ $nick ] ]) || (%roul.bet. [ $+ [ $nick ] ] == 0)) halt ELSE { IF ((%floodROULinfo) || ($($+(%,floodROULinfo.,$nick),2))) halt SET -u15 %floodROULinfo On SET -u60 %floodROULinfo. $+ $nick On MSG $chan $nick $+ , you may bet any amount of money from $chr(36) $+ %roul_minbet to $chr(36) $+ %roul_maxbet on Roulette! ▌ Use: !rbet [option] [amount] ▌ Example: !rbet red %roul_minbet ▌ For all betting options, see http://i.imgur.com/j7Fwytt.jpg } } alias roulspin { VAR %num = $rand(0,36) MSG %roul_chan The ball lands on %num $+ ! IF (%num == 0) VAR %winnum = 0 ELSEIF (%num == 1) VAR %winnum 1 red odd row1 doz1 line1 less ELSEIF (%num == 2) VAR %winnum 2 black even row2 doz1 line1 less ELSEIF (%num == 3) VAR %winnum 3 red odd row3 doz1 line1 less ELSEIF (%num == 4) VAR %winnum 4 black even row1 doz1 line1 line2 less ELSEIF (%num == 5) VAR %winnum 5 red odd row2 doz1 line1 line2 less ELSEIF (%num == 6) VAR %winnum 6 black even row3 doz1 line1 line2 less ELSEIF (%num == 7) VAR %winnum 7 red odd row1 doz1 line2 line3 less ELSEIF (%num == 8) VAR %winnum 8 black even row2 doz1 line2 line3 less ELSEIF (%num == 9) VAR %winnum 9 red odd row3 doz1 line2 line3 less ELSEIF (%num == 10) VAR %winnum 10 black even row1 doz1 line3 line4 less ELSEIF (%num == 11) VAR %winnum 11 black odd row2 doz1 line3 line4 less ELSEIF (%num == 12) VAR %winnum 12 red even row3 doz1 line3 line4 less ELSEIF (%num == 13) VAR %winnum 13 black odd row1 doz2 line4 line5 less ELSEIF (%num == 14) VAR %winnum 14 red even row2 doz2 line4 line5 less ELSEIF (%num == 15) VAR %winnum 15 black odd row3 doz2 line4 line5 less ELSEIF (%num == 16) VAR %winnum 16 red even row1 doz2 line5 line6 less ELSEIF (%num == 17) VAR %winnum 17 black odd row2 doz2 line5 line6 less ELSEIF (%num == 18) VAR %winnum 18 red even row3 doz2 line5 line6 less ELSEIF (%num == 19) VAR %winnum 19 red odd row1 doz2 line6 line7 more ELSEIF (%num == 20) VAR %winnum 20 black even row2 doz2 line6 line7 more ELSEIF (%num == 21) VAR %winnum 21 red odd row3 doz2 line6 line7 more ELSEIF (%num == 22) VAR %winnum 22 black even row1 doz2 line7 line8 more ELSEIF (%num == 23) VAR %winnum 23 red odd row2 doz2 line7 line8 more ELSEIF (%num == 24) VAR %winnum 24 black even row3 doz2 line7 line8 more ELSEIF (%num == 25) VAR %winnum 25 red odd row1 doz3 line8 line9 more ELSEIF (%num == 26) VAR %winnum 26 black even row2 doz3 line8 line9 more ELSEIF (%num == 27) VAR %winnum 27 red odd row3 doz3 line8 line9 more ELSEIF (%num == 28) VAR %winnum 28 black even row1 doz3 line9 line10 more ELSEIF (%num == 29) VAR %winnum 29 black odd row2 doz3 line9 line10 more ELSEIF (%num == 30) VAR %winnum 30 red even row3 doz3 line9 line10 more ELSEIF (%num == 31) VAR %winnum 31 black odd row1 doz3 line10 line11 more ELSEIF (%num == 32) VAR %winnum 32 red even row2 doz3 line10 line11 more ELSEIF (%num == 33) VAR %winnum 33 black odd row3 doz3 line10 line11 more ELSEIF (%num == 34) VAR %winnum 34 red even row1 doz3 line11 more ELSEIF (%num == 35) VAR %winnum 35 black odd row2 doz3 line11 more ELSEIF (%num == 36) VAR %winnum 36 red even row3 doz3 line11 more VAR %x = 1 WHILE ($read(roulbets.txt, %x) != $null) { VAR %nick $gettok($read(roulbets.txt, %x), 1, 32) VAR %bet $gettok($read(roulbets.txt, %x), 2, 32) VAR %amount $gettok($read(roulbets.txt, %x), 3, 32) IF ($istok(%winnum,%bet,32)) { IF ((%bet == red) || (%bet == black) || (%bet == odd) || (%bet == even) || (%bet == more) || (%bet == less)) VAR %winnings = %amount * 2 ELSEIF (($left(%bet,3) == row) || ($left(%bet,3) == doz)) VAR %winnings = %amount * 3 ELSEIF ($left(%bet,4) == line) VAR %winnings = %amount * 6 ELSE VAR %winnings = %amount * 35 VAR %winnersList %winnersList %nick $chr(40) $+ $chr(36) $+ %winnings on %bet $+ $chr(41) - WRITEINI roulette.ini %nick money $calc($readini(roulette.ini,%nick,money) + %winnings) } INC %x } IF (%winnersList) .timer.endroul 1 3 MSG %roul_chan CONGRATULATIONS TO THE WINNERS OF THE ROULETTE GAME: $left(%winnersList, -1) ELSE .timer.endroul 1 3 MSG %roul_chan Nobody won at Roulette! Better luck next time! .timer.roul.unset2 1 3 UNSET %roul.* .timer.roul.unset3 1 3 REMOVE roulbets.txt IF (%roul_cd > 0) .timer.roul.reopen 1 $calc(%roul_cd + 3) MSG %roul_chan The Roulette game is open again! You may bet any amount of money from $chr(36) $+ %roul_minbet to $chr(36) $+ %roul_maxbet on Roulette! ▌ Use: !rbet [option] [amount] ▌ Example: !rbet red %roul_minbet ▌ For all betting options, see http://i.imgur.com/j7Fwytt.jpg IF (%roul_repeat > 0) .timer.roul.repeat 0 $calc(%roul_repeat + 3) MSG %roul_chan The Roulette game is open! Place your bets! You may bet any amount of money from $chr(36) $+ %roul_minbet to $chr(36) $+ %roul_maxbet on Roulette! ▌ Use: !rbet [option] [amount] ▌ Example: !rbet red %roul_minbet ▌ For all betting options, see http://i.imgur.com/j7Fwytt.jpg } alias -l newplayer { IF (!$1) { MSG %roul_chan Welcome to Roulette, $nick $+ ! You now have $chr(36) $+ %roul_newplayer to play the game! WRITEINI roulette.ini $nick money %roul_newplayer } ELSE { MSG %roul_chan $1 $+ 's money has been reset to $chr(36) $+ %roul_newplayer $+ . WRITEINI roulette.ini $1 money %roul_newplayer } } ON $*:TEXT:/^!money(\s|$)/iS:%roul_chan:{ IF ($($+(%,floodROUL_MONEY.,$nick),2)) halt SET -u6 %floodROUL_MONEY. $+ $nick On IF (!$2) { IF ($ini(roulette.ini,$nick)) MSG $chan $nick $+ , you have $chr(36) $+ $readini(roulette.ini,$nick,money) to gamble at Roulette. ELSE newplayer } ELSEIF ($2 == $me) MSG $chan I got all the money! ELSE { IF ($ini(roulette.ini,$2)) MSG $chan $2 has $chr(36) $+ $readini(roulette.ini,$2,money) to gamble at Roulette. ELSE MSG $chan $2 has never played Roulette here. } } ON $*:TEXT:/^!reset(\s|$)/iS:%roul_chan: { IF ($($+(%,floodROUL_RESET.,$nick),2)) halt IF ($nick !isop $chan) SET -u10 %floodROUL_RESET. $+ $nick On IF (!$2) newplayer ELSEIF (($nick isop $chan) && ($ini(roulette.ini,$2)) && ($2 != $me)) $newplayer($2) } ON *:TEXT:!top5:%roul_chan: { IF (%floodROULtop) halt SET -u10 %floodROULtop On window -h @. | var %i 1 WHILE $ini(roulette.ini,%i) { aline @. $v1 $readini(roulette.ini,$v1,money) INC %i } filter -cetuww 2 32 @. @. VAR %i 1 | while %i <= 5 { tokenize 32 $line(@.,%i) VAR %name $chr(35) $+ %i $1 $chr(40) $+ $2 $+ $chr(41) - VAR %list $addtok(%list, %name, 32) INC %i } MSG $chan Roulette Leaderboard ▌ $left(%list, -1) window -c @. }
-
This is the darkest script. load it in your remote to find more information, summary tho. Sexy colours, sexy other things, flood control word strippers color basers. etc. its very good for a loaded theme, maybe the best :). dialog csetting { title "Colour settings!" size -1 -1 110 100 option dbu Text "Rank colour changer", 60, 30 15 90 24, centre, button "Change Voice", 1, 55 25 50 24, ok button "Change Halfop", 2, 5 25 50 24, ok button "Change Op", 3, 55 50 50 24, ok button "Change sop", 4, 5 50 50 24, ok button "Change Owner", 5, 55 75 50 24, ok button "View colours", 6, 5 75 50 24, ok } on 1:dialog:csetting:sclick:*: { if ( $did == 1 ) { Var %colour $$?"What colour do you want Voice to be?" if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 16) { writeini theme.ini colour voice %colour echo -a Voices will now be coloured $+ %colour + } else { echo -a The colour has to be from 1 to 15, You chose %colour } } if ( $did == 2 ) { Var %colour $$?"What colour do you want Halfop to be?" if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 16) { writeini theme.ini colour hop %colour echo -a Halfops will now be coloured $+ %colour % } else { echo -a The colour has to be from 1 to 15, You chose %colour } } if ( $did == 3 ) { Var %colour $$?"What colour do you want Op to be?" if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 16) { writeini theme.ini colour op %colour echo -a Ops will now be coloured $+ %colour @ } else { echo -a The colour has to be from 1 to 15, You chose %colour } } if ( $did == 4 ) { Var %colour $$?"What colour do you want Sop to be?" if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 16) { writeini theme.ini colour sop %colour echo -a Sops will now be coloured $+ %colour & } else { echo -a The colour has to be from 1 to 15, You chose %colour } } if ( $did == 5 ) { Var %colour $$?"What colour do you want Owner to be?" if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 16) { writeini theme.ini colour owner %colour echo -a Owners will now be coloured $+ %colour ~ } else { echo -a The colour has to be from 1 to 15, You chose %colour } } if ( $did == 6 ) { window -da @colours aline @colours $scol( Voices are + - Halfops are % - Ops are @ - Sops are & - Owners are ~ -) } } alias csetting { echo -a The colours if you need them are as fallowed, 01 $+ 1022033044055066077088099101011111212131314141515 dialog -mo csetting csetting } on *:input:@Darkest-control: { if ( / !isin $1 ) { aline @Darkest-Control $1- if ( command isin $1 ) { aline @Darkest-Control The commands are as fallowed. Aline @darkest-control Colour setting - set up the colour for +%@&~. aline @Darkest-Control Blacklist - To see who is on your blacklist. aline @Darkest-Control Update - Update the botlist, You may get an error if your server doesnt support the bs command. aline @Darkest-Control View botList - For a list of the bots you have. aline @Darkest-Control settings - To change the settings aline @Darkest-Control Help - For the dark help file. aline @Darkest-Control add bot - Add a bot to the bot list manually aline @Darkest-Control delete bot - Delete a bot from the bot list. aline @Darkest-Control View settings - View the current settings you have in place. halt } if ($regex($lower($1-),hi|hello|sup|good morning|good day|hey|bonjour|greet|salutatio)) { aline 12 @Darkest-Control $greet($time(HH)) $+ , It is $day $time(mmmm) $time(mm) $+ , Have a nice day $me :). | halt } if ( view == $1 ) && ( setting isin $2 ) { aline @Darkest-Control You currently have stripping messages: $iif($readini(theme.ini,settings,strip),$readini(theme.ini,settings,strip),off) aline @Darkest-Control You currently have Highlights: $iif($readini(theme.ini,settings,highlight),$readini(theme.ini,settings,highlight),off) aline @Darkest-Control You currently have Grammar correct: $iif($readini(theme.ini,settings,grammercorrect),$readini(theme.ini,settings,grammercorrect),off) aline @Darkest-Control You currently have Mode setting by + or -: $iif($readini(theme.ini,settings,plus),$readini(theme.ini,settings,plus),off) aline @Darkest-control You currently have Auto away: $iif(%away,%away,off) aline @Darkest-Control You currently have Query control: $iif($readini(theme.ini,settings,querycontrol),$readini(theme.ini,settings,querycontrol),off) aline @Darkest-Control You currently have Pop up on notice: $iif($readini(theme.ini,settings,popup),$readini(theme.ini,settings,popup),off) aline @Darkest-control Your current colour settings are $scol(~&@%+) - if they are all blue, you have none, type colour settings to change them. aline @Darkest-Control You are currently using - $dark(Darkest Script) Version $readini(theme.ini, settings, version) halt } if ( $1 == colour ) && ( setting isin $2 ) { csetting | halt } if ( blacklist isin $1- ) { aline @Darkest-Control $iif($ini(theme.ini,blacklreason,1),You currently have $ini(theme.ini, blacklreason, 0) people on your blacklist., You currently have no people on your blacklist.) var %x $ini(theme.ini, blacklreason, 0) while (%x) { var %person $ini(theme.ini, blacklreason, %x) aline @Darkest-Control %person For reason, $Readini(theme.ini, blacklreason, %person) dec %x } halt } if ( setting isin $1 ) { settings | halt } if ( help isin $1 ) { darkhelp | halt } if ( add == $1 ) && ( bot == $2 ) && ($3) { writeini theme.ini bots $3 1 | aline @Darkest-Control $3 has been added to the botlist! | halt } if ( delete == $1 ) && ( bot == $2 ) && ($3) { remini theme.ini bots $3 | aline @Darkest-Control $3 has been taken off the botlist. | halt } if ( view == $1 ) && ( bot isin $2 ) { viewbot | halt } if ( update == $1 ) { botit | halt } else { aline @Darkest-Control Error - No such command - To see commands type - commands - That is all. } } else noop $1- } alias startsets { if (!$hget(address, 0).item) .hmake address 100 hload address address.txt set -e %ttraw on set -e %logo 6,1D1,6a6,1r1,6k6,1e1,6s6,1t set -e %timestamp 14(12hh14:12nn14:12ss14) set -e %raw $readini(theme.ini, settings, raw) set -e %protection $readini(theme.ini, settings, protection) set -e %awaytime $readini(theme.ini, settings, awaytime) set -e %amsg $readini(theme.ini, settings, amsg) } on *:start: { startsets window -e @Darkest-Control aline 12 @Darkest-Control $greet($time(HH)) $+ , It is $day $time(mmmm) $time(mm) $+ , Have a nice day $me :). } alias Greet { var %time Hello! Its late :P if ( $1 == 06 ) { var %time Good morning } if ( $1 == 07 ) { var %time Good morning } if ( $1 == 08 ) { var %time Good morning } if ( $1 == 09 ) { var %time Good morning } if ( $1 == 10 ) { var %time Good morning } if ( $1 == 11 ) { var %time Good morning } if ( $1 == 12 ) { var %time Good Afternoon } if ( $1 == 13 ) { var %time Good Afternoon } if ( $1 == 14 ) { var %time Good Afternoon } if ( $1 == 15 ) { var %time Good Afternoon } if ( $1 == 16 ) { var %time Good Afternoon } if ( $1 == 17 ) { var %time Good Afternoon } if ( $1 == 18 ) { var %time Good Evening } if ( $1 == 19 ) { var %time Good Evening } if ( $1 == 20 ) { var %time Good Evening } return %time } on ^1:OPEN:?:*: { if ($nick) who $nick if ( $readini(theme.ini, settings, querycontrol) == on ) { if ($readini(theme.ini, query, $iif($sha($nick),$v1,$nick)) == accepted ) { echo -a Query Auto accepted from $nick $+ . | goto finish } if (%flood.o) { close -m $nick | $iif(%querys < 3,.msg $nick Please wait I have a que of queries which need to be answered first.) | inc %querys | window @floodcontrol | aline @floodcontrol $nick has queried you saying: <- $1- -> while you were accepting a query. | halt } set %query.nick $nick set %query.true $1- set %query.msg $iif($len($strip($1-)) > 75,a message to long to be displayed,$strip($1-)) .msg $nick 12{14-15-14 $dark(Darkest) Query Control Please Wait to be accepted or denied 14-15-12} dialog -m QF QF .timer 1 0 close -m $nick set %flood.o 1 .timer 1 5 unset %flood.* window @Darkest-Control aline 10 @Darkest-Control Query control used } :finish } dialog QF { title "Darkest Query Control" size 250 75 250 125 text You have a query from %query.nick $chr(40) $+ $sha(%query.nick) $+ $chr(41) saying %query.msg ,1, 5 5 210 100 button "Accept",2, 5 70 50 30, ok button "Deny",3, 60 70 50 30, cancel button "Block",4, 115 70 50 30 text "V3", 5, 200 90 30 15, disable } on *:dialog:QF:sclick:2: { query %query.nick echo -t %query.nick 12{14-12 %query.nick 14-12} %query.true echo -t %query.nick 12{14-12 $me 14-12} I have accepted your query. .msg %query.nick 12{14-15-14 I have accepted your query. 15-14-12} unset %query.* } on *:dialog:QF:sclick:3: { .msg %query.nick I have denied your query - A 2 minute ignore has been placed on your nick to prevent abuse. .ignore -pu120 %query.nick close -m %query.nick unset %query.* } on *:dialog:QF:sclick:4: { dialog -x QF var %reason $??"Is there a reason why you are blocking this person?" .msg %query.nick I have denied your query & You have been blocked for reason: $iif(%reason,$v1,Generel annoyance) .ignore -pu1200 %query.nick close -m %query.nick unset %query.* } menu query { $iif($readini(Theme.ini, Query, $sha($active)) == accepted,$style(1),$style(0)) Auto-Accept queries from $active: { set %status $iif($readini(Theme.ini, Query, $sha($active)) == Accepted,Declined,Accepted) writeini theme.ini query $sha($active) %status echo -ta $+(04,$active) 14 has been04 $iif(%status == declined,deleted from,added to) 14Auto-Accept. } } dialog FloodProtection { title "Flood Protection." size -1 -1 110 100 option dbu Text "Flood Protection", 10, 34 10 50 24, centre, ok button "Add exception", 1, 5 25 50 24, button "lines before kick", 2, 55 25 50 24, button "When to unset lines", 3, 5 50 50 24, button "Kicks before ban", 4, 55 50 50 24, button "Do kick ops", 5, 55 74 50 24, button "Dont kick ops", 6, 5 74 50 24, } on *:dialog:Floodprotection:sclick:*: { if ( $did == 1 ) { var %nick $$?"Who do you want to add to your exception list?" if (!%nick) { echo -a You have cancelled the command | halt } writeini theme.ini exception %nick Excepted echo -a %nick Has been added to the exception list. } if ( $did == 2 ) { set %lines $$?"How many lines should be said in a set amount of time before kicking somone?" echo -a after %lines line $+ $iif(%lines > 1,s) in $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) seconds a user will get kicked. } if ( $did == 3 ) { writeini theme.ini flood unsettime $$?"How long should it take to unset kicking time? - in seconds." echo -a after %lines line $+ $iif(%lines > 1,s) in $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) seconds a user will get kicked. } if ( $did == 4 ) { var %kb $$?"How many times should a person be kicked before being banned?" writeini theme.ini ban times %kb echo -a after $readini(theme.ini, ban, times ) kick $+ $iif( $readini(theme.ini, ban, times) > 1,s) a user will be banned, if not on the exception list. } if ( $did == 6 ) { writeini theme.ini protection op on echo -a ops will now not be kicked if they flood. } if ( $did == 5 ) { writeini theme.ini protection op off echo -a ops will now be kicked if they flood. } } alias w { whois $1- } alias advertise { msg $iif(%chan,$v1,$active) 12{14-15-14 I am using %logo script 12-14 Made by Termz 12-14 http://darkest-script.webs.com 15-14-12} } alias settings { dialog -mo settings settings } alias sun { var %colour1 8 var %colour2 4 var %colour3 7 var %colour4 $iif($rand(7,9) == 9,4,$rand(7,8)) var %x = 1 var %c = $chr(3) var %t = $+(%c,%colour1) %colour1 = $base(%colour1,10,10,2) %colour2 = $base(%colour2,10,10,2) %colour3 = $base(%colour3,10,10,2) %colour4 = $base(%colour4,10,10,2) while ($mid($1-,%x,1)) { %t = $+(%t,$v1,%c,$iif($and(%x,1) == 0,%colour [ $+ [ $rand(1,4) ] ],%colour [ $+ [ $rand(1,4) ] ] )) inc %x } return %t } alias ac { var %colour1 11 var %colour2 12 var %colour3 2 var %colour4 10 var %x = 1 var %c = $chr(3) var %t = $+(%c,%colour1) %colour1 = $base(%colour1,10,10,2) %colour2 = $base(%colour2,10,10,2) %colour3 = $base(%colour3,10,10,2) %colour4 = $base(%colour4,10,10,2) while ($mid($1-,%x,1)) { %t = $+(%t,$v1,%c,$iif($and(%x,1) == 0,%colour [ $+ [ $rand(1,4) ] ],%colour [ $+ [ $rand(1,4) ] ] )) inc %x } return %t } alias register { if (!%password ) { set %password $??"what is your password?" } if (@ !isin $Readini(mirc.ini, mirc, email)) { var %email $$?"What is your email?" writeini mirc.ini mirc email %email } else { var %email $readini(mirc.ini, mirc, email) } msg nickserv register %password %email } alias mute { who $active mode $active +b ~q: $+ $sha($1) | mode $active -vho $1 $1 $1 } on ^*:NOTICE:*:?: { $iif($readini(theme.ini, bots, $nick),goto bots,inc %floodS) if ( $readini(theme.ini, settings, popup) == on ) { if ( %floodS >= 3 ) { goto window } .timerflood 1 30 unset %floodS :bots if ($readini(Theme.ini, Bots, $nick) == 1 ) { if ($nick == nickserv) && ( Please isin $1-) && ( nick isin $1- ) { identify } if ($nick == botserv) && (%silence [ $+ [ botserv ] ]) { $iif($1 isnum,halt,writeini -n Theme.ini Bots $1 1) | halt } echo < $nick > $1- | halt :window .timerflood 1 30 unset %floods window @FloodControl $iif(%Alined != 1,aline 12 @floodcontrol This person was suspected of flood so it was forwarded to this window.) set %alined 1 .timer 1 20 unset %alined aline 14 @floodcontrol < $+ $nick $+ > $1- halt } noop $tip(Notice, Notice, 7Notice from 3 $+ $nick $+ saying $1- ,10) | write notice.txt $time $nick $+ : $1- | haltdef halt } } on ^*:INVITE:#: { if ( %raw != on ) { halt } if ( %inv [ $+ [ $address($nick,13) ] ] == 1 ) { .notice $nick I will not accept an invite from you for the next 60 seconds. | inc %inv [ $+ [ $address($nick,13) ] ] | halt } if ( %inv [ $+ [ $address($nick,13) ] ] > 1 ) { window @Darkest-Control aline 8 @Darkest-Control Invite protection from $nick has been used. halt } echo $active 12{14-12 $nick 14-12} has invited you to $+ $iif(!$1,$chan,$5) inc -u60 %inv [ $+ [ $address($nick,13) ] ] halt } menu @highlight { Clear Highlights: { .remove hl.txt write hl.txt Highlights Echo Highlights have been cleared. } } alias kick { if ( $2 == $chan ) || ( $3 == $chan ) { kick $1- | halt } $iif(Q isincs $chan(#).mode,cs kick,kick) $chan $1 $iif(!$2,$read(kick.txt),$2-) } alias darkhelp { run help.txt } alias connection { $iif($readini(theme.ini, botlist, $network) != Complete,Botit) .timestamp -f 14(12hh14:12nn14:12ss14) .timestamp on .timestamp -g 14(12hh14:12nn14:12ss14) set %raw on mode $me +xp } on *:load: { load } alias load { if ($?!"You are about to load the darkest script - when loading the darkest script many files will be made. And you will then be guided threw it.") { titlebar Darkest - Script .alias invite invite $chr(36) $+ 1 $chr(36) $+ iif(! $+ $chr(36) $+ 2,#, $+ $chr(36) $+ 2) .remove hl.txt .remove help.txt writeini mirc.ini text quit Darkest Script write hl.txt Highlights write help.txt *-*-*-*-*-*-*-*- $+ Darkest Script $+ -*-*-*-*-*-*-*-* write help.txt Thank you for using the darkest script made by Termz write help.txt I suggest you read this before further use. write help.txt For a list of commands to use in this window type commands in this window. write help.txt to access this file type help in this window. write help.txt To change settings right click the background or type "settings" write help.txt The rainbow text and grammer text cannot be on at the same time write help.txt Protection protects you from getting kicked or banned if you are op write help.txt Please do not edit the script in any way write help.txt If the script stops working because you editted it please do not ask me for help write help.txt if you need help with the script and you didnt edit it etc. you can find me by. write help.txt The website, http://darkest-script.webs.com/# for details and extra help. .remove joke.txt writeini theme.ini ban times 3 write joke.txt Yo mama's head is so small that she got her ear pierced and died. write joke.txt Yo mama's so bald she curls her hair with rice. write joke.txt Yo mama's so fat she lays on the beach and people run around yelling Free Willy! write joke.txt Yo mama's head is so big she has to wash her hair at Niagara Falls write joke.txt Yo mama's so poor when I saw her kicking a can down the street, I asked her what she was doing, she said, "Moving." write joke.txt Yo mama's breath is so stank we don't know whether you need gum or toilet paper write joke.txt Yo mama's so fat her blood type is Ragu write joke.txt Yo mama's head is so big she has to wash her hair at Niagara Falls write joke.txt Yo mama's so fat she can't wear Daisey Dukes. She has to wear Boss Hoggs set -e %logo 6,1D1,6a6,1r1,6k6,1e1,6s6,1t set -e %timestamp 14(12hh14:12nn14:12ss14) set -e %raw on set -e %protection on set -e %awaytime 1800 write joke.txt Yo mama's so stupid on her job application where it says emergency contact she put 911 write joke.txt Yo mama's so ugly that when she was born, the doctor slapped HER mama! write joke.txt Yo mama's so bald that she took a shower and got brain-washed! write joke.txt Yo mama's so big she uses I-95 for a Slip 'n Slide write joke.txt Yo mama's so stupid on her job application where it says emergency contact she put 911 write joke.txt Yo mama's so ugly they pay her to put her clothes on in strip joints. write joke.txt Yo mama's so fat she went to the movies and sat next to everyone! write joke.txt Yo mama's so smelly, that her shit is glad to escape. write joke.txt Yo mama's so fat when she wears a yellow raincoat, people said "Taxi!" write joke.txt Yo mama's so fat that when the bitch goes to an all You can eat buffet, they have to install speed bumps. write joke.txt Yo mama's so dumb, she cooked her own complimentary breakfast. write joke.txt Yo mama's so fat a picture of her would fall off the wall! write joke.txt Yo mama's so stupid, I saw her in the frozen food section with a fishing rod. write joke.txt Yo mama's so dumb, she got hit by a cup and told the police that she got mugged. write joke.txt Yo mama's got three fingers and a banjo. write joke.txt Yo mama's so stupid, she asked you, "What is the number for 911?" write joke.txt Yo mama's breath is so stank we don't know whether you need gum or toilet paper write joke.txt Yo mama's so stupid, I saw her in the frozen food section with a fishing rod. write joke.txt Yo mama's so ugly they put her face on box of Ex-Lax and sold it empty write joke.txt Yo mama's so ugly that Yo father takes her to work just so he doesn't have to kiss her goodbye. set %timestamp 14(12hh14:12nn14:12ss14) .remove chuck.txt write chuck.txt When you play Monopoly with Chuck Norris, you do not pass go, and you do not collect two hundred dollars. You will be lucky if you make it out alive. write chuck.txt When you play Monopoly with Chuck Norris, you do not pass go, and you do not collect two hundred dollars. You will be lucky if you make it out alive. write chuck.txt Chuck Norris can win a game of Connect Four in only three moves. write chuck.txt The active ingredient in Red Bull is Chuck Norris's sweat. write chuck.txt When Chuck Norris is in a crowded area, he doesn't walk around people. He walks through them. write chuck.txt It takes Chuck Norris 20 minutes to watch 60 Minutes. write chuck.txt The active ingredient in Red Bull is Chuck Norris's sweat. write chuck.txt Chuck Norris once ate an entire bottle of sleeping pills. They made him blink. write chuck.txt Thousands of years ago Chuck Norris came across a bear. It was so terrified that it fled north into the arctic. It was also so terrified that all of its decendents now have white hair. write chuck.txt When Chuck Norris is in a crowded area, he doesn't walk around people. He walks through them. write chuck.txt Chuck Norris doesn't bowl strikes, he just knocks down one pin and the other nine faint. write chuck.txt In the first Jurassic Park movie, the Tyrannosaurus Rex wasn't chasing the jeep. Chuck Norris was chasing the Tyrannosaurus AND the jeep. write chuck.txt Chuck Norris don't open no can of whoopass. He makes his own. write chuck.txt When a valcano erupts it is not because of a natural cause. It is because chuck norris just farted. write chuck.txt Chuck Norris once roundhouse-kicked a ten dollar bill into 200 nickels. write chuck.txt When a valcano erupts it is not because of a natural cause. It is because chuck norris just farted. write chuck.txt In the Bible, Jesus turned water into wine. But then Chuck Norris turned that wine into beer. write chuck.txt There are no weapons of mass destruction in Iraq, Chuck Norris lives in Oklahoma. write chuck.txt Chuck norris killed the dinosaurs. Along with the mamoth and the sabre tooth tiger, and well any other species thats did. He was there. write chuck.txt Chuck Norris doesn't bowl strikes, he just knocks down one pin and the other nine faint. .remove kick.txt write kick.txt Please, just stop. You are cracking the fuck out of everyone. write kick.txt You have a right to be silent! that means shut the fuck up! write kick.txt This happend because you were retarted and you forced me to do it. write kick.txt God doesnt spair idiots. He also doesnt spair jack asses, consider yourself a double kill. write kick.txt Who? ohhhh that faggot, i just kicked him. write kick.txt If you feel you were unfairly kicked please call our hotline at 1-800-tuf-shit or if you want to visit the website. www.kissmyass.com .color topic 3 .color kick 4 .color own text 14 if (!$hget(address, 0).item) .hmake address 100 .color normal text 14 .font -d Arial Unicode MS .color background 1 writeini -n Theme.ini Bots nickserv 1 writeini -n Theme.ini Bots Botserv 1 writeini -n Theme.ini Bots memoserv 1 writeini -n Theme.ini Bots Hostserv 1 writeini -n theme.ini Bots chanserv 1 writeini -n theme.ini Theme logo 1,6D6,1a1,6r6,1k1,6e6,1s1,6t writeini -n theme.ini Bots Global 1 .timestamp -f 14(12hh14:12nn14:12ss14) .timestamp on .timestamp -g 14(12hh14:12nn14:12ss14) set %raw on set %logo $dark(Darkest) set %night 6|13,6|0,13|13,6|6,2|2,1| 8¤ Good night ¤ 2,1|6,2|13,6|0,13|13,6| var %x 1 window -e @Darkest-Control writeini -n theme.ini settings Version 3 while ( %x < $calc($lines(help.txt) + 1)) { .timer 1 $calc(%x + %x) aline @Darkest-Control $replace($read(help.txt, %x),Darkest script,$dark(Darkest Script)) inc %x } } } alias version { $iif(!$1,version,ctcp $1 version) } dialog Away { title "The darkness shall rule the night" size -1 -1 270 150 Text "Dark Away script", 60, 85 15 90 24, centre, Text "V3", 330, 185 30 90 24, centre, disabled button "Adjust away time", 3, 0 50 90 24, ok button "Away message", 2, 90 50 90 24, ok button "Away nick", 1, 180 50 90 24, ok button "Turn on", 4, 0 74 135 76, ok button "Turn off", 5, 136 74 135 75, ok } on *:dialog:Away:sclick:*: { if ( $did == 2) { set %amsg $$?="What do you want your away message to be when you are gone?" echo $active Your away message is now %amsg } if ( $did == 3 ) { set %awaytime $$?="After how many seconds should your status turn away?" echo $active Your away time is now $duration(%awaytime) $+ . } if ( $did == 5 ) { set %away off | echo $active Away script has been turned off. } if ( $did == 4 ) { set %away on | echo $active Away script has been turned on. } if ( $did == 1 ) { set %anick $$?="What do you want your nick to be?" set %onick $me echo $active Your away nick is now %anick $+ , And your original nick is now $nick $+ . } } alias Botit { set -u5 %silencebotserv 10 bs botlist writeini theme.ini botlist $network Complete window -e @Darkest-Control aline 7 @Darkest-Control The botlist for $network has been updated. } alias identify { if (!$readini(theme.ini, password, $network $+ $iif($newnick,$newnick,$me))) { halt } .msg nickserv identify $readini(theme.ini, password, $network $+ $me) window -e @Darkest-Control aline 6 @Darkest-Control Auto identify script has been used. } ctcp ^*:version:*:{ haltdef | .ctcpreply $nick $1 1,6D6,1a1,6r6,1k1,6n6,1e1,6s6,1s 6,1 And only that shall rule the night. - 12Scripted 12By 14T15e0r15m14z4 | .ignore -tu7 $nick } on *:INPUT:#: { if ($1 == /who ) { unset %ttraw | .timer 1 5 set %ttraw on } if ( /ns == $1 && id == $2 && $3 != $null && !$readini(theme.ini, password, $network $+ $nick) ) { writeini theme.ini password $network $+ $nick $3 | echo $active your password has been recorded. | halt } if ( /msg == $1 && nickserv == $2 && identify == $3 && $readini(theme.ini, password, $network $+ $nick) ) { writeini theme.ini password $network $+ $nick $4 | echo $active your password has been recorded. | halt } if ( + isin $1 ) && ( $readini(theme.ini, settings, plus) == on ) { if ($regex($1,b|e/si)) && ( $2 ison $chan ) { mode $chan $replace($1-,$2, $iif($address($2,3),$v1,$sha($2))) | goto finish } mode $chan $1 $replace($2-,$ $+ me,$me) } if ( - isin $1 ) && ( $readini(theme.ini, settings, plus) == on ) && ($chan) { if ($regex($1,b|e/si)) && ( $2 ison $chan ) { mode $chan $replace($1-,$2, $iif($address($2,3),$v1,$sha($2)))) | goto finish } mode $chan $1 $replace($2-,$ $+ me, $+ $me $+ ) } if ( $readini(theme.ini, settings, grammercorrect) == on ) { if ( $left($1,1) isalpha ) { if ( $1 ison $chan ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $+ , $2- $+ . | halt } if ( ! isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( $right($1-,1) == ? ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( $right($1-,1) == ! ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( $right($1-,1) == . ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( . isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if (!$2) { msg $active $upper($left($1,1)) $+ $right($1,-1) $+ . | halt } if ( ` isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( - isin $1- ) || ( + isin $1) { halt } if ( Good night isin $1- ) { msg $active $replace($1-,Good night,%night) | halt } haltdef msg $active $upper($left($1,1)) $+ $right($1,-1) $2- $+ . | halt } } if (%rainbowtexton == 1) && ($left($1,1) != /) { var %x 1 while ( %x !> $chan(0)) { if ( $chan == $chan(%x) ) { var %y %x } inc %x } if ( $lower(c) isin $chan(%y).mode ) || ($upper(S) isin $chan(%y).mode) { goto norm } unset %msgrbw var %r1 1 set %nintext $len($1-) + 1 while (%r1 < %nintext) { set %msgrbw %msgrbw $+ $+ 04 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 07 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 08 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 09 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 12 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 06 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 13 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 } if (c isincs $chan(#).mode) { msg $chan $strip($1-) | haltdef | goto finisher1 } say %msgrbw unset %msgrbw unset %nintext halt } elseif (%rainbowtextandbackgroundon == 1) && ($left($1,1) != /) { unset %msgrbw2 var %r2 1 set %nintext2 $len($1-) + 1 while (%r2 < %nintext2) { set %msgrbw2 %msgrbw2 $+ $+ 06,04 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 13,07 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 12,08 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 03,09 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 08,12 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 07,13 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 04,06 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw22 %msgrbw2 $chr(32) } inc %r2 } if ($lower(c) isincs $chan(#).mode) { msg $chan $strip($1-) | haltdef | goto finisher1 } say %msgrbw2 :finisher1 unset %msgrbw2 unset %nintext2 haltdef halt } if ( %raw != on ) { goto finish } if ($left($1,1) == /) { goto finish } if ($left($1,2) == /) { goto finish } :norm if ($1) || ($2) $iif($status == connected,.msg,echo) $active $1- else { echo -a Your message could not be relayed. | halt } $iif($server,echo,noop) -at 12{14-12 $iif($ialchan($me,#,1).pnick != $me,$scol($left($ialchan($me,#,1).pnick,1))) $+ 12 $+ $me 14-12} $+ $color(own text) $1- $iif($away,away1) $iif(%away == on,.timeraway 1 $iif(!%awaytime,1800,%awaytime) away123) halt :finish } on *:INPUT:?: { if ($1 == /who ) { unset %ttraw | .timer 1 5 set %ttraw on } if ( /ns == $1 && id == $2 && $3 != $null && !$readini(theme.ini, password, $network $+ $nick) ) { writeini theme.ini password $network $+ $nick $3 | echo $active your password has been recorded. | halt } if ( /msg == $1 && nickserv == $2 && identify == $3 && $readini(theme.ini, password, $network $+ $nick) ) { writeini theme.ini password $network $+ $nick $4 | echo $active your password has been recorded. | halt } if ( + isin $1 ) && ( $readini(theme.ini, settings, plus) == on ) { if ( b isin $1 ) && ( $2 ison $chan ) { mode $chan $replace($1-,$2, $address($2,3)) | goto finish } mode $chan $1 $replace($2-,$ $+ me, $+ $me $+ ) } if ( - isin $1 ) && ( $readini(theme.ini, settings, plus) == on ) && ($chan) { if ( b isin $1 ) && ( $2 ison $chan ) { mode $chan $replace($1-,$2, $address($2,3)) | goto finish } mode $chan $1 $replace($2-,$ $+ me, $+ $me $+ ) } if ( $readini(theme.ini, settings, grammercorrect) == on ) { if ( $left($1,1) isalpha ) { if ( $1 ison $chan ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $+ , $2- $+ . | halt } if ( ! isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( $right($1-,1) == ? ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( $right($1-,1) == ! ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( $right($1-,1) == . ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( . isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if (!$2) { msg $active $upper($left($1,1)) $+ $right($1,-1) $+ . | halt } if ( ` isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( - isin $1- ) || ( + isin $1) { halt } if ( Good night isin $1- ) { msg $active $replace($1-,Good night,%night) | halt } haltdef msg $active $upper($left($1,1)) $+ $right($1,-1) $2- $+ . | halt } } if (%rainbowtexton == 1) && ($left($1,1) != /) { var %x 1 while ( %x !> $chan(0)) { if ( $chan == $chan(%x) ) { var %y %x } inc %x } if ( $lower(c) isin $chan(%y).mode ) || (S isin $chan(%y).mode) { goto norm } unset %msgrbw var %r1 1 set %nintext $len($1-) + 1 while (%r1 < %nintext) { set %msgrbw %msgrbw $+ $+ 04 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 07 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 08 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 09 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 12 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 06 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 13 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 } if (c isincs $chan(#).mode) { msg $chan $strip($1-) | haltdef | goto finisher1 } say %msgrbw unset %msgrbw unset %nintext halt } elseif (%rainbowtextandbackgroundon == 1) && ($left($1,1) != /) { unset %msgrbw2 var %r2 1 set %nintext2 $len($1-) + 1 while (%r2 < %nintext2) { set %msgrbw2 %msgrbw2 $+ $+ 06,04 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 13,07 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 12,08 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 03,09 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 08,12 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 07,13 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 04,06 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw22 %msgrbw2 $chr(32) } inc %r2 } if (c isincs $chan(#).mode) { msg $chan $strip($1-) | haltdef | goto finisher1 } say %msgrbw2 :finisher1 unset %msgrbw2 unset %nintext2 haltdef halt } if ( %raw != on ) { goto finish } if ($left($1,1) == /) { goto finish } if ($left($1,2) == /) { goto finish } :norm $iif(!$server,echo,.msg) $active $1- $iif($server,echo) -at 12{14-12 $iif($chan,$ialchan($me,#,1).pnick,$me) 14-12} $+ $color(own text) $1- $iif($away,away1) $iif(%away == on,.timeraway 1 $iif(!%awaytime,1800,%awaytime) away123) halt :finish } alias away1 { .timerg* off away nick $iif(%onick,%onick,$remove($me,|away)) timergonetime off unset %hlw* echo $active Welcome back from being away :), The script took care of you :3. You were away for, $duration(%seconds [ $+ [ $server ] ]) $+ . unset %second* } alias away123 { unset %hlw* set -e %second [ $+ [ $server ] ] %awaytime .timerG [ $+ [ $network ] ] 0 1 inc %seconds [ $+ [ $server ] ] away I am not here. $iif(%amsg,%amsg $+ .) 12{14-15- 12Auto Away Script By 14T15e0r15m14z 15-14-12} tnick $iif(!%anick,$me $+ |away,%anick) window @Darkest-Control aline 11 @Darkest-Control Auto away script used at $time(hh:nn) after $duration(%awaytime) } menu c* { Addons .Ascii converter: { var %convert $strip($$?"What do you want to convert to/from ascii?") bset -t &asc 1 %convert if ( $remove(%convert,$chr(32)) !isnum ) { var %result $bvar(&asc,1-) } else { bset &asc 1 %convert var %result $remove($bvar(&asc,1-).text,1,2,3,4,5,6,7,8,9,0) } echo -a 12{14-15-14 $iif(%convert isnum,Number %convert,%convert) 15-14-12}12 Is 12{14-15-14 $iif(%result,%result,$iif(%convert isnum ,$chr(%convert),$asc(%convert))) 15-14-12} } .Mass invite: { var %x 1 var %chan $$?"What channel you advertising today?" if (!%reason) { var %reason $Read(reason.txt) } while ( %x < $nick($chan,0) ) { :check if ( $nick($chan,%x) == $me ) || ($readini(theme.ini, Bots, $nick)) || ($nick ison %chan ) { inc %x | goto check } .timerinv $+ %x 1 $calc( %x * 10) .notice $nick($chan,%x) Hey, join %chan please? inc %x } } .Mass-Highlight:$iif($?!"There is a chance you may get banned for doing this. Do you still want to do it?",listchan) channel control .Flood Protection ..Add channel to flood protection: writeini theme.ini flood $chan 1 | echo -a Flood protection for $chan has been turned on. ..Delete channel from flood protection: remini theme.ini flood $chan | echo -a $chan has been removed from flood protection. ..settings:dialog -m floodprotection floodprotection .Topic ..Rare: topic # 7,14i!i!1,14i!i!14,1i!i! 1,1014 ·º• 8 $$?"What do you want to say in your topic?" 14•º· 14,1i!i!1,14i!i!7,14i!i! ..Love: topic # 2>6,2<313,6<30,13<313,6<36,2<32,1 8¤ 13,1x4X6x8,1 $$?"What do you want to say in your topic?" 13,1x4X6x 8¤ 2>6,2<313,6<30,13<313,6<36,2<32,12,1> ..Ice storm: topic # 11,0•0,11•10,11•11,10•12,10•10,12•2,12•1,2•2,1• $$?="What do you want to say in your topic" 11,0•0,11•10,11•11,10•12,10•10,12•2,12•1,2•2,1• ..Holy Have: Topic # 8¤~8,1®8,14®8,15®8,0®8,15®8,14®8,1® 8,1¤ $$?="What do you want to say in your topic" ¤8,1®8,14®8,15®8,0®8,15®8,14®8,1® ¤~ ..Gray love: topic # 14(¯`.¸15(¯`.¸ 4 $+ $$?="What do you want to say in your topic" $+ 15¸.´¯)14.´¯) ..Star light: topic # 4~*07~*08~*09~*10~*06~* $$?="What do you want to say in your topic?" 4*~07*~08*~09*~10*~06*~ ..Aurora: topic # 2|¦1,2|¦12,2|¦2,12|¦11,12|¦12,11|¦0,11|¦1,11-- $$?"What do you want to say in your topic?" --0,11¦|12¦|11,12¦|2,12¦|12,2¦|1,2¦|2,1¦|1,1144 ..Blazing red AE: topic # 14 7,4æ5,4æ4,5æ1,5æ5,1æ7,1 $??="What do you want to say in your topic" 5,1æ1,5æ4,5æ5,4æ7,4æ4,7æ ..Flame circles: topic # 14 8•0,80•7•0,78•5•0,47•5•0,54•0,110» 12 $$?="what do you want your topic to say" 10« 8•0,80•7•0,78•5•0,47•5•0,54• ..Fire arrow: topic # 12 0,4»5,4»4,5»1,5»5,1»0,1 $??="What do you want to say in your topic" 5,1«1,5«4,5«5,4« ..Blazing Red: topic # 4,0%0,4%4,4 5,4%4,5%5,5 1,5%5,1%1,1 0,1 $??="What do you want to say in your topic" 5,1%1,5%5,5 4,5%5,4%4,4 0,4%4,0% ..Blazing Purple: topic # 13¦|0,13¦|6¦|13,6¦|5¦|4 $??="What do you want to say in your topic" 5|¦13|¦6,13|¦0|¦13,0|¦ ..Blazing Blue: topic # 0,12æ¸2,12`æ12,2æ¸1,2`æ2,1æ¸0,1 -= $??="What do you want to say in your topic" =- 2,1`æ1,2æ¸12,2`æ2,12æ¸0,12`æ ..Blazing Green: topic # 9,0æ0,9æ3,9æ9,3æ1,3æ3,1æ9 $??="What do you want to say in your topic" 3,1æ1,3æ9,3æ3,9æ0,9æ9,0æ ..Red Bars: topic # 8,0|0,8|8,7|4,7|7,4|5,4|4,5|1,5|5,1|9,1 $??="What do you want to say in your topic" 5,1|1,5|4,5|5,4|7,4|4,7|8,7|0,8|8,0| ..Blue Bars: topic # 11,0¦|0,11¦|12,11¦|11,12¦|2,12¦|12,2¦|1,2¦|2,1¦|11,1 $??="What do you want to say in your topic" 2,1|¦1,2|¦12,2|¦2,12|¦11,12|¦12,11|¦0,11|¦11,0|¦ ..Steel Bar: topic # 15,0\0,15\14,15\15,14\1,14\14,1\15,1 $??="What do you want to say in your topic" 14,1/1,14/15,14/14,15/0,15/15,0/ ..Sky High: topic # 2~12,10~11,2~12,10~2,11~12,10~11,2~12,10~2,11~12,10~11,2~ $??="What do you want to say in your topic" 11,2~12,10~2,11~12,10~11,2~12,10~2,11~12,10~11,2~12,10~2,11~ ..Rainbow: topic # 6,12|12,6|13,6|6,13|4,13|13,4|7,4|4,7|8,7|7,8|9,8|8,9|10,9|9,10|12,10|10,12|16,12 $??="What do you want to say in your topic" 10,12|12,10|9,10|10,9|8,9|9,8|7,8|8,7|4,7|7,4|13,4|4,13| .channel mode setter. ..Register chan: msg chanserv register $chan $$?="Password for channel please" Second | topic # Welcome to $chan $+ , have a nice day. ..lock chan: mode $chan +miRc ..Normal secure chan: mode $chan +j 3:5 | /cs levels $chan set Autovoice -1 | mode $chan +m | bs assign $chan X | mode $chan +f [5t#b]:4 | /bs kick #channel flood ON 2 5 4 | mode $chan +Q Darkest .$iif($readini(theme.ini, settings, querycontrol) == on,$style(1)Disable,$style(0)Enable) Use Query Control: { var %status $iif($readini(theme.ini, settings, querycontrol) == on,off,on) echo -ta 14Query control has been turned %status writeini theme.ini settings querycontrol %status } .Nick color: csetting .settings: dialog -mo settings settings .Lag Bar: { .raw ping 123 /dialog -m lag lag .timer 1 0 /dialog -s lag 650 40 150 0 X } .Adjust away script: dialog -m away away .advertise: set %chan $iif(!$active,$chan,$active) | advertise | unset %chan } menu @Darkest-Control { Darkest .$iif($readini(theme.ini, settings, querycontrol) == on,$style(1)Disable,$style(0)Enable) Use Query Control: { var %status $iif($readini(theme.ini, settings, querycontrol) == on,off,on) echo -ta 14Query control has been turned %status writeini theme.ini settings querycontrol %status } .Nick color: csetting .settings: dialog -mo settings settings .Lag Bar: { .raw ping 123 dialog -m lag lag .timer 1 0 dialog -s lag 650 40 150 0 X } .Adjust away script: dialog -m away away } menu n* { Fun Things .Steal Cookies: { var %x $rand(2,20) describe $chan Goes into10 $$1 $+ 's pocket and grabs10 %x cookies! writeini theme.ini games cookies $calc($readini(theme.ini, games, cookies) + %x) msg $chan 10 $+ $readini(theme.ini, games, cookies) cookies stolen to date!! } .fml: { fml } .Fact: echo $active 12{14-15- Chuck Fact 15-14-12} $read(chuck.txt) .Insult: { var %diss $iif($Readini(theme.ini, diss, $$1),$v1,0) inc %diss writeini theme.ini diss $$1 %diss msg $active $$1 $read(joke.txt) 12[11-2=12,15Insulted $readini(theme.ini, diss, $$1) times0,02=11-12] } Highlight .View Anti Highlight List: { window -d @AntiHighlight var %x $ini(theme.ini, nohighlight, 0) aline 10 @AntiHighlight Start list while (%x) { aline 12 @AntiHighlight $ini(theme.ini, nohighlight, %x) dec %x } aline 10 @AntiHighlight End of list } .Add To Anti Highlight List: { if ( $readini(Theme.ini, NoHighlight, $$1) == 1 ) { echo -a $$1 is already on your anti highlight list. halt } else { echo -a $$1 has been added to the anti highlight list. writeini theme.ini NoHighlight $$1 1 } } .Delete From Anti Highlight List: { remini theme.ini Nohighlight $$1 echo -a $$1 has been taken of the anti highlight list. } User control .access ..Give voice: mode $chan + $+ $str(v,15) $$1- ..Take voice: mode $chan - $+ $str(v,15) $$1- ..Give halfop: mode $chan + $+ $str(h,15) $$1- ..Take halfop: mode $chan - $+ $str(h,15) $$1- ..Give op: mode $chan + $+ $str(o,15) $$1- ..Take op: mode $chan - $+ $str(o,15) $$1- ..Give sop: mode $chan + $+ $str(a,15) $$1- ..Take sop: mode $chan - $+ $str(a,15) $$1- ..Give owner: mode $chan + $+ $str(q,15) $$1- ..Take owner: mode $chan - $+ $str(q,15) $$1- .Dicipline ..Mute: who $chan | mode $chan +b ~q: $+ $sha($$1) | mode $chan -vho $$1 $$1 $$1 ..kick : kick $$1 ..kick with reason: var %reason $??="Reason of kicking this person?" | kick $$1 %reason ..kick with random: inc %kc1 | kick $$1 $read(kick.txt) 4«14«4«14« GTFO2 2Kick Number %kc1 4»14»4»14» ..Kickban: who $chan | /kick $chan $$1 | mode $chan +b $sha($$1) ..Ultimate ban: { who $chan | mode $chan +bbbbbbbbbbbb $address($$1,3) $address($$1,4) $address($$1,2) $address($$1,1) $address($$1,5) $address($$1,6) $address($$1,7) $address($$1,8) $address($$1,9) $address($$1,10) $address($$1,11) $$1 } .Black list ..Add to blacklist: { var %nickblk $$1 var %xbb $??="Do you have a reason for blacklisting this person?" writeini theme.ini Blacklreason $$1 $iif(!%xbb,No reason specified,%xbb) kick %nickblk 12{14-15-14 blacklisted for reason: $readini(theme.ini, blacklreason, $$1) 15-14-12} } ..Delete from blacklist: { var %nickblk $??="Who do you want to take of the blacklist." if (!$readini(theme.ini, blacklreason, %nickblk)) { echo -n %nickblk is not on your blacklist. | halt } remini theme.ini Blacklreason %nickblk mode $chan -b $address(%nickblk,3) echo -n $iif(%nickblk,%nickblk has been taken off blacklist,Command has been canceled.) } Contact .query: query $$1 $$?"What do you want to say?" .whois: w $$1 .version: version $$1 } on @*:deop:#: { if ( %protection == on ) && ( $opnick == $me ) { ns update mode $chan -o $nick kick $nick Dont deop a pro. the pro deops you. window -e @Darkest-Control aline 4 @Darkest-Control Auto op script has been used. - by protection in settings. } } on @*:BAN:#:{ if ( %protection == on ) && ($banmask iswm $ial($me)) && ($me isop $chan) && ($nick != $me) { noop $tip(Ban, Ban, 4Ban in 12 $+ $chan $+ by 3 $+ $nick $+ And it was like this: $1- ,5) mode $chan -obbb $nick $me $banmask $wildsite if ( $nick == chanserv ) { halt } kick $nick window @Darkest-Control aline 4 @Darkest-Control Auto anti ban script has been used. - by protection in settings. } } on @*:kick:#: { if ( %protection == on ) && ( $knick == $me ) && ( $me is $+ $iif( $me isop $chan,op,hop) $chan ) { noop $tip(Kick, Darkest-script, 4Kick in 12 $+ $chan $+ by 3 $+ $nick $+ saying $1- ,2) if ( $nick == chanserv ) { cs unban $chan | halt } cs unban $chan .timer1 1 3 .join $chan .timer2 1 4 .kick $nick 5,1{4-0Kick4-0Protection4-5} window -e @Darkest-Control aline 4 @Darkest-Control Anti kick script has been used. - by protection in settings. } } alias cchans { set %cc.t = $comchan($1,0), %cc.n = 1, %cc while (%cc.n <= %cc.t) { %cc = %cc $comchan($1,%cc.n) | inc %cc.n } return ( $+ %cc $+ ) } on ^*:nick: { if ( %raw == on ) { var %cc.t = $comchan($newnick,0), %cc.n = 1, %cc while (%cc.n <= %cc.t) { echo $comchan($newnick,%cc.n) 12(14Nick Change12) (14 $nick 12) 14is now known as 12(14 $newnick 12) | inc %cc.n } if ( $nick == $me ) { identify } who $nick haltdef } } On ^*:Join:#: { if (!$hget($network, $chan)) { if (!$hget($network, 0).item) hmake $network 100 hadd $network $chan No update needed. who $iif($nick == $me,$chan,$nick) } if ( %raw == on ) && ( $me isop $chan ) && ($readini(theme.ini, Blacklreason, $nick)) { mode $chan +b $address($nick,3) kick $nick Blacklisted for reason: $readini(theme.ini, Blacklreason, $nick) } echo -t $Chan 12{14-12 14Join $+ 14:12 $nick 14(12 $+ $remove($Address($nick,1),!,*) $+ 14) Has Joined12 $Chan 14-12} | halt } alias scol { var %x $Replace($1-,+, $+ $+ $iif($readini(theme.ini, colour, voice),$readini(theme.ini, colour, voice),12) $+ +) var %x $Replace(%x, $+ $chr(37) $+ , $+ $+ $iif($readini(theme.ini, colour, hop),$readini(theme.ini, colour, hop),12) $+ $chr(37) $+ ) var %x $Replace(%x,@, $+ $+ $iif($readini(theme.ini, colour, op),$readini(theme.ini, colour, op),12) $+ @) var %x $Replace(%x,&, $+ $+ $iif($readini(theme.ini, colour, sop),$readini(theme.ini, colour, sop),12) $+ &) var %x $Replace(%x,~, $+ $+ $iif($readini(theme.ini, colour, owner),$readini(theme.ini, colour, owner),12) $+ ~) return %x } On ^*:Part:#: { if ( %raw == on ) { if (!$1-) { echo -t $Chan 12{14-12 14Part:12 $Nick 14 $+ $chr(40) $+ 12 $+ $sha($nick) $+ 14 $+ $chr(41) 14Has Left12 $Chan 14-12} | halt } if ($1-) { echo -t $Chan 12{14-12 14Part:12 $Nick 14 $+ $chr(40) $+ 12 $+ $sha($nick) $+ 14 $+ $chr(41) 14Has Left2 $Chan 14-12} 12(14-12 $1- 14-12) | halt } } } On ^*:Rawmode:#:{ if ( %raw == on ) { echo -t $Chan 12{14-12 $Nick 14sets Mode:14(12 $+ $1- $+ 14) 14-12} | Halt } } On $^*:Text:*:#: { if ( %raw == on ) { if ( $readini(theme.ini, settings, highlight) == on ) && (!$readini(theme.ini, bots, $nick)) { if ( $me isin $strip($1-) ) { if ($away) { window -e @Darkest-control write hl.txt 15{14-12 $network 14-15} {14-12 $nick 14-15} {14-12 $time(dddd mmmm mm yyyy) 14-15} {14-12 $time(hh:nn) 14-15} -----< $1- >----- aline @Darkest-control 14 $+ $nick Has highlighted you in12 $chan 14at15 $time(hh:nn) 14saying:12 $1- if (%hlw [ $+ [ $nick ] ]) { goto finish } set %hlw [ $+ [ $nick ] ] 1 halt .notice $nick I am aware of your highlight but i am currently away, This is a 1 time highlight message. | window -e @Darkest-control | aline 8 @darkest-control Highlight < $nick > in $chan at $time(hh:nn) saying $1- } if ( $readini(Theme.ini, NoHighlight, $nick)) { goto finish } if ( $chan == $active ) && ( $appactive) { write hl.txt 15{14-12 $network 14-15} {14-12 $nick 14-15} {14-12 $time(dddd mmmm mm yyyy) 14-15} {14-12 $time(hh:nn) 14-15} -----< $1- >----- echo -at 12{14-12 $iif($ialchan($nick,#,1).pnick != $nick,$scol($left($ialchan($nick,#,1).pnick,1))) $+ 12 $+ $nick 14-12} 8<9<10Highlight9>8> $1- halt } if ( %highlight [ $+ [ $nick ] ] == 1 ) { goto finish } set -u30 %highlight [ $+ [ $nick ] ] 1 if (!$appactive) { write hl.txt 15{14-12 $network 14-15} {14-12 $nick 14-15} {14-12 $time(dddd mmmm mm yyyy) 14-15} {14-12 $time(hh:nn) 14-15} -----< $1- >----- noop $tip(H, H, 4Highlight in 12 $+ $chan $+ by 3 $+ $nick $+ saying $1- ,5) window -e @Darkest-control aline @Darkest-control 14 $+ $nick Has highlighted you in12 $chan 14at15 $time(hh:nn) 14saying:12 $1- echo -t $chan 12{14-12 $iif($ialchan($nick,#,1).pnick != $nick,$scol($left($ialchan($nick,#,1).pnick,1))) $+ 12 $+ $nick 14-12} 8<9<10Highlight9>8> $1- halt } echo -a 12,1|11,1|2,1|12,0Highlight2,1|11,1|12,1| $chan $nick $+ : $strip($1-) 12,1|11,1|2,1|12,0Highlight2,1|11,1|12,1| } } if ( $readini(Theme.ini, Flood, $chan ) == 1) && ($me isop $chan) && (!$readini(theme.ini, exception, $nick)) { if ( $nick isop $chan ) && ( $readini(theme.ini, Protection, op) == on ) { halt } inc %flood [ $+ [ $nick ] ] if ( %flood [ $+ [ $nick ] ] == $iif(%lines,%lines,3) ) { inc -u3000 %num [ $+ [ $nick ] ] kick $nick Flood Protection. 12{14-15-14 Warning %num [ $+ [ $nick ] ] 14-15-12} %lines line $+ $iif(%lines > 1,s) in $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) seconds window @Darkest-Control aline 13 @Darkest-Control Flood protection has been used in $chan $+ . } if ( $readini(theme.ini, ban, times ) == %num [ $+ [ $nick ] ] ) { who $chan mode $chan +b $sha($nick) | unset %num [ $+ [ $nick ] ] } .timer 1 $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) unset %flood [ $+ [ $nick ] ] } } :finish if ( %raw != on ) { goto no } echo $chan $timestamp 12{14-12 $iif($ialchan($nick,#,1).pnick != $nick,$scol($left($ialchan($nick,#,1).pnick,1))) $+ 12 $+ $nick 14-12} $iif($readini(theme.ini, settings, strip) == on,$strip($1-),$1-) Halt :no } On ^*:QUIT:{ if ( %raw == on ) { haltdef var %z = 1 while (%z <= $comchan($nick,0)) { echo -ti2 $comchan($nick,%z) 12{14- Quit:12 $nick 14(12 $+ $sha($nick) $+ 14)12-14(12 $+ $1- $+ 14) -12} | inc %z } } } on ^*:ACTION:*:#: { if ( slaps isin $strip($1-)) && ( $me isin $strip($1-)) && ( trout isin $strip($1-)) && ( %aflood != 1) { set -u10 %aflood 1 var %trout $iif(!$readini(theme.ini, games, trout),1,$calc($readini(theme.ini, games, trout) + 1 )) writeini theme.ini Games Trout %trout .timer 1 0 describe $chan Takes the 12Trout out of $nick $+ 's hands and drops it back in the sea 12{14-15-11 $readini(theme.ini, games, trout) 12Trou $+ $iif($readini(theme.ini, games,trout) >= 2, t's,t) saved 15-14-12} Window -e @darkest-control aline 12 @darkest-control Trout protection has been used in $chan on $nick $+ ! } if ( $readini(Theme.ini, Flood, $chan ) == 1) && ($me isop $chan) && (!$readini(theme.ini, exception, $nick)) { if ( $nick isop $chan ) && ( $readini(theme.ini, Protection, op) == on ) { halt } inc %flood [ $+ [ $nick ] ] if ( %flood [ $+ [ $nick ] ] == $iif(%lines,%lines,3) ) { inc %num [ $+ [ $nick ] ] .timerFloodPro -o 1 999 unset %num* kick $nick Flood Protection. 12{14-15-14 Warning %num [ $+ [ $nick ] ] 14-15-12} %lines line $+ $iif(%lines > 1,s) in $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) seconds } if ( $readini(theme.ini, ban, times ) == %num [ $+ [ $nick ] ] ) { mode $chan +b $sha($nick) | unset %num [ $+ [ $nick ] ] } .timer 1 $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) unset %flood [ $+ [ $nick ] ] } } On ^*:Text:*:?: { haltdef echo $nick $timestamp 12{14-12 $nick 14-12} 14 $+ $1- } alias dark { var %a $len($1-),%b 1,%c 1 while (%b <= %a) { if ($mid($1-,%b,1) != $chr(32)) { if (%c == 8) var %c 1 var %d $+(%d,$chr(3),$gettok(6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6 6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6 6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6 6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6 6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6 6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6,%c,32),$mid($1-,%b,1),$chr(3)) inc %c } else var %d $+(%d,$chr(160)) inc %b } $iif($isid,return,msg $active) $+ $replace(%d,$chr(160),$chr(32)) $+ } alias listchan var %x 1,%a | while (%x <= $nick($iif($1,#$1,#),0)) { var %a %a $nick($iif($1,#$1,#),%x) | if ($len(%a) > 400) { msg $iif($1,$1,$active) %a | var %a } | inc %x } | msg $iif($1,$1,$active) %a alias viewbot { var %x $ini(theme.ini,bots,0) var %b 1 window -c @botlist window -d @botlist aline 12 @botlist This is the list of bots you have! while (%x) { aline @botlist Bot number %b - $ini(theme.ini,bots,%x) dec %x inc %b } } menu s* { Bot Control .Update Bot list: bs botlist | echo Bot list has been updated! | set %silence [ $+ [ botserv ] ] 1 | .timerSilence 1 15 unset %silence [ $+ [ Botserv ] ] .View bot list: viewbot .Add Bot: { var %bot $$?"What bot are you adding?" writeini theme.ini bots %bot 1 echo -a %bot has been added to the botlist. } .Delete Bot: { var %bot $$?"what is the bots name?" if ( $readini(theme.ini, bots, %bot)) { echo -a %bot has been taken off the botlist. remini theme.ini bots %bot } else { echo -a %bot is not on the bot list. } } } menu @Darkest-Control { Nick color: csetting Bot Control .Update Bot list: { botit echo Bot list has been updated! } .View bot list: viewbot .Add Bot: { var %bot $$?"What bot are you adding?" writeini theme.ini bots %bot 1 echo -a %bot has been added to the botlist. } .Delete bot: { var %bot $$?"what is the bots name?" if ( $readini(theme.ini, bots, %bot)) { echo -a %bot has been taken off the botlist. remini theme.ini bots %bot } else { echo -a %bot is not on the bot list. } } } on *:input:@*: { $iif($left($1,1) == /,$1-) $iif($left($1,1) != /,aline 12,halt) $active $eval($1-) } menu @* { Window Control .Close: { var %x $window(0) while (%x) { if ( $active == $window(%x) ) { var %active $window(%x) } dec %x } window -c %active } .Clear: { var %x $window(0) while (%x) { if ( $active == $window(%x) ) { var %active $window(%x) } dec %x } window -c %active window -ae %active } } on ^*:pong:{ if ((%lag) && (*123 iswm $1-)) { haltdef set %temp $calc( ( $ticks - %lag) / 1000 ) seconds if (%temp > 5) { if (!%xb) { set -u90 %xb 1 echo -a |||||--Lag Alert 5+ seconds of lag detected!--||||| } } } } alias lag { set %lag $ticks .raw ping 123 dialog -t lag %temp } dialog lag { size -1 -1 150 0 title %temp lag } on 1:dialog:lag:init:*: { .timerBar2 0 4 .raw ping 123 .timerBar1 0 5 lag } on 1:dialog:lag:close:*: { .timerBar* off unset %lag unset %temp } ;;; Aliases needed for colouring. Changing colour by changing "$Chr(3),12,$Chr(2)" to "Chr(3),<Colour>,$Chr(2)" $h is the main colour, $hh is the secondary colour. alias h { return $+($chr(3),12,$chr(2),$chr(2),$1-,$chr(3),$chr(2),$chr(2)) } alias hh { return $+($chr(3),14,$chr(2),$chr(2),$1-,$chr(3),$chr(2),$chr(2)) } Alias Tags { Return $+($hh([),$h($1-),$hh(]) $hh(—),$h(>),) } alias FML { if ($Sock(FML)) { SockClose FML } set %FMLOut $iif($1 = -s, msg $active, Echo -a) Sockopen FML rscript.org 80 } On *:SockOpen:FML: { Sockwrite -nt FML GET /lookup.php?type=fml SockWrite -nt FML Host: rscript.org SockWrite -nt FML $crlf } on *:SockRead:FML: { if ($SockErr) { SockClose FML | SockOpen FML rscript.org 80 } Var %FML SockRead %FML if ($Regex(%FML,ID:)) { set %FMLID $GetTok(%FML,2-,32) } if ($Regex(%FML,Cate:)) { set %FMLCate $GetTok(%FML,2-,32) } if ($Regex(%FML,Text:)) { set %FMLText $hh($GetTok(%FML,2-,32)) } if ($Regex(%FML,Agree:)) { set %FMLAggree $Bytes($GetTok(%FML,2-,32),bd) } if ($Regex(%FML,Deserved:)) { set %FMLDisaggree $Bytes($GetTok(%FML,2-,32),bd) } if ($Regex(%FML,Comments:)) { set %FMLComments $Bytes($GetTok(%FML,2-,32),bd) } if ($Regex(%FML,END)) { SockClose FML } if (!$Sock(FML)) { %FMLOut $Tags(FML) $hh(FML:) $h(%FMLText) %fmlout $Tags(FML) $hh(Information:) $hh(Agreed:) $h(%FMLAggree) $hh($(|)) $hh(Deserved) $h(%FMLDisaggree) $hh($(|)) $hh(Comments:) $h(%FMLComments) %FMLOut $Tags(FML) $hh(Link:) $h($+(,http://www.fmylife.com,/,%FMLCate,/,%FMLID,/,)) Unset %FML* } } alias eval { var %x = $ticks $iif( -a == $1,echo -a,msg $active) $remove(Eval $+(,$chr(40),,$1- == $iif($($1-,2) != $null,$v1,$!null),,$chr(41) $chr(40),,$calc($ticks - %x MS),,$chr(41))},-a) } dialog settings { title "Darkest settings" size -1 -1 110 100 option dbu tab "Base colors", 1, 5 5 100 90 tab "main settings", 2 tab "Addons", 3 button "Notice Pop up on", 19, 5 54 50 44, ok tab 1 button "Notice pop up off", 20, 55 54 50 44, ok tab 1 button "base colors on", 4, 5 20 50 34, ok tab 1 button "base colors off", 5, 55 20 50 34, ok tab 1 button "Strip messages on", 6, 5 20 50 24, tab 2 button "Strip messages off", 7, 55 20 50 24, tab 2 button "Highlight on", 8, 5 40 50 24, tab 2 button "Highlight off", 9, 55 40 50 24, tab 2 button "View highlights", 10, 5 62 100 34, tab 2 button "Grammer on", 11, 5 17 50 20, tab 3 button "Grammer off", 12, 55 17 50 20, tab 3 button "Rainbow text on", 13, 5 37 50 20, tab 3 button "Rainbow text off", 14, 55 37 50 20, tab 3 button "protection on", 15, 5 57 50 20, tab 3 button "Protection off", 16, 55 57 50 20, tab 3 button "mode setter on", 17, 5 75 50 20, tab 3 button "mode setter off", 18, 55 75 50 20, tab 3 } on *:dialog:settings:sclick:*: { if ( $did == 20 ) { writeini theme.ini settings popup off | echo -a When you get a notice it will now echo in your window. } if ( $did == 19 ) { writeini theme.ini settings popup on | echo -a When you get a notice it will now pop up :) } if ( $did == 18 ) { writeini theme.ini settings plus off echo -a Mode setter has been turned off } if ( $did == 17 ) { writeini theme.ini settings plus on echo -a Mode setter has been turned on, type +(mode) or -(mode) to use it. } if ( $did == 14 ) { coff } if ( $did == 15 ) { proon } if ( $did == 16 ) { prooff } if ( $did == 13 ) { con } if ( $did == 12 ) { gcoroff } if ( $did == 11 ) { gcoron } if ( $did == 10 ) { viewhl } if ( $did == 9 ) { hloff } if ( $did == 8 ) { hlon } if ( $did == 6 ) { writeini theme.ini settings strip on echo -a All incoming messages are now stripped. } if ( $did == 7 ) { writeini theme.ini settings strip off echo -a All incoming messages are no longer stripped. } if ( $did == 4 ) { colourso } if ( $did == 5 ) { coloursf } } alias gcoron { if (%rainbowtexton) { echo -a Rainbow text is already on | halt } echo -a Grammer correction has been turned on. writeini theme.ini settings grammercorrect on } alias gcoroff { if (%rainbowtexton) { echo -a Rainbow text is already on | halt } echo -a grammer correction has been turned off. writeini theme.ini settings grammercorrect off } alias con { if ( $readini(theme.ini, settings, grammercorrect) == on) { echo -a Grammer correction is already on | halt } echo -a $ac(Rainbow text has been turned on) unset %rainbowtextandbackgroundon | set %rainbowtexton 1 | echo -n Rainbow text turned on } alias coff { if ( $readini(theme.ini, settings, grammercorrect) == on) { echo -a Grammer correction is already on | halt } echo -a Rainbow text has been turned off unset %rainbowtexton | unset %rainbowtextandbackgroundon | echo -n Rainbow text turned off } alias mseton { echo -a mode setter has been turned on writeini theme.ini settings plus on } alias msetoff { echo -a mode setter has been turned off. writeini theme.ini settings plus off } alias hlon { writeini theme.ini settings highlight on echo -a Highlights have been turned on } alias hloff { writeini theme.ini settings highlight off echo -a highlights have been turned off } alias colourso { .timestamp -f 14(12hh14:12nn14:12ss14) .timestamp on .timestamp -g 14(12hh14:12nn14:12ss14) set %raw on echo -a Base colors have been turned on. } alias coloursf { .timestamp -f .timestamp on .timestamp -g set %raw off echo -a Base colors have been turned off. } alias proon { set %protection on echo -a Protection has been turned on. } alias prooff { set %protection off echo -a Protection has been turned off. } alias viewhl { if (!$read(hl.txt)) { write Hl.txt Highlight Logs. } var %x 1 window -c @highlight window -ad @Highlight while (%x < $calc($lines(hl.txt) + 1)) { $iif($len($Read(hl.txt, %x)) > 5,echo @Highlight $read(hl.txt, %x)) inc %x } } alias -l DVersion { return Darkest Script Version 3 - Mirc version $version } alias rawc { if ( %raw == on ) { noop } if ( %raw != on ) { halt } } alias Sha { who $1 return $iif($2,$address($1,$2),$iif($remove($iif($hget($network, $1),$v1,$iif($address($1,0),$v1,$hget(address, $1))),~) == *,$null,$remove($v1,~))) } raw 315:*: $iif(%ttraw,halt) raw 352:*: { if (!$hget($network)) { .hmake $network 100 } hadd $network $6 $3 $+ @ $+ $4 if ($hget(Address)) { hadd Address $6 $3 $+ @ $+ $4 } else .hmake address 1000 .timerASave 1 5 hsave address address.txt if (%ttraw) halt } raw 311:*:{ rawc echo -a 14«12« 12[15/14WHOIS12] 15Start 12»14» echo -a 14«12« 12 $+ $2 15 is 15 $+ $3 $+ 12@15 $+ $4 $5- 12»14» if (!$hget($network)) { .hmake $network 100 } hadd $network $2 $3 $+ @ $+ $4 if ($hget(Address)) { hadd Address $2 $3 $+ @ $+ $4 } else .hmake address 1000 halt } on *:INPUT:*: { if ($1 == /who ) { unset %ttraw | .timer 1 5 set %ttraw on } } raw 301:*:{ rawc | echo -a 14«12« 12 $+ $2 15 $+ is away:14 $3- 12»14» | halt } raw 307:*:{ rawc | echo -a 14«12« 12 $+ $2 15is a registered user on14 $network 12»14» | halt } raw 312:*:{ rawc | echo -a 14«12« 12 $+ $2 15is on:14 $3 $12 12»14» | halt } raw 313:*:{ rawc | echo -a 14«12« 12 $+ $2 15is:14 $5- 12»14» | halt } raw 317:*:{ rawc | echo -a 14«12« 12 $+ $2 15is idling:14 $duration($3) 12»14» | halt } raw 319:*:{ rawc | echo -a 14«12« 12 $+ $2 15is on channels:14 $3- 12»14» | halt } raw 378:*:{ rawc | echo -a 14«12« 12 $+ $2 15is connecting from host:14 $6 12»14» | halt } raw 338:*:{ rawc | echo -a 14«12« 12 $+ $2 15is connecting from host:14 $3 12»14» | halt } raw 537:*:{ rawc | echo -a 14«12« 12 $+ $2 15 $+ $3- 12»14» | halt } raw 320:*:{ rawc | echo -a 14«12« 12 $+ $2 15 $+ $3- 12»14» | halt } raw 671:*:{ rawc | echo -a 14«12« 12 $+ $2 15is using a secure connection 12»14» | halt } raw 310:*:{ rawc | echo -a 14«12« 12 $+ $2 15 $+ $3- 12»14» | halt } raw 318:*:{ rawc | echo -a 14«12« 12[15/14WHOIS12] 14End 12»14» | halt } raw 329:*:{ haltdef } raw 439:*:{ echo Target Change Detected. Halt all messageing! | .timers off | halt } raw 474:*:{ if ( %raw == on ) { haltdef | echo $active ««Ë®®öR»» You are banned from $2 $+ . } } raw 972:*:{ if ( %raw == on ) { haltdef | echo $active ««Ë®®öR»» $2- } } raw 482:*:{ if ( %raw == on ) { haltdef | echo -a ««Ë®®öR»» You do not have enough access. } } raw 404:*:{ if ( %raw == on ) { haltdef | echo -a ««Ë®®öR»» $remove($1-,$me,$chan,) ) } } raw 421:*:{ if ( %raw == on ) { haltdef | echo -a ««Ë®®öR»» $2 - $3 command } } raw 332:*:{ if ( %raw == on ) { haltdef | echo $2 12{14-15-12 Topic is $2- 15-14-12} } } raw 335:*:{ if ( %raw == on ) { haltdef | echo -a 12{14-15-12 $2- 15-14-12} } } raw 313:*:{ if ( %raw == on ) { haltdef | echo -a 4*07*08*09*12*06 $2- 4*07*08*09*12*06 } } raw 372:*:{ if ( %raw == on ) { haltdef | echo $2- | .timerconnect 1 3 echo $active You have succesfully connected to the server via 11,0¦|0,11¦|12,11¦|11,12¦|2,12¦|12,2¦|1,2¦|2,1¦|11,1 12,1 12D12,14arkest 12S12,14cript 2,1|¦1,2|¦12,2|¦2,12|¦11,12|¦12,11|¦0,11|¦11,0|¦ --- Made by Termz | .timercf 1 5 connection } } raw 301:*:{ if ( %raw == on ) { haltdef | echo -a 12{14-15-12 Away - $2- 15-14-12} } } raw 401:*:{ if ( %raw == on ) { haltdef | echo -a 11,0¦|0,11¦|12,11¦|11,12¦|2,12¦|12,2¦|1,2¦|2,1¦|11,1 $2 not found on server. 1¦1,2|¦12,2|¦2,12|¦11,12|¦12,11|¦0,11|¦11,0|¦ } }
-
Hi guys so i'm making a simple command line game, i've finished making a standard one, theres so much more to add but for now i'll show you what its like. this is called the DUEL game: Look at the pastebin to see what the game is like. https://pastebin.com/ep0Dzhed at the moment the commands are: [18:08:54] <~dronez4> !help [18:08:55] [Duel Commands] [18:08:55] !duel, !accept, !attack, !damage, !duelstats i'll show you what each command does [!duel] [18:04:58] <~dronez4> !duel wallrunner [18:04:59] [DUEL]: dronez4 has dueled wallrunner [Type !accept to accept dronez4's duel] [!accept] [18:05:02] !accept [18:05:03] [DUEL]: wallrunner accepted dronez4's duel [18:05:03] [Max Damage]: dronez4: 40 - wallrunner: 40 [18:05:03] [HP:200] - dronez4 [18:05:03] [HP:200] - wallrunner [18:05:04] [DUEL]: dronez4's turn [!attack] [18:05:14] <~dronez4> !attack wallrunner [18:05:14] [ATTACK]: dronez4 hit 11 on wallrunner [18:05:14] [HP:200] - dronez4 [18:05:14] [HP:189] - wallrunner [18:05:14] [DUEL]: wallrunner's turn [!damage] [18:11:41] <~dronez4> !damage dronez4 [18:11:42] [Damage Output]: Maximum amount of damage dronez4 has: [Damage: 40] [!duelstats] [18:12:26] <~dronez4> !duelstats dronez4 [18:12:27] [Duel Stats]: dronez4 - (Max damage: 40) (Total HP: 200) (Wins: ) (loses: ) [the wins/loses are empty if you have won/lost 0 games] I am currently in the stage of adding more features, way more features, feel free to give me any ideas? atm i've got a list hp [DONE] damage [DONE] upgrades [DONE] Round start - Round end [DONE] Special power - skip [not sure about implimenting yet] Store point system [Coming soon] Stun [Coming soon] Critical hit [coming soon] Heal [Coming soon] Protection spell [Coming soon] ;works for only 1 channel at the moment, so add a specific channel if need be. on *:text:*:#:{ if ($1 == !duel) && ($2 ison $chan) { if (%duel == on) { msg $chan 7[DUEL]: There's already a duel going on } else { msg $chan 7[DUEL]: $nick has dueled $2 [Type !accept to accept $nick $+ 's duel] set %duel on set %duelnick1 $nick set %duelnick2 $2 } } if ($1 == !accept) { if (%duel == on) { remini duelhp.ini hp %duelnick1 remini duelhp.ini hp %duelnick2 set %duelturn %duelnick1 set %duelnotturn %duelnick2 msg $chan 7[DUEL]: %duelnick2 accepted %duelnick1 $+ 's duel msg $chan 4[Max Damage]: %duelnick1 $+ :13 $calc($readini(duelstats.ini, stats, %duelnick1) + 40) 4- %duelnick2 $+ :13 $calc($readini(duelstats.ini, stats, %duelnick2) + 40) timer 1 2 msg $chan 7[DUEL]: %duelturn $+ 's turn if ($readini(addhp.ini, hp, %duelnick1) != $null) { timer 1 1 writeini duelhp.ini hp %duelnick1 $calc(200 + $readini(addhp.ini, hp, %duelnick1)) msg $chan 4[HP:13 $+ $calc(200 + $readini(addhp.ini, hp, %duelnick1)) $+ 4] - %duelnick1 } if ($readini(addhp.ini, hp, %duelnick2) != $null) { timer 1 1 writeini duelhp.ini hp %duelnick2 $calc(200 + $readini(addhp.ini, hp, %duelnick2)) msg $chan 4[HP:13 $+ $calc(200 + $readini(addhp.ini, hp, %duelnick2)) $+ 4] - %duelnick2 } if ($readini(duelhp.ini, hp, %duelnick1)) { msg $chan 4[HP:13 $+ $calc($readini(duelhp.ini, hp, %duelnick1) + $readini(addhp.ini, hp, %duelnick1)) $+ 4] - %duelnick1 } else { if ($readini(addhp.ini, hp, %duelnick1) == $null) { writeini duelhp.ini hp %duelnick1 200 msg $chan 4[HP:132004] - %duelnick1 } } if ($readini(duelhp.ini, hp, %duelnick2)) { msg $chan 4[HP:13 $+ $calc($readini(duelhp.ini, hp, %duelnick2) + $readini(addhp.ini, hp, %duelnick2)) $+ 4] - %duelnick2 } else { if ($readini(addhp.ini, hp, %duelnick2) == $null) { writeini duelhp.ini hp %duelnick2 200 msg $chan 4[HP:132004] - %duelnick2 } } } } if ($1 == !attack) { if (%duel == on) { if ($nick isin %duelturn) { set %randomhit $calc($rand(10,40) + $readini(duelstats.ini, stats, %duelturn)) if ($chr(45) isin $calc($readini(duelhp.ini, hp, %duelnotturn) - %randomhit)) { set %prize $rand(1,5) set %prize1 $rand(1,7) set %duel off msg $chan 4[ATTACK]:9 %duelturn hit13 %randomhit 9on %duelnotturn writeini duelhp.ini hp %duelnotturn $calc($readini(duelhp.ini, hp, %duelnotturn) - %randomhit) msg $chan 4[HP:13 $+ $readini(duelhp.ini, hp, %duelnick1) $+ 4] - %duelnick1 msg $chan 4[HP:13 $+ $readini(duelhp.ini, hp, %duelnick2) $+ 4] - %duelnick2 msg $chan 9[Winner]: %duelturn won the duel [Prize: Added %prize damage + %prize1 HP to %duelturn $+ 's statistic] writeini winsnlose.ini win %duelturn $calc($readini(winsnlose.ini, win, %duelturn) + 1) writeini winsnlose.ini lose %duelnotturn $calc($readini(winsnlose.ini, win, %duelnotturn) + 1) remini duelhp.ini hp %duelnick1 remini duelhp.ini hp %duelnick2 if ($readini(addhp.ini, hp, %duelturn) == $null) { writeini addhp.ini hp %duelturn %prize1 } else { writeini addhp.ini hp %duelturn $calc($readini(addhp.ini, hp, %duelturn) + %prize1) } if ($readini(duelstats.ini, stats, %duelturn) != $null) { writeini duelstats.ini stats %duelturn $calc($readini(duelstats.ini, stats, %duelturn) + %prize) halt } else { writeini duelstats.ini stats %duelturn %prize halt } } msg $chan 4[ATTACK]:9 %duelturn hit13 %randomhit 9on %duelnotturn writeini duelhp.ini hp %duelnotturn $calc($readini(duelhp.ini, hp, %duelnotturn) - %randomhit) msg $chan 4[HP:13 $+ $readini(duelhp.ini, hp, %duelnick1) $+ 4] - %duelnick1 msg $chan 4[HP:13 $+ $readini(duelhp.ini, hp, %duelnick2) $+ 4] - %duelnick2 set %duelnotturn1 %duelnotturn set %duelnotturn %duelturn set %duelturn %duelnotturn1 msg $chan 7[DUEL]: %duelturn $+ 's turn } else { msg $chan 7[DUEL]: It is %duelturn $+ 's turn } } } if ($1 == !damage) && ($2 == $null) { msg $chan 9[Damage Output]: Maximum amount of damage $nick has: [Damage:13 $calc($readini(duelstats.ini, stats, $nick) + 40) $+ 9] } if ($1 == !damage) && ($2 != $null) { msg $chan 9[Damage Output]: Maximum amount of damage $2 has: [Damage:13 $calc($readini(duelstats.ini, stats, $2) + 40) $+ 9] } if ($1 == !duelstats) { if ($2 != $null) { msg $chan 9[Duel Stats]: $2 - (Max damage:13 $calc($readini(duelstats.ini, stats, $2) + 40) $+ 9) (Total HP:13 $calc($readini(addhp.ini, hp, $2) + 200) $+ 9) 9(Wins:13 $readini(winsnlose.ini, win, $2) $+ 9) 9(loses:13 $readini(winsnlose.ini, lose, $2) $+ 9) } else { msg $chan 9[Duel Stats]: $nick - (Max damage:13 $calc($readini(duelstats.ini, stats, $nick) + 40) $+ 9) (Total HP:13 $calc($readini(addhp.ini, hp, $nick) + 200) $+ 9) 9(Wins:13 $readini(winsnlose.ini, win, $nick) $+ 9) 9(loses:13 $readini(winsnlose.ini, lose, $nick) $+ 9) } } if ($1 == !help) { msg $chan [Duel Commands] msg $chan !duel, !accept, !attack, !damage, !duelstats } }
-
That Is Dialog Of /whois command Again Write /whois nick and you will see the whois dialog The IP Adress,Modes Is For The IRCOPS.Some Time Host Can Show The IPadress of nick Auth is For GameSurge.Reg is for Check the nick is registered nick or no And HelpOp Shows The NickName is HelpOp or no #whois on dialog whois { title "Whois" size -1 -1 131 113 option dbu text "NickName:", 1, 4 4 27 8 text "RealName:", 2, 4 13 25 8 text "Identy:", 3, 4 22 25 8 text "Host:", 4, 4 31 25 8 text "IP Address:", 21, 4 40 31 8 text "Auth or Reg:", 20, 4 58 31 8 text "Channels:", 5, 4 67 25 8 text "Away:", 6, 4 76 25 8 text "Idle:", 24, 4 85 25 8 text "Other:", 7, 4 94 32 8 text "Modes:", 22, 4 49 31 8 text "HelpOp:", 23, 4 103 32 8 edit "", 8, 36 3 94 9, read autohs edit "", 9, 36 12 94 9, read autohs edit "", 10, 36 21 94 9, read autohs edit "", 11, 36 30 94 9, read autohs edit "", 12, 36 66 94 9, read autohs edit "", 13, 36 75 94 9, read autohs edit "", 14, 36 84 94 9, read autohs edit "", 15, 36 93 94 9, read autohs edit "", 16, 36 57 94 9, read autohs edit "", 17, 36 39 94 9, read autohs edit "", 18, 36 48 94 9, read autohs edit "", 19, 36 102 94 9, read autohs } raw *:*: { if ( $numeric == 311 ) { set %d $2 dialog -m %d whois dialog -t %d Whois $2 $+ ? did -a %d 8 $2 did -a %d 9 $6- did -a %d 10 $3 did -a %d 11 $4 halt } if ( $numeric == 307 ) { if ( a registered nick isin $1- ) { did -a %d 16 Yes halt } } if ( $numeric == 378 ) { did -a %d 17 $6- halt } if ( $numeric == 379 ) { did -a %d 18 $6- halt } if ( $numeric == 330 ) { did -a %d 16 $3 halt } if ( $numeric == 319 ) { did -a %d 12 $3- halt } if ( $numeric == 301 ) { did -a %d 13 $3- halt } if ( $numeric == 313 ) { did -a %d 15 $3- did -a %d 7 $2 halt } if ( $numeric == 317 ) { did -a %d 14 $duration($3) halt } if ( $numeric == 310 ) { if ( help isin $1- ) { did -a %d 19 Yes halt } } if ( $numeric == 318 ) { halt } if ( $numeric == 312 ) { halt } } #whois end menu * { Whois Dialog .$iif($group(#whois).status == on,$style(1)) ON: .enable #whois | linesep | echo 3 -ag * Whois Dialog Has Been Enabled | linesep .$iif($group(#whois).status == off,$style(1)) OFF: .disable #whois | linesep | echo 2 -ag * Whois Dialog Has Been Disabled | linesep }
-
Just another socket from me ;x this one looks up a random tweet from twasted tweets. copy/paste into a new remote. Trigger is @twasted or @twast May not be right for +G rated channels As always rip strip this snippet how ever you see fit. I can care less. ex: <~napa182> @twasted <&Sick0> TwastedTweets: RT @rsmallbone My erection lasted for 4 hours +. I called my doctor but he didnt seem too impressed so I showed it to some ppl at the mall <~napa182> @twast <&Sick0> TwastedTweets: RT @shariv67 The most tedious part of being an Afghani phone sex operator is describing what I'm wearing. <~napa182> @twast <&Sick0> TwastedTweets: RT @ruthakers Man at Walmart asked me the name of "Mommys Lil Helpers". Judging by his face "Xanax & Vodka" wasnt the reply he was looking 4 on $*:text:/^@(twast(ed)?)$/iS:#: { if (!$($+(%,f,#),2)) { inc -u4 $+(%,f,#) if ($sock($+(Twast,#))) sockclose $+(Twast,#) sockopen $+(Twast,#) api.twitter.com 80 sockmark $+(Twast,#) $r(1,20) $& $+(/1/statuses/user_timeline/TwastedTweets.rss?page=,$r(1,26)) msg # } } on *:sockopen:Twast*: { sockwrite -nt $sockname GET $gettok($sock($sockname).mark,2,32) HTTP/1.1 sockwrite -nt $sockname Host: $+($sock($sockname).addr,$str($crlf,2)) } on *:load:{ echo 12 -a You Have Just Loaded Napa182's Twasted Tweets Snippet echo -a 08!!04WARNING08 This snippet may04/08will say curse04/08foul words 04WARNING08!! } alias -l twast return $regsubex($1-,/("|&)|\46\43(\d+)\73/g,$iif(\1 isnum,$chr(\1),$iif(\1 = ",",&))) on *:sockread:Twast*: { var %Twast | sockread %Twast if ($regex(%Twast,/<title>(Twa.+?)<\/title>/)) { inc -u4 %tw 1 if (%tw = $gettok($sock($sockname).mark,1,32)) { $gettok($sock($sockname).mark,3-,32) $twast($regml(1)) sockclose $sockname } } }
-
Copy the code below and paste into an empty Remote file in mIRC (alt+r to view Remotes) Click ok, and either right click anywhere in a channel or type /autoreply Follow the instructions in the dialog and create your own custom auto-response message! I hang out in #script on Gamesurge and by far the most common question (especially recently) is "how do I set up a query auto response?". I know that when I was starting out scripting I was much more comfortable with dialogs as they ease the process and make it more understandable (at least for me), so I thought it would be useful to create this. Obviously many of this site's frequenters won't have any use for it, but it's made for people who are either new to scripting or can't script at all. Thank you to FordLawnMower for the (http://www.hawkee.com/snippet/6047/) which I borrowed (and slightly modified) due to mIRC not allowing you to open up the color dialog any way other than control+k As somebody who has never used an auto-reply myself I didn't know exactly what would be best for this dialog, so if anyone has a suggestion on what I could add/remove please let me know! Thanks! //Auto-reply creator dialog by tv3636 //Version 1.0 7/26/09 alias autoreply { dialog -m autoreply autoreply } menu channel { Auto-Reply Creator .Auto-Reply Creator:/autoreply } dialog autoreply { title "Auto Reply Creator" size -1 -1 195 175 option dbu edit "", 1, 1 97 192 38, multi return button "Done", 3, 76 160 37 12, ok cancel text "Type your desired auto-reply in the text box below. To wrap a section in bold, color, underline, or reverse text simply check the box at the beginning of the section and uncheck it at the end. On top of the text box is a list of common identifiers you may want to use. These are dynamic and will return values rather than being displayed as they are. For instance, the auto-reply 'Hi $nick' would auto reply to Chanserv with 'Hi Chanserv'. To insert an identifier simply double click on it (or manually enter it). Be warned that an identifier must have a space before and after it to evaluate correctly.", 4, 5 2 186 54 list 6, 1 56 193 39, size check "Bold", 7, 20 137 24 10 check "Color", 8, 56 137 24 10 check "Underline", 9, 94 137 34 10 check "Reverse", 10, 145 137 30 10 } On *:Dialog:autoreply:init:*: { did -a $dname 6 $!nick - Returns the nickname of the user who messaged you did -a $dname 6 $!query(0) - Returns the number of query windows you have open did -a $dname 6 $!duration($idle) - Returns the time you have been idle did -a $dname 6 $!awaymsg - Returns your away message did -a $dname 6 $!awaytime - Returns your away time } On *:Dialog:autoreply:dclick:6: { if ($did($dname,6).sel == 1) did -a $dname 1 $!nick else if ($did($dname,6).sel == 2) did -a $dname 1 $!query(0) else if ($did($dname,6).sel == 3) did -a $dname 1 $!duration($idle) else if ($did($dname,6).sel == 4) did -a $dname 1 $!awaymsg else if ($did($dname,6).sel == 5) did -a $dname 1 $!awaytime } On *:Dialog:autoreply:sclick:*:{ if ($did == 7) did -a $dname 1 else if ($did == 8) { if ($did($dname,8).state == 0) did -a $dname 1 else { ColorPicker } } else if ($did == 9) did -a $dname 1 else if ($did == 10) did -a $dname 1 } On *:Dialog:autoreply:close:*: { var %x = 1 var %out write -c autoreply.mrc On *:Open:?:*: $chr(123) while (%x <= $did($dname,1).lines) { write autoreply.mrc msg $!nick $did($dname,1,%x) | inc %x } write autoreply.mrc $chr(125) load -rs autoreply.mrc echo -a 07Auto-reply created successfully. To view/modify go to the Remotes tab of the mIRC scripts editor (alt+r), click on view, and select "autoreply.mrc" } alias -l MakeColorIcons { var %c 0 if (!$isdir($+($mircdir,ColorIcon))) { mkdir ColorIcon } while (%c <= 15) { if (!$window(@MakeColorIcons)) { window -hBpf +d @MakeColorIcons -1 -1 68 68 } drawfill @MakeColorIcons %c %c 0 0 68 68 if (!$isfile($+(ColorIcon\,ColorIcon,%c,.bmp))) { drawsave @MakeColorIcons $qt($+($mircdir,ColorIcon\,ColorIcon,%c,.bmp)) } inc %c } window -c @MakeColorIcons } alias ColorPicker { if (!$dialog(ColorPicker)) { dialog -m ColorPicker ColorPicker } else { dialog -v ColorPicker ColorPicker } } dialog ColorPicker { title "Color Picker" size -1 -1 90 45 option dbu icon 1, 2 2 8 8 icon 2, 13 2 8 8 icon 3, 24 2 8 8 icon 4, 35 2 8 8 icon 5, 46 2 8 8 icon 6, 57 2 8 8 icon 7, 68 2 8 8 icon 8, 79 2 8 8 icon 9, 2 15 8 8 icon 10, 13 15 8 8 icon 11, 24 15 8 8 icon 12, 35 15 8 8 icon 13, 46 15 8 8 icon 14, 57 15 8 8 icon 15, 68 15 8 8 icon 16, 79 15 8 8 button "", 17, 4 4 4 4 button "", 18, 15 4 4 4 button "", 19, 26 4 4 4 button "", 20, 37 4 4 4 button "", 21, 48 4 4 4 button "", 22, 59 4 4 4 button "", 23, 70 4 4 4 button "", 24, 81 4 4 4 button "", 25, 4 17 4 4 button "", 26, 15 17 4 4 button "", 27, 26 17 4 4 button "", 28, 37 17 4 4 button "", 29, 48 17 4 4 button "", 30, 59 17 4 4 button "", 31, 70 17 4 4 button "", 32, 81 17 4 4 button "Accept", 38, 30 30 29 12, ok } On *:Dialog:ColorPicker:Close:*: { unset %ColorPicker* } On *:Dialog:ColorPicker:Sclick:*: { if ($did >= 17) && ($did <= 32) { set %ColorPickerNum $calc($did - 17) } if ($did == 38) { did -a autoreply 1 $+ %ColorPickerNum } } On *:Dialog:ColorPicker:init:*: { MakeColorIcons var %c = 0 while %c <= 15 { did -g ColorPicker $calc(%c + 1) $+(ColorIcon\,ColorIcon,%c,.bmp) inc %c } did -c ColorPicker 35 set %ColorPickerFG $color(normal text) set %ColorPickerBG $color(background) }
-
So im getting a lot of the old snippets from hawkee's and never knew there was so many, but im going fourth and continue to move forward and add more and more each day. I really havent counted as to how many snippets have been added on hawkee but this i can tell you i will have all of them on coders-resources so we dont loose them all. we will have a huge range of archive snippets and scripts and continue to do so!! I will continue to keep you all posted and continue to add more and more 👍
-
mIRC Kicking Clones Games for Server Zildjan.mine.nu:6667 by Team SpiralKinetics. A simple mIRC code intended to kick clones. Summary of the games detailed in the code dialog. ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] menu status,menubar,channel { - Spiralkinetics™ Dual Mode:/dialog $iif($dialog(dualmode),-o,-m) dualmode dualmode Spiralkinetics™ MassJoin Clear cloneMJ.TXT:/write -c cloneMJ.txt Spiralkinetics™ Flood Clear cloneFL.TXT:/write -c cloneFL.txt - } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] dialog dualmode { title "SpiralKinetics Dual Mode Sock Configuration" size -1 -1 210 180 option dbu ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] tab "Intro", 1, 5 2 200 150, box "", 10, 10 15 190 135 text "Script: SpiralKinetics Dual Mode", 11, 15 20 180 10, tab 1 enable text "Coder: Sabri", 12, 15 27 180 10, tab 1 enable text "Tester: ItikRock, Ahseng, Cloud, Kereei and m11x", 13, 15 34 180 10, tab 1 enable text "Disclaimer: This code belong to Team SpiralKinetics and we just lend it to whoever wish to use it.", 14, 15 41 180 20, tab 1 enable text "Advisor: Bioshock and zildjan", 77, 15 59 180 10, tab 1 enable text "Applications: Flooding and MassJoin Games at Server Zildjan.mine.nu:6667", 15, 15 65 180 10, tab 1 enable text "Channel: Flooding #FLOOD / MassJoin #BIRC", 78, 15 72 180 10, tab 1 enable text "Games Summary:-", 16, 15 82 180 10, tab 1 enable text "Flood - (#FLOOD) Basic understanding are kicking clone on syntax error display on channel by each clone such as Long text etc.", 17, 15 90 180 20, tab 1 enable text "MassJoin - (#BIRC) Basic understanding are kicking all join clone.", 18, 15 104 180 10, tab 1 enable text "Team: SpiralKinetics Establish in 2010.", 19, 15 115 180 10, tab 1 enable text "Team members comprise of: Bioshock (Founder) and Senior Members: Sabri, ItikRock, Kereei, Ahseng, Cloud and m11x", 20, 15 122 180 15, tab 1 enable text "Like Us:", 21, 15 140 20 10, tab 1 enable link "FaceBook Page: SpiralKinetics Productions", 22, 35 140 130 15, tab 1 enable ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] tab "MassJoin", 2, 5 2 170 130 box "MassJoin Configuration", 4, 15 20 180 125, tab 2 box "Groups", 23, 20 30 170 20, tab 2 text "Enable/Disable MassJoin Remote Groups:", 24, 25 38 99 10, enable tab 2 radio "Enable", 25, 127 36 25 10, left tab 2 box "", 26, 155 32 2 16, tab 2 radio "Disable", 27, 160 36 25 10, tab 2 box "Set Nick/Pass Sock`s", 28, 20 53 70 50, tab 2 text "Nick:", 29, 25 63 13 10, tab 2 edit "", 30, 40 63 45 10, center autohs tab 2 text "Pass:", 31, 25 78 13 10, tab 2 edit "", 32, 40 78 45 10, center pass autohs, tab 2 button "Set Nick/Pass", 33, 32 90 45 10, disable tab 2 box "", 34, 95 50 95 50, tab 2 text "Add Server eg.", 35, 125 55 40 10, tab 2 text "Zildjan.mine.nu PORT: 6667", 36, 109 62 68 10, tab 2 edit "", 37, 100 71 85 10, center autohs tab 2 edit "", 38, 118 85 25 10, center autohs tab 2 text "PORT:", 39, 100 86 15 10, tab 2 button "Add Server", 40, 146 85 40 10, disable tab 2 box "Set Channel e. #birc", 41, 20 105 63 37, tab 2 edit "", 42, 29 115 45 10, center autohs tab 2 button "Add Chan", 43, 32 128 40 10, disable tab 2 text "ON/OFF Your Sock`s", 44, 110 102 60 10, tab 2 button "Connect", 45, 95 112 40 15, tab 2 button "Disconnect", 46, 140 112 40 15, tab 2 text "Clear all MassJoin Setting:", 47, 85 132 70 10, tab 2 button "¤ Clear All ¤", 48, 152 130 40 12, tab 2 ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] tab "Flood", 3, 5 2 170 130 box "Flood Configuration", 5, 15 20 180 125, tab 3 box "Groups", 49, 20 30 170 20, tab 3 text "Enable/Disable Flood Remote Groups:", 50, 25 38 99 10, enable tab 3 radio "Enable", 51, 127 36 25 10, left tab 3 box "", 52, 155 32 2 16, tab 3 radio "Disable", 53, 160 36 25 10, tab 3 box "Set Nick/Pass Sock`s", 54, 20 53 70 50, tab 3 text "Nick:", 55, 25 63 13 10, tab 3 edit "", 56, 40 63 45 10, center autohs tab 3 text "Pass:", 57, 25 78 13 10, tab 3 edit "", 58, 40 78 45 10, center pass autohs, tab 3 button "Set Nick/Pass", 59, 32 90 45 10, disable tab 3 box "", 60, 95 50 95 50, tab 3 text "Add Server eg.", 61, 125 55 40 10, tab 3 text "Zildjan.mine.nu PORT: 6667", 62, 109 62 68 10, tab 3 edit "", 63, 100 71 85 10, center autohs tab 3 edit "", 64, 118 85 25 10, center autohs tab 3 text "PORT:", 65, 100 86 15 10, tab 3 button "Add Server", 66, 146 85 40 10, disable tab 3 box "Set Channel e. #flood", 67, 20 105 63 37, tab 3 edit "", 68, 29 115 45 10, center autohs tab 3 button "Add Chan", 69, 32 128 40 10, disable tab 3 text "ON/OFF Your Sock`s", 70, 110 102 60 10, tab 3 button "Connect", 71, 95 112 40 15, tab 3 button "Disconnect", 72, 140 112 40 15, tab 3 text "Clear all Flood Setting:", 73, 85 132 70 10, tab 3 button "¤ Clear All ¤", 74, 152 130 40 12, tab 3 ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] tab "Timing", 79, 5 2 170 130 box "MassJoin Timer/Isnum Tune", 80, 13 20 184 62, tab 79 box "Flood Timer/Isnum Tune", 81, 13 85 184 62, tab 79 text "Default setting isnum is 467-487 and larger than > 497. Isnum: Setting must be in different between 20 - 22 lines. i.e:min-100-120, max-100-122. Larger than that may cause you excessing. Delay: Setting must be in different of 10 lines after direct isnum last line. i.e if direct isnum 100-120 you may set your starting delay line: 130. Try default setting.", 82, 15 28 180 33, enable tab 79 button "Use Default Setting", 83, 15 66 55 10, tab 79 box "", 84, 73 60 121 20, tab 79 text "Isnum:", 85, 75 67 17 10, tab 79 edit "", 86, 93 66 28 10, center autohs tab 79 text ">", 87, 123 67 4 10, tab 79 edit "", 88, 130 66 15 10, center autohs tab 79 button "Use My Own", 89, 150 66 40 10, disable tab 79 text "Same as MassJoin. Default setting isnum is 367-387 and larger than > 397. Isnum: Setting must be in different between 20 - 22 lines. i.e:min-100-120, max-100-122. Larger than that may cause you excessing. Delay: Setting must be in different of 10 lines after direct isnum last line. i.e if direct isnum 100-120 you may set your starting delay line: 130. Try default setting.", 90, 15 93 180 33, enable tab 79 button "Use Default Setting", 91, 15 131 55 10, tab 79 box "", 92, 73 125 121 20, tab 79 text "Isnum:", 93, 75 132 17 10, tab 79 edit "", 94, 93 131 28 10, center autohs tab 79 text ">", 95, 123 132 4 10, tab 79 edit "", 96, 130 131 15 10, center autohs tab 79 button "Use My Own", 97, 150 131 40 10, disable tab 79 ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] tab "Logo", 100, 5 2 170 130 box "MassJoin Logo Setting", 98, 13 20 184 62, tab 100 box "Flood Logo Setting", 99, 13 85 184 62, tab 100 box "", 101, 30 50 150 1, tab 100 box "", 102, 30 115 150 1, tab 100 text "`` Dûä£ Mødè Mässjøíñ :: «®¤Šþì®á£Kïnè†í犙¤®»", 103, 15 29 180 10, center tab 100 button "Use Default Logo", 104, 32 37 60 10, tab 100 button "View/Echo", 105, 118 37 60 10, tab 100 edit "", 106, 16 55 178 10, autohs tab 100 button "View/Echo", 107, 20 68 50 10, tab 100 button "Use My Own", 108, 80 68 50 10, tab 100 button "Clear", 109, 140 68 50 10, tab 100 text "`` Dûä£ Mødè F£øød :: «®¤Šþì®á£Kïnè†í犙¤®»", 110, 15 94 180 10, center tab 100 button "Use Default Logo", 111, 23 102 60 10, tab 100 button "View/Echo", 112, 127 102 60 10, tab 100 edit "", 113, 16 120 178 10, autohs tab 100 button "View/Echo", 114, 20 133 50 10, tab 100 button "Use My Own", 115, 80 133 50 10, tab 100 button "Clear", 116, 140 133 50 10, tab 100 ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx tab "Halting", 200, 5 2 170 130 box "MassJoin Channel", 117, 13 20 90 127, tab 200 check " MODE OP : ", 118, 62 30 37 10, left tab 200 check " MODE DEOP : ", 119, 49 45 43 10, left tab 200 check " JOIN : ", 120, 73 60 26 10, left tab 200 check " PART : ", 121, 65 75 27 10, left tab 200 check " BAN : ", 122, 75 90 24 10, left tab 200 check " UNBAN : ", 123, 61 105 31 10, left tab 200 check " KICK : ", 124, 74 120 25 10, left tab 200 text "To halt, set channel at MassJoin Tab. ie. #BIRC", 133, 16 130 80 20, center tab 200 box "Flood Channel", 125, 107 20 90 127, tab 200 check " : MODE OP ", 126, 116 30 83 10, tab 200 check " : MODE DEOP ", 127, 110 45 83 10, tab 200 check " : JOIN ", 128, 116 60 83 10, tab 200 check " : PART ", 129, 110 75 83 10, tab 200 check " : BAN ", 130, 116 90 83 10, tab 200 check " : UNBAN ", 131, 110 105 83 10, tab 200 check " : KICK ", 132, 116 120 83 10, tab 200 text "To halt, set channel at Flood Tab. ie. #FLOOD", 134, 110 130 80 20, center tab 200 ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] text "«®¤b£áçkŠKŠè®ìès¤®» :: «®¤Šþì®á£Kïnè†í犙¤®»", 75, 8 162 135 10, disable button "«®¤ CLOSE ¤®»", 76, 150 159 55 14, ok } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] on 1:dialog:dualmode:*:*:{ if ($devent == edit) { if ($did == 30) { did -e $dname 33 } if ($did == 37) || ($did == 38) { did -e $dname 40 } if ($did == 42) { did -e $dname 43 } if ($did == 56) { did -e $dname 59 } if ($did == 63) || ($did == 64) { did -e $dname 66 } if ($did == 68) { did -e $dname 69 } if ($did == 86) || ($did == 88) { did -e $dname 89 } if ($did == 94) || ($did == 96) { did -e $dname 97 } } if ($devent == init) { if ($group(#mjdialog) == on) { did -c $dname 25 } if ($group(#mjdialog) == off) { did -c $dname 27 } if ($group(#flooddialog) == on) { did -c $dname 51 } if ($group(#flooddialog) == off) { did -c $dname 53 } if (%MJsocknick) || (%MJpasssock) || (%MJserver) || (%MJport) || (%MJchan) || (%MJisnum) || (%MJafter) || (%MJlogo) { did -a $dname 30 %MJsocknick did -a $dname 32 %MJpassnick did -a $dname 37 %MJserver did -a $dname 38 %MJport did -a $dname 42 %MJchan did -a $dname 86 %MJisnum did -a $dname 88 %MJafter did -a $dname 106 %MJlogo } if (%FLsocknick) || (%FLpasssock) || (%FLserver) || (%FLport) || (%FLchan) || (%FLisnum) || (%FLafter) || (%FLlogo) { did -a $dname 56 %FLsocknick did -a $dname 58 %FLpassnick did -a $dname 63 %FLserver did -a $dname 64 %FLport did -a $dname 68 %FLchan did -a $dname 94 %FLisnum did -a $dname 96 %FLafter did -a $dname 113 %FLlogo } if ($group(#mjophalt) == on) { did -c $dname 118 } if ($group(#mjophalt) == off) { did -u $dname 118 } if ($group(#mjdeophalt) == on) { did -c $dname 119 } if ($group(#mjdeophalt) == off) { did -u $dname 119 } if ($group(#mjjoinhalt) == on) { did -c $dname 120 } if ($group(#mjjoinhalt) == off) { did -u $dname 120 } if ($group(#mjparthalt) == on) { did -c $dname 121 } if ($group(#mjparthalt) == off) { did -u $dname 121 } if ($group(#mjbanhalt) == on) { did -c $dname 122 } if ($group(#mjbanhalt) == off) { did -u $dname 122 } if ($group(#mjunbanhalt) == on) { did -c $dname 123 } if ($group(#mjunbanhalt) == off) { did -u $dname 123 } if ($group(#mjkickhalt) == on) { did -c $dname 124 } if ($group(#mjkickhalt) == off) { did -u $dname 124 } if ($group(#flophalt) == on) { did -c $dname 126 } if ($group(#flophalt) == off) { did -u $dname 126 } if ($group(#fldeophalt) == on) { did -c $dname 127 } if ($group(#fldeophalt) == off) { did -u $dname 127 } if ($group(#fljoinhalt) == on) { did -c $dname 128 } if ($group(#fljoinhalt) == off) { did -u $dname 128 } if ($group(#flparthalt) == on) { did -c $dname 129 } if ($group(#flparthalt) == off) { did -u $dname 129 } if ($group(#flbanhalt) == on) { did -c $dname 130 } if ($group(#flbanhalt) == off) { did -u $dname 130 } if ($group(#flunbanhalt) == on) { did -c $dname 131 } if ($group(#flunbanhalt) == off) { did -u $dname 131 } if ($group(#flkickhalt) == on) { did -c $dname 132 } if ($group(#flkickhalt) == off) { did -u $dname 132 } } if ($devent == sclick) { if ($did == 25) { if ($did(25).state == 0) { enable #mjdialog } if ($did(25).state == 1) { did -c $dname 25 | enable #mjdialog | .auser MJbot bot-bircX-03 } } if ($did == 27) { if ($did(27).state == 0) { disable #mjdialog } if ($did(27).state == 1) { did -c $dname 27 | disable #mjdialog | .flush MJbot } } if ($did == 51) { if ($did(51).state == 0) { enable #flooddialog } if ($did(51).state == 1) { did -c $dname 51 | enable #flooddialog } } if ($did == 53) { if ($did(53).state == 0) { disable #flooddialog } if ($did(53).state == 1) { did -c $dname 53 | disable #flooddialog } } if ($did == 33) { set %MJsocknick $did(30) set %MJpassnick $did(32) } if ($did == 40) { set %MJserver $did(37) set %MJport $did(38) } if ($did == 43) { set %MJchan $did(42) } if ($did == 48) { did -r $dname 30,32 did -r $dname 37,38 did -r $dname 42 did -b $dname 33,40,43 disable #MJdialog did -c $dname 27 did -u $dname 25 flush MJbot unset %MJsocknick %MJpassnick unset %MJserver %MJport %MJchan } if ($did == 45) { .sockopen MJ_* %MJserver %MJport | .notify %MJsocknick } if ($did == 46) { .sockwrite -n MJ_* quit | .sockclose MJ_* | .notify %MJsocknick } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] if ($did == 59) { set %FLsocknick $did(56) set %FLpassnick $did(58) } if ($did == 66) { set %FLserver $did(63) set %FLport $did(64) } if ($did == 69) { set %FLchan $did(68) } if ($did == 74) { did -r $dname 56,58 did -r $dname 63,64 did -r $dname 68 did -b $dname 59,66,69 disable #flooddialog did -c $dname 53 did -u $dname 51 unset %FLsocknick %FLpassnick unset %FLserver %FLport %FLchan } if ($did == 71) { .sockopen FL_* %FLserver %FLport | .notify %FLsocknick } if ($did == 72) { sockwrite -n FL_* quit | .sockclose FL_* | .notify %FLsocknick } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] if ($did == 83) { set %MJisnum 467-487 set %MJafter 497 did -b $dname 83 did -e $dname 89 } if ($did == 89) { set %MJisnum $did(86) set %MJafter $did(88) did -b $dname 89 did -e $dname 83 } if ($did == 91) { set %FLisnum 367-387 set %FLafter 397 did -b $dname 91 did -e $dname 97 } if ($did == 97) { set %FLisnum $did(94) set %FLafter $did(96) did -b $dname 97 did -e $dname 91 } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] if ($did == 104) { did -b $dname 104 | set %MJlogo `` 14D15ûä14£ M15ød14è Mä15ssjø14íñ :: 14«15®14¤14,1Šþì®15á£14Kï15nè14†íçŠ15™14¤15®14» } if ($did == 105) { set %MJlogoview `` 14D15ûä14£ M15ød14è Mä15ssjø14íñ :: 14«15®14¤14,1Šþì®15á£14Kï15nè14†íçŠ15™14¤15®14» echo -at echo -at NickClone was kicked by You ( $+ %MJlogoview $+ ) echo -at unset %MJlogoview } if ($did == 107) { set %logoview $did(106) echo -at echo -at NickClone was kicked by You ( $+ %logoview $+ ) echo -at unset %logoview } if ($did == 108) { did -b $dname 108 | set %MJlogo $did(106) } if ($did == 109) { did -r $dname 106 } if ($did == 111) { set %FLlogo `` 14D15ûä14£ M15ød14è F15£øø14d :: 14«15®14¤14,1Šþì®15á£14Kï15nè14†íçŠ15™14¤15®14» } if ($did == 112) { set %FLlogoview `` 14D15ûä14£ M15ød14è F15£øø14d :: 14«15®14¤14,1Šþì®15á£14Kï15nè14†íçŠ15™14¤15®14» echo -at echo -at NickClone was kicked by You (» Swearing » %FLlogoview $+ ) echo -at unset %FLlogoview } if ($did == 114) { set %logoview $did(113) echo -at echo -at NickClone was kicked by You (» Swearing » %logoview $+ ) echo -at unset %logoview } if ($did == 115) { did -b $dname 115 | set %FLlogo $did(113) } if ($did == 116) { did -r $dname 113 } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] if ($did == 118) { if ($did(118).state == 0) { disable #mjophalt } if ($did(118).state == 1) { enable #mjophalt } } if ($did == 119) { if ($did(119).state == 0) { disable #mjdeophalt } if ($did(119).state == 1) { enable #mjdeophalt } } if ($did == 120) { if ($did(120).state == 0) { disable #mjjoinhalt } if ($did(120).state == 1) { enable #mjjoinhalt } } if ($did == 121) { if ($did(121).state == 0) { disable #mjparthalt } if ($did(121).state == 1) { enable #mjparthalt } } if ($did == 122) { if ($did(122).state == 0) { disable #mjbanhalt } if ($did(122).state == 1) { enable #mjbanhalt } } if ($did == 123) { if ($did(123).state == 0) { disable #mjunbanhalt } if ($did(123).state == 1) { enable #mjunbanhalt } } if ($did == 124) { if ($did(124).state == 0) { disable #mjkickhalt } if ($did(124).state == 1) { enable #mjkickhalt } } if ($did == 126) { if ($did(126).state == 0) { disable #flophalt } if ($did(126).state == 1) { enable #flophalt } } if ($did == 127) { if ($did(127).state == 0) { disable #fldeophalt } if ($did(127).state == 1) { enable #fldeophalt } } if ($did == 128) { if ($did(128).state == 0) { disable #fljoinhalt } if ($did(128).state == 1) { enable #fljoinhalt } } if ($did == 129) { if ($did(129).state == 0) { disable #flparthalt } if ($did(129).state == 1) { enable #flparthalt } } if ($did == 130) { if ($did(130).state == 0) { disable #flbanhalt } if ($did(130).state == 1) { enable #flbanhalt } } if ($did == 131) { if ($did(131).state == 0) { disable #flunbanhalt } if ($did(131).state == 1) { enable #flunbanhalt } } if ($did == 132) { if ($did(132).state == 0) { disable #flkickhalt } if ($did(132).state == 1) { enable #flkickhalt } } } if ($devent == dclick) { if ($did == 22) { /run https://www.facebook.com/spiralkineticsproductions } } } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] on *:SOCKCLOSE:MJ_*: { sockclose MJ_* | timersock 1 2 .sockopen MJ_* %MJserver %MJport } on *:SOCKOPEN:MJ_*: { if ($sockerr != 0) { halt } if ($sockerr > 0) return sockwrite -nt MJ_* connect $+ %MJserver $+ : $+ %MJport $+ / HTTP/1.0 $+ $crlf $+ $crlf sockwrite -n MJ_* pong $gettok( $+ %MJserver $+ : $+ %MJport $+ ,1,58) sockwrite -n MJ_* USER Dual.Mode * * : sock` «®¤Šþì®á£Kïnè†í犙¤®» sockwrite -nt MJ_* nick %MJsocknick sockwrite -nt MJ_* nickserv identify %MJpassnick sockwrite -nt MJ_* join %MJchan sockwrite -nt MJ_* privmsg %MJchan !protect %MJsocknick sockwrite -nt MJ_* privmsg MassJoinServ op %MJchan 123456 sockwrite -nt MJ_* PING $ticks } on *:SOCKREAD:MJ_*: { sockread %tempMJ if ($mid(%tempMJ,1,4) == PING) { sockwrite -nt MJ_* PONG $remove($remove(%tempMJ,ping :),ping) | halt } if ($gettok(%tempMJ,2,32) == 386) { .sockwrite -nt MJ_* join %MJchan } } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] on *:SOCKCLOSE:FL_*: { sockclose FL_* | timersock 1 2 .sockopen FL_* %FLserver %FLport } on *:SOCKOPEN:FL_*: { if ($sockerr != 0) { halt } if ($sockerr > 0) return sockwrite -nt FL_* connect $+ %FLserver $+ : $+ %FLport $+ / HTTP/1.0 $+ $crlf $+ $crlf sockwrite -n FL_* pong $gettok( $+ %FLserver $+ : $+ %FLport $+ ,1,58) sockwrite -n FL_* USER Dual.Mode * * : sock` «®¤Šþì®á£Kïnè†í犙¤®» sockwrite -nt FL_* nick %FLsocknick sockwrite -nt FL_* nickserv identify %FLpassnick sockwrite -nt FL_* join %FLchan sockwrite -nt FL_* privmsg birc op %FLchan 123456 sockwrite -nt FL_* PING $ticks } on *:SOCKREAD:FL_*: { sockread %tempFL if ($mid(%tempFL,1,4) == PING) { sockwrite -nt FL_* PONG $remove($remove(%tempFL,ping :),ping) | halt } if ($gettok(%tempFL,2,32) == 386) { .sockwrite -nt FL_* join %FLchan } } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] #mjophalt on on ^*:op:%MJchan: halt #mjophalt end #mjdeophalt on on ^*:deop:%MJchan: halt #mjdeophalt end #mjjoinhalt on on ^*:join:%MJchan: halt #mjjoinhalt end #mjparthalt on on ^*:part:%MJchan: halt #mjparthalt end #mjbanhalt on on ^*:ban:%MJchan: halt #mjbanhalt end #mjunbanhalt on on ^*:unban:%MJchan: halt #mjunbanhalt end #mjkickhalt on on ^*:kick:%MJchan: halt #mjkickhalt end #flophalt on on ^1:op:%FLchan:$iif($nick != $me,haltdef) #flophalt end #fldeophalt on on ^*:deop:%FLchan: halt #fldeophalt end #fljoinhalt on on ^*:join:%FLchan: halt #fljoinhalt end #flparthalt on on ^*:part:%FLchan: halt #flparthalt end #flbanhalt on on ^*:ban:%FLchan: halt #flbanhalt end #flunbanhalt on on ^*:unban:%FLchan: halt #flunbanhalt end #flkickhalt on on ^1:kick:%FLchan:$iif($nick != $me,haltdef) #flkickhalt end ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] #mjdialog off ON *:JOIN:%MJchan: { .updatenl if ($nick == %MJsocknick) || ($nick !isreg $chan) || ($nick isop $chan) || ($nick isin %protect) { halt } .MJspiral } alias -l MJSpiral { .inc -u5 %MJclone.join .set %MJnick $nick | .set %MJchan $chan | .write cloneMJ.txt %MJnick if (%MJclone.join isnum %MJisnum) { .sockwrite -nt MJ_* kick %MJchan %MJnick 9Direct %MJlogo | .return } if (%MJclone.join > %MJafter) { .timerGoTo 1 2 MJKinetics } .halt .return } alias -l MJKinetics { .set %MJnick $read(cloneMJ.txt) if (%MJnick != $null) { if (%MJnick ison %MJchan) { sockwrite -nt MJ_* kick %MJchan %MJnick 8Delay %MJlogo } .timerloopst 1 1 MJKinetics } if (%MJnick !ison %MJchan) { .write -ds %MJnick cloneMJ.txt .timerloopnd 1 0 MJKinetics } } ON ^1:OP:%MJchan: { if ($opnick == %MJsocknick) { .timerloopth 1 0 MJKinetics } else { return } } on ^!*:kick:%MJchan: { if ($knick == %MJsocknick) { //sockwrite -nt MJ_* join %MJchan //sockwrite -nt MJ_* privmsg MassJoinServ op %MJchan 123456 } } on +MJbot:text:*:%MJchan: { if (Jumlah klon yang telah ditendang keluar pada pusingan kali ini ialah isin $strip($1-)) { .write -c cloneMJ.txt } } ON *:TEXT:*:%MJchan:{ if (!Protect == $1) && ($2) { .set %protect $addtok(%protect,$2,300) | echo -at ***4,0 #BIRC Add $2 in Protect list. } } ON !*:DEOP:%MJchan: { if ($opnick == %MJsocknick) && (!%deopMJ) { write -c cloneMJ.txt | timerDeopSock 1 5 sockwrite -nt MJ_* privmsg MassJoinServ op %MJchan 123456 | set -u2 %deopMJ 1 } } #mjdialog end ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] #flooddialog off on ^!*:text:*:%FLchan: if ($nick isreg #) { haltdef | SK.engine $1- } on ^!*:notice:*:%FLchan: if ($nick isreg #) { haltdef | SK.engine $1- } on ^!*:action:*:%FLchan: if ($nick isreg #) { haltdef | SK.engine $1- } ctcp *:*:%FLchan: { if ((%FLsocknick isop #) && ($nick isreg #)) { $FLSpiral(pinG) } } on *:ctcpreply:*: { if ((%FLsocknick isop #) && ($nick isreg #)) { $FLSpiral(pinG) } } alias -l SK.engine { if ($nick !isreg $chan) || ($nick == %FLsocknick) { goto end } if ($regex($1-,/[[:cntrl:]]/g) >= 50) { .FLSpiral cOrL | halt } if ($regex($1-,/[[:upper:]]/g) >= 50) { .FLSpiral sHit | halt } if ($regex($strip($1-),/[[:digit:]]/g) >= 50) { .FLSpiral diGi | halt } if ($regex($strip($1-),/[[:punct:]]/g) >= 50) { .FLSpiral sMbL | halt } if ($regex($strip($1-),/[ $chr(160) ]/g) >= 50) { .FLSpiral bLnK | halt } if ($regex($1-,/[ $chr(174) ]/g) >= 50) { .FLSpiral aSCi | halt } if ($regex($strip($1-),/[[:lower:]]/g) >= 200) { .FLSpiral lOnG | halt } if ($regex($remove($1-,$chr(40),$chr(41)),/(http|tp:|#)/g)) { .FLSpiral sPaM | halt } if ($regex($strip($1-),/(shit|babi|dick|puki|fuck)/g)) { .FLSpiral sWeR | halt } .hinc -u15m repeat [ $+ [ $chan ] $+ [ $nick ] ] $hash($remove($strip($1-),$chr(160),$chr(32)),32) 1 | if ($hget(repeat [ $+ [ $chan ] $+ [ $nick ] ],$hash($remove($strip($1-),$chr(160),$chr(32)),32)) > 2) { .FLSpiral rEpT } .hinc -u15m special [ $+ [ # ] $+ [ $nick ] ] $hash($remove($strip($1-),$chr(160),$chr(32)),32) 1 | if ($hget(special [ $+ [ # ] $+ [ $nick ] ],$hash($remove($strip($1-),$chr(160),$chr(32)),32)) >= 4) { .FLSpiral sCPc } .hinc -u10m newline [ $+ [ # ] ] $address($nick,3) 1 | if ($hget(newline [ $+ [ # ] ],$address($nick,3)) >= 5) { .FLSpiral rOW } else { return } } alias -l FLSpiral { .inc -mu9m %FLclone.join | .set %FLnick $nick | .write cloneFL.txt %FLnick | .set %reason $1- if (%FLclone.join isnum %FLisnum) { .sockwrite -nt FL_* kick %FLchan %FLnick » %reason » 9Direct %FLlogo | .return } if (%FLclone.join > %FLafter) { .timerGoTost 1 2 FLKinetics } .halt .return } alias -l FLKinetics { .set %FLnick $read(cloneFL.txt) if (%FLnick != $null) { if (%FLnick ison %FLchan) { sockwrite -nt FL_* kick %FLchan %FLnick » %reason » 8Delay %FLlogo } .timerloop1st 1 1 FLKinetics } if (%FLnick !ison %FLchan) { .write -ds %FLnick cloneFL.txt .timerloop2nd 1 0 FLKinetics } } ON ^1:OP:%FLchan: { if ($opnick == %FLsocknick) { .timerloop3th 1 0 FLKinetics } else { return } } ON ^1:KICK:%FLchan:{ if ($nick == %FLsocknick) { $SpiralkineticsBan($knick,%FLchan) } } alias -l SpiralkineticsBan { .hadd -u3m sk $1 $+ !*@*Dual.Mode* .timerfA -os 1 26 clear %FLchan .timerfB -os 1 29 sockwrite -nt FL_* mode $2 $+(+,$str(b,1)) $hget(sk,1).item .timerfC -os 1 30 write -c cloneFL.txt .halt } ON !*:DEOP:%MJchan: { if ($opnick == %FLsocknick) && (!%deopFL) { write -c cloneFL.txt | timerDeopSo
-
This is the third iteration of the server manager. Made improvements large enough that I thought it was okay to resubmit as a new snippet. By right clicking on a Status, Query or Channel, you'll have the option of popping up the dialog for the script. http://www.hawkee.com/pictures/m_60273_DcLdbzzMvsbH8nYs8XcRNrR1V.png Functionality: Can add as many servers to the autojoin list as you like, with the ability to enable/disable autojoining them via the manager. If you wish to connect with a different port, add a colon and the port after entering the server. e.g. "irc.gamesurge.net:6667" Can add as many channels for each server as you like. If you wish to join a channel with a password, simply type the password after the channel. e.g. "#channel password" Can add as many nicks as you like for each server, all of which share a group nickserv password - If a nick is already in use when you connect a server, you connect as the first available one in the list - and automatically idents Persistant ordering of servers, nicks and channels - if you delete anything from any list, the remaining items in the list are still ordered the way you left them (I like having servers and channels in a particular order) All settings are saved in an ini file in your mirc settings directory Improvements from v2: Improved GUI Can handle more than 5 servers Can handle more than 2 nicknames per server (useful if you're running bots) Removed useless functionality (I realised I didn't find it very useful, anyway) Improved code PS: I am the same user that submitted v2.1, just wanted to use a newer alias 😉 PSS: I know there's a particular big with choosing the 'next free nick' if your nick is taken, i'll edit the snippet once I work out how 😛 Still works, just not the way I intended. ;Shows a link to the script when you right click a status, query or channel window menu status,query,channel { Auto Connect/Join/Identify v3:/showacji } ;Calls the dialog window initialisation and loads the first server alias showacji dialog -m acji acji ;Initialises the dialog window dialog acji { title "Auto Connect/Join/Identify v3" size -1 -1 355 425 ; type | text | id | x y w h | style text "Change settings for:", 1, 5 8 100 20 combo 2, 110 5 240 20, drop text "Servers address", 3, 15 30 160 12 edit "", 4, 15 45 132 20, autohs text "Server network", 5, 153 30 160 12 edit "", 6, 153 45 132 20, autohs check "Enabled", 29, 290 40 55 20 text "Add nickname", 7, 22 85 70 20 edit "", 8, 20 99 72 21, autohs text "Group password", 9, 99 85 78 20 edit "", 10, 99 99 76 21, autohs pass button "Add nickname", 11, 20 125 155 25 text "View/delete existing nicknames", 12, 182 85 150 20 combo 13, 180 99 155 20, drop button "Delete nickname", 14, 180 125 155 25 text "Add channel to this server", 15, 22 180 140 20 edit "", 16, 20 194 155 21, autohs button "Add channel", 17, 20 220 155 25 text "View/delete existing channels", 18, 182 180 150 20 combo 19, 180 194 155 20, drop button "Delete channel", 20, 180 220 155 25 button "Add/Save server", 21, 20 275 100 25 button "Delete server", 22, 125 275 100 25 button "Close manager", 23, 230 275 100 25, cancel box "", 24, 5 22 345 245 box "Grouped nicknames", 25, 15 70 325 90 box "Channels", 26, 15 165 325 90 box "Hover over buttons/boxes for help.", 27, 5 305 345 110 text "", 28, 10 318 325 92, multi ; type | text | id | x y w h | style } ;On initialisation, display default help text and load first tab on 1:dialog:acji:init:*: acji.loadgui $iif($gettok($rs(0, Order), 1, 46) != $null, $ifmatch, 1) ;loads the gui with the information for the requested server (called with $1 being server number in acjiSettings.ini) alias -l acji.loadgui { acji.resetgui set %n 1 while (%n <= $rs(0,Servers)) { did -a acji 2 $+(%n, :) $rs($gettok($rs(0, Order), %n, 46), Server) inc %n } did -a acji 2 Add a new server did -c acji 2 $iif($findtok($rs(0, Order), $1, 46) != $null, $ifmatch, $did(2).lines) ;If no servers are set up, or if "Add a new server" is selected, disable some entry fields and rename buttons. if $did(2).sel == $did(2).lines { did -b acji 8,10,11,13,14,16,17,19,20,22,29 did -ra acji 21 Add Server } ;Enable them otherwise else { did -e acji 8,10,11,13,14,16,17,19,20,22,29 did -ra acji 21 Save Server } did -a acji 4 $rs($1, Server) did -a acji 6 $rs($1, Network) did $iif($rs($1, Enabled) == 1, -c, -u) acji 29 set %n 1 while (%n <= $rs($1,Nicks)) { did -a acji 13 $rs($1, Nick $+ %n) inc %n } did -a acji 10 $rs($1, Password) set %n 1 while (%n <= $rs($1,Channels)) { did -a acji 19 $rs($1, Channel $+ %n) inc %n } unset %n } alias -l acji.resetgui { did -r acji 2,4,6,8,10,13,16,19 did -u acji 29 } ;Listens for clicks on the gui on 1:dialog:acji:sclick:*: { if ($did(2).sel != $did(2).lines) { set %sID $gettok($rs(0, Order), $did(2).sel, 46) } else set %sID $did(2).lines ;If combo box changed, update gui with details of the correct server if ($did == 2) { acji.loadgui %sID } ;If the save button is clicked, save all information into the acjiSettings.ini file if ($did == 21) { ;If the last line of combo box is selected, add a new server if ($did(2).sel == $did(2).lines) { set %servers $calc($rs(0,Servers) + 1) $wsdata(0, Servers, %servers) ;Determine next free token, then save the settings into the correct server position set %n 1 while (%n <= %servers) { if (!$istok($rs(0,Order,46), %n, 46)) { $wsdata(0, Order, $addtok($rs(0,Order,46), %n, 46))) } inc %n } unset %n $ws(%sID, Server, 4) $ws(%sID, Network, 6) } if ($did(10).text != $null) { $ws(%sID, Password, 10) } else { $rms(%sID, Password) } $wsdata(%sID, Enabled, $did(29).state) acji.loadgui %sID } ;If the add nick button is pressed, add a nick to the current server (and save password if entered) if ($did == 11) { if ($did($dname, 8).text != $null) { $wsdata(%sID, Nicks, $calc($rs(%sID, Nicks) + 1)) $ws(%sID, Nick $+ $rs(%sID, Nicks), 8) did -r acji 8 if ($did(10).text != $null) { $ws(%sID, Password, 10) } else { $rms(%sID, Password) } acji.loadgui %sID } } ;If the add channel button is pressed, add a channel to the current server if ($did == 17) { if ($did($dname, 16).text != $null) { $wsdata(%sID, Channels, $calc($rs(%sID, Channels) + 1)) $ws(%sID, Channel $+ $rs(%sID, Channels), 16) did -r acji 16 acji.loadgui %sID } } ;If the delete nickname button is pressed, delete the current nickname and move all those after it up a spot if ($did == 14) { if ($did(13).sel != $null) { set %nicks $rs(%sID, Nicks) set %n $did(13).sel $rms(%sID, Nick $+ %n) dec %nicks set %s %n while (%n <= %nicks) { inc %s $wsdata(%sID, Nick $+ %n, $rs(%sID, Nick $+ %s)) inc %n } $rms(%sID, Nick $+ %n) $wsdata(%sID, Nicks, %nicks) unset %s | unset %n | unset %nicks } acji.loadgui %sID } ;If the delete channel button is pressed, delete the current channel and move all those after it up a spot if ($did == 20) { if ($did(19).sel != $null) { set %channels $rs(%sID, Channels) set %n $did(19).sel $rms(%sID, Channel $+ %n) dec %channels set %s %n while (%n <= %channels) { inc %s $wsdata(%sID, Channel $+ %n, $rs(%sID, Channel $+ %s)) inc %n } $rms(%sID, Channel $+ %n) $wsdata(%sID, Channels, %channels) unset %s | unset %n | unset %channels } acji.loadgui %sID } ;If the delete server button is pressed, delete the current server's token from the "Order" field if ($did == 22) { ;Remove the entire section $rms(%sID,) ;Remove the servers token from the Order field $iif($deltok($rs(0, Order), $did(2).sel, 46) != $null, $wsdata(0, Order, $ifmatch), $rms(0,Order)) $wsdata(0, Servers, $calc($rs(0, Servers) - 1)) acji.loadgui $gettok($rs(0, Order), 1, 46) } unset %sID } ;When mIRC starts, connect to each of the servers in the Settings.ini file with the primary nick supplied, if there is one. on *:Start: { set %n 1 while (%n <= $rs(0, Servers)) { if ($rs($gettok($rs(0, Order),%n,46), Enabled) == 1) { server $iif(%n == 1,,-m) $rs($gettok($rs(0, Order),%n,46), Server) -i $rs(%n, Nick1),) inc %n } else inc %n } unset %n } ;When you connect to a server, check that it's one in the Settings.ini file and then connect to the supplied channels on *:Connect: { set %n 1 while (%n <= $rs(0, Servers)) { if ($rs(%n, Network) == $network) { set %c 1 while (%c <= $rs(%n, Channels)) { join $rs(%n, Channel $+ %c) inc %c } unset %c if ($rs(%n, Password) != $null) nickserv identify $rs(%n, Password) } inc %n } unset %n } ;When nickserv asks to identify, do so with the supplied password from the acjiSettings.ini file on *:notice:*nickname is regsitered and protected*:?: { if ($nick == nickserv) { set %n 1 while (%n <= $rs(0, Servers)) { if ($rs(%n, Network) == $network) { nickserv identify $rs(%n, Password) } inc %n } unset %n } } ;If the nickname is currently being used, attempt to connect with the first free nickname saved for the server ;-- $2 is the current nickname, find it in tokens and try the next one. raw 433:*:{ set %n 1 while (%n <= $rs(0, Servers)) { if ($rs(%n, Server) == $server) { set %c 1 while (%c <= $rs(%n, Nicks)) { $iif($rs(%n, Nick $+ %c) != $2, nick $ifmatch,) inc %c } } inc %n } unset %c unset %n } ;When hovering over any of the edit boxes or buttons, the help label will display help information for that element on 1:dialog:acji:mouse:*: { if ($did == 2) { did -ra $dname 28 Select the server you wish to change details for. If empty, proceed to add a server by filling out the form below. } elseif ($did == 4) { did -ra $dname 28 Enter the server address here. e.g. irc.gamesurge.net If you wish to connect to a server with a non-default port, simply add a colon and a port number after the server. e.g. irc.gamesurge.net:6667 } elseif ($did == 6) { did -ra $dname 28 Enter the servers network here. $crlf $+ Find this out by typing '//echo -a $+($,network') whilst connected the the server. e.g. GameSurge } elseif ($did == 8) || ($did == 11) { did -ra $dname 28 Enter a nickname and then click the Add button to add that nickname to this servers autoidentify list. } elseif ($did == 10) { did -ra $dname 28 Enter the password to the group of nicknames set for this server. You Will automatically identify when nickserv asks for the password. } elseif ($did == 13) || ($did == 14) { did -ra $dname 28 Use the dropdown menu to view the nicknames set to automatically attempt to connect with. If you wish to delete one, pick it from the list then click the Delete button. } elseif ($did == 16) || ($did == 17) { did -ra $dname 28 Enter a channel name and then click the Add button to add that channel to this servers autojoin list. If the channel has a password, enter it after the channel. $crlf e.g. #channel password } elseif ($did == 19) || ($did == 20) { did -ra $dname 28 Use the dropdown menu to view the channels set to automatically join when this server starts. If you wish to delete one, pick it from the list then click the Delete button. } elseif ($did == 21) { did -ra $dname 28 By clicking this button all the info in the edit boxes will be saved for this server. } elseif ($did == 22) { did -ra $dname 28 By clicking this button all changes will be lost. Be sure to click the Set button is you want to save this configuration. } } ;called by $rs(server number, item) - if server number is 0, then general settings are stored. alias -l rs return $readini(acjiSettings.ini, Server $+ $1, $2) ;called by $wsdata(server number, data name, data) alias -l wsdata writeini acjiSettings.ini Server $+ $1 $2 $3 ;called by $ws(server number, data name, dialog item id to read from) alias -l ws writeini acjiSettings.ini Server $+ $1 $2 $did($3).text ;called by $rms(server number, item) alias -l rms remini acjiSettings.ini Server $+ $1 $2
-
his script accesses www.orlydb.com and pulls the newest Scene Releases and posts them on the channel. Added Search function: !pre Release Name Added where you can omit languages that you do not want to show. Added option to turn the Pre announce on or off through the party line ".pre" in the party line will toggle settings Fixed issue with program crashing after a few hours of running. Fixed issue with search not working ## Displys Scene Releases that have been Pred on the website www.orlydb.com ## namespace eval pre { variable language "FRENCH|GERMAN|SWEDISH|DANSIH|DUTCH|FINNISH|NORWEGIAN|SPANiSH" #"APPS 0DAY MOBILE ANiME AUDiOBOOKS COVERS DOX EBOOKS IMAGESET SAMPLES UNKNOWN MP3 MVIDS MDVDR TV TV-BLURAY TV-DVDR TV-DVDRiP TV-HR TV-x264 TV-XViD VCD BLURAY x264 XViD SVCD TRAILERS SUBPACK DiVX DVDR Wii XBOX XBOX360 GAMEBOY GAMECUBE GAMES DREAMCAST NDS PS1 PS2 PS3 PSP PSX PSXPSP XXX XXX-IMGSET" variable types "APPS 0DAY MOBILE MP3 TV-DVDR TV-DVDRiP TV-HR TV-x264 TV-XViD x264 XViD XXX XXX-IMGSET" #Set to channel to show Pre information variable chan "#Chan" #Change preNum to how many Search Results you want shown variable Num 5 } set PreNew "" #Change to (on/off) to turn on pre bot set status "on" bind pub - !pre presearch bind dcc - pre pre:change proc pre {} { global PreNew status if {$status == "on"} { set PreOld $PreNew set url "http://www.orlydb.com" set page [web2data $url] if {$page!=0} { regexp {"timestamp">(.*?)<\/span>} $page a stamp regexp {"section"><a.*?>(.*?)<\/a>} $page a section regexp {"release">(.*?)<\/span>} $page a release if {[info exists release]} { set PreNew "$stamp $section $release" if {![regexp -nocase $pre::language $release] && [regexp -nocase $section $pre::types] && $PreNew != $PreOld} { putquick "PRIVMSG $pre::chan :\00308(\00315PRE\00308)\00315 $stamp \00308(\00315$section\00308)\00315 $release" } } } } utimer 2 pre } proc pre:change {hand idx arg} { global status if {$status == "on"} { set status "off" } else { set status "on" } putdcc $idx "Pre status changed to: $status" } proc presearch { nick host hand chan arg } { set arg [string map { " " "+" } $arg] set url "http://www.orlydb.com/?q=$arg" set page [web2data $url] set temp 1 while {$temp <= $pre::Num && [regexp {<div>(.*?)<\/div>} $page a result]} { if {[info exists result]} { regexp {"timestamp">(.*?)<\/span>} $result a stamp regexp {"section"><a.*?>(.*?)<\/a>} $result a section regexp {"release">(.*?)<\/span>} $result a release regsub {<div>(.*?)<\/div>} $page "" page if {![regexp -nocase $pre::language $release]} { if {[info exists release]} { incr temp putquick "PRIVMSG $chan :\00304(\00315PRE\00304)\00315 $stamp \00304(\00315$section\00304)\00315 $release" unset stamp section release } } } } if {$temp==0} { putquick "PRIVMSG $chan :\00304(\00315PRE\00304)\00315 Nothing Found" } } proc web2data { website } { package require http if { [catch { set token [http::geturl $website -timeout 100000]} error] } { return 0 } elseif { [http::ncode $token] == "404" } { return 0 } elseif { [http::status $token] == "ok" } { set data [http::data $token] } elseif { [http::status $token] == "timeout" } { return 0 } elseif { [http::status $token] == "error" } { return 0 } http::cleanup $token if { [info exists data] } { return $data } else { return 0 } } utimer 2 pre putlog "\00308(\00315PRE\00308)"
-
I saw RagBot's Pcwin Hangman and I decided it would be a decent challenge to make a Hangman game in a dialog. It was actually a little harder than I thought it would be. Easy to use: Just load into remotes, Right click channel or status and select HangMan. This will start a new game with the category stars. To select a letter, just click the letter at the top. If you fill in all the blanks before you click 6 wrong letters, you win. If you click 6 wrong letters you lose. To start a new game in the current category, click Play. To start a new game with a new category, just change the category with the drop-down to the left. ;Dialog HangMan by Ford_Lawnmower irc.mindforge.org #USA-Chat menu Channel,Status { HangMan .Play: dialog $iif($dialog(HangMan),-v,-md) HangMan HangMan .Reset: { if ($dialog(HangMan)) { dialog -x HangMan } var %count 0 while (%count <= 6) { if ($isfile($+(HangMan\,%count,.gif))) { .remove $+(HangMan\,%count,.gif) } inc %count } dialog -md HangMan HangMan } } alias -l HangMan { if ($sock(HangMan)) { sockclose HangMan } sockopen HangMan $+($1,.hangmania.com) 80 sockmark HangMan $+($1,.hangmania.com) } On *:sockopen:HangMan: { if (!$sockerr) { sockwrite -nt $sockname GET / HTTP/1.0 sockwrite -n $sockname Host: $sock($sockname).mark sockwrite -n $sockname $crlf } else { echo -st Socket Error $nopath($script) | sockclose $sockname | return } } On *:sockread:HangMan: { if ($sockerr) { echo -st Socket Error $nopath($script) | sockclose $sockname | return } else { var %HangMan | sockread %HangMan if ($regex(%HangMan,/new Array\((.*)\)\;/i)) { set %HangMan.Key $replace($remove($regml(1),$chr(39)),$chr(32),$chr(1),$chr(44),$chr(32)) set %HangMan.Word $regsubex(%HangMan.Key,/\w/g,_) set %HangMan.Count 0 if ($dialog(HangMan)) { did -e hangman 1-26 did -a HangMan 29 %HangMan.Word if ($isfile(Hangman\0.gif)) { did -g Hangman 30 Hangman\0.gif } else { .timer 1 3 did -g Hangman 30 Hangman\0.gif } } sockclose $sockname return } } } alias -l repchar { return $+($left($3-,$calc($1 - 1)),$2,$mid($3-,$+($calc($1 + 1),-))) } alias -l CheckStrings { var %string1 $1, %string2 $2, %length $len($1) while (%length) { if ($mid($1,%length,1) == $3) { %string2 = $repchar(%length,$v1,%string2) } dec %length } if ($2 != %string2) { return %string2 } } alias -l GetIcons { var %count 0 while (%count <= 6) { .timer 1 $calc(%count * 2) gethangpict www.justhangman.com $+(/images/hangman_,%count,.gif) Hangman $+(%count,.gif) inc %count } } alias -l GetHangPict { if (!$isfile($qt($+($3,\,$4)))) { var %sockname $+(GetHangPict,$ticks,$r(1,$ticks)) if (!$isdir($qt($3))) { mkdir $qt($3) } sockopen %sockname $1 80 sockmark %sockname $1- } } On *:sockopen:GetHangPict*:{ sockwrite -nt $sockname GET $gettok($sock($sockname).mark,2,32) HTTP/1.0 sockwrite -n $sockname Host: $gettok($sock($sockname).mark,1,32) $+ $crlf $+ $crlf } On *:sockread:GetHangPict*:{ if (!$gettok($sock($sockname).mark,5,32)) { var %GetPict | sockread %GetPict if (!%GetPict) { sockmark $sockname $addtok($sock($sockname).mark,1,32) } } else { sockread &GetPict bwrite -s $qt($+($gettok($sock($sockname).mark,3,32),\,$gettok($sock($sockname).mark,4,32))) -1 -1 &GetPict } } dialog HangMan { title "HangMan" size -1 -1 199 244 option dbu button "A", 1, 24 8 8 10 button "B", 2, 36 8 8 10 button "C", 3, 48 8 8 10 button "D", 4, 60 8 8 10 button "E", 5, 72 8 8 10 button "F", 6, 84 8 8 10 button "G", 7, 96 8 8 10 button "H", 8, 108 8 8 10 button "I", 9, 120 8 8 10 button "J", 10, 132 8 8 10 button "K", 11, 144 8 8 10 button "L", 12, 156 8 8 10 button "M", 13, 168 8 8 10 button "N", 14, 24 22 8 10 button "O", 15, 36 22 8 10 button "P", 16, 48 22 8 10 button "Q", 17, 60 22 8 10 button "R", 18, 72 22 8 10 button "S", 19, 84 22 8 10 button "T", 20, 96 22 8 10 button "U", 21, 108 22 8 10 button "V", 22, 120 22 8 10 button "W", 23, 132 22 8 10 button "X", 24, 144 22 8 10 button "Y", 25, 156 22 8 10 button "Z", 26, 168 22 8 10 combo 27, 5 48 60 12, drop text "Category:", 28, 5 40 58 8 text "", 29, 73 46 119 24 icon 30, 6 71 186 153 button "Play", 31, 98 230 37 12 button "Close", 32, 148 230 37 12, Cancel } On *:dialog:HangMan:close:*: { unset %HangMan.* } On *:dialog:HangMan:init:*: { GetIcons didtok $dname 27 32 Stars Movies Games Countries Animals did -c $dname 27 1 HangMan Stars } On *:dialog:HangMan:Sclick:31,27: { HangMan $did($dname,27).seltext } On *:dialog:HangMan:Sclick:1-26: { did -b $dname $did if ($CheckStrings(%HangMan.Key,%HangMan.Word,$did($dname,$did).text)) { set %HangMan.Word $v1 did -a $dname 29 %HangMan.Word if (%HangMan.Word == %HangMan.Key) { did -a $dname 29 %HangMan.Key -- Winner!! did -b $dname 1-26 } } else { if ($calc($gettok($nopath($did($dname,30)),1,46) + 1) <= 6) { did -g $dname 30 $+(HangMan\,$v1,.gif) } if ($v1 == 6) { did -a $dname 29 %HangMan.Key -- You Lost!! did -b $dname 1-26 } } }
-
ust a quick Halo Reach Career Stats lookup Socket copy/paste into a new remote of ur bot. Trigger is @halor playername Ex: <~napa182> @halor doop <&Sick0> :[Halo Reach Stats For]: doop <&Sick0> Sorry Player Not Found <~napa182> @halor chiefMENDOZA666 <&Sick0> :[Halo Reach Stats For]: chiefMENDOZA666 <&Sick0> :[Rank]: Corporal Grade 1 Next: Sergeant (3193 of 5000) :[Games Played]: 20 :[Playtime]: 0d 3h 8m :[Kills]: 257 :[Deaths]: 259 :[Assists]: 32 :[Kill/Death]: 0.99 :[Kills/Game]: 12.85 :[Deaths/Game]: 12.95 :[Kills/Hour]: 81.96 :[Deaths/Hour]: 82.60 :[Medals]: 324 :[Medals/Game]: 16.20 :[Medals/Hour]: 103.33 <&Sick0> :[Player Stats Link]: www.bungie.net/stats/reach/careerstats/default.aspx?player=chiefMENDOZA666&vc=3 Like always rip strip butcher this snippet how ever you want idc on $*:text:/^@halor\s(.+)/iS:#:{ if (!$($+(%,halo,$wildsite),2)) { inc -u5 $+(%,halo,$wildsite) if ($sock($+(halor,#))) sockclose $+(halor,#) sockopen $+(halor,#) www.bungie.net 80 sockmark $+(halor,#) $+(/stats/reach/careerstats/default.aspx?player=,$& $replace($regml(1),$chr(32),$+(%,20)),&vc=3) msg # msg # 09:[04Halo Reach Stats For09]: $regml(1) } } on *:load: { echo 04 -a You Have Just Loaded Napa182's Halo Reach Career Stats Lookup Socket echo 07 -a An irc.EzzyChat.com Production } on *:sockopen:halor*: { sockwrite -n $sockname GET $gettok($sock($sockname).mark,1,32) HTTP/1.1 sockwrite -n $sockname Host: $+($sock($sockname).addr,$str($crlf,2)) } on *:sockread:halor*: { var %halor | sockread %halor if ($regex(%halor,/<h1.+>(Not Found)<\/.+>/)) { hinc -mu4 $sockname c 1 $gettok($sock($sockname).mark,2-,32) Sorry Player $regml(1) sockclose $sockname } if ($regex(%halor,/<span.+>(.+)<\/span.+>(Next:.+) (.+)<\/span>/)) { hadd -mu4 $sockname 1 09:[04Rank09]: $regml(1) $regml(2) $regml(3) } if ($regex(%halor,/<li class=.+>(\d+)<\/li>/)) { hadd -mu4 $sockname 2 09:[04Games Played09]: $regml(1) } if ($regex(%halor,/<strong>(.+)<\/.+>(.+)<\/span><\/li>/)) { hinc -mu4 $sockname c 1 if ($hget($sockname,c) isnum 1-12) { hadd -mu4 $sockname $calc($hget($sockname,c) +2) $+(09:[04,$regml(1),09]:) $regml(2) } if ($hget($sockname,c) = 12) { $gettok($sock($sockname).mark,2-,32) $regsubex($str(.,$hget($sockname,0).item),/(.)/g,$hget($sockname,\n) $chr(32)) $gettok($sock($sockname).mark,2-,32) 09:[04Player Stats Link09]: $+(www.bungie.net,$gettok($sock($sockname).mark,1,32)) sockclose $sockname } } }
-
Blackjack Race is a channel based multiplayer game, supporting up to your standard 7 players. I saw a few versions of Blackjack on this site, but none of them were scripted well, whether it be the style of code, the game pace or the logic within the code to match the game. So here you go 🙂 Features include: Simultaneous games within multiple channels at the same time A "first to" style, meaning rather than betting, you're trying to accumulate a certain amount of coins to win Derived from the real casino game, but adapted to suit IRC A real shoe, with shuffling points when shoe density falls below a threshold Accurate dealer simulation, standing with hard 17 Strategy play options: !hit !stand !double !split !surrender Resplit as many times as you require! 10 seconds are added to the timer for each "layer" of hands all players go through The Edge - An optional lower boundary which kicks players from the game when overstepped AI opponents, with an intelligence range from 1 to 10 Automatic AI participation if only 1 player joins Easily configure options and house rules within the script No messy global variables Possibility to save statistics via external files http://i.imgur.com/a7PDsUB.jpg To start a game, type !blackjack To join a game, type !join To start a game with AI opponents ready to join, type !blackjack N, where N is a number from 1 to 7 To start a game with specific AI opponents, for example Jess and Kyle, type !blackjack Jess Kyle To leave a game type !replace. This will replace you with an AI opponent To view a list of AI opponents and their intelligence level, type !ai To forcefully stop a game, type !blackjack stop OR !stop (Operators only) To abort the games termination, type !abort To view a list of ALL commands, type !commands UPDATE 20/01/17 - Added AI, primarily so you can start a game by yourself UPDATE 21/01/17 - Added !split and !surrender, for completions sake. Integration was a bit rough but i scraped by UPDATE 22/01/17 - Fixed the randomization of cards in the shoe. Added !replace UPDATE 24/01/17 - Fixed small conflicting error, added an easter egg UPDATE 27/02/17 - Added house options, optional lower boundary and N card tricks, fixed dealer logic if all surrender UPDATE 24/07/17 Added stats, which can be turned on and off. Includes top 5 lists and comparison Top 5 lists can be displayed as: !top5 [-a/-u] [cpg / cph / gr / wr / h2h] User stats can be found with: !stat [-a/-u] nickname Comparisons can be done via: !compare [-a/-u] nickname1 [-a/-u] nickname2 !repair can be used by operators to fix the game if it won't start properly or becomes unresponsive !commands is available to view all known commands with possible further detail UPDATE 26/07/17 - Save total coins in external file, assist with external use. See the comments UPDATE 24/09/17 - Added blackjackCoinListener alias to the bottom of the script, used for adding your own functionality each time coins are accumulated ;######################################################## ;######################################################## ; SETTINGS (for YOU.... yes YOU!!!) ;######################################################## ;######################################################## ;# THE DEALER HAS AN EDGE. If you win as much as you lose, all player balances will gradually decrease making the 'finish' impossible to reach. ;# to compensate, you can award points for draws, and reward more money for a win than you take away for a loss. The same applies for doubles. ;# for faster games: 200 40 20 30 0 -10 5 10 -3 ;# more realistic game values: 150 40 20 30 -10 -25 0 0 -5 alias -l finish return 150 alias -l winDouble return 40 alias -l winSingle return 20 alias -l winBlackjack return 30 alias -l loseSingle return -10 alias -l loseDouble return -25 alias -l drawSingle return 0 alias -l drawDouble return 0 alias -l surrender return -5 ;# theEdge - Set to 0 to disable. Kicks players from the game after falling below -N alias -l theEdge return -100 ;# Bonus payouts. N card tricks represent an auto-payout if a player's hand consists of N cards. set to 0 to disable, otherwise set to the amount which should be paid out. alias -l var5CardTrickPayout return 5 alias -l var6CardTrickPayout return 10 alias -l var7CardTrickPayout return 15 alias -l var5Card21Payout return 20 alias -l var6Card21Payout return 40 alias -l var7Card21Payout return 100 ;# House rules. 'decks' can be from 2-8. The other lines respresent rules which can be used in the game. To "activate" a rule, change the 0 to a 1. alias -l decks return 2 alias -l dealerHitsOnSoft17 return 0 alias -l doubleWith3orMoreCards return 0 alias -l noResplitWithAces return 0 alias -l splitAcesOneCardOnly return 0 ;# Colors. 3 are used, each represented below. Use 2 digits, from 00-15 alias -l color1 return 07 alias -l color2 return 03 alias -l color3 return 06 ;# AI opponents. Just seperate the names by spaces, if you want to add more. ;# the intelligence levels correlate to the names, so Jess matches 6 and Kyle matches the last 1. alias -l ai return Jess Trump DeathKnight AIMaster Jerry Lacey Jonorama Degausser NotTheSun Kyle alias -l aiIntel return 6 9 8 10 3 5 4 7 2 1 ;# 'statEnable' signifies whether the statistics will be recorded. 1 represents on, and 0 off ;# 'statDirectory' is your path to stats. there should be no slashes at the beginning or end of the path. use \ if you want to go deeper into folders ;# the other two aliases represent the minimum needed hands/games for a user to be displayed in the top5 lists alias -l statEnable return 1 alias -l statDirectory return stats\blackjack alias -l statMinHands return 10 alias -l statMinGames return 2 ;######################################################## ;######################################################## ; TEXT EVENTS ;######################################################## ;######################################################## on *:TEXT:*:#:{ if ($hget($g($chan,1))) { if ($hget($g($chan,1), $nick)) && ($hget($g($chan,1), $nick) != check) && (!$isAI($chan, $nick)) { if ($timer($+(BlackJack,$chan,DrawTimer))) { if ($1 == !hit) || ($1 == !card) drawCardAction $chan $nick elseif ($1 == !double) drawCardAction $chan $nick -d elseif ($1 == !stand) standAction $chan $nick elseif ($1 == !split) splitAction $chan $nick elseif ($1 == !surrender) surrenderAction $chan $nick } if ($1 == !replace) || ($1 == !drop) replaceAction $chan $nick } elseif ($istok(!join.join,$1,46)) && ($timer($+(BlackJack,$chan,JoinTimer))) addPlayer $chan $nick if ($1-2 == !blackjack stop) || ($1 == !stop) triggerBlackjackStop $chan -m $nick elseif ($1 == !abort) && ($hget($s($chan), stop)) triggerAbort $1- elseif ($1 == !repair) && ($nick isop $chan) triggerRepair $chan } elseif ($1 == !blackjack) triggerBlackjack $1- if ($1 == !stat) triggerStats stat $1- elseif ($1 == !coins) triggerStats coins $1- elseif ($1 == !commands) triggerCommands $1- elseif ($1 == !top5) triggerTop5 $1- elseif ($1 == !compare) triggerCompare $1- elseif ($1 == !ai) .notice $nick List of computer opponents: $listAI } ;######################################################## ;######################################################## ; LITTLE ALIASES ;######################################################## ;######################################################## alias -l suits return ♣♠♥♦ alias -l cardify return $replace($1-,10,E,11,J,12,Q,13,K,1,A,E,10) alias -l bracks return $+($chr(40),$1-,$chr(41)) alias -l cb1 return $+(,$color1,,$1-,) alias -l cb2 return $+(,$color2,,$1-,) alias -l cb3 return $+(,$color3,,$1-,) alias -l c1 return $+(,$color1,$1-,,) alias -l c2 return $+(,$color2,$1-,,) alias -l c3 return $+(,$color3,$1-,,) alias -l f { verif | return $+(",$mircdir,$statDirectory,\,$1,.ini,") } alias -l l { verif | return $+(",$mircdir,$statDirectory,\,$1,.txt,") } alias -l getStat return $iif($readini($1,$2,$3),$ifmatch,0) alias -l fs filter -ffctue 1 32 $1- $1- alias -l top5 return cph.wr.cpg.gr.h2h alias -l g return $+(bj_game,_,$1,_,$2) alias -l a return $+(bj_action,_,$1,_,$2) alias -l d return $+(bj_deck,_,$1) alias -l w return $+(bj_score,_,$1) alias -l s return $+(bj_settings,_,$1) alias -l hfreedom { if ($hget($g($1,1))) hfree $g($1,1) if ($hget($a($1,1))) hfree $a($1,1) if ($hget($d($1))) hfree $d($1) if ($hget($w($1))) hfree $w($1) if ($hget($s($1))) hfree $s($1) hfreedomMirror $1 } alias -l hfreedomMirror { var %x = 2 while ($hget($g($1,%x))) { hfree $hget($g($1,%x)) hfree $hget($a($1,%x)) inc %x } } alias -l verif { if (!isdir($+(",$mircdir,$statDirectory,\,"))) { var %x = 1 while (%x <= $numtok($statDirectory,92)) { if (!isdir($+(",$mircdir,$gettok($statDirectory,$+(1-,%x),92),\,"))) .mkdir $+(",$mircdir,$gettok($statDirectory,$+(1-,%x),92),\,") inc %x } } } ;######################################################## ;######################################################## ; GAME TRIGGERS ;######################################################## ;######################################################## alias triggerBlackjack { if (!$2) blackjackStart $chan $nick elseif ($istok(1.2.3.4.5.6.7,$2,46)) blackjackStart $chan $nick $2 elseif ($filterAI($2-)) blackjackStart $chan $nick $ifmatch else { .notice $nick Invalid parameter. To start a game with AI opponents ready to join, type !blackjack N. N can be a number from 1-7 .notice $nick You can also specify certain AI opponents you want in the game, for example: !blackjack AIMaster Degausser Trump } } alias triggerBlackjackStop { if ($3 !isop $1) .notice $3 You must be an operator to stop a game! else { if ($cardsRemaining($1)) { if (!$hget($s($1), stop)) stopAction $1 $3 else .notice $3 The game will end after the current round! } elseif ($timer($+(BlackJack,$1,JoinTimer))) { $+(.timerBlackJack,$chan,*) off if ($2 == -m) msg $chan $cb3(Blackjack Race) has been stopped by $c3($3) hfreedom $1 } else .notice $3 You can't perform this action now! } } alias -l triggerAbort { if ($timer($+(BlackJack,$chan,DrawTimer))) && ($nick isop $chan) abortAction $chan $nick elseif ($nick !isop $chan) .notice $nick You must be an operator to abort the games termination! else .notice $nick You can't perform that action now } alias -l triggerStats { if (!$3) .notice $nick Invalid parameters. Specify a name. The -a flag can be used to specify an AI character like: $+(!,$1) -a Degausser elseif (((!$4) && (!$userStats($3))) || (($4) && (!$userStats($4)))) || (($1 == coins) && ((!$userStats($4).user) && (!$userStats($3).user))) .notice $nick Sorry, I haven't heard that name before else { var %s if (!$4) %s = $chan -u $3 elseif ($3 == -a) && ($userStats($4).ai) && ($1 != coins) %s = $chan -a $4 else %s = $chan -u $4 if ($1 == stat) displayStats %s elseif ($1 == coins) displayCoins %s } } alias -l triggerCommands { if ($istok(!ai.ai,$2,46)) .notice $nick This will send you a notice with a list of AI opponents you're able to play against elseif ($istok(!stat.stat,$2,46)) .notice $nick These will send a message with user statistics for the specified name. You can specify the -a flag to define AI opponents, such as: !stat -a Degausser elseif ($istok(!coins.coins,$2,46)) .notice $nick These will send a message with total user coins. Define a user (not AI) by simply specifying a username. elseif ($istok(!commands.commands,$2,46)) .notice $nick This will notice you a list of commands.... silly! elseif ($istok(!compare.compare,$2,46)) { .notice $nick Compare two players based on their stats in comparison to all other players. You can specify two names, and optionally a -a or -u before the names to specify AI or user .notice $nick For example, !compare Anne -a Degausser. Example 2: !compare -a Kyle -u Sarah } elseif ($istok(!blackjack.blackjack,$2,46)) { .notice $nick This command will start a game. You can specify the number of AI opponents ready to join by typing !blackjack N, where N is a number from 1-7 .notice $nick You can also specify specific players by using their names (type !ai for a list) like so: !blackjack Degausser NotTheSun .notice $nick If a game is active, channel operators can end the game by typing: !blackjack stop } elseif ($istok(!replace.replace,$2,46)) .notice $nick Specifically an in-game command to be used if you don't want to play anymore. The game will be counted as a loss elseif ($istok(!top5.top5,$2,46)) { .notice $nick Displays lists of top 5 players. You can specify a -a or -u flag to view distinct AI or user lists. You can also specify the type of list from: $replace($top5,$chr(46),$chr(32)) .notice $nick Example 1: !top5 -u wr :: Example 2: !top5 cph } elseif ($istok(!abort.abort,$2,46)) { .notice $nick Allows you to abort the !blackjack stop operation, before a hand finishes } elseif ($istok(!stop.stop,$2,46)) { .notice $nick Stops the entire round. Does not apply game based statistics } elseif ($istok(!repair.repair,$2,46)) { .notice $nick Repairs the game if you're having trouble starting a new game } else { .notice $nick Helpful commands - IN GAME: !hit !stand !double !split !surrender !replace !stop !abort !repair - OUTSIDE: !blackjack !commands !ai !stat !coins !top5 !compare .notice $nick Type !commands command for more information on some commands, for example: !commands ai } } alias -l triggerTop5 { var %t = $gettok($top5,1,46) if (!$3) { if ($istok(-a.-u,$2,46)) displayTop5 $chan $2 %t else displayTop5 $chan -n $iif($istok($top5,$2,46),$2,%t) } elseif ($left($2,1) == $chr(45) && $len($2) == 2) displayTop5 $chan $iif($istok(-a.-u,$2,46),$2,-n) $iif($istok($top5,$3,46),$3,%t) elseif ($2) displayTop5 $chan -n $iif($istok($top5,$2,46),$2,%t) else displayTop5 $chan -n %t } alias -l triggerCompare { if ($0 == 3) { if ($userStats($2)) && ($userStats($3)) displayCompare -u $2 -u $3 $chan else .notice $nick One of more of the specified users could not be found } elseif ($0 == 5) { if ($userStats($3)) && ($userStats($5)) displayCompare $iif($2 == -a,-a,-u) $3 $iif($4 == -a,-a,-u) $5 $chan else .notice $nick One of more of the specified users could not be found } elseif ($0 < 3) .notice $nick You have to specify two users to compare them. Type !compare player1 player2 elseif ($0 > 5) .notice $nick You've specified to many parameters! To specify users or AI, type: !compare -u user -a AIname else { if ($userStats($3)) { if ($userStats($4)) displayCompare $iif($2 == -a,-a,-u) $3 -u $4 $chan elseif ($userStats($2)) displayCompare -u $2 $iif($4` == -a,-a,-u) $3 $chan } elseif ($userStats($2)) && ($userStats($4)) displayCompare -u $2 $iif($3 == -a,-a,-u) $4 $chan else .notice $nick One or more of the specified users are not recognized } } alias -l triggerRepair { if (!$timerCheck($1)) { msg $1 $cb3(Blackjack Race) was found in a $c2(broken state) $+ , and has been $c3(repaired) hfreedom $1 } } alias -l timerCheck { if ($timer($+(blackjack,$1,DrawTimer)).secs isnum) return $true if ($timer($+(blackjack,$1,JoinTimer)).secs isnum) return $true if ($timer($+(blackjack,$1,AutoTimer)).secs isnum) return $true if ($timer($+(blackjack,$1,RepeatGame)).secs isnum) return $true if ($timer($+(blackjack,$1,NextRound)).secs isnum) return $true if ($timer($+(blackjack,$1,AnnounceWinner)).secs isnum) return $true if ($timer($+(blackjack,$1,EndGame)).secs isnum) return $true return $false } ;######################################################## ;######################################################## ; ACTIONS ;######################################################## ;######################################################## alias -l drawCardAction { if ($numerifyTotal($cardTotal($1,-u,$2).hard) < 21) && (!$istok(double.stand, $hget($a($1,1), $2), 46)) { var %d = $iif(d isin $3,$true,$false) if ((%d) && ($numtok($hget($g($1,1), $2), 32) > 2)) && (!$doubleWith3orMoreCards) .notice $nick You can only double with the first two cards! else { var %card = $drawCard($1), %z hadd $g($1,1) $2 $hget($g($1,1), $2) %card %z = $numerifyTotal($cardTotal($1,-u,$2).hard) if (%z > 20) && (!%d) hadd $a($1,1) $2 stand else hadd $a($1,1) $2 $iif(%d,double,hit) msg $1 $c2($2) $iif(%d,doubled,hit) and drew: $cardflair(%card) :: Current hand: $cardflair($hget($g($1,1), $2)) $bracks($cardTotal($1,-u,$2)) if (%z == 21) && ($($+($chr(36),var,$numtok($hget($g($1,1),$2),32),Card21Payout),2)) { hinc $w($1) $2 $ifmatch msg $1 $c1($2) has hit a $cb3($numtok($hget($g($1,1),$2),32) Card 21) and is rewarded $c2($ifmatch coins) } elseif (%z < 21) && ($($+($chr(36),var,$numtok($hget($g($1,1),$2),32),CardTrickPayout),2)) { hinc $w($1) $2 $ifmatch msg $1 $c1($2) has hit a $cb3($numtok($hget($g($1,1),$2),32) Card Trick) and is rewarded $c2($ifmatch coins) } if ((%d) || (%z > 20)) { hinc $s($1) completed 1 if ($splitHand($1,$2)) createSplits $1 $2 $ifmatch elseif ($actionsComplete($1)) checkWinner $1 -f } } } else .notice $2 You can't draw anymore cards! } alias -l standAction { if ($numerifyTotal($cardTotal($1,-u,$2).hard) < 21) && (!$istok(double.stand, $hget($a($1,1), $2), 46)) { hadd $a($1,1) $2 stand hinc $s($1) completed 1 msg $1 $c2($2) stands with the hand: $cardflair($hget($g($1,1), $2)) $bracks($cardTotal($1,-u,$2)) if ($splitHand($1,$2)) createSplits $1 $2 $ifmatch elseif ($actionsComplete($1)) checkWinner $1 -f } else .notice $2 You can't perform this action! } alias -l splitAction { var %hand = $hget($g($1,1),$2) if ($cardPair(%hand)) && (!$istok(double.stand,$hget($a($1,1),$2),46)) { if ($noResplitWithAces) && ($gettok($gettok(%hand,1,32),2,95) == A) && ($hget($g($1,2),$2)) .notice $2 You can't split Aces more than once! else { msg $1 $c2($2) splits the hand: $cardflair($hget($g($1,1),$2)) $bracks($cardTotal($1,-u,$2)) hadd $newSplitTable($1,$2) $2 $gettok($hget($g($1,1),$2),2,32) hadd $g($1,1) $2 $gettok($hget($g($1,1), $2),1,32) hinc $s($1) actions 1 createSplits $1 $2 } } else .notice $2 You can't perform this action! } alias -l surrenderAction { if ($numtok($hget($g($1,1), $2), 32) == 2) && ($numerifyTotal($cardTotal($1,-u,$2).hard) < 21) && (!$hget($m($1,1),$2)) && (!$istok(double.stand, $hget($a($1,1), $2), 46)) { msg $1 $c2($2) surrenders their hand: $cardflair($hget($g($1,1), $2)) $bracks($cardTotal($1,-u,$2)) and $c1($iif($surrender > 0,wins,loses) $abs($surrender) $iif($abs($surrender) == 1,coin,coins)) hdel $a($1,1) $2 hadd $g($1,1) $2 check hinc $w($1) $2 $surrender hinc $s($1) completed 1 processHandStats $1 $2 total 1 processHandStats $1 $2 lose 1 processHandStats $1 $2 coins $surrender if ($actionsComplete($1)) checkWinner $1 -f } else .notice $2 You can't perform this action! } alias -l replaceAction { if (!$istok($hget($s($1),replace),$nick,32)) { hadd $s($1) replace $hget($s($1), replace) $2 msg $1 $cb3($2) $c3(will be replaced after the next round!) } } alias -l stopAction { hadd $s($1) stop $2 msg $1 $cb3(Blackjack Race) $c3(will be stopped after the next round!) } alias -l abortAction { if ($hget($s($1),stop)) hdel $s($1) stop msg $1 $cb3(Blackjack Race) $c3(will no longer be stopped after this round!) } alias -l actionsComplete { if ($hget($s($1), completed) == $hget($s($1), actions)) return $true return $false } ;######################################################## ;######################################################## ; SPLIT TABLES ;######################################################## ;######################################################## alias -l newSplitTable { var %x = 2 while (%x) { if (!$hget($g($1, %x))) { hmake $g($1, %x) 1 hmake $a($1, %x) 1 $+(.timerBlackJack,$1,DrawTimer) -o 1 $calc($timer($+(BlackJack,$1,DrawTimer)).secs + 10) checkWinner $1 } if (!$hget($g($1, %x), $2)) return $g($1,%x) inc %x } } alias -l splitHand { var %x = 2 while ($hget($g($1,%x),$2)) { if ($numtok($ifmatch,32) == 1) return %x inc %x } return $false } ;######################################################## ;######################################################## ; THE EDGE ;######################################################## ;######################################################## alias -l offTheEdge { if ($theEdge < 0) { var %x = 1, %n = $hget($w($1),0).item, %p, %s, %e = $v1, %count = 1, %countvar, %minimum, %a while (%x <= %n) { %s = $hget($w($1),%x).data if (!$len(%countvar)) %countvar = %s elseif (%countvar == %s) inc %count if (%s > %minimum) || (!$len(%minimum)) %minimum = %s inc %x } if (%count != %n) { if (%minimum > %e) %minimum = %e %x = 1 while ($len($hget($w($1),%x).item)) { %p = $hget($w($1),%x).item %s = $hget($w($1),%p) if (%s < %minimum) { %a = $iif($isAI($1,%p),-a,-u) msg $1 $cb2(%p) has tipped over $c3(The Edge) and fallen into obscurity! $cb3(Goodbye %p $+ !) preProcessHandStats $1 %p %a lose if (%a == -u) coinSave $1 %p hdel $g($1,1) %p hdel $w($1) %p top5PreWrite $1 %p %a } else { if (%s == %minimum) msg $1 $c2(%p) is on $cb3(The Edge) with $+(04,%s,) coins! inc %x } } } } } ;######################################################## ;######################################################## ; ARTIFICIAL INTELLIGENCE ;######################################################## ;######################################################## alias -l getIntel return $iif($findtok($ai,$1,1,32) <= $numtok($aiIntel,32),$iif($gettok($aiIntel,$findtok($ai,$1,1,32),32) isnum 1-10, $v1, 5),5) alias -l isAI return $istok($hget($s($1), ai),$2,32) alias -l listAI { var %x = 1, %y = $numtok($ai,32), %r, %u while (%x <= %y) { %u = $gettok($ai,%x,32) %r = %r $c2(%u) $c1($bracks($getIntel(%u))) / inc %x } return $left(%r,-1) } alias -l filterAI { var %x = 1, %y = $numtok($1-,32), %return, %a while (%x <= %y) { %a = $gettok($1-,%x,32) if ($istok($ai,%a,32)) && (!$istok(%return,%a,32)) %return = $addtok(%return,%a,32) inc %x } return %return } alias -l generateAI { var %x = 1, %y = $numtok($ai,32), %s, %u, %n = $iif($2- isnum 1-7,$iif($2- <= $numtok($ai,32),$2-,$numtok($ai,32)),$numtok($2-,32)) while (%x <= %n) { if ($2- isnum 1-7) { while ($istok(%s,%u,32) || !%u) { %u = $gettok($ai,$rand(1,$numtok($ai,32)),32) } %s = %s %u } elseif ($istok($ai,$gettok($2-,%x,32),32)) %u = $gettok($2-,%x,32) else %u = $null if (%u) $+(.timerBlackJack,$1,JoinTimer,%u) -o 1 $rand(2,28) addPlayer $1 %u -a inc %x } } alias -l rollAI { var %x = 1, %ai = $hget($s($1), ai), %y = $numtok(%ai, 32), %player while (%x <= %y) { %player = $gettok(%ai,%x,32) if (!$istok(double.stand, $hget($a($1,1), %player), 46)) timeAI $1 %player inc %x } } alias -l performAIAction { if ($timer($+(BlackJack,$1,DrawTimer))) { var %action = stand, %intel = $getIntel($2), %dealer = $cardTotal($1, -d).hard, %hard = $cardTotal($1,-u,$2).hard, %soft = $cardTotal($1,-u,$2).soft, %d = $iif($numtok($hget($g($1,1), $2), 32) == 2 || $doubleWith3orMoreCards,1,0), %s = $iif($cardPair($hget($g($1,1),$2)),$ifmatch,0) if (%s == A) && ($hget($g($1,2),$2)) && ($noResplitWithAces) %s = 0 if (%hard < 12) || (%soft < 8) %action = hit if (%intel > 1) && (%hard < 17) %action = hit if (%intel > 1) && (%s) && (%soft == 2) %action = split if (%intel > 2) && (%dealer < 11) && (%hard isnum 10-11) %action = double if (%intel > 2) && (%dealer > 6) && ((%soft > 7) && (%hard > 13)) %action = stand if (%intel > 3) && (%dealer isnum 2-6) && (%hard > 11) && (%soft > 7) %action = stand if (%intel > 3) && (%s) && (%hard == 16) && (%dealer < 11) %action = split if (%intel > 4) && (%dealer isnum 2-3) && (%hard < 14) && (!$istok(double.split,%action,46)) %action = hit if (%intel > 4) && (%dealer > 6) && ((%hard < 15) || (%soft < 8) && (!$istok(double.split,%action,46))) %action = hit if (%intel > 5) && (%dealer == 9) && (%soft < 9) && (%action != split) %action = hit if (%intel > 5) && (%dealer isnum 10-11) && (%soft == 8) %action = hit if (%intel > 5) && (%s) && (%dealer isnum 3-6) && ($istok(4.6.12.14.18,%hard,46)) %action = split if (%intel > 6) && (%dealer == 10) && (%hard isnum 10-11) %action = hit if (%intel > 6) && (%dealer == 9) && (%hard isnum 10-11) %action = double if (%intel > 6) && (%dealer == 11) && (%hard < 17) && (%soft > 2) %action = hit if (%intel > 7) && (%dealer == 3) && (%hard == 13) && (%soft == 13) %action = stand if (%intel > 7) && (%dealer > 7) && (%hard isnum 12-16) && (!$istok(double.split,%action,46)) %action = hit if (%intel > 7) && (%s) && (%dealer == 2) && (%hard isnum 4-6) %action = split if (%intel > 7) && (%s) && (%dealer == 7) && ($istok(4.6.14.16,%hard,46)) %action = split if (%intel > 8) && (%dealer isnum 3-6) && (%hard == 9) %action = double if (%intel > 8) && (%dealer isnum 5-6) && (%soft isnum 2-8) && (%hard > 11) %action = $iif(!%d && %soft == 8,stand,double) if (%intel > 8) && (%dealer == 7) && (%hard isnum 15-16) && (%action != split) %action = hit if (%intel > 8) && (%s) && (%hard == 18) && ($istok(4.5.6.8.9,%dealer,46)) %action = split if (%intel > 9) && (%dealer == 4) && (%soft isnum 5-8) && (%hard > 11) && (%action != split) %action = $iif(!%d && %soft == 8,stand,double) if (%intel > 9) && (%dealer == 3) && (%soft isnum 7-8) && (%hard > 11) && (%action != split) %action = $iif(!%d && %soft == 8,stand,double) if (%action == hit) || ((%action == double) && (!%d)) drawCardAction $1 $2 elseif (%action == double) drawCardAction $1 $2 -d elseif (%action == split) splitAction $1 $2 else standAction $1 $2 if (!$istok(double.stand, $hget($a($1,1), $2), 46)) timeAI $1 $2 } } alias -l timeAI { $+(.timerBlackJack,$1,DrawTimer,$2) -o 1 $rand(2,7) performAIAction $1 $2 } ;######################################################## ;######################################################## ; SHOE MANAGEMENT ;######################################################## ;######################################################## alias -l createDeck { var %i = 1, %d = $calc($hget($s($1), decks) * 52) while (%i <= %d) { hadd $d($1) %i 1 inc %i } } alias -l cardsRemaining return $hget($d($1), 0).item alias -l drawCard { if (!$cardsRemaining($1)) checkShuffle $1 var %r = $rand(1,$cardsremaining($1)), %t = $hget($d($1), %r).item hdel $d($1) %t return $+($mid($suits,$calc((%t % 4) + 1),1),_,$cardify($calc((%t % 13) + 1))) } ;######################################################## ;######################################################## ; GAME FLOW ;######################################################## ;######################################################## alias -l blackjackStart { hfreedom $1 hmake $g($1,1) 1 hmake $a($1,1) 1 hmake $d($1) $floor($calc(($iif($decks isnum 1-8,$v1,2) * 52) / 10)) hmake $w($1) 1 hmake $s($1) 1 hadd $s($1) decks $iif($decks isnum 1-8,$v1,2) hadd $s($1) stats $iif($statEnable,1,0) msg $1 $c2($2) has started a game of $cb3(Blackjack Race!) Type $c2(!join) to join the game, you have $c1(30 seconds!) $+(.timerBlackJack,$1,JoinTimer) -o 1 30 startGame $1 if ($3) generateAI $1 $3- } alias -l addPlayer { if (!$hget($g($1,1), $2)) { hadd $g($1,1) $2 check hadd $w($1) $2 0 if ($3) && (a isin $3) hadd $s($1) ai $iif($hget($s($1), ai),$ifmatch $2,$2) msg $1 $c2($2) $+ $iif(($3) && (a isin $3),$+($chr(32),$bracks(AI level $getIntel($2)))) has joined the game! $c1($players($1)) players joined! $iif($hget($g($1,1), 0).item < 7 && $timer($+(BlackJack,$1,JoinTimer)).secs > 1,You've $c1($timer($+(BlackJack,$1,JoinTimer)).secs) seconds left to join!) if ($hget($g($1,1), 0).item > 6) startGame $1 -f } } alias -l startGame { $+(.timerBlackJack,$1,JoinTimer*) off if (!$players($1)) { msg $1 Nobody has joined the game. $c2(1 player) is required! Turning off. blackjackStop $1 -f } else { if ($players($1) == 1) { while ($players($1) < 2) { if (($isAI($1, $hget($g($1,1), 1).item)) && ($numtok($ai,32) < 2)) || (!$ai) addPlayer $1 $+(Agent,$rand(11111,99999)) -a else addPlayer $1 $gettok($ai,$rand(1,$numtok($ai,32)),32) -a } } hadd $s($1) original_players $players($1) createDeck $1 var %text = The aim is to win $cb1($finish coins) from the $c2(Dealer) before everyone else. Bet amounts are in units of $winSingle $+ , $cb3($iif($hget($s($1), decks) > 1,$v1 decks,1 deck)) in use. Get ready... if ($2) && (f isin $2) msg $1 There are a maximum of $c1($players($1) players!) %text else msg $1 $c1(Time is up!) There are $c1($players($1) players!) %text $+(.timerBlackJack,$1,RepeatGame) -o 1 10 startRound $1 } } alias -l startRound { createDefaults $1 if ($actionsComplete($1)) $+(.timerBlackJack,$1,AutoTimer) -o 1 2 checkWinner $1 -f else { $+(.timerBlackJack,$1,DrawTimer) -o 1 30 checkWinner $1 if ($hget($s($1), ai)) rollAI $1 } } alias -l createDefaults { var %x = 1, %p = $players($1), %player, %actions hadd $s($1) dealer $drawCard($1) hadd $s($1) actions $hget($g($1,1),0).item hadd $s($1) completed 0 while (%x <= %p) { %player = $hget($g($1,1), %x).item hadd $g($1,1) %player $drawCard($1) $drawCard($1) %actions = $iif($numerifyTotal($cardTotal($1,-u,%player).hard) < 21,hit,stand) hadd $a($1,1) %player %actions if (%actions == stand) hinc $s($1) completed 1 msg $1 $c2($+(%player,:)) Your cards are: $cardflair($hget($g($1,1), %player)) :: Total: $bracks($cardTotal($1,-u,%player)) $iif(%actions == hit,:: You can: !hit !stand !double $+ $iif($cardPair($hget($g($1,1), %player)),$+($chr(32),!split))) $+ $iif(%actions == hit,$+($chr(32),!surrender))) inc %x } msg $1 The $cb2(Dealer) is showing: $cardflair($hget($s($1), dealer)) } alias -l createSplits { if ($3) { var %temp = $hget($g($1,1),$2) hadd $g($1,1) $2 $hget($g($1,$3),$2) hadd $g($1,$3) $2 %temp hadd $a($1,$3) $2 $hget($a($1,1),$2) } hadd $g($1,1) $2 $hget($g($1,1),$2) $drawCard($1) var %one = $iif(($splitAcesOneCardOnly) && ($gettok($gettok($hget($g($1,1),$2),1,32),2,95) == A),1,0), %actions = $iif($numerifyTotal($cardTotal($1,-u,$2).hard) < 21 && !%one,hit,stand) hadd $a($1,1) $2 %actions msg $1 $c2($+($2,:)) Your cards are: $cardflair($hget($g($1,1), $2)) :: Total: $bracks($cardTotal($1,-u,$2)) $iif(%actions == hit && !%one,:: You can: !hit !stand !double $+ $iif($cardPair($hget($g($1,1), $2)) && (($cardPair($hget($g($1,1), $2)) != A) || (!$noResplitWithAces)),$+($chr(32),!split))) if (%actions == stand) { hinc $s($1) completed 1 if ($splitHand($1,$2)) forwardSplitter $1 $2 $splitHand($1,$2) elseif ($actionsComplete($1)) checkWinner $1 -f } } alias -l forwardSplitter { createSplits $1- } alias -l blackjackStop { if ($hget($s($1),stats)) { var %x = 1, %f, %u, %p = $players($1), %w, %winner = $3 while ($hget($g($1,1), %x).item) { %u = $ifmatch %f = $iif($isAI($1,%u),-a,-u) %w = $iif(%winner && ($2 != -f),$iif(%winner == %u,win,lose),draw) preProcessHandStats $1 %u %f %w top5PreWrite $1 %u %f if (%f == -u) coinSave $1 %u inc %x } top5Sort } hfreedom $1 } ;######################################################## ;######################################################## ; POST HAND ;######################################################## ;######################################################## alias -l checkWinner { $+(.timerBlackJack,$1,DrawTimer,*) off var %dealer = $dealerOption($1) dealerDraw $1 %dealer roundDisplay $1 %dealer $iif($2,$2) } alias -l roundDisplay { var %t = $hget($s($1), dealer), %win = $getWinner($1).win, %draw = $getWinner($1).draw, %lose = $getWinner($1).lose, %finished = $cb1($iif(f isin $3,All hands are finished!,Time is up!)) var %displaywin = $formatPlayers($1, %win).win, %displaylose = $formatPlayers($1, %lose).lose, %displaydraw = $formatPlayers($1, %draw).draw if ($istok(1.2,$2,46)) msg $1 %finished The $cb2(Dealer) shows $cardflair($gettok(%t,1,32)) and $iif($2 = 2,draws the following cards:,drew the card:) $cardflair($gettok(%t,2-,32)) :: Total: $cb2($cardTotal($1, -d).hard) elseif ($2 == 0) msg $1 %finished Everyone went $c1(bust) so the $cb2(Dealer) wins elseif ($2 == 4) msg $1 %finished Everyone $c1(surrendered) so the $cb2(Dealer) doesn't draw cards else msg $1 %finished The $cb2(Dealer) can't make $c1(Blackjack) so doesn't draw cards if (%win) msg $1 $c1($iif($numtok(%win, 32) != 1,$v1 players,%win)) beat the dealer $+ $iif($numtok(%win, 32) != 1,: %displaywin,: $gettok(%displaywin,2-,32)) if (%draw) msg $1 $c1($iif($numtok(%draw, 32) != 1,$v1 players,%draw)) managed to draw $+ $iif($numtok(%draw, 32) != 1,: %displaydraw,: $gettok(%displaydraw,2-,32)) if (!%win) && (!%draw) && (%lose) && ($istok(1.2,$2,46)) msg $1 The $cb2(Dealer) beat everyone with: $cardflair(%t) :: Total: $cb2($cardTotal($1,-d).hard) $+(.timerBlackJack,$1,nextRound) -o 1 2 nextRound $1 } alias -l checkShuffle { var %r = $cardsRemaining($1) if (%r < $calc(($players($1) + 1) * 7)) { msg $1 $cb3(The cards are getting shuffled and reloaded) $bracks($+($round($calc((%r / ($hget($s($1), decks) * 52)) * 100),2),$chr(37)) density) createDeck $1 } else msg $1 $cb3(%r cards) remain in the shoe $bracks($+($round($calc((%r / ($hget($s($1), decks) * 52)) * 100),2),$chr(37)) density) } alias -l nextRound { msg $1 Current scores: $allScores($1) offTheEdge $1 if ($overallWinner($1)) { var %winner = $ifmatch, %coins = $hget($w($1), %winner) $+(.timerBlackJack,$1,announceWinner) -o 1 2 msg $1 Okay we have an $cb3(overall winner.) $cb2(%winner) wins the game, finishing with $c1(%coins coins!) $+(.timerBlackJack,$1,endGame) -o 1 4 blackjackStop $1 -m %winner } elseif ($hget($s($1), stop)) { $+(.timerBlackJack,$1,announceStop) -o 1 2 msg $1 $cb3(Blackjack Race) was set to be stopped by $c2($hget($s($1), stop)) and has been terminated $+(.timerBlackJack,$1,endGame) -o 1 4 blackjackStop $1 -f } else { hdel -w $a($1,1) * hfreedomMirror $1 $+(.timerBlackJack,$1,ShuffleTimer) -o 1 5 checkShuffle $1 if ($hget($s($1),replace)) $+(.timerBlackJack,$1,ReplaceUser) -o 1 10 replaceUser $1 $+(.timerBlackJack,$1,RepeatGame) -o 1 12 startRound $1 } } alias -l replaceUser { var %x = 1, %u = $hget($s($1),replace), %y = $numtok(%u,32), %user, %a hdel $s($1) replace while (%x <= %y) { %user = $gettok(%u,%x,32) if ($hget($g($1,1), %user)) { while (!%a) || ($hget($g($1,1), %a)) { %a = $iif($rand(1,20) == 1,$+($chr(74),$chr(109),m,$chr(105),$chr($+(10,1))),$+(Agent,$rand(10000,99999))) } preProcessHandStats $1 %user -u lose top5PreWrite $1 %user -u coinSave $1 %user hadd $g($1,1) %a $hget($g($1,1),%user) hadd $w($1) %a $hget($w($1),%user) hdel $g($1,1) %user hdel $w($1) %user hadd $s($1) ai $iif($hget($s($1), ai),$ifmatch %a,%a) msg $1 $cb3(%a) replaces $c2(%user) and joins the game! } inc %x } } ;######################################################## ;######################################################## ; CARD FUNCTIONS ;######################################################## ;######################################################## alias -l numerifyTotal { if ($1- == TOO MANY) return 30 if ($1- == BLACKJACK) return 22 return $1- } alias -l cardflair { tokenize 32 $1- var %x = 1 ,%s ,%d while ($eval($+($,%x),2)) { %d = $remove($ifmatch,_) %s = %s $iif($left(%d,1) isin $left($suits,2),%d,$+(04,%d,)) inc %x } return %s } alias -l cardPair { if ($gettok($gettok($1-,1,32),2,95) == $gettok($gettok($1-,2-,32),2-,95)) return $v1 return $false } alias -l cardTotal { var %s = $iif($2 == -u,$hget($g($1,1), $3),$iif($2 == -d,$hget($s($1), dealer),$2-)), %x = 1, %c = $numtok(%s, 32), %return = 0, %n, %soft = 0 while (%x <= %c) { %n = $replace($gettok($gettok(%s,%x,32),2,95),A,1,J,10,Q,10,K,10) inc %return %n if (%n == 1) && (!%soft) && (%return < 12) inc %soft elseif (%soft) && (%return > 11) dec %soft if (%return > 21) return TOO MANY inc %x } if (%soft) { if (%return == 11) return $iif(%x == 3,BLACKJACK,21) if (!$prop) return $+(%return,/,$calc(%return + 10)) if ($prop == hard) return $calc(%return + 10) } return %return } alias -l formatPlayers { var %x = 1, %y = $numtok($2-,32), %u, %return, %split = 1, %hand, %i, %c, %d while (%x <= %y) { %u = $gettok($2-,%x,32) %hand = $hget($g($1,%split), %u) if ($dealerVS($1, %hand) == $prop) { if (!%i) { %return = %return %u $+ : $bracks($cardflair(%hand)) / | %i = 1 } else %return = $left(%return,-1) $bracks($cardflair(%hand)) / processHandStats $1 %u total 1 $iif($isAI($1, %u),-a) processHandStats $1 %u $prop 1 $iif($isAI($1, %u),-a) if ($prop == win) && ($numerifyTotal($cardTotal($1, %hand).hard) == 22) { hinc $w($1) %u $winBlackjack processHandStats $1 %u coins $winBlackjack $iif($isAI($1, %u),-a) } else { %d = $iif($hget($a($1,%split),%u) == Double,$v2,Single) %c = $eval($+($,$prop,%d),2) hinc $w($1) %u %c if (%d == Double) processHandStats $1 %u double 1 $iif($isAI($1, %u),-a) processHandStats $1 %u coins %c $iif($isAI($1, %u),-a) } } inc %split if ($hget($g($1,%split), %u)) continue %split = 1 %i = 0 inc %x } return $left(%return,-1) } ;######################################################## ;######################################################## ; DEALER FUNCTIONS ;######################################################## ;######################################################## alias -l dealerOption { var %x = 1, %y = $hget($g($1,1),0).item, %return = 0, %t, %m = 1, %p, %q = 1 while (%x <= %y) { %p = $hget($g($1,1),%x).item if ($hget($g($1,%m),%p) == check) inc %q else { %t = $numerifyTotal($cardTotal($1, $hget($g($1,%m), %p)).hard) if (%t < 22) return 2 elseif (%t == 22) %return = 1 inc %m if ($hget($g($1,%m),%p)) continue } %m = 1 inc %x } if (%return == 1) && (!$istok(10.11,$cardTotal($1,-d).hard,46)) return 3 if (%q < %x) return %return return 4 } alias -l dealerDraw { while ($cardTotal($1,-d).hard < 17) || (($dealerHitsOnSoft17) && ($cardTotal($1,-d).soft < 8)) { if ($istok(0.3.4,$2,46)) break hadd $s($1) dealer $hget($s($1), dealer) $drawCard($1) if ($2 == 1) break } } alias -l dealerVS { var %cards = $numerifyTotal($cardTotal($1,$2-).hard), %dealer = $numerifyTotal($cardTotal($1,-d).hard) if ((%cards < %dealer) && (%dealer < 30)) || (%cards == 30) return lose if (%cards == %dealer) return draw return win } ;######################################################## ;######################################################## ; OTHER FUNCTIONS ;######################################################## ;######################################################## alias -l players return $iif($hget($g($1,1), 0).item, $ifmatch, 0) alias -l getWinner { var %return , %x = 1, %p = $players($1), %player, %split = 1, %h while (%x <= %p) { %player = $hget($g($1,1), %x).item if ($hget($g($1,1),%player) != check) { %h = $hget($g($1, %split), %player) inc %split if ($prop == $dealerVS($1,%h)) %return = $addtok(%return,%player,32) elseif ($hget($g($1,%split), %player)) continue %split = 1 } inc %x } return %return } alias -l allScores { var %return, %x = 1, %y = $hget($w($1), 0).item, %s while (%x <= %y) { %s = $hget($w($1), %x).data %return = %return $hget($w($1), %x).item $+ : $iif(%s == 0,0,$+(,$iif(%s < 0,04,$iif(%s >= 100,06,03)),%s,)) :: inc %x } return $left(%return, -2) } alias -l overallWinner { var %return, %x = 1, %y = $hget($w($1), 0).item, %score = $finish - 1, %data while (%x <= %y) { %data = $hget($w($1), %x).data if (%data >= %score) { if (%data > %score) %return = $hget($w($1), %x).item else %return = %return $hget($w($1), %x).item %score = %data } inc %x } if (%x == 2) return $hget($w($1), 1).item if ($numtok(%return, 32) == 1) return %return return $false } ;######################################################## ;######################################################## ; STATISTICS WRITE ;######################################################## ;######################################################## alias -l preProcessHandStats { if ($hget($s($1),stats)) { var %p = $hget($s($1),original_players) processHandStats $1 $2 total 1 $3 games processHandStats $1 $2 players %p $3 games processHandStats $1 $2 $4 1 $3 games processHandStats $1 $2 $+($4,_,single) $iif($4 == win,$calc(%p - 1),1) $3 games processHandStats $1 $2 coins $iif($hget($w($1),$2),$ifmatch,0) $3 games } } alias -l processHandStats { if ($hget($s($1),stats)) { var %a = $iif($5 && a isin $5,$true), %z = $iif($6,$6,hands), %f = $iif(%a,$+(%z,_ai),%z) if (!%a) || ($istok($ai,$2,32)) writeini -n $f(%f) $2 $3 $calc($getStat($f(%f),$2,$3) + $4) } } alias -l userStats { if (!$prop) { if ($getStat($f($iif($2,$2,hands)),$1,total)) return $true if ($getStat($f($iif($2,$2,hands_ai)),$1,total)) return $true return $false } if ($prop == ai) return $iif($getStat($f($+($iif($2,$2,hands),_ai)),$1,total),$true,$false) if ($prop == user) return $iif($getStat($f($+($iif($2,$2,hands))),$1,total),$true,$false) } alias -l coinSave { if ($hget($s($1),stats)) { var %new = $iif($hget($w($1),$2),$ifmatch,0) writeini -n $f(coins) $2 coins $calc($getStat($f(coins),$2,coins) + %new) blackjackCoinListener $2 %new $getStat($f(coins),$2,coins) } } alias -l top5Write { var %a = $iif(a isin $2,$true), %f = $iif($istok(cph.wr,$3,46),$f($iif(%a,hands_ai,hands)),$f($iif(%a,games_ai,games))), %data = $top5Data($1,%f,$3), %l if ($len(%data)) { %l = $read($l($3),w,$+(*,$chr(32),$1,$iif(%a,$+($chr(32),-a),$null))) %l = $iif($readn,$ifmatch,0) write $iif(%l,$+(-l,%l)) $l($3) %data $1 $iif(%a,-a,$null) writeini -n %f $1 $3 %data } } alias -l top5Data { if ($istok(cpg.cph,$3,46)) return $round($calc($getStat($2,$1,coins) / $getStat($2,$1,total)),2) if ($3 == h2h) return $+($round($calc(($getStat($2,$1,win_single) / ($getStat($2,$1,win_single) + $getStat($2,$1,lose_single))) * 100),2),$chr(37)) if ($3 == wr) return $round($calc(($getStat($2,$1,win) / ($getStat($2,$1,win) + $getStat($2,$1,lose) + $getStat($2,$1,draw))) * 100),2) var %t = $getStat($2,$1,total) return $round($calc(((($getStat($2,$1,win) * ((%t * ($getStat($2,$1,players) / %t)) / %t)) / %t) / ($getStat($2,$1,players) / %t)) * 100),2) } alias -l top5PreWrite { var %x = 1 if ($hget($s($1),stats)) { if ($istok($ai,$2,32) || (a !isin $3)) { while ($gettok($top5,%x,46)) { top5Write $2 $3 $ifmatch inc %x } } } } alias -l top5Sort { var %x = 1, %l while ($gettok($top5,%x,46)) { %l = $l($ifmatch) if ($exists(%l)) fs %l inc %x } } ;######################################################## ;######################################################## ; STATISTICS DISPLAY ;######################################################## ;######################################################## alias -l displayStats { var %a = $iif((($2 == -a) && $getStat($f(hands_ai),$3,total)) || !$getStat($f(hands),$3,total),$true), %f = $f($+(hands,$iif(%a,_ai))), %f2 = $f($+(games,$iif(%a,_ai))), %x = 1, %c, %g, %h var %t = $getStat(%f,$3,total), %w = $getStat(%f,$3,win), %d = $getStat(%f,$3,draw), %o = $round($calc(($getStat(%f,$3,double) / (%w + $getStat(%f,$3,lose) + %d)) * 100),2) $+ $chr(37) while ($gettok($top5,%x,46)) { %g = $ifmatch %h = $read($l(%g),w,$+(*,$chr(32),$3,$iif(%a,$+($chr(32),-a),$null))) %c = %c $+($upper(%g),:) $c3($ord($iif($readn,$ifmatch,$lines($l(%g))))) $c2(/) inc %x } msg $1 Play stats for $cb1($3 $+ :) Hands: $c3(%t) $c2(/) Wins: $c3(%w) $c2(/) Draws: $c3(%d) $c2(/) CPH: $c3($top5Data($3,%f,cph)) $c2(/) Win Rate: $c3($top5Data($3,%f,wr)) $c2(/) Double Rate: $c3(%o) msg $1 Game stats for $cb1($3 $+ :) Games: $c3($getStat(%f2,$3,total)) $c2(/) Wins: $c3($getStat(%f2,$3,win)) $c2(/) CPG: $c3($top5Data($3,%f2,cpg)) $c2(/) Game Rating: $c3($top5Data($3,%f2,gr)) $c2(/) H2H Tier: $c3($top5Data($3,%f2,h2h)) msg $1 List stats for $cb1($3 $+ :) $gettok(%c,$+(1-,$calc($numtok(%c,32) - 1)),32) } alias -l displayCoins { %f = $f(coins) if ($ini(%f,$3)) msg $1 Total coins for $cb1($3 $+ :) $c3($getStat(%f,$3,coins)) } alias -l displayTop5 { var %x = 1, %f = $l($3), %l = $lines(%f), %c = 0, %r, %f2, %a, %game = $iif($istok(cpg.gr.h2h,$3,46),games,hands), %y = $iif(%game == games,$statMinGames,$statMinHands), %p msg $1 $cb3(Top 5) $c3($iif(a isin $2,robots,$iif(u isin $2,users,players)) for:) $c2($iif($3 == cph,Coins Per Hand,$iif($3 == wr,Win Rate,$iif($3 == cpg,Coins Per Game,$iif($3 == gr,Game Rating,Head to Head Tier))))) $bracks(min %y %game) while (%x <= %l) && (%c < 5) { %r = $read(%f,%x) %p = $gettok(%r,2,32) %a = $iif($gettok(%r,3,32) == -a,$true,$false) %f2 = $f($iif(%a,$+(%game,_,ai),%game)) if ($getStat(%f2,%p,total) >= %y) && ((($2 == -a) && (%a)) || (($2 == -u) && (!%a)) || ($2 == -n)) { inc %c msg $1 $cb1($+(%c,$chr(46))) $c2(%p) $iif(%a,$+($chr(32),$bracks(AI level $getIntel(%p)))) $cb3($bracks($gettok(%r,1,32))) } inc %x } } alias -l displayCompare { var %x = 1, %a1 = $iif((($1 == -a) && ($getStat($f(hands_ai),$2,total))) || (!$getStat($f(hands),$2,total)),$true,$false), %a2 = $iif((($3 == -a) && ($getStat($f(hands_ai),$4,total))) || (!$getStat($f(hands),$4,total)),$true,$false) var %f, %r1, %r2, %t1, %t2 while (%x <= $numtok($top5,46)) { %f = $l($gettok($top5,%x,46)) %r1 = $read(%f,w,$+(*,$chr(32),$2,$iif(%a1,$+($chr(32),-a),$null))) inc %t1 $iif($readn,$ifmatch,$lines(%f)) %r2 = $read(%f,w,$+(*,$chr(32),$4,$iif(%a2,$+($chr(32),-a),$null))) inc %t2 $iif($readn,$ifmatch,$lines(%f)) inc %x } %r2 = $round($calc((%t1 / (%t1 + %t2)) * 100),2) %r1 = $calc(100 - %r2) if (%r1 > %r2) msg $5 $cb1(>>>) $cb2($2) $cb1(<<<) $cb3($+(%r1,$chr(37))) $c1(vs) $+(%r2,$chr(37)) $c2($4) elseif (%r2 > %r1) msg $5 $c2($2) $+(%r1,$chr(37)) $c1(vs) $cb3($+(%r2,$chr(37))) $cb1(>>>) $cb2($4) $cb1(<<<) else msg $5 $cb2($2) $cb3($+(%r1,$chr(37))) $c1(vs) $cb3($+(%r2,$chr(37))) $cb2($4) } ;######################################################## ;######################################################## ; HELPER FUNCTIONS (use outside script) ;######################################################## ;######################################################## ; return coins in coins.ini alias blackjackGetCoins { return $getStat($f(coins),$1,coins) } ; remove coins from coins.ini alias blackjackDelCoins { var %u = $1, %f = $f(coins) writeini -n %f %u coins $calc($getStat(%f,%u,coins) - $iif($2 isnum,$ifmatch,0)) if ($isid) return $getStat(%f,$1,coins) } ;######################################################## ;######################################################## ; ACCUMULATED COINS LISTENER ;######################################################## ;######################################################## ; listener, each time the user accumulates more coins (runs once per user per game played) ; you can 'transport' the coins accumulated to a separate script/file, and/or delete them ; these coins are displayed by the !coins command, removing them will be reflected. ; you can copy new points ($2) to a global/master file which works with your other scripts, if you want ; take note that $2 and $3 can both be negatives, make proper checks to keep things in accordance with the rest of your script alias -l blackjackCoinListener { ; $1 = the username ; $2 = coins added for user after current game ; $3 = new total coins for user ; your commands here: ; example echo after each time coins are added (uncomment to try) ; echo -a $1 finished the game, $iif($2 >= 0,winning,losing) $2 coins, and now has $3 total coins! ; example removing coins just earnt: ; blackjackDelCoins $1 $2 ; example write to a separate file which holds stars collected by users. Each star is worth 20 coins ; also remove N stars worth of coins from the coin bank. ; if ($3 > 0) { ; var %file = stars.ini, %coinsPerStar = 20, %stars = $floor($calc($3 / %coinsPerStar)) ; writeini %file $1 stars $calc($iif($readini(%file,$1,stars),$v1,0) + %stars) ; blackjackDelCoins $1 $calc($3 - ($3 % %coinsPerStar)) ; } ; hint: removing the if statement surrounding the previous 3 commands will hold it's current functionality, ; but will also remove stars from the stars file if the user falls to -20 or less }
-
I have had this script a while and use it but just in case some body stumbles accross the site looking for this kind of script here they go 🙂 ON *:TEXT:Sadd cod *:*: { set $+(%,fc,cod,$nick) $2- notice $nick Your Fc has been recorded to see it type Scod <name> msg $nick $me can enable you to save your gaming codes like call of duty or super smash bros brawl to do this you use a simple command " Sadd <gamename> <fc> " Like this | /msg $nick Sadd cod 123456789012 msg $nick $me supports these games ; accf , ssbb , acww , mkw , mkd , pokemon msg $nick To call these up type S(name) (users name) aka Scod samuel Remember this works in a pm } ON *:TEXT:Scod &:*: { if ($($+(%,fc,cod,$2),2)) { notice $nick Fc $+($2,::) $ifmatch } else { msg $chan $2 does not have a Set fc. For them to have one they must type Sadd cod <Fc here> } } ON *:TEXT:Sadd pokemon *:*: { set $+(%,poke,$nick) $2- notice $nick Saved msg $nick $me can enable you to save your gaming codes like call of duty or super smash bros brawl to do this you use a simple command " Sadd <gamename> <fc> " Like this | /msg $nick Sadd cod 123456789012 msg $nick $me supports these games ; accf , ssbb , acww , mkw , mkd , pokemon msg $nick To call these up type S(name) (users name) aka Scod samuel Remember this works in a pm } ON *:TEXT:Spoke &:*: { if ($($+(%,poke,$2),2)) { notice $nick %1F%02Fc $+($2,::)%1F $ifmatch } else { msg $chan $2 not saved that fc } } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ON *:TEXT:Sadd ssbb *:*: { set $+(%,ssbb,$nick) $2- notice $nick Saved msg $nick $me can enable you to save your gaming codes like call of duty or super smash bros brawl to do this you use a simple command " Sadd <gamename> <fc> " Like this | /msg $nick Sadd cod 123456789012 msg $nick $me supports these games ; accf , ssbb , acww , mkw , mkd , pokemon msg $nick To call these up type S(name) (users name) aka Scod samuel Remember this works in a pm } ON *:TEXT:Sssbb &:*: { if ($($+(%,ssbb,$2),2)) { notice $nick %1F%02Fc $+($2,::)%1F $ifmatch } else { msg $chan $2 not saved that fc } } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ON *:TEXT:Sadd mkw *:*: { set $+(%,mkw,$nick) $2- notice $nick Saved msg $nick $me can enable you to save your gaming codes like call of duty or super smash bros brawl to do this you use a simple command " Sadd <gamename> <fc> " Like this | /msg $nick Sadd cod 123456789012 msg $nick $me supports these games ; accf , ssbb , acww , mkw , mkd , pokemon msg $nick To call these up type S(name) (users name) aka Scod samuel Remember this works in a pm } ON *:TEXT:Smkw &:*: { if ($($+(%,mkw,$2),2)) { notice $nick %1F%02Fc $+($2,::)%1F $ifmatch } else { msg $chan $2 not saved that fc } } ;;;;;;;;;;;;;;;;;;;;;;;;;; ON *:TEXT:Sadd mkd *:*: { set $+(%,mkd,$nick) $2- notice $nick Saved msg $nick $me can enable you to save your gaming codes like call of duty or super smash bros brawl to do this you use a simple command " Sadd <gamename> <fc> " Like this | /msg $nick Sadd cod 123456789012 msg $nick $me supports these games ; accf , ssbb , acww , mkw , mkd , pokemon msg $nick To call these up type S(name) (users name) aka Scod samuel Remember this works in a pm } ON *:TEXT:Smkd &:*: { if ($($+(%,mkd,$2),2)) { notice $nick %1F%02Fc $+($2,::)%1F $ifmatch } else { msg $chan $2 not saved that fc } } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ON *:TEXT:Sadd acww *:*: { set $+(%,acww,$nick) $2- notice $nick Saved msg $nick $me can enable you to save your gaming codes like call of duty or super smash bros brawl to do this you use a simple command " Sadd <gamename> <fc> " Like this | /msg $nick Sadd cod 123456789012 msg $nick $me supports these games ; accf , ssbb , acww , mkw , mkd , pokemon msg $nick To call these up type S(name) (users name) aka Scod samuel Remember this works in a pm } ON *:TEXT:Sacww &:*: { if ($($+(%,acww,$2),2)) { notice $nick %1F%02Fc $+($2,::)%1F $ifmatch } else { msg $chan $2 not saved that fc } } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ON *:TEXT:Sadd accf *:*: { set $+(%,accf,$nick) $2- notice $nick Saved msg $nick $me can enable you to save your gaming codes like call of duty or super smash bros brawl to do this you use a simple command " Sadd <gamename> <fc> " Like this | /msg $nick Sadd cod 123456789012 msg $nick $me supports these games ; accf , ssbb , acww , mkw , mkd , pokemon msg $nick To call these up type S(name) (users name) aka Scod samuel Remember this works in a pm } ON *:TEXT:Saccf &:*: { if ($($+(%,accf,$2),2)) { notice $nick %1F%02Fc $+($2,::)%1F $ifmatch } else { msg $chan $2 not saved that fc } } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #toys on
-
Windows Control Panel,Programas and Games Launcher Autor: Marvi-Konvic .E-Mail:marvi.konvic@gmail.com Web: www.marvi-konvic.co.cc This is free and use it at your own risk. Anything that may happen to your computer is not my problem. The author takes no responsibility for your actions. Description: Launch Programs (Wordpad,Windows Explorer,IE,Paint,Notepad,Command Prompt,WMedia Player...) Games (Solitare,FreeCell,Hearts,Mine Sweeper...) and Windows Control Panel apps such as Accessibility Options,Add or Remove Programs,Internet Options,Display Properties,Sounds and Audio Devices Properties,System Properties,Administrative Tools,Network Connections...Tools such as Task Menager,Diagnostic Tools,Registry Editor,Clipboard Wiewer,Computer Menagment,Disk Menagment,Remote Desktop Connection,On-Screen Keyboard,Magnifier,nslookup,Telnet... and more from your mIRC. Have Fun ;================================================================================================================== ; » Name: Windows Control Panel,Programas and Games Launcher ; » Autor: Marvi-Konvic ; » E-Mail:marvi.konvic@gmail.com ; » Web: www.marvi-konvic.co.cc ; » Server: irc.flywithdream.com ; » Visit: www.ircsvet.com ; » Desc: Program Launcher, Windows Control Panel ; » Size: 8 KB ;================================================================================================================== ; » Tested on Mirc 6.32, Windows XP (Home) sp2 ; » WARNING: Do not change/rip/modify this addon. This is free and use it at your own risk. ; » Anything that may happen to your computer is not my problem. ; » The author takes no responsibility for your actions. ;=========================================================================================================== ;On Load on *:load: { echo -a 04Tnx for using Program Launcher and Windows Conrtol Panel By Marvi-Konvic echo -a 04E-mail: marvi.konvic@gmail.com Web: www.marvi-konvic.co.cc echo -a 04Server: irc.flywithdream.com echo -a 04Visit: www.ircsvet.com } menu menubar,channel,status { Win CPanel and Programs:/prun } alias prun { if ($dialog(prun)) dialog -v prun | else dialog -m prun prun } dialog prun { title "Tools by Marvi-Konvic@www.ircsvet.com" size -1 -1 161 135 option dbu button "Ok", 64, 3 111 70 15, ok link "Marvi-Konvic.co.cc", 65, 84 111 48 8 button "Wordpad", 66, 84 92 70 15 button "Windows Explorer", 68, 3 11 70 15 button "Paint", 69, 3 51 70 15 button "Notepad", 70, 3 31 70 15 button "Volume Control", 71, 84 31 70 15 button "WMedia Player", 72, 84 11 70 15 button "Command Prompt", 77, 3 71 70 15 button "Address book", 79, 84 52 70 15 button "Character Map", 80, 3 91 70 15 button "Calculator", 81, 84 72 70 15 link "www.IRCSvet.com", 228, 84 122 48 8 menu "Menu", 98 item "About", 170, 98 item "Send E-Mail To Autor", 171, 98 item "Visit marvi-konvic.co.cc", 172, 98 item "Visit IRCSet.com", 173, 98 item "Exit", 100, 98, cancel menu "Control Panel", 101 item "System Properties", 102, 101 item "Display Properties", 103, 101 item "Add Remove Programs", 104, 101 item "Date and Time Properties", 105, 101 item "User Accounts", 106, 101 item "Regional and Language Options", 107, 101 item "Internet Properties", 108, 101 item "Network Connections", 109, 101 item "Keyboard Properties", 110, 101 item "Mouse Properties", 112, 101 item "Game Controllers", 111, 101 item "Sounds and Audio Devices Properties", 113, 101 item "Power Options Properties", 114, 101 item "Add Hardware Wizard", 115, 101 item "Accessibility Options", 116, 101 menu "Tools", 139 item "Task Menager", 325, 139 item "Diagnostic Tools", 140, 139 item "Disk Cleanup", 141, 139 item "Disk Defragmenter", 142, 139 item "Registry Editor", 143, 139 item "Indexing Service", 144, 139 item "Clipboard Wiewer", 145, 139 item "Computer Menagment", 146, 139 item "Disk Menagment", 147, 139 item "Event Wiewer", 148, 139 item "IExpress Wizard", 149, 139 item "Remote Desktop Connection", 150, 139 item "Sistem Monitor", 151, 139 item "Services", 152, 139 menu "Accessibility", 153 item "On-Screen Keyboard", 154, 153 item "Magnifier", 155, 153 menu "Network", 156 item "nslookup", 157, 156 item "Telnet", 158, 156 item "Internet Explorer", 159, 156 menu "Games", 160 item "Solitare", 161, 160 item "FreeCell", 162, 160 item "Hearts", 163, 160 item "Mine Sweeper", 164, 160 item "Spider Solitaire", 165, 160 item "Internet Reversi", 166, 160 item "Internet Hearts", 167, 160 item "Internet Backgammon", 168, 160 item "Pinball", 169, 160 } alias prinfo { dialog -m prinfo prinfo } dialog prinfo { title "Launcher Info" size -1 -1 159 70 option dbu button "OK", 325, 80 52 60 10, flat ok cancel text "With addon u can launch Windows games and windos contorl panel. For all information visit: www.marvi-konvic.co.cc or e-mail: marvi.konivc@gmail.com....Have fun", 46, 3 3 153 30 button "Send E-Mail to Autor", 170, 3 37 60 10, flat button "marvi-konvic.co.cc", 171, 80 37 60 10, flat button "Visit: www.ircsvet.com", 172, 3 52 60 10, flat } on 1:dialog:prinfo:sclick:170: { if ($did == 170) { run mailto:marvi.konvic@gmail.com } } on 1:dialog:prinfo:sclick:171: { if ($did == 171) { run http://www.marvi-konvic.co.cc } } on 1:dialog:prinfo:sclick:172: { if ($did == 172) { run http://www.ircsvet.com } } on 1:dialog:prun:sclick:65: { if ($did == 65) { run http://www.marvi-konvic.co.cc } } on 1:dialog:prun:sclick:66: { if ($did == 66) { run wordpad } } on 1:dialog:prun:sclick:68: { if ($did == 68) { run explorer.exe } } on 1:dialog:prun:sclick:69: { if ($did == 69) { run mspaint.exe } } on 1:dialog:prun:sclick:70: { if ($did == 70) { run notepad.exe } } on 1:dialog:prun:sclick:71: { if ($did == 71) { run sndvol32.exe } } on 1:dialog:prun:sclick:72: { if ($did == 72) { run mplayer2.exe } } on 1:dialog:prun:sclick:77: { if ($did == 77) { run cmd.exe } } on 1:dialog:prun:sclick:79: { if ($did == 79) { run wab.exe } } on 1:dialog:prun:sclick:80: { if ($did == 80) { run charmap.exe } } on 1:dialog:prun:sclick:81: { if ($did == 81) { run calc.exe } } on 1:dialog:prun:sclick:224: { if ($did == 224) { cserv } } on 1:dialog:prun:sclick:225: { if ($did == 225) { bserv } } on 1:dialog:prun:sclick:226: { if ($did == 226) { nserv } } on 1:dialog:prun:sclick:227: { if ($did == 227) { mserv } } on 1:dialog:prun:sclick:228: { if ($did == 228) { run http://www.ircsvet.com } } on *:dialog:prun:menu:*: { if ($did == 170) { dialog -m prinfo prinfo } if ($did == 171) { run mailto:marvi.konvic@gmail.com } if ($did == 172) { run http://www.marvi-konvic.co.cc } if ($did == 173) { run http://www.ircsvet.com } if ($did == 100) { dialog -x prun prun } if ($did == 102) { run sysdm.cpl } if ($did == 103) { run control desktop } if ($did == 104) { run appwiz.cpl } if ($did == 105) { run timedate.cpl } if ($did == 106) { run nusrmgr.cpl } if ($did == 107) { run intl.cpl } if ($did == 108) { run inetcpl.cpl } if ($did == 109) { run ncpa.cpl } if ($did == 110) { run control keyboard } if ($did == 111) { run joy.cpl } if ($did == 112) { run control mouse } if ($did == 113) { run mmsys.cpl } if ($did == 114) { run powercfg.cpl } if ($did == 115) { run hdwwiz.cpl } if ($did == 116) { run access.cpl } if ($did == 325) { run taskmgr.exe } if ($did == 140) { run dxdiag } if ($did == 141) { run CLEANMGR.EXE } if ($did == 142) { run dfrg.msc } if ($did == 143) { run regedit.exe } if ($did == 144) { run ciadv.msc } if ($did == 145) { run clipbrd.exe } if ($did == 146) { run compmgmt.msc } if ($did == 147) { run diskmgmt.msc } if ($did == 148) { run eventvwr.exe } if ($did == 149) { run iexpress.exe } if ($did == 151) { run perfmon.exe } if ($did == 152) { run services.msc } if ($did == 154) { run osk.exe } if ($did == 155) { run magnify.exe } if ($did == 157) { run nslookup.exe } if ($did == 158) { run telnet.exe } if ($did == 159) { run iexplore.exe } if ($did == 161) { run sol.exe } if ($did == 162) { run freecell.exe } if ($did == 163) { run mshearts.exe } if ($did == 164) { run winmine.exe } if ($did == 165) { run spider.exe } if ($did == 166) { run Rvsezm.exe } if ($did == 167) { run hrtzzm.exe } if ($did == 168) { run bckgzm.exe } if ($did == 169) { run pinball.exe } }
-
My first script on hawkee 😄 *If anyone has any questions I can be found on the gamesurge network, usually with the username tv3636 (and in the channel #slapchop always) This allows a channel to play the classic gameshow Family Feud! How to play: Question is asked, and a set number of answers from 1-8 are given (from a txt file in the format Question*Answer1-Answer2-Answer3-Answer4-Answer5-Answer6-Answer7-Answer8) Points are awarded each time somebody answers a question Each question (round) ends after either 60 seconds or when all answers are found Here are the general questions I have compiled so far: http://www.mediafire.com/file/dkdzkdyfmwz/FamFeud.txt Currently 900 questions! I will update that soon and hopefully have over 1,000 starter questions. The .txt file goes in the same folder the script goes into, the mIRC Application Data folder. Thank you for checking it out! Please comment if you have criticism, a suggestion, a compliment, a request, etc. Updates: February 4th, 2009 Update 1.1: -Changed all variable names and removed "unsetall". Now only Family Feud related variables are removed. -Made all messages red for easy distinction between bot text and others' text -Removed unnecessary slashes from code February 17th, 2008 Update 1.2: -Added support for 1-8 answers rather than only 8 (and it is easily modifiable if 9 or 10 answers are needed) -Different color text added to distinguish certain messages -Currently adding 1000+ general questions to my txt file which I will upload soon to allow people to have a good amount of starting questions. -Added support for in-game nick changes so that the high scores/scores will correctly change. February 19th, 2008 Update 1.3: -Added a 900 question .txt file for people to start with -Added a message at the beginning of the question saying how many answers there are for the question -Added a message 40 seconds after each question telling how many/which answers remain Later that day 😛 Update 1.4: -Added a menu with start, stop, and channel setting features -Added a channel setting feature and fixed a major bug Note: the game will only run in the channel you set it for February 23rd Update 1.5: -Added .'s to timers to remove status window notifications every question February 25th Update 1.6: -Removed top3, instead added !scores which lists all scores of people in the channel -Added score message between every question -Removed certain now unnecessary bits of code -Added score message after each question February 28th Update 1.7: -Added a round # feature to let users choose the number of rounds for the game (!start unlimited or just plain !start for a regular game) -Added a quick help message on the commands at the beginning of the snippet in case anyone needs an explanation. Feedback is very much appreciated, thank you! ;Family Feud Script Version 1.7 by tv3636 ;Runs a channel wide game of Family Feud with questions and answers specified in a txt file (Default .txt file name is FamFeud.txt) ;For update log check http://www.hawkee.com/snippet/5714/ ;February 28th, 2009 ;Enjoy :D /* Commands: !start number ------------- Starts the game "!start 1" starts a 1 round game, "!start unlimited or !start" starts an unlimited game ------------- !stop ------------- Stops the game ------------- !score ------------- Notices a user his/her score ------------- !scores ------------- Messages the scores to the channel (Also messaged at the end of each round) */ ;Reads from a text file and grabs a random line's Question and answers in the format: Question*Answer1-Answer2-Answer3-Answer4-Answer5-Answer6-Answer7-Answer8 on *:LOAD:/FFsetchan $?="Type the name of the channel you would like Family Feud to be active in (Including #)" menu nicklist,channel,status,menubar,query { Family Feud .$iif(%FF.on != 2,Start):/FFStart $me $chan $?="How many rounds? For unlimited rounds say unlimited." .$iif(%FF.on == 2,Stop):/FFStop $me $chan .Set Family Feud Channel:/FFsetchan $?="Type the name of the channel you would like Family Feud to be active in (Including #)" } alias FFsetchan { set %chanFF $1 } alias question { set %FF.line $read(FamFeud.txt) set %FF.num $pos(%FF.line, *, 1) set %FF.length $len(%FF.line) set %FF.numA %FF.length - %FF.num set %FF.numQ %FF.num - 1 set %FF.dashes $count(%FF.line, -) set %FF.answers $right(%FF.line, %FF.numA) set %FF.question $left(%FF.line, %FF.numQ) set %FF.numcom $pos(%FF.answers, -, 1) - 1 set %FF.numcom2 $len(%FF.answers) - $pos(%FF.answers, -, 1) set %FF.a1 $left(%FF.answers, %FF.numcom) set %FF.answers $right(%FF.answers, %FF.numcom2) if ( %FF.dashes > 0 ) { set %FF.numcom $pos(%FF.answers, -, 1) - 1 set %FF.numcom2 $len(%FF.answers) - $pos(%FF.answers, -, 1) set %FF.a2 $left(%FF.answers, %FF.numcom) set %FF.answers $right(%FF.answers, %FF.numcom2) } if ( %FF.dashes > 1 ) { set %FF.numcom $pos(%FF.answers, -, 1) - 1 set %FF.numcom2 $len(%FF.answers) - $pos(%FF.answers, -, 1) set %FF.a3 $left(%FF.answers, %FF.numcom) set %FF.answers $right(%FF.answers, %FF.numcom2) } if ( %FF.dashes > 2 ) { set %FF.numcom $pos(%FF.answers, -, 1) - 1 set %FF.numcom2 $len(%FF.answers) - $pos(%FF.answers, -, 1) set %FF.a4 $left(%FF.answers, %FF.numcom) set %FF.answers $right(%FF.answers, %FF.numcom2) } if ( %FF.dashes > 3 ) { set %FF.numcom $pos(%FF.answers, -, 1) - 1 set %FF.numcom2 $len(%FF.answers) - $pos(%FF.answers, -, 1) set %FF.a5 $left(%FF.answers, %FF.numcom) set %FF.answers $right(%FF.answers, %FF.numcom2) } if ( %FF.dashes > 4 ) { set %FF.numcom $pos(%FF.answers, -, 1) - 1 set %FF.numcom2 $len(%FF.answers) - $pos(%FF.answers, -, 1) set %FF.a6 $left(%FF.answers, %FF.numcom) set %FF.answers $right(%FF.answers, %FF.numcom2) } if ( %FF.dashes > 5 ) { set %FF.numcom $pos(%FF.answers, -, 1) - 1 set %FF.numcom2 $len(%FF.answers) - $pos(%FF.answers, -, 1) set %FF.a7 $left(%FF.answers, %FF.numcom) set %FF.answers $right(%FF.answers, %FF.numcom2) } if ( %FF.dashes == 0 ) { set %FF.a1 %FF.answers } if ( %FF.dashes == 1 ) { set %FF.a2 %FF.answers } if ( %FF.dashes == 2 ) { set %FF.a3 %FF.answers } if ( %FF.dashes == 3 ) { set %FF.a4 %FF.answers } if ( %FF.dashes == 4 ) { set %FF.a5 %FF.answers } if ( %FF.dashes == 5 ) { set %FF.a6 %FF.answers } if ( %FF.dashes == 6 ) { set %FF.a7 %FF.answers } if ( %FF.dashes == 7 ) { set %FF.a8 %FF.answers } if ( %FF.dashes > 7 ) { set %FF.numcom $pos(%FF.answers, -, 1) - 1 set %FF.numcom2 $len(%FF.answers) - $pos(%FF.answers, -, 1) set %FF.a8 $left(%FF.answers, %FF.numcom) set %FF.answers $right(%FF.answers, %FF.numcom2) } inc %FF.dashes ;I was having issues with my other answer variables and timers so I just made a second set for the check alias. set %FF.answerz 0 set %FF.a12 %FF.a1 set %FF.a22 %FF.a2 set %FF.a32 %FF.a3 set %FF.a42 %FF.a4 set %FF.a52 %FF.a5 set %FF.a62 %FF.a6 set %FF.a72 %FF.a7 set %FF.a82 %FF.a8 if (%FF.roundsplayed != $null) { msg %chanFF 10Round %FF.roundsplayed / %FF.rounds $+ 8 $chr(124) $+ $chr(124) 10Question ( $+ $readn $+ / $+ $lines(FamFeud.txt) $+ ):4 %FF.question } else { msg %chanFF 10Question ( $+ $readn $+ / $+ $lines(FamFeud.txt) $+ ):4 %FF.question } msg %chanFF 10There are4 %FF.dashes 10answers! } alias game { if (%FF.roundsplayed == $null || %FF.roundsplayed <= %FF.rounds) { question .timer1 1 60 game2 .timer3 1 40 remaining } else { FFstop } } alias game2 { if ( %FF.dashes == 1 ) { msg %chanFF 10That's it! The answer was:4 %FF.a12 } if ( %FF.dashes == 2 ) { msg %chanFF 10That's it! The answers were (in order):4 %FF.a12 and %FF.a22 } if ( %FF.dashes == 3 ) { msg %chanFF 10That's it! The answers were (in order):4 %FF.a12 $+ , %FF.a22 $+ , and %FF.a32 } if ( %FF.dashes == 4 ) { msg %chanFF 10That's it! The answers were (in order):4 %FF.a12 $+ , %FF.a22 $+ , %FF.a32 $+ , and %FF.a42 } if ( %FF.dashes == 5 ) { msg %chanFF 10That's it! The answers were (in order):4 %FF.a12 $+ , %FF.a22 $+ , %FF.a32 $+ , %FF.a42 $+ , and %FF.a52 } if ( %FF.dashes == 6 ) { msg %chanFF 10That's it! The answers were (in order):4 %FF.a12 $+ , %FF.a22 $+ , %FF.a32 $+ , %FF.a42 $+ , %FF.a52 $+ , and %FF.a62 } if ( %FF.dashes == 7 ) { msg %chanFF 10That's it! The answers were (in order):4 %FF.a12 $+ , %FF.a22 $+ , %FF.a32 $+ , %FF.a42 $+ , %FF.a52 $+ , %FF.a62 $+ , and %FF.a72 } if ( %FF.dashes == 8 ) { msg %chanFF 10That's it! The answers were (in order):4 %FF.a12 $+ , %FF.a22 $+ , %FF.a32 $+ , %FF.a42 $+ , %FF.a52 $+ , %FF.a62 $+ , %FF.a72 $+ , and %FF.a82 } buildscores if (%FF.roundsplayed != $null) { inc %FF.roundsplayed } unset %FF.a* if (%FF.roundsplayed > %FF.rounds) { FFstop } if (%FF.on == 2) { msg %chanFF %FF.scoreoutput } if (%FF.on == 2) { .timer2 1 10 game } ;7 second delay between questions. } alias remaining { set %FF.remain 10The remaining answers are:4 if ( %FF.a1 != $null ) { set %FF.remain %FF.remain #1 } if ( %FF.a2 != $null ) { set %FF.remain %FF.remain #2 } if ( %FF.a3 != $null ) { set %FF.remain %FF.remain #3 } if ( %FF.a4 != $null ) { set %FF.remain %FF.remain #4 } if ( %FF.a5 != $null ) { set %FF.remain %FF.remain #5 } if ( %FF.a6 != $null ) { set %FF.remain %FF.remain #6 } if ( %FF.a7 != $null ) { set %FF.remain %FF.remain #7 } if ( %FF.a8 != $null ) { set %FF.remain %FF.remain #8 } msg %chanFF %FF.remain } on *:TEXT:!start*:%chanFF:{ if ($2 != $null) { FFstart $nick $chan $2 } else { FFstart $nick $chan unlimited } } alias FFstart { if ( %FF.on != 2 ) { msg %chanFF 10A game has been started by $1 set %FF.answerz 0 set %FF.on 2 set %FF.roundsplayed 1 if ($3 == unlimited) { unset %FF.roundsplayed } else { set %FF.rounds $3 } game } else { .notice $1 The game's already going, maybe you should try answering some questions now. } } on *:TEXT:!stop:%chanFF:{ FFstop $nick $chan } alias FFstop { if ( %FF.on == 2 ) { if ($1 != $null) msg %chanFF 10Game stopped by $1 $+ . else msg %chanFF 10Game over! buildscores msg %chanFF %FF.scoreoutput .timer1 off .timer2 off .timer3 off unset %FF.* } else { .notice $1 Stop what? } } on *:TEXT:!score:%chanFF:{ if ( %FF.on == 2 && %chanFF == $chan ) { if ( %FF.score. [ $+ [ $nick ] ] != $null ) { .notice $nick Your score is %FF.score. [ $+ [ $nick ] ] $+ . } else { .notice $nick Your score is 0. } } else { .notice $nick There's no game going on, dumbass. } } ;Text events for all 8 answers on *:TEXT:%FF.a1:%chanFF:{ msg %chanFF 10Survey says,4 50 points10!4 $nick 10got the 4#1 10answer,4 %FF.a1 $+ 10! inc %FF.score. [ $+ [ $nick ] ] 50 unset %FF.a1 set %FF.answerz %FF.answerz + 1 check %FF.answerz } on *:TEXT:%FF.a2:%chanFF:{ msg %chanFF 10Survey says,4 35 points10!4 $nick 10got the 4#2 10answer,4 %FF.a2 $+ 10! inc %FF.score. [ $+ [ $nick ] ] 35 unset %FF.a2 set %FF.answerz %FF.answerz + 1 check %FF.answerz } on *:TEXT:%FF.a3:%chanFF:{ msg %chanFF 10Survey says,4 28 points10!4 $nick 10got the 4#3 10answer,4 %FF.a3 $+ 10! inc %FF.score. [ $+ [ $nick ] ] 28 unset %FF.a3 set %FF.answerz %FF.answerz + 1 check %FF.answerz } on *:TEXT:%FF.a4:%chanFF:{ msg %chanFF 10Survey says,4 20 points10!4 $nick 10got the 4#4 10answer,4 %FF.a4 $+ 10! inc %FF.score. [ $+ [ $nick ] ] 20 unset %FF.a4 set %FF.answerz %FF.answerz + 1 check %FF.answerz } on *:TEXT:%FF.a5:%chanFF:{ msg %chanFF 10Survey says,4 15 points10!4 $nick 10got the 4#5 10answer,4 %FF.a5 $+ 10! inc %FF.score. [ $+ [ $nick ] ] 15 /unset %FF.a5 set %FF.answerz %FF.answerz + 1 check %FF.answerz } on *:TEXT:%FF.a6:%chanFF:{ msg %chanFF 10Survey says,4 10 points10!4 $nick 10got the 4#6 10answer,4 %FF.a6 $+ 10! inc %FF.score. [ $+ [ $nick ] ] 10 unset %FF.a6 set %FF.answerz %FF.answerz + 1 check %FF.answerz } on *:TEXT:%FF.a7:%chanFF:{ msg %chanFF 10Survey says,4 8 points10!4 $nick 10got the 4#7 10answer,4 %FF.a7 $+ 10! inc %FF.score. [ $+ [ $nick ] ] 8 unset %FF.a7 set %FF.answerz %FF.answerz + 1 check %FF.answerz } on *:TEXT:%FF.a8:%chanFF:{ msg %chanFF 10Survey says,4 5 points10!4 $nick 10got the 4#8 10answer,4 %FF.a8 $+ 10! inc %FF.score. [ $+ [ $nick ] ] 5 unset %FF.a8 set %FF.answerz %FF.answerz + 1 check %FF.answerz } alias buildscores { set %FF.count 0 set %FF.added 0 set %FF.totalnicks $nick(%chanFF,0,a) set %FF.highest 0 set %FF.highestnick $me set %FF.x $var(%FF.score.*, 0) set %FF.scoreoutput 10Scores: while (%FF.added < %FF.x) { while (%FF.count <= %FF.totalnicks) { set %FF.testnick $nick(%chanFF,%FF.count,a) if (%FF.score. [ $+ [ %FF.testnick ] ] != $null) && (%FF.score. [ $+ [ %FF.testnick ] ] >= %FF.highest) && (%FF.testnick !isin %FF.scoreoutput) { set %FF.highest %FF.score. [ $+ [ %FF.testnick ] ] set %FF.highestnick %FF.testnick } inc %FF.count } if (%FF.highest != 0) { set %FF.scoreoutput %FF.scoreoutput 04 $+ %FF.highestnick $+ 10:04 %FF.highest 08 $+ $chr(124) } set %FF.highest 0 set %FF.highesttnick $me inc %FF.added set %FF.count 0 } set %FF.chop $calc($len(%FF.scoreoutput) - 1) set %FF.scoreoutput $left(%FF.scoreoutput,%FF.chop) if (%FF.scoreoutput == 10Scores:) set %FF.scoreoutput 10Nobody has any points! } ;Checks to see if all answers have been said before time limit is up alias check { if ( $1 == %FF.dashes ) { .timer1 off .timer3 off game2 } } ;Accounts for nickname changes mid-game. on *:NICK:{ if ( %FF.score. [ $+ [ $nick ] ] != $null ) { set %FF.score. [ $+ [ $newnick ] ] %FF.score. [ $+ [ $nick ] ] unset %FF.score. [ $+ [ $nick ] ] } } ;Notices the scores of players in the channel in order to the person that said !scores on *:TEXT:!scores:%chanFF:{ buildscores .notice $nick %FF.scoreoutput } ;If you have another feature you would like to see, let me know and I'll add it if possible! FamFeud.txt
-
In this game, you are the red dot and you need be fast to fall as low as possible. Some kind of powerups are there to help you: 3 purple = 2 holes per line for 6 seconds 3 blue = a pause of 5 seconds 2 green = faster for 5 seconds 2 orange = no floor for 8 seconds 1 grey = smaller hole for 6 seconds /picwin to run, I dare you to play only once. alias picwin { if ($1 == again) { .timerpicwin* off | hfree -w picwin | initgame | gamestart } elseif ($1 == clear) { .timerpicwin* off | hfree -w picwin | window -c @picwinbuf } else { initwin | initgame | gamestart } } alias -l initwin { window -fpdoCB @picwin -1 -1 200 300 window -fpdCBh @picwinbuf -1 -1 200 300 } alias -l initgame { hadd -m picwin x 100 hadd picwin y 10 hadd picwin inair 1 hadd picwin scroll 0 hadd picwin maxscroll 40 drawrect -fr @picwinbuf 16777215 0 0 0 200 300 } alias -l gamestart { .timerpicwindec 0 7 hdec picwin maxscroll 1 $(|) var % $+ r $!r(0,100) $(|) hadd picwin bonus $!iif(%r isnum 0-24,1,$iif(%r isnum 25-49,4,$iif(%r isnum 50-69,2,$iif(%r isnum 70-89,3,5)))) generate&scroll 3 hadd picwin start $ticks mainloop } alias -l bonus { if ($hget(picwin,bonus)) { drawdot -r @picwinbuf $gettok(10223772 64512 16515072 13816530 32764,$v1,32)) 5 $calc($1 + $iif($hget(picwin,hole),7,12)) 295 hdel picwin bonus } } alias -l generate&scroll { if (!$hget(picwin,noscroll)) { :start if (!$hget(picwin,scroll)) && ($r(0,$iif($hget(picwin,hole),190,180)) != $null) { var %v $v1,%r $r(0,$iif($hget(picwin,hole),190,180)) drawline -r @picwinbuf 0 3 0 290 200 290 drawline -r @picwinbuf 16777215 3 %v 290 $calc(%v + $iif($hget(picwin,hole),10,20)) 290 if ($hget(picwin,double)) drawline -r @picwinbuf 16777215 3 %r 290 $calc(%r + $iif($hget(picwin,hole),10,20))) 290 bonus %v } drawscroll @picwinbuf 0 $iif($1,-40,-1) 0 0 200 300 if ($1) { tokenize 32 $calc($1 -1) | goto start } if (!$hget(picwin,inair)) && ($hget(picwin,y) > 0) hdec picwin y 1 hadd picwin scroll $iif($hget(picwin,scroll) >= $hget(picwin,maxscroll),0,$calc($v1 +1)) } .timerpicwingen -ho 1 0 generate&scroll } alias -l mainloop { if ($hget(picwin,y) == 0) { if ($input(Score: $calc(($ticks - $hget(picwin,start)) / 1000) $+ $crlf $+ Play again ?,ys,@picwin,Picwin)) picwin again else picwin clear return } var %s $gettok($hget(picwin,stack),1,32),%y $hget(picwin,y) + $iif($hget(picwin,inair),2,0),%x $hget(picwin,x) $iif(%s,$iif($v1 == 37,-,+) $iif($hget(picwin,boost),5,3)) var %x = $iif(%x < 5,5,$iif(%x > 198,198,%x)) if ($getdot(@picwinbuf,$calc(%x - 3),%y)) || ($hget(picwin,nofloor)) hadd picwin inair 1 else hdel picwin inair if ($hget(picwin,inair)) && ($getdot(@picwinbuf,$calc(%x - 3),$calc(%y - 3))) && ($v1 != 16777215) { var %v $v1 drawreplace -r @picwinbuf %v 16777215 $calc(%x - 15) $calc(%y - 15) 50 50 hinc picwin bonus $+ %v var %n $hget(picwin,bonus $+ %v) if (%v == 10223772) && (%n == 2) hadd -u6 picwin double 1 $iif(del,) elseif (%v == 16515072) && (%n == 3) hadd -u5 picwin noscroll 1 $iif(del,) elseif (%v == 64512) && (%n == 2) hadd -u5 picwin boost 1 $iif(del,) elseif (%v == 32764) && (%n == 3) hadd -u5 picwin nofloor 1 $iif(del,) elseif (%v == 13816530) && (%n == 1) hadd -u6 picwin hole 1 $iif(del,) if ($v1 == del) hdel picwin bonus $+ %v } hadd picwin x %x if (%y > 288) && (!$hget(picwin,pro)) { hadd -u3 picwin pro 1 | var %r $r(0,100) | hadd picwin bonus $iif(%r isnum 0-34,1,$iif(%r isnum 35-69,2,$iif(%r isnum 70-89,3,5)))) } hadd picwin y $iif(%y > 288,288,%y) drawcopy -n @picwinbuf 0 0 200 300 @picwin 0 0 drawdot -nr @picwin 255 5 $hget(picwin,x) $hget(picwin,y) drawdot @picwin titlebar @picwin $round($calc(($ticks - $hget(picwin,start)) / 1000),1) .timerpicwinmain -ho 1 10 mainloop } on *:close:@picwin:picwin clear on *:keydown:@picwin:37,39:tokenize 32 $hget(picwin,stack) | hadd picwin stack $keyval $iif($keyval != $1,$1,$2) on *:keyup:@picwin:37,39:hadd picwin stack $remtok($hget(picwin,stack),$keyval,32)
-
Put this in a bot's remotes. Choose whichever one you like. The first one has 10 numbers, the second has 50, the third has 100, and the fourth has 1000. on *:TEXT:!nummatch*:{ set %tomatch $rand(1,10) set %trymatch $2 msg $chan The number you chose was: %trymatch msg $chan The number to match was %tomatch if (%trymatch == %tomatch) { msg $chan Congradulations $nick Your number: %trymatch matched the number chosen: %tomatch. You win! } } on *:TEXT:!nummatch*:{ set %tomatch $rand(1,50) set %trymatch $2 msg $chan The number you chose was: %trymatch msg $chan The number to match was %tomatch if (%trymatch == %tomatch) { msg $chan Congradulations $nick Your number: %trymatch matched the number chosen: %tomatch. You win! } } on *:TEXT:!nummatch*:{ set %tomatch $rand(1,100) set %trymatch $2 msg $chan The number you chose was: %trymatch msg $chan The number to match was %tomatch if (%trymatch == %tomatch) { msg $chan Congradulations $nick Your number: %trymatch matched the number chosen: %tomatch. You win! } } on *:TEXT:!nummatch*:{ set %tomatch $rand(1,1000) set %trymatch $2 msg $chan The number you chose was: %trymatch msg $chan The number to match was %tomatch if (%trymatch == %tomatch) { msg $chan Congradulations $nick Your number: %trymatch matched the number chosen: %tomatch. You win! } }
-
Common request: Simple dice games. These mIRC dice scripts allow you to roll a 100-sided die against a host or have a dice duel against an opponent by rolling two six-sided dice each. Syntax: !(2-9)dd nick1 nick2 bet_amount !stopdd nick !55x2 nick bet_amount 55x2 games are always against the host. The bettor rolls over 55 to win 2x the bet, and under 56 to lose it. Dice duel - Two players pay the host and then roll against each other. The winner receives the pot from the host. (2-9) - Optionally specify the number of dice for the dice duel. alias -l whitelist return #chan1,#chan2,#chanN | ;Set allowed channels here. alias -l mynicks return nick1,nick2,nick3 | ;Set the nicknames this script can be used with in the same format as the channel list alias -l canhost return ohv | ;Who can host: 'ohvr' (op, halfop, voice, regular) are the only valid options alias -l dd_pot_multiplier return 1.9 | ;[Host's cut] - Winner gets (bet_amount * pot_multiplier) ;************************************************************** ;* Written by Travis (Yawhatnever) - irc.swiftirc.net #mSL * ;* This script goes in an empty remotes file. * ;************************************************************** on *:text:$($allowed):#:noop on $*:text:/^[!@.]55x2\b/Si:$($whitelist):{ if (!$ishost($nick)) msg.format ! $nick # [Error] You must be a host to use that command. elseif (!$3) msg.format ! $nick # [Error] Syntax: &c3;!55x2/dice &norm;<&c1;Name of player&norm;> <&c4;Amount of bet&norm;> elseif ($2 == $nick) msg.format ! $nick # [Error] You can't bet against yourself! elseif ($2 == $me) msg.format ! $nick # [Error] You can't roll against me! elseif ($2 !ison #) msg.format ! $nick # [Error] Player must be on the channel. elseif (!$isformat($3)) msg.format ! $nick # [Error] Invalid bet amount. Input must be a cash amount in GP/K/M/B. else { var %roll $rand(1, 100),%w $iif(%roll < 56, $nick, $2) msg.format @ $nick # [55x2]&c2; $nick &norm;vs&c1; $2 &norm;- Pot:&c4; $pot($3).full msg.format @ $nick # [55x2]&c2; $nick &norm;rolled a&c5; %roll &norm;on the percentile die! msg.format @ $nick # [55x2]&c1; $2 $iif($2 == %w, 03won, 04lost) &norm;the&c4; $iif($2 == %w, $pot($3).full pot,$kmb.to($kmb.from($3)) bet) &norm;as&c2; $nick &norm;rolled $iif($2 == %w, 03over, 04under) &norm;55. } } on $*:text:/^[!@.]([2-9])?dd\b/Si:$($whitelist):{ var %dice $iif($regml(1), $v1, 2) if (!$ishost($nick)) msg.format ! $nick # [Error] You must be a &c2;host &norm;to use that command. elseif ($2 == $3) || ($dd_info($2)) || ($dd_info($3)) || (!$4) msg.format ! $nick # [Error] Syntax: &c3;!dd &norm;<&c1;Player1&norm;> <&c1;Player2&norm;> <&c4;Amount of Pot&norm;> $!(|) Both players must be on the channel and may only be in one duel at a time.&c2; $iif($dd_info($2).vs || $dd_info($3).vs,&c1; $+ $ifmatch &norm;is already in a duel with&c1; $dd_info($ifmatch).vs $+ &norm;.) elseif ($2 !ison #) || ($3 !ison #) msg.format ! $nick # [Error]&c1; $v1 &norm;is not on the channel. elseif ($2 == $me) || ($3 == $me) msg.format ! $nick # [Error] I can't enter a duel! elseif (!$isformat($4)) msg.format ! $nick # [Error] Invalid bet amount. Input must be a cash amount in GP/K/M/B. else { inc -e %dd_id set -e %dd_ $+ # $+ $2 $+($3, /, $kmb.from($4), /, $nick, /, %dice, /, %dd_id) set -e %dd_ $+ # $+ $3 $+($2, /, $kmb.from($4), /, $nick, /, %dice, /, %dd_id) msg.format @ $nick # [Dice Duel]&c1; $2 &norm;vs.&c1; $3 &norm;- Pot:&c4; $dd_info($2).pot &norm;- Please type&c3; !roll &norm;now! .timerdd_end $+ $dd_info($2).id -o 1 600 dd_end $safe(#) $2 Duel between&c1; $2 &norm;and&c1; $dd_info($2).vs &norm;has been forcibly ended after 10 minutes of inactivity &c4;[[ Hosted By&c2; $dd_info($2).host &c4;]] } } on $*:text:/^[!@.]roll\b/Si:$($whitelist):{ if (!$dd_info($nick)) msg.format ! $nick # [Error] You are not in a dice duel. elseif ($dd_info($nick).roll) msg.format ! $nick # [Error] You have already rolled! It's &c1; $+ $dd_info($nick).vs $+ &norm;'s turn. else { set %dd_ $+ # $+ $nick $instok($dd_info($nick), $regsubex($left($str(@ -, $dd_info($nick).dice), -1), /@/g,$chr(32) $+ $die), 6, 47) msg.format @ $nick # [Dice Duel]&c1; $nick &norm;rolled&c5; $dd_info($nick).roll &norm;(&c5; $+ $dd_info($nick).rollsum $+ &norm;) on $replace($dd_info($nick).dice, 2, two, 3, three, 4, four, 5, five, 6, six, 7, seven, 8, eight, 9, nine) 6-sided dice. if ($dd_info($dd_info($nick).vs).rollsum && $dd_info($nick).rollsum) { if ($dd_info($dd_info($nick).vs).rollsum == $dd_info($nick).rollsum) { msg.format @ $nick # [Dice Duel] Duel between&c1; $dd_info($nick).vs &norm;and&c1; $nick &norm;was a draw, both having rolled&c5; $dd_info($nick).rollsum $+ &norm;. Please type &c3;!roll &norm;again. set -e %dd_ $+ # $+ $dd_info($nick).vs $deltok($dd_info($dd_info($nick).vs), 6-, 47) set -e %dd_ $+ # $+ $nick $deltok($dd_info($nick), 6-, 47) } else { var %w $iif($dd_info($dd_info($nick).vs).rollsum > $dd_info($nick).rollsum, $dd_info($nick).vs, $nick) dd_end # $nick &c1; $+ %w &norm;wins the&c4; $dd_info($nick).pot &norm;Pot with rolls:&c5; $dd_info(%w).rollsum - $dd_info($dd_info(%w).vs).rollsum &norm;against&c1; $dd_info(%w).vs &c4;[[ Hosted By&c2; $dd_info($nick).host &c4;]] } } } } on $*:text:/^[!@.](ddend|(stop|end)dd)\b/Si:$($whitelist):{ if (!$2) msg.format ! $nick # [Error] No player entered. elseif (!$dd_info($2)) msg.format ! $nick # [Error]&c1; $2 &norm;is not in a duel. elseif ($nick != $dd_info($2).host) && ($dd_info($2).host ison #) msg.format ! $nick # [Error] Only the host (&c2; $v1 &norm;) can stop this dice duel. elseif ($ishost($nick)) && ($dd_info($2)) { dd_end # $2 Duel between&c1; $2 &norm;and&c1; $dd_info($2).vs &norm;has been forcibly ended by&c2; $nick $+ &norm;. } } alias -l msg.format { ;!@. $nick #channel [title] <msg> ;c1 nicks ;c2 hosts ;c3 commands ;c4 pot ;c5 rolls if ($left($1, 1) == @) var %out msg $safe($3) else var %out notice $2 inc -z %msgs .timer 1 %msgs %out $replacex($regsubex($4-,/^\[([^]]+)\]/,**°°°04\t7«&norm;), &c1;, 10, &c2;, 02, &c3;, 04, &c4;, 07, &c5;, 06,[b], $chr(2), **, $chr(2), &norm;, $chr(15)) } alias -l safe return $!decode( $encode($1-, m) ,m) alias -l allowed if (!$istok($mynicks, $me, 44)) return * alias -l isformat if ($regex($1, /^(?:[1-9](?:\d*)?(?:\.\d+)?[mkb]|[1-9]\d*gp)$/Si)) return $true alias -l ishost if ($nick(#, $1, $canhost)) return $true alias -l dd_info { /* * $dd_info([#chan,]nick).prop * Properties: vs, bet, host, dice, id, rolls, rollsum, pot */ ;nick2/bet/host/dice/id/rolls if ($regex($1, /^#/)) var %chan $1, %nick $2 else var %chan #, %nick $1 if (!$prop) return $($+(%, dd_, %chan, %nick), 2) tokenize 47 $($+(%, dd_, %chan, %nick), 2) if ($prop == vs) return $1 elseif ($prop == bet) return $2 elseif ($prop == host) return $3 elseif ($prop == dice) return $4 elseif ($prop == id) return $5 elseif ($prop == roll) return $6 elseif ($prop == rollsum) return $calc($replace($6, -, +)) elseif ($prop == pot) return $pot($2) } alias -l pot return $kmb.to($ceil($calc($kmb.from($1) * $iif($prop == full, 2, $dd_pot_multiplier)))) alias -l die return $rand(1,6) alias -l dd_end { /* * /dd_end #channel nick [message] */ if ($3) msg.format @ $2 $1 [Dice Duel] $3- .timerdd_end $+ $dd_info($1, $2).id off unset %dd_ $+ $1 $+ $dd_info($1,$2).vs unset %dd_ $+ $1 $+ $2 } alias -l kmb.from return $regsubex($remove($1,$chr(44)),/([\d.]+)([kmbt]|gp)/Si,$calc(\1 * 10 ^ (3 * $pos(kmbt,\2)))) alias -l kmb.to { while (. !isin $1) && ($2 != 4) && ($1 >= 1000) tokenize 32 $calc($1 /$v2) $calc(1+$2) return $1 $+ $gettok(GP K M B T, $calc(1+$2), 32) }
-
i folks... been trying a few rpg type games, and folks suggested to make a way so they can add their own monsters in. This script will add, list totals, and delete entries from monster txt files , that IRC rpg games typically use. You may have to edit the script depending on how many levels there are in your rpg game, and you may also have to edit the prefix of all the monster text files for each level .. (the rpg game i use has the monster text files as monster.txt, monster2.txt.. etc) You may also want to add in some feature that only ops can add/del .. but for me its not necessary I must also thank a few people around irc that gave some pointers and a little help while putting this together. you know who you all are.. and thank you so much for your time. The Monster Manager Commands COMMANDS MENU IN CHAN !m-help ADD A MONSTER TO A LEVEL !m-lv(level number)-add (Your Monster) CHECK HOW MANY MONSTERS ARE IN A LEVEL !m-lv(level number) CHECK A SPECIFIC MONSTER IN A LEVEL !m-lv(level number) (number) CHECK TOTAL MONSTERS FOR ALL LEVELS !m-total DELETE MONSTER FROM A LEVEL !m-lv(level number)-del (number) enjoy ;;PAN'S MONSTER MANGAER ------------------------------------------------------ on *:text:!m-help:#:{ msg $chan Pan's Monster Manager: To Add: 12!m-lv(level number)-add (Your Monster) - To check number of monsters in each Level: 12!m-lv(level number) - To view individual monsters: 12!m-lv(level number) (number) - To View total enemy strength: 12!m-total - To Delete Monster: 12!m-lv(level number)-del (number) - 4"Try not delete other peoples monsters" } ;;LEVEL 1 -------------------------------------------------------------------- on *:text:!m-lv1-add *:#:{ write monsters.txt $2- msg # 12 $+ $2- has been added to the Level 1 Monsters list $nick $+ . Thy epic journey awaits thee. } on *:text:!m-lv1:#:{ msg $chan There are a total of12 $lines(monsters.txt) Level 1 Monsters. } on *:text:!m-lv1-del *:#:{ if ($2 isnum) { msg $chan $qt($read(monsters.txt, n, $2)) was deleted! write -dl $+ $2 monsters.txt } } ;;LEVEL 2 -------------------------------------------------------------------- on *:text:!m-lv2-add *:#:{ write monsters2.txt $2- msg # 12 $+ $2- has been added to the Level 2 Monsters list $nick $+ . May good fortune be with thee on thy quest. } on *:text:!m-lv2:#:{ msg $chan There are a total of12 $lines(monsters2.txt) Level 2 Monsters. } on *:text:!m-lv2-del *:#:{ if ($2 isnum) { msg $chan $qt($read(monsters2.txt, n, $2)) was deleted! write -dl $+ $2 monsters2.txt } } ;;LEVEL 3 -------------------------------------------------------------------- on *:text:!m-lv3-add *:#:{ write monsters3.txt $2- | .msg $chan 12 $+ $2- has been added to the Level 3 Monsters list $nick $+ . Glory awaits thee. } on *:text:!m-lv3:#:{ msg $chan There are a total of12 $lines(monsters3.txt) Level 3 Monsters. } on *:text:!m-lv3-del *:#:{ if ($2 isnum) { msg $chan $qt($read(monsters3.txt, n, $2)) was deleted! write -dl $+ $2 monsters3.txt } } ;;LEVEL 4 -------------------------------------------------------------------- on *:text:!m-lv4-add *:#:{ write monsters4.txt $2- msg # 12 $+ $2- has been added to the Level 4 Monsters list $nick $+ . Journey forth into the darkness with pride and haste.. } on *:text:!m-lv4:#:{ msg $chan There are a total of12 $lines(monsters4.txt) Level 4 Monsters. } on *:text:!m-lv4-del *:#:{ if ($2 isnum) { msg $chan $qt($read(monsters4.txt, n, $2)) was deleted! write -dl $+ $2 monsters4.txt } } ;;LEVEL 5 -------------------------------------------------------------------- on *:text:!m-lv5-add *:#:{ write monsters5.txt $2- msg # 12 $+ $2- has been added to the Level 5 Monsters list $nick $+ . Elders shall speak of thy honorable deeds. } on *:text:!m-lv5:#:{ msg $chan There are a total of12 $lines(monsters5.txt) Level 5 Monsters. } on *:text:!m-lv5-del *:#:{ if ($2 isnum) { msg $chan $qt($read(monsters5.txt, n, $2)) was deleted! write -dl $+ $2 monsters5.txt } } ;;LEVEL 6 -------------------------------------------------------------------- on *:text:!m-lv6-add *:#:{ write monsters6.txt $2- msg # 12 $+ $2- has been added to the Level 6 Monsters list $nick $+ . Many bards shall play, honoring thy glorious victories. } on *:text:!m-lv6:#:{ msg $chan There are a total of12 $lines(monsters6.txt) Level 6 Monsters. } on *:text:!m-lv6-del *:#:{ if ($2 isnum) { msg $chan $qt($read(monsters6.txt, n, $2)) was deleted! write -dl $+ $2 monsters6.txt } } ;;LEVEL 7 -------------------------------------------------------------------- on *:text:!m-lv7-add *:#:{ write monsters7.txt $2- msg # 12 $+ $2- has been added to the Level 7 Monsters list $nick $+ . May the free folk to come speak of thy heroism. } on *:text:!m-lv7:#:{ msg $chan There are a total of12 $lines(monsters7.txt) Level 7 Monsters. } on *:text:!m-lv7-del *:#:{ if ($2 isnum) { msg $chan $qt($read(monsters7.txt, n, $2)) was deleted! write -dl $+ $2 monsters7.txt } } ;;LEVEL 8 -------------------------------------------------------------------- on *:text:!m-lv8-add *:#:{ write monsters8.txt $2- msg # 12 $+ $2- has been added to the Level 8 Monsters list $nick $+ . Thy place within history awaits thee. } on *:text:!m-lv8:#:{ msg $chan There are a total of12 $lines(monsters8.txt) Level 8 Monsters. } on *:text:!m-lv8-del *:#:{ if ($2 isnum) { msg $chan $qt($read(monsters8.txt, n, $2)) was deleted! write -dl $+ $2 monsters8.txt } } ;;LEVEL 9 -------------------------------------------------------------------- on *:text:!m-lv9-add *:#:{ write monsters9.txt $2- msg # 12 $+ $2- has been added to the Level 9 Monsters list $nick $+ . The Holy Scriptures will proclaim thy divinity. } on *:text:!m-lv9:#:{ msg $chan There are a total of12 $lines(monsters9.txt) Level 9 Monsters. } on *:text:!m-lv9-del *:#:{ if ($2 isnum) { msg $chan $qt($read(monsters9.txt, n, $2)) was deleted! write -dl $+ $2 monsters9.txt } } ;;LEVEL 10 -------------------------------------------------------------------- on *:text:!m-lv10-add *:#:{ write monsters10.txt $2- msg # 12 $+ $2- has been added to the Level 10 Monsters list $nick $+ .Now go!, once more unto the breach!. } on *:text:!m-lv10:#:{ msg $chan There are a total of12 $lines(monsters10.txt) Level 10 Monsters. } on *:text:!m-lv10-del *:#:{ if ($2 isnum) { msg $chan $qt($read(monsters10.txt, n, $2)) was deleted! write -dl $+ $2 monsters10.txt } } ;;LEVEL 11 -------------------------------------------------------------------- on *:text:!m-lv11-add *:#:{ write monsters11.txt $2- msg # 12 $+ $2- has been added to the Level 11 Monsters list $nick $+ . May good fortune be upon thy quest where so many nobel warriors have failed before thee. } on *:text:!m-lv11:#:{ msg $chan There are a total of12 $lines(monsters11.txt) Level 11 Monsters. } on *:text:!m-lv11-del *:#:{ if ($2 isnum) { msg $chan $qt($read(monsters11.txt, n, $2)) was deleted! write -dl $+ $2 monsters11.txt } } ;;LEVEL 12 -------------------------------------------------------------------- on *:text:!m-lv12-add *:#:{ write monsters12.txt $2- msg # 12 $+ $2- has been added to the Level 12 Monsters list $nick $+ . 4May all the Gods have mercy on thy soul!! } on *:text:!m-lv12:#:{ msg $chan There are a total of12 $lines(monsters12.txt) Level 12 Monsters. } on *:text:!m-lv12-del *:#:{ if ($2 isnum) { msg $chan $qt($read(monsters12.txt, n, $2)) was deleted! write -dl $+ $2 monsters12.txt } } ;;CHECK MONSTERS -------------------------------------------------------------------- on *:text:!m-lv1 *:#:if ($2 isnum) msg $chan $read(monsters.txt,$2) - Total Lv2 Monsters:12 $lines(monsters.txt) on *:text:!m-lv2 *:#:if ($2 isnum) msg $chan $read(monsters2.txt,$2) - Total Lv2 Monsters:12 $lines(monsters2.txt) on *:text:!m-lv3 *:#:if ($2 isnum) msg $chan $read(monsters3.txt,$2) - Total Lv3 Monsters:12 $lines(monsters3.txt) on *:text:!m-lv4 *:#:if ($2 isnum) msg $chan $read(monsters4.txt,$2) - Total Lv4 Monsters:12 $lines(monsters4.txt) on *:text:!m-lv5 *:#:if ($2 isnum) msg $chan $read(monsters5.txt,$2) - Total Lv5 Monsters:12 $lines(monsters5.txt) on *:text:!m-lv6 *:#:if ($2 isnum) msg $chan $read(monsters6.txt,$2) - Total Lv6 Monsters:12 $lines(monsters6.txt) on *:text:!m-lv7 *:#:if ($2 isnum) msg $chan $read(monsters7.txt,$2) - Total Lv7 Monsters:12 $lines(monsters7.txt) on *:text:!m-lv8 *:#:if ($2 isnum) msg $chan $read(monsters8.txt,$2) - Total Lv8 Monsters:12 $lines(monsters8.txt) on *:text:!m-lv9 *:#:if ($2 isnum) msg $chan $read(monsters9.txt,$2) - Total Lv9 Monsters:12 $lines(monsters9.txt) on *:text:!m-lv10 *:#:if ($2 isnum) msg $chan $read(monsters10.txt,$2) - Total Lv10 Monsters:12 $lines(monsters10.txt) on *:text:!m-lv11 *:#:if ($2 isnum) msg $chan $read(monsters11.txt,$2) - Total Lv11 Monsters:12 $lines(monsters11.txt) on *:text:!m-lv12 *:#:if ($2 isnum) msg $chan $read(monsters12.txt,$2) - Total Lv12 Monsters:12 $lines(monsters12.txt) on *:text:!m-total:#:{ msg $chan Total Enemy Strengh: ( Lv1:12 $lines(
-
So I've been working on this for a little bit. I wanted to make something where you could have a registration system for all scripts that wanted to support this kind of thing. For example if you had a casino script or trivia script that wanted to register users, you could do so with this script for both of them (assuming they were compatible). I would definitely like to collaborate with mIRC script writers who are looking to use this kind of system. I'm almost always available on skype via: jasonsphone01 Since this is a system all it's own, it does not require any other plugins to help it run. If you have any questions please use the comment section below or feel free to message me on skype! (or if you want to invite me to your IRC server, that'll work too) Change Log: SR-001 Extensible Account Script v.0.1.0.0.bta Beta Release version of the EAS. HF-001 Extensible Account Script v.0.1.0.1.bta Clean-up of the code used in EAS. Added more identifiers to the $eas alias Commented-out ability to type /account open to open the account dialog. Added the -c tag to the /account alias (before any additional arguments) to clear out the window before processing any other information. SU-001 Extensible Account Script v.0.2.0.0.bta Added dialogs for all normal /account alias commands. Additional code clean-up. Added $alock() alias for a quicker look at various user's account lock information. Added a change log. SU-002 Extensible Account Script v.0.3.0.0.bta Added Menu option to bring up the console Added an on TEXT event handler MU-001 Extensible Account Script v.0.3.1.0.bta Added information text to /account info command. Added installation and version update times for statistical purposes. MU-002 Extensible Account Script v.0.3.2.1.bta Added Staff Channel with and output option Added the ability to auto-join this channel upon connecting to a server. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;Extensible Account Script;;;;; ;;;;;;;Version: 0.3.2.1.bta;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;; ;;;;;Aliases;;;;; ;;;;;;;;;;;;;;;;; alias eas { If ($1 == version) { return 0.3.2.1.bta } If ($1 == left) { return 9,1[EAS] } If ($1 == checkversion) { return $readini(account/account.ini,status,version) } If ($1 == settings) { return $readini(account/account.ini,settings,$2) } If ($1 == status) { return $readini(account/account.ini,status,$2) } If ($1 == perm) { return $readini(account/ $+ $2 $+ /permissions.ini,perms,$3) } If ($1 == gperm) { return $readini(account/staff/groups.ini,$2,$3) } If ($1 == isRegistered) { return $readini(account/ $+ $2 $+ /account.ini,status,registered) } If ($1 == isStaff) { return $readini(account/ $+ $2 $+ /account.ini,power,staff) } If ($1 == staffGroup) { return $readini(account/ $+ $2 $+ /account.ini,power,position) } If ($1 == isGroup) { return $readini(account/staff/groups.ini,$2,registered) } If ($1 == userPass) { return $readini(account/ $+ $2 $+ /account.ini,status,password) } If ($1 == userEmail) { return $readini(account/ $+ $2 $+ /account.ini,status,email) } If ($1 == opLevel) { return $readini(account/staff/groups.ini,$2,oplevel) } If ($1 == loggedIn) { return $readini(account/ $+ $2 $+ /account.ini,status,loggedin) } If ($1 == joinTime) { return $readini(account/ $+ $2 $+ /account.ini,status,jointime) } } alias alock { If (!$2) { return $readini(account/ $+ $1 $+ /account.ini,status,locked) } Elseif ($2 == date) { return $readini(account/ $+ $1 $+ /account.ini,status,lastlockdate) } Elseif ($2 == locker) { return $readini(account/ $+ $1 $+ /account.ini,status,lastlocker) } Elseif ($2 == reason) { return $readini(account/ $+ $1 $+ /account.ini,status,lockreason) } Elseif ($2 == unlock) { return $readini(account/ $+ $1 $+ /account.ini,status,unlocktime) } Else { return error } } alias cout { echo -a $eas(left) $1- } alias re { $1- } alias start { dialog $iif($dialog($1) == $1,-v,-md $1) $1 } alias dclose { dialog -x $dname } alias account { If (-c isin $1) { clear re account $2- halt } $iif($1 == open,,cout ==========) If ($readini(account/account.ini,status,installed) != yes) { If (!$1) { cout Please type 3/account install to install the Extensible Account Script. | halt } Elseif ($1 != install) { cout Please type 3/account install to install the Extensible Account Script. | halt } Else { cout Please wait... mkdir account writeini account/account.ini status installed yes writeini account/account.ini status version $eas(version) writeini account/account.ini status installtime $ctime writeini account/account.ini status updatetime $ctime writeini account/account.ini settings password on writeini account/account.ini settings email on writeini account/account.ini settings emailvalidate on write account/perms.txt op write account/perms.txt lockBypass mkdir account/staff re account group Owner add 4 re account group Admin add 2 writeini account/account.ini settings registration on writeini account/account.ini settings login on write account/opleveldesc.txt 7 - Staff, Bot Owner write account/opleveldesc.txt 6 - Staff, Owner (Supported services (ie ~ rank in channel)) write account/opleveldesc.txt 5 - Staff, Admin (Supported services (ie & rank in channel)) write account/opleveldesc.txt 4 - Staff, Operator (ie @ in channel)) write account/opleveldesc.txt 3 - Staff, Halfop (Supported services (ie % rank in channel)) write account/opleveldesc.txt 2 - Staff, Voice (ie + in channel)) write account/opleveldesc.txt 1 - Staff, No rank write account/opleveldesc.txt 0 - Member, non-staff writeini account/account.ini settings output off writeini account/account.ini status output #account writeini account/account.ini settings enforcechannelaccess true writeini account/account.ini settings autojoin true cout Installation complete! re account } } Elseif ($eas(checkversion) != $eas(version)) { If (!$1) { cout Please type /account update to update the Extensible Account Script. | halt } Elseif ($1 != update) { cout Please type /account update to update the Extensible Account Script. | halt } Else { cout Please wait... If (!$eas(checkversion)) { ;;;;;Update to version 0.1.0.0.dev;;;;; } If ($eas(checkversion) == 0.1.0.0.dev) { ;;;;;Update to version 0.1.0.1.dev;;;;; writeini account/account.ini settings password on writeini account/account.ini settings email on } If ($eas(checkversion) == 0.1.0.1.dev) { ;;;;;Update to version 0.1.0.2.dev;;;;; writeini account/account.ini settings emailvalidate on } If ($eas(checkversion) == 0.1.0.2.dev) { ;;;;;Update to version 0.2.0.0.dev;;;;; write account/perms.txt op write account/perms.txt lockBypass mkdir account/staff } If ($eas(checkversion) == 0.2.0.0.dev) { ;;;;;Update to version 0.2.1.0.dev;;;;; re account group Owner add 4 re account group Admin add 2 } If ($eas(checkversion) == 0.2.1.0.dev) { ;;;;;Update to version 0.2.2.0.dev;;;;; writeini account/account.ini settings registration on writeini account/account.ini settings login on } If ($eas(checkversion) == 0.2.2.0.dev) { ;;;;;Update to version 0.1.0.0.bta;;;;; ;;;;;This is the official beta release;;;;; ;;;;;If anyone would like to colaberate on this project with me, add me on skype: jasonsphone01 write account/opleveldesc.txt 7 - Staff, Bot Owner write account/opleveldesc.txt 6 - Staff, Owner (Supported services (ie ~ rank in channel)) write account/opleveldesc.txt 5 - Staff, Admin (Supported services (ie & rank in channel)) write account/opleveldesc.txt 4 - Staff, Operator (ie @ in channel)) write account/opleveldesc.txt 3 - Staff, Halfop (Supported services (ie % rank in channel)) write account/opleveldesc.txt 2 - Staff, Voice (ie + in channel)) write account/opleveldesc.txt 1 - Staff, No rank write account/opleveldesc.txt 0 - Member, non-staff } If ($eas(checkversion) == 0.1.0.0.bta) { ;;;;;Update to version 0.1.0.1.bta;;;;; ;;;;;Code clean-up;;;;; ;;;;;Nothing to add presently;;;;; } If ($eas(checkversion) == 0.1.0.1.bta) { ;;;;;Update to version 0.2.0.0.bta;;;;; ;;;;;Code clean-up;;;;; ;;;;;Added dialogs;;;;; ;;;;;Nothing to add here;;;;; } If ($eas(checkversion) == 0.2.0.0.bta) { ;;;;;Update to version 0.3.0.0.bta;;;;; ;;;;;Code clean-up;;;;; ;;;;;Added Menu and on Text event handler;;;;; ;;;;;Nothing to add here;;;;; } If ($eas(checkversion) == 0.3.0.0.bta) { ;;;;;Update to version 0.3.1.0.bta;;;;; ;;;;;Added information text to /account command;;;;; writeini account/account.ini status installtime $ctime } If ($eas(checkversion) == 0.3.1.0.bta) { ;;;;;Update to version 0.3.2.0.bta;;;;; ;;;;;Added Staff Output Channel;;;;; writeini account/account.ini settings output off writeini account/account.ini status output #account writeini account/account.ini settings enforcechannelaccess true } If ($eas(checkversion) == 0.3.2.0.bta) { ;;;;;Update to version 0.3.2.1.bta;;;;; ;;;;;Added on Conect option to auto-join the account channel;;;;; writeini account/account.ini settings autojoin on } writeini account/account.ini status version $eas(version) writeini account/account.ini status updatetime $ctime cout Update complete! re account } } Else { If (!$1) { cout Please select from the following options: cout To view options for account management, please type /account manage cout To view options for staff management, please type /account staff cout To view options for script settings, please type /account settings cout To bring up the dialog for this script, please type /account open cout To view information about this script, please type /account info } Elseif ($1 == open) { start account } Elseif ($1 == manage) { cout Please select from the following options: cout To register/unregister a user, please type /account <register|unregister> <nick> $iif($eas(settings,password) == on,[password],) $iif($eas(settings,email) == on,[email],) cout To login/logout a user, please type /account <login|logout> <nick> cout To lock/unlock a user account, please type /account <lock|unlock> <nick> [time to expire in seconds] [reason for lock] cout To view the list of settings on a user account and how to modify them, please type /account view <nick> } Elseif ($1 == register) { If (!$2) { cout Please type /account register <nick> $iif($eas(settings,password) == on,<password>,) $iif($eas(settings,email) == on,<email>,) | halt } If ($eas(isRegistered,$2) == yes) { cout This user is already registered! | halt } If ($eas(settings,password) == on) && ($eas(settings,email) == on) { If (!$4) { cout Please type /account register <nick> <password> <email> | halt } If ($eas(settings,emailvalidate) == on) { If ($readini(account/account.ini,emailvalidate,$4) == registered) { cout This email is already registered to a user! | halt } Else { writeini account/account.ini emailvalidate $4 registered } } mkdir account/ $+ $2 writeini account/ $+ $2 $+ /account.ini status password $3 writeini account/ $+ $2 $+ /account.ini status email $4 } Elseif ($eas(settings,password) == on) { If (!$3) { cout Please type /account register <nick> <password> | halt } mkdir account/ $+ $2 writeini account/ $+ $2 $+ /account.ini status password $3 } Elseif ($eas(settings,email) == on) { If (!$3) { cout Please type /account register <nick> <email> | halt } If ($eas(settings,emailvalidate) == on) { If ($readini(account/account.ini,emails,$3) == registered) { cout This email is already registered to a user! | halt } Else { writeini account/account.ini emailvalidate $3 registered } } mkdir account/ $+ $2 writeini account/ $+ $2 $+ /account.ini status email $3 } Else { mkdir account/ $+ $2 } writeini account/ $+ $2 $+ /account.ini status registered yes writeini account/ $+ $2 $+ /account.ini status loggedin no writeini account/ $+ $2 $+ /account.ini status lastlogin na writeini account/ $+ $2 $+ /account.ini status locked no writeini account/ $+ $2 $+ /account.ini status lastlockdate na writeini account/ $+ $2 $+ /account.ini status lastlocker na writeini account/ $+ $2 $+ /account.ini status lockreason na writeini account/ $+ $2 $+ /account.ini status unlocktime $ctime writeini account/ $+ $2 $+ /account.ini status jointime $ctime writeini account/ $+ $2 $+ /account.ini power staff no writeini account/ $+ $2 $+ /account.ini power position member writeini account/ $+ $2 $+ /account.ini power premium no writeini account/ $+ $2 $+ /account.ini power premiumExpiration $ctime write account/accounts.txt $2 cout Account registration for the nickname $2 is complete! } Elseif ($1 == unregister) { If (!$2) { cout Please type /account unregister <nick> | halt } If ($eas(isRegistered,$2) != yes) { cout This isn't a registered user. | halt } remini account/account.ini emailvalidate $eas(userEmail,$2) .remove account/ $+ $2 $+ /account.ini .remove account/ $+ $2 $+ /permissions.ini rmdir account\$2 write -ds $+ $2 account/accounts.txt cout User Unregistration Complete! } Elseif ($1 == login) { If (!$2) { cout Please type /account login <nick> | halt } If ($eas(isRegistered,$2) != yes) { cout This isn't a registered user. | halt } If ($eas(loggedIn,$2) == yes) { cout This user is already logged in. | halt } writeini account/ $+ $2 $+ /account.ini status loggedin yes writeini account/ $+ $2 $+ /account.ini status lastlogin $ctime If (-s !isin $3-) { cout User has been logged-in sucessfully! } If ($alock($2) == yes) { cout Warning! User is currently locked but has been logged-in anyway! } } Elseif ($1 == logout) { If (!$2) { cout Please type /account logout <nick> | halt } If ($eas(isRegistered,$2) != yes) { cout This isn't a registered user. | halt } If ($eas(loggedIn,$2) != yes) { cout This user isn't logged in. | halt } writeini account/ $+ $2 $+ /account.ini status loggedin no If (-s !isin $3-) { cout User has been logged-out sucessfully! } } Elseif ($1 == lock) { If (!$4) { cout Please type /account lock <nick> <time to expire in seconds> <reason for lock> | halt } If ($eas(isRegistered,$2) != yes) { cout This isn't a registered user. | halt } If ($alock($2) == yes) { cout This user's account is already locked. | halt } If ($eas(perm,$2,op) == true) { cout Warning! This user can't normally be locked! } If ($eas(perm,$2,lockBypass) == true) || ($eas(perm,$2,op) == true) { cout Warning! This user can bypass an account lockout! } writeini account/ $+ $2 $+ /account.ini status locked yes writeini account/ $+ $2 $+ /account.ini status lastlockdate $ctime writeini account/ $+ $2 $+ /account.ini status lastlocker ~Console writeini account/ $+ $2 $+ /account.ini status lockreason $4- writeini account/ $+ $2 $+ /account.ini status unlocktime $calc($ctime + $3) cout User lock of $2 $+ 's account complete! } Elseif ($1 == unlock) { If (!$2) { cout Please type /account unlock <nick> | halt } If ($eas(isRegistered,$2) != yes) { cout This isn't a registered user. | halt } If ($alock($2) != yes) { cout This user's account is not locked. | halt } writeini account/ $+ $2 $+ /account.ini status locked no cout User unlock of $2 $+ 's account complete! } Elseif ($1 == view) { If (!$2) { cout Please type /account view <nick> | halt } If ($eas(isRegistered,$2) != yes) { cout This isn't a registered user. | halt } cout Profile information for: $2 (Generated at $asctime(ddmmmyyyy hh:nn:ss TT) $+ ) cout Status: Registered - Locked: $alock($2) $iif($alock($2) == yes,- Date Unlockable: $asctime($alock($2,unlock),ddmmmyyyy hh:nn:ss TT),) cout Last login: $asctime($readini(account/ $+ $2 $+ /account.ini,status,lastlogin),ddmmmyyyy hh:nn:ss TT) cout Join Date: $asctime($readini(account/ $+ $2 $+ /account.ini,status,jointime),ddmmmyyyy hh:nn:ss TT) If ($eas(isStaff,$2) == yes) { cout Staff Position: $readini(account/ $+ $2 $+ /account.ini,power,position) } If ($readini(account/ $+ $2 $+ /account.ini,power,premium) == yes) { cout Premium Expiration Date: $asctime($readini(account/ $+ $2 $+ /account.ini,power,premiumExpiration),ddmmmyyyy hh:nn:ss TT) } If ($alock($2,date) != na) { cout Last Lock Date: $asctime($alock($2,date),ddmmmyyyy hh:nn:ss TT) cout Last Locker: $alock($2,locker) cout Last Lock Reason: $alock($2,reason) } } Elseif ($1 == staff) { cout Please select from one of the following options: cout To manage staff users, please type /account manageStaff cout To manage staff groups, please type /account groups } Elseif ($1 == manageStaff) { cout Please select from one of the following options: cout To make a registered user staff (or to fire a staff member), please type: /account <hire|fire> <nick> [group] cout (For a list of groups, please type /account groups) cout To manage an individual's permissions as a staff member, please type /account staffer <nick> cout To change a user's group as staff, please type /account changeGroup <nick> <newGroup> } Elseif ($1 == hire) { If (!$3) { cout Please type: /account hire <nick> <group> | cout (For a list of groups, please type /account groups) | halt } If ($eas(isRegistered,$2) != yes) { cout This is not a registered user. | halt } If ($eas(isStaff,$2) == yes) { cout This user is already staff. | halt } If ($readini(account/staff/groups.ini,$3,registered) != yes) { cout This is not a valid group. | halt } writeini account/ $+ $2 $+ /account.ini power staff yes writeini account/ $+ $2 $+ /account.ini power position $3 write account/staff/staffers.txt $2 cout Staff hired sucessfully! } Elseif ($1 == fire) { If (!$2) { cout Please type: /account fire <nick> | halt } If ($eas(isRegistered,$2) != yes) { cout This is not a registered user. | halt } If ($eas(isStaff,$2) != yes) { cout This user isn't staff. | halt } writeini account/ $+ $2 $+ /account.ini power staff no writeini account/ $+ $2 $+ /account.ini power position member write -ds $+ $2 account/staff/staffers.txt cout Staff fired sucessfully! } Elseif ($1 == staffer) { If (!$2) { cout Please type: /account staffer <nick> | halt } If ($eas(isRegistered,$2) != yes) { cout This is not a registered user. | halt } If ($eas(isStaff,$2) != yes) { cout This user is not a staffer. | halt } cout Information about staffer: $2 (Report generated on: $asctime(ddmmmyyyy hh:nn:ss TT) $+ ) cout Current Group: $readini(account/ $+ $2 $+ /account.ini,power,position) If ($readini(account/ $+ $2 $+ /permissions.ini,status,registered) == yes) { cout Individiual Permissions: var %temp.1 1 While (%temp.1 <= $lines(account/perms.txt)) { If ($readini(account/ $+ $2 $+ /permissions.ini,perms,$read(account/perms.txt,t,%temp.1))) { cout $read(account/perms.txt,t,%temp.1) - $eas(perm,$2,$read(account/perms.txt,t,%temp.1)) } inc %temp.1 } cout End of Individual Permissions. } cout To change individual permissions, type /account changePerm <nick> <permission node> <value> cout For a complete list of permissions, type /account permList } Elseif ($1 == permList) { cout The following are the permissions recognized by the EAS directly: var %temp.1 1 While (%temp.1 <= $lines(account/perms.txt)) { cout $read(account/perms.txt,t,%temp.1) inc %temp.1 } cout End of List } Elseif ($1 == changePerm) { If (!$4) { cout Please type /account changePerm <nick> <permissions node> <value> | halt } If ($eas(isRegistered,$2) != yes) { cout This is not a registered user. | halt } writeini account/ $+ $2 $+ /permissions.ini status registered yes writeini account/ $+ $2 $+ /permissions.ini perms $3 $4 cout Permission set sucessfully! } Elseif ($1 == changeGroup) { If (!$3) { cout Please type /account changeGroup <nick> <newGroup> | halt } If ($eas(isRegistered,$2) != yes) { cout This user isn't registered. | halt } If ($eas(isStaff,$2) != yes) { cout This user isn't a staffer. | halt } If ($readini(account/staff/groups.ini,$3,registered) != yes) { cout This isn't a valid group. | halt } writeini account/ $+ $2 $+ /account.ini power position $3 cout $2 had their group change to $3 sucessfully! } Elseif ($1 == groups) { cout The following is a list of groups available for staffers: var %temp.1 1 While (%temp.1 <= $lines(account/staff/groups.txt)) { cout $read(account/staff/groups.txt,t,%temp.1) inc %temp.1 } cout End of list. To learn more about each one (and see other available options), please type /account group <groupName> info } Elseif ($1 == group) { If (!$3) { cout Please select from one of the following options: cout To view a list of available groups, please type /account groups cout To view information specific to a group, please type /account group <groupName> info cout To add/remove a group, please type /account group <groupName> <add|remove> [opLevel if adding] cout To edit operator status, please type /account group <groupName> opLevel <actual op level, see documentation for help with this> cout To edit specific permissions a group has access to, please type /account group <groupName> perms <permissions node> <value> } Elseif ($3 == info) { If ($eas(isGroup,$2) != yes) { cout This is not a valid group. | halt } cout Information for group $2 (Report generated on $asctime(ddmmmyyyy hh:nn:ss TT) cout Op Level: $readini(account/staff/groups.ini,$2,oplevel) cout Specific Permissions: var %temp.1 1 While (%temp.1 <= $lines(account/perms.txt)) { cout $read(account/perms.txt,t,%temp.1) - $eas(gperm,$2,$read(account/perms.txt,t,%temp.1)) inc %temp.1 } cout Users who have this group: var %temp.1 1 While (%temp.1 <= $lines(account/accounts.txt)) { If ($readini(account/ $+ $read(account/accounts.txt,t,%temp.1) $+ /account.ini,power,position) == $2) { cout - $read(account/accounts.txt,t,%temp.1) } inc %temp.1 } cout End of Report } Elseif ($3 == add) { If (!$4) { cout Please type /account group <groupName> add <opLevel> | halt } If ($eas(isGroup,$2) == yes) { cout This group already exists. | halt } writeini account/staff/groups.ini $2 registered yes writeini account/staff/groups.ini $2 opLevel $4 var %temp.1 1 While (%temp.1 <= $lines(account/perms.txt)) { writeini account/staff/groups.ini $2 $read(account/perms.txt,t,%temp.1) false inc %temp.1 } write account/staff/groups.txt $2 cout Group created sucessfully! } Elseif ($3 == remove) { If ($eas(isGroup,$2) != yes) { cout This group doesn't exist. | halt } write -ds $+ $2 account/staff/groups.txt remini account/staff/groups.ini $2 var %temp.1 1 While (%temp.1 <= $lines(account/accounts.txt)) { If ($readini(account/ $+ $read(account/accounts.txt,t,%temp.1) $+ /account.ini,power,position) == $2) { writeini account/ $+ $read(account/accounts.txt,t,%temp.1) $+ /account.ini power position member } inc %temp.1 } cout Group removed sucessfully! Any users assigned to that group have been assigned to the member group (ie non-staff). } Elseif ($3 == opLevel) { If (!$4) { cout Please type /account group <groupName> opLevel <actual op level> | halt } If ($eas(isGroup,$2) != yes) { cout This is not a registered group | halt } writeini account/staff/groups.ini $2 opLevel $4 cout Op Level for $2 changed to $4 sucessfully! } Elseif ($3 == perms) { If (!$5) { cout Please type /account group <groupName> perms <permissions node> <value> | halt } If ($eas(isGroup,$2) != yes) { cout This is not a registered group | halt } writeini account/staff/groups.ini $2 $4 $5 cout Permissions set sucessfully! Please note that if the permissions node is not one in the EAS system it will not show up normally (ie from a different plugin) } Else { cout Unknown command. } } Elseif ($1 == settings) { If (!$2) { cout Please select from one of the following: cout To manage core account settings, please type /account settings system cout To manage user settings (including login and registration), please type /account settings user cout To manage staff settings, please type /account settings staff } Elseif ($2 == system) { If (!$4) { cout Please select from the following options: cout To turn Staff Channel Output $iif($readini(account/account.ini,settings,output) == on,off,on) $+ , please type: /account settings system output $iif($eas(settings,output) == on,off,on) cout To change the Staff Output channel (currently: $eas(status,output) $+ ), please type: /account settings system channel <input new channel> cout To change the Enforce Access to Output channel (currently: $eas(settings,enforcechannelaccess) $+ ), please type: /account settings system enforcechannelaccess $iif($eas(settings,enforcechannelaccess) == on,off,on) cout To change the Autojoin on Connect option (currently: $eas(settings,autojoin) $+ ), please type: /account settings system autojoin $iif($eas(autojoin) == on,off,on) } Elseif ($3 == output) { writeini account/account.ini settings output $4 cout Staff Channel Output changed to: $4 } Elseif ($3 == channel) { writeini account/account.ini status output $4 cout Staff Channel has been changed to: $4 } Elseif ($3 == enforcechannelaccess) { writeini account/account.ini settings enforcechannelaccess $4 cout Enforce Channel Access has been changed to: $4 } Elseif ($3 == autojoin) { writeini account/account.ini settings autojoin $4 cout Autojoin on connect has been changed to: $$ } Else { cout Unknown command. } } Elseif ($2 == user) { If (!$4) { cout Please select from one of the following options: cout To $iif($readini(account/account.ini,settings,registration) == on,deny,allow) registration, please type: /account settings user registration $iif($readini(account/account.ini,settings,registration) == on,off,on) cout To $iif($readini(account/account.ini,settings,login) == on,deny,allow) logins, please type: /account settings user login $iif($readini(account/account.ini,settings,login) == on,off,on) cout To $iif($readini(account/account.ini,settings,password) == on,not require,require) a password, please type: /account settings user password $iif($readini(account/account.ini,settings,password) == on,off,on) cout To $iif($readini(account/account.ini,settings,email) == on,not require,require) an email, please type: /account settings user email $iif($readini(account/account.ini,settings,email) == on,off,on) cout To $iif($readini(account/account.ini,settings,emailvalidate) == on,not block,block) the same email address registereing more than once, please type: /account settings user emailvalidate $iif($readini(account/account.ini,settings,emailvalidate) == on,off,on) } Else { writeini account/account.ini settings $3 $4 cout Value updated sucessfully! } } Elseif ($2 == staff) { cout Currently there are no settings available. } Else { cout Unknown command. } } Elseif ($1 == info) { cout Extensible Account Script - Version $eas(version) cout Installed on: $asctime($eas(status,installtime),ddmmmyyyy hh:nn:ss TT) cout Most recently updated on: $asctime($eas(status,updatetime),ddmmmyyyy hh:nn:ss TT) cout This update released on $asctime(1438531200,ddmmmyyyy hh:nn:ss TT) cout Number of accounts currently registered: $lines(account/accounts.txt) cout Number of staffers: $lines(account/staff/staffers.txt) cout Development Area: irc.us.gamesurge.net #Tamaki } } Else { cout Unknown command. } } ;;;;;;;;;;;;;;;;; ;;;;;Dialogs;;;;; ;;;;;;;;;;;;;;;;; dialog account { title Account Main Menu option dbu size -1 -1 101 44 button "Account Management", 1, 1 1 100 10 button "Staff Management", 2, 1 11 100 10 button "System Settings", 3, 1 22 100 10 button "Close", 4, 1 33 100 10, cancel } dialog account_management { title Account Management option dbu size -1 -1 101 44 button "New Account", 1, 1 1 100 10 button "Manage Account", 2, 1 11 100 10 button "Delete Account", 3, 1 22 100 10 button "Back", 4, 1 33 100 10 } dialog account_management_new { title New Account option dbu size -1 -1 152 55 text "Nick", 1, 1 1 50 10 edit "", 2, 51 1 100 10 text "Password", 3, 1 11 50 10 edit "", 4, 51 11 100 10, disable text "Email", 5, 1 22 50 10 edit "", 6, 51 22 100 10, disable button "Create Account", 7, 1 33 151 10 button "Cancel", 8, 1 44 151 10 } dialog account_management_manage { title Manage Account option dbu size -1 -1 203 77 text "Username", 1, 1 1 50 10 edit "", 2, 51 1 100 10 button "Search", 3, 152 1 50 10 button "Look-up", 4, 1 11 202 10 text "Password", 5, 1 22 50 10 edit "", 6, 51 22 152 10, pass disable text "Email", 7, 1 33 50 10 edit "", 8, 51 33 152 10, disable check "Lock Account", 11, 1 44 202 10, disable button "Complete", 9, 1 55 202 10, disable button "Cancel", 10, 1 66 202 10 } dialog account_management_manage_list { title Account List option dbu size -1 -1 101 143 list 1, 1 1 100 100 text "Username", 2, 1 100 100 10 edit "", 3, 1 110 100 10, right read button "Select", 4, 1 121 100 10, disable button "Cancel", 5, 1 132 100 10 } dialog account_management_delete { title Delete Account option dbu size -1 -1 101 143 list 1, 1 1 100 100 text "Username", 2, 1 100 100 10 edit "", 3, 1 110 100 10, right read button "Delete", 4, 1 121 100 10, disable button "Cancel", 5, 1 132 100 10 } dialog account_staff { title Staff Management option dbu size -1 -1 101 33 button "Manage Staffers", 1, 1 1 100 10 button "Manage Groups", 2, 1 11 100 10 button "Back", 3, 1 22 100 10 } dialog account_staff_manage { title Manage Staff option dbu size -1 -1 101 44 button "New Staffer", 1, 1 1 100 10 button "Manage Staffer", 2, 1 11 100 10 button "Fire Staffer", 3, 1 22 100 10 button "Back", 4, 1 33 100 10 } dialog account_staff_manage_hire { title Hire New Staff option dbu size -1 -1 203 55 text "Username", 1, 1 1 50 10 edit "", 2, 51 1 100 10 button "Search", 3, 152 1 50 10 button "Look-up", 4, 1 11 202 10 text "Group", 5, 1 22 50 10 combo 6, 51 22 152 10, drop disable button "Hire", 7, 1 33 202 10, disable button "Cancel", 8, 1 44 202 10 } dialog account_staff_manage_hire_list { title Non-Staff Account List option dbu size -1 -1 101 143 list 1, 1 1 100 100 text "Username", 2, 1 100 100 10 edit "", 3, 1 110 100 10, right read button "Select", 4, 1 121 100 10, disable button "Cancel", 5, 1 132 100 10 } dialog account_staff_manage_manage { title Manage Staffer option dbu size -1 -1 203 66 text "Username", 1, 1 1 50 10 edit "", 2, 51 1 100 10 button "Search", 3, 152 1 50 10 button "Look-up", 4, 1 11 202 10 text "Group", 5, 1 22 50 10 combo 6, 51 22 152 10, drop disable button "Individual Permissions", 7, 1 33 202 10, disable button "Complete", 8, 1 44 202 10, disable button "Cancel", 9, 1 55 202 10 } dialog account_staff_manage_manage_list { title Staff List option dbu size -1 -1 101 143 list 1, 1 1 100 100 text "Username", 2, 1 100 100 10 edit "", 3, 1 110 100 10, right read button "Select", 4, 1 121 100 10, disable button "Cancel", 5, 1 132 100 10 } dialog account_staff_manage_manage_perms { title Manage Permissions option dbu size -1 -1 152 55 text "Permission", 1, 1 1 50 10 combo 2, 51 1 100 10, drop text "Current", 3, 1 13 50 10 text "", 4, 51 13 100 10, right text "New", 5, 1 24 50 10 edit "", 6, 51 24 100 10, right disable button "Change", 7, 1 35 151 10, disable button "Cancel", 8, 1 46 151 10 } dialog account_staff_manage_fire { title Fire Staffer option dbu size -1 -1 101 145 list 1, 1 1 100 100 text "Username", 2, 1 101 100 10 text "", 3, 1 112 100 10 button "Fire", 4, 1 123 100 10, disable button "Cancel", 5, 1 134 100 10 } dialog account_staff_groups { title Group Options option dbu size -1 -1 101 44 button "Create Group", 1, 1 1 100 10 button "Manage Group", 2, 1 11 100 10 button "Delete Group", 3, 1 22 100 10 button "Back", 4, 1 33 100 10 } dialog account_staff_groups_create { title Create Group option dbu size -1 -1 152 44 text "Group Name", 1, 1 1 50 10 edit "", 2, 51 1 100 10 text "OpLevel", 3, 1 11 50 10 combo 4, 51 11 100 10, drop button "Create", 5, 1 22 151 10 button "Cancel", 6, 1 33 151 10 } dialog account_staff_groups_manage { title Manage Group option dbu size -1 -1 203 68 text "Group Name", 1, 1 1 50 10 edit "", 2, 51 1 100 10 button "Search", 3, 152 1 50 10 button "Look-up", 4, 1 11 202 10 text "OpLevel", 5, 1 22 100 10 combo 6, 101 22 100 10, drop disable button "Change Permissions", 7, 1 35 202 10, disable button "Complete", 8, 1 46 202 10, disable button "Cancel", 9, 1 57 202 10 } dialog account_staff_groups_manage_list { title Groups List option dbu size -1 -1 101 145 list 1, 1 1 100 100 text "Group Name", 2, 1 101 100 10 text "", 3, 1 112 100 10 button "Select", 4, 1 123 100 10, disable button "Cancel", 5, 1 134 100 10 } dialog account_staff_groups_manage_perms { title Manage Permissions option dbu size -1 -1 152 55 text "Permission", 1, 1 1 50 10 combo 2, 51 1 100 10, drop text "Current", 3, 1 13 50 10 text "", 4, 51 13 100 10, right text "New", 5, 1 24 50 10 edit "", 6, 51 24 100 10, right disable button "Change", 7, 1 35 151 10, disable button "Cancel", 8, 1 46 151 10 } dialog account_staff_groups_delete { title Delete Group option dbu size -1 -1 101 145 list 1, 1 1 100 100 text "Group Name", 2, 1 101 100 10 text "", 3, 1 112 100 10 button "Delete", 4, 1 123 100 10, disable button "Cancel", 5, 1 134 100 10 } dialog account_system { title System Settings option dbu size -1 -1 101 44 button "Core Settings", 1, 1 1 100 10 button "User Settings", 2, 1 11 100 10 button "Staff Settings", 3, 1 22 100 10 button "Back", 4, 1 33 100 10 } dialog account_system_core { title Core System Settings option dbu size -1 -1 101 66 button "Output to Channel", 1, 1 1 100 10 button "Output Channel", 2, 1 11 100 10 button "Enforce Channel Access", 4, 1 22 100 10 button "Join Output Channel", 5, 1 33 100 10 button "Autojoin on Connect", 6, 1 44 100 10 button "Back", 3, 1 55 100 10 } dialog account_system_user { title User System Settings option dbu size -1 -1 101 66 button "User Registration", 1, 1 1 100 10 button "User Logins", 2, 1 11 100 10 button "Require Password", 3, 1 22 100 10 button "Require Email", 4, 1 33 100 10 button "Email Validation", 5, 1 44 100 10 button "Back", 6, 1 55 100 10 } ;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;on Dialog event;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;; on *:DIALOG:account:*:*: { If ($devent == sclick) { If ($did == 1) { dclose account start account_management } If ($did == 2) { dclose account start account_staff } If ($did == 3) { dclose account start account_system } } } on *:DIALOG:account_management:*:*: { If ($devent == sclick) { If ($did == 1) { dclose account_management start account_management_new } If ($did == 2) { dclose account_management start account_management_manage } If ($did == 3) { dclose account_management start account_management_delete } If ($did == 4) { dclose account_management start account } } If ($devent == close) { start account } } on *:DIALOG:account_management_new:*:*: { If ($devent == init) { If ($eas(settings,password) == on) { did -e $dname 4 } If ($eas(settings,email) == on) { did -e $dname 6 } } If ($devent == sclick) { If ($did == 7) { If (!$did(2)) { did -f $dname 2 } If ($eas(settings,password) == on) { If (!$did(4)) { did -f $dname 4 } } If ($eas(settings,email) == on) { If (!$did(6)) { did -f $dname 6 } } account register $did(2) $iif($eas(settings,password) == on,$did(4),) $iif($eas(settings,email) == on,$did(6),) dclose account_management_new start account_management } If ($did == 8) { dclose account_management_new start account_management } } If ($devent == close) { start account_management } } on *:DIALOG:account_management_manage:*:*: { If ($devent == sclick) { If ($did == 3) { start account_management_manage_list } If ($did == 4) { If ($eas(isRegistered,$did(2)) == yes) { did -b $dname 2-4 If ($eas(settings,password) == on) { did -era $dname 6 $eas(userPass,$did(2)) } If ($eas(settings,email) == on) { did -era $dname 8 $eas(userEmail,$did(2)) } If ($alock($did(2)) == yes) { did -c $dname 11 } did -e $dname 9,11 } Else { did -fr $dname 2 } } If ($did == 9) { writeini account/ $+ $did(2) $+ /account.ini status password $did(6) writeini account/ $+ $did(2) $+ /account.ini status email $did(8) dclose $dname start account_management } If ($did == 10) { dclose $dname start account_management } If ($did == 11) { If ($alock($did(2)) == yes) { account unlock $did(2) did -u $dname 11 } Else { var %temp.1 $?="PLease enter a time to expire in seconds." var %temp.2 $?="Please enter a lock reason." account lock $did(2) %temp.1 %temp.2 did -c $dname 11 start $dname } } } If ($devent == close) { start account_management } } on *:DIALOG:account_management_manage_list:*:*: { If ($devent == init) { If (!$dialog(account_management_manage)) { start account_management_manage dialog -v $dname } var %temp.1 1 While (%temp.1 <= $lines(account/accounts.txt)) { did -a $dname 1 $read(account/accounts.txt,t,%temp.1) inc %temp.1 } } If ($devent == sclick) { If ($did == 1) { did -ra $dname 3 $did(1).seltext did -e $dname 4 } If ($did == 4) { If (!$dialog(account_management_manage)) { start account_management_manage } did -b account_management_manage 2-4 did -ra account_management_manage 2 $did(3) If ($eas(settings,password) == on) { did -era account_management_manage 6 $eas(userPass,$did(3)) } If ($eas(settings,email) == on) { did -era account_management_manage 8 $eas(userEmail,$did(3)) } did -e account_management_manage 9,11 If ($alock($did(3)) == yes) { did -c account_management_manage 11 } dclose $dname start account_management_manage } If ($did == 5) { dclose $dname start account_management_manage } } If ($devent == dclick) { If ($did == 1) { If (!$dialog(account_management_manage)) { start account_management_manage } did -b account_management_manage 2-4 did -ra account_management_manage 2 $did(1).seltext If ($eas(settings,password) == on) { did -era account_management_manage 6 $eas(userPass,$did(1).seltext) } If ($eas(settings,email) == on) { did -era account_management_manage 8 $eas(userEmail,$did(1).seltext) } did -e account_management_manage 9,11 If ($alock($did(1).seltext) == yes) { did -c account_management_manage 11 } dclose $dname start account_management_manage } } If ($devent == close) { start account_management } } on *:DIALOG:account_management_delete:*:*: { If ($devent == init) { var %temp.1 1 While (%temp.1 <= $lines(account/accounts.txt)) { did -a $dname 1 $read(account/accounts.txt, %temp.1) inc %temp.1 } } If ($devent == sclick) { If ($did == 1) { did -ra $dname 3 $did(1).seltext did -e $dname 4 } If ($did == 4) { If (!$did(3)) { did -b $dname 4 | halt } account unregister $did(3) dclose $dname start account_management } If ($did == 5) { dclose $dname start account_management } } If ($devent == close) { start account_management } } on *:DIALOG:account_staff:*:*: { If ($devent == sclick) { If ($did == 1) { dclose $dname start account_staff_manage } If ($did == 2) { dclose $dname start account_staff_groups } If ($did == 3) { dclose $dname start account } } If ($devent == close) { start account } } on *:DIALOG:account_staff_manage:*:*: { If ($devent == sclick) { If ($did == 1) { dclose $dname start account_staff_manage_hire } If ($did == 2) { dclose $dname start account_staff_manage_manage } If ($did == 3) { dclose $dname start account_staff_manage_fire } If ($did == 4) { dclose $dname start account_staff } } If ($devent == close) { start account_staff } } on *:DIALOG:account_staff_manage_hire:*:*: { If ($devent == init) { var %temp.1 1 While (%temp.1 <= $lines(account/staff/groups.txt)) { did -a $dname 6 $read(account/staff/groups.txt,t,%temp.1) inc %temp.1 } } If ($devent == sclick) { If ($did == 3) { start account_staff_manage_hire_list } If ($did == 4) { If ($eas(isRegistered,$did(2)) != yes) { did -rf $dname 2 | cout User is not registered! | halt } If ($eas(isStaff,$did(2)) == yes) { did -rf $dname 2 | cout User is already staff! | halt } did -b $dname 2-4 did -e $dname 6,7 } If ($did == 7) { If (!$did(6).seltext) { cout Select a group first! | halt } account hire $did(2) $did(6) dclose $dname start account_staff_manage } If ($did == 8) { dclose $dname start account_staff_manage } } If ($devent == close) { start account_staff_manage } } on *:DIALOG:account_staff_manage_hire_list:*:*: { If ($devent == init) { var %temp.1 1 While (%temp.1 <= $lines(account/accounts.txt)) { If ($eas(isStaff,$read(account/accounts.txt,t,%temp.1)) != yes) { did -a $dname 1 $read(account/accounts.txt,t,%temp.1) } inc %temp.1 } } If ($devent == sclick) { If ($did == 1) { did -ra $dname 3 $did(1).seltext did -e $dname 4 } If ($did == 4) { did -b account_staff_manage_hire 2-4 did -ra account_staff_manage_hire 2 $did(3) did -e account_staff_manage_hire 6,7 dclose $dname start account_staff_manage_hire } If ($did == 5) { dclose $dname start account_staff_manage_hire } } If ($devent == dclick) { If ($did == 1) { did -b account_staff_manage_hire 2-4 did -ra account_staff_manage_hire 2 $did(1).seltext did -e account_staff_manage_hire 6,7 dclose $dname start account_staff_manage_hire } } If ($devent == close) { start account_staff_manage_hire } } on *:DIALOG:account_staff_manage_manage:*:*: { If ($devent == init) { var %temp.1 1 While (%temp.1 <= $lines(account/staff/groups.txt)) { did -a $dname 6 $read(account/staff/groups.txt,t,%temp.1) inc %temp.1 } } If ($devent == sclick) { If ($did == 3) { start account_staff_manage_manage_list } If ($did == 4) { If ($eas(isStaff,$did(2)) != yes) { did -rf $dname 2 | cout User is not staff! | halt } did -b $dname 2-4 did -e $dname 6-8 } If ($did == 7) { start account_staff_manage_manage_perms } If ($did == 8) { If (!$did(6).seltext) { cout Please select a group first! | halt } account changeGroup $did(2) $did(6).seltext dclose $dname start account_staff_manage } If ($did == 9) { dclose $dname start account_staff_manage } } If ($devent == close) { start account_staff_manage } } on *:DIALOG:account_staff_manage_manage_list:*:*: { If ($devent == init) { var %temp.1 1 While (%temp.1 <= $lines(account/staff/staffers.txt)) { did -a $dname 1 $read(account/staff/staffers.txt,t,%temp.1) inc %temp.1 } } If ($devent == sclick) { If ($did == 1) { did -ra $dname 3 $did(1).seltext did -e $dname 4 } If ($did == 4) { did -b account_staff_manage_manage 2-4 did -ra account_staff_manage_manage 2 $did(3) did -e account_staff_manage_manage 6-8 dclose $dname start account_staff_manage_manage } If ($did == 5) { dclose $dname start account_staff_manage_manage } } If ($devent == dclick) { If ($did == 1) { did -b account_staff_manage_manage 2-4 did -ra account_staff_manage_manage 2 $did(1).seltext did -e account_staff_manage_manage 6-8 dclose $dname start account_staff_manage_manage } } If ($devent == close) { start account_staff_manage_manage } } on *:DIALOG:account_staff_manage_manage_perms:*:*: { If ($devent == init) { var %temp.1 1 While (%temp.1 <= $lines(account/perms.txt)) { did -a $dname 2 $read(account/perms.txt,t,%temp.1) inc %temp.1 } } If ($devent == sclick) { If ($did == 2) { did -b $dname 2 did -ra $dname 4 $eas(perm,$did(account_staff_manage_manage,2),$did(2).seltext) did -e $dname 6,7 } If ($did == 7) { If (!$did(6)) { did -f $dname 6 | cout Please type a new value first! | halt } account changePerm $did(account_staff_manage_manage,2) $did(2).seltext $did(6) dclose $dname start account_staff_manage_manage } If ($did == 8) { dclose $dname start account_staff_manage_manage } } If ($devent == close) { start account_staff_manage_manage } } on *:DIALOG:account_staff_manage_fire:*:*: { If ($devent == init) { var %temp.1 1 While (%temp.1 <= $lines(account/staff/staffers.txt)) { did -a $dname 1 $read(account/staff/staffers.txt, %temp.1) inc %temp.1 } } If ($devent == sclick) { If ($did == 1) { did -ra $dname 3 $did(1).seltext did -e $dname 4 } If ($did == 4) { account fire $did(3) dclose $dname start account_staff_manage } If ($did == 5) { dclose $dname start account_staff_manage } } If ($devent == close) { start account_staff_manage } } on *:DIALOG:account_staff_groups:*:*: { If ($devent == sclick) { If ($did == 1) { dclose $dname start account_staff_groups_create } If ($did == 2) { dclose $dname start account_staff_groups_manage } If ($did == 3) { dclose $dname start account_staff_groups_delete } If ($did == 4) { dclose $dname start account_staff } } If ($devent == close) { start account_staff } } on *:DIALOG:account_staff_groups_create:*:*: { If ($devent == init) { var %temp.1 1 While (%temp.1 <= 7) { did -a $dname 4 %temp.1 inc %temp.1 } } If ($devent == sclick) { If ($did == 5) { If (!$did(2)) { did -f $dname 2 | cout Please input a name first! | halt } If ($eas(isGroup,$did(2)) == yes) { did -f $dname 2 | cout This group is already registered! | halt } If (!$did(4).seltext) { did -f $dname 4 | cout Please select an OpLevel first! | halt } account group $did(2) add $did(4).seltext dclose $dname start account_staff_groups } If ($did == 6) { dclose $dname start account_staff_groups } } If ($devent == close) { start account_staff_groups } } on *:DIALOG:account_staff_groups_manage:*:*: { If ($devent == init) { var %temp.1 1 While (%temp.1 <= 7) { did -a $dname 6 %temp.1 inc %temp.1 } } If ($devent == sclick) { If ($did == 3) { start account_staff_groups_manage_list } If ($did == 4) { If (!$did(2)) { did -f $dname 2 | halt } If ($eas(isGroup,$did(2)) != yes) { did -f $dname 2 | cout This is not a valid group! | halt } did -b $dname 2-4 did -e $dname 6-8 did -ra $dname 5 OpLevel - Current: $eas(opLevel,$did(2)) } If ($did == 7) { start account_staff_groups_manage_perms } If ($did == 8) { If (!$did(6).seltext) { did -f $dname 6 | cout Please select a new OpLevel! | halt } account group $did(2) opLevel $did(6).seltext dclose $dname start account_staff_groups } If ($did == 9) { dclose $dname start account_staff_groups } } If ($devent == close) { dclose $dname start account_staff_groups } } on *:DIALOG:account_staff_groups_manage_list:*:*: { If ($devent == init) { var %temp.1 1 While (%temp.1 <= $lines(account/staff/groups.txt)) { did -a $dname 1 $read(account/staff/groups.txt,t,%temp.1) inc %temp.1 } } If ($devent == sclick) { If ($did == 1) { did -ra $dname 3 $did(1).seltext did -e $dname 4 } If ($did == 4) { did -b account_staff_groups_manage 2-4 did -e account_staff_groups_manage 6-8 did -ra account_staff_groups_manage 2 $did(3) did -ra account_staff_groups_manage 5 OpLevel - Current: $eas(opLevel,$did(3)) dclose $dname start account_staff_groups_manage } If ($did == 5) { dclose $dname start account_staff_groups_manage } } If ($devent == dclick) { If ($did == 1) { did -b account_staff_groups_manage 2-4 did -e account_staff_groups_manage 6-8 did -ra account_staff_groups_manage 2 $did(1).seltext did -ra account_staff_groups_manage 5 OpLevel - Current: $eas(opLevel,$did(1).seltext) dclose $dname start account_staff_groups_manage } } If ($devent == close) { start account_staff_groups_manage } } on *:DIALOG:account_staff_groups_manage_perms:*:*: { If ($devent == init) { var %temp.1 1 While (%temp.1 <= $lines(account/perms.txt)) { did -a $dname 2 $read(account/perms.txt,t,%temp.1) inc %temp.1 } } If ($devent == sclick) { If ($did == 2) { did -b $dname 2 did -ra $dname 4 $eas(gperm,$did(account_staff_groups_manage,2),$did(2).seltext) did -e $dname 6,7 } If ($did == 7) { If (!$did(6)) { did -f $dname 6 | cout Please type a new value first! | halt } account group $did(account_staff_groups_manage,2) perms $did(2).seltext $did(6) dclose $dname start account_staff_groups_manage } If ($did == 8) { dclose $dname start account_staff_groups_manage } } If ($devent == close) { start account_staff_groups_manage } } on *:DIALOG:account_staff_groups_delete:*:*: { If ($devent == init) { var %temp.1 1 While (%temp.1 <= $lines(account/staff/groups.txt)) { did -a $dname 1 $read(account/staff/groups.txt,t,%temp.1) inc %temp.1 } } If ($devent == sclick) { If ($did == 1) { did -ra $dname 3 $did(1).seltext did -e $dname 4 } If ($did == 4) { account group $did(3) remove dclose $dname start account_staff_groups } If ($did == 5) { dclose $dname start account_staff_groups } } If ($devent == close) { start account_staff_groups } } on *:DIALOG:account_system:*:*: { If ($devent == sclick) { If ($did == 1) { dclose $dname start account_system_core } If ($did == 2) { dclose $dname start account_system_user } If ($did == 3) { account settings staff | halt } If ($did == 4) { dclose $dname start account } } If ($devent == close) { start account } } on *:DIALOG:account_system_core:*:*: { If ($devent == init) { did -ra $dname 1 Output to Channel: $eas(settings,output) did -ra $dname 2 Output Channel: $eas(status,output) did -ra $dname 4 Enforce Channel Access: $eas(settings,enforcechannelaccess) did -ra $dname 6 Autojoin on Connect: $eas(settings,autojoin) } If ($devent == sclick) { If ($did == 1) { If ($eas(settings,output) == on) { writeini account/account.ini settings output off did -ra $dname 1 Output to Channel: Off } Else { writeini account/account.ini settings output on did -ra $dname 1 Output to Channel: On } } If ($did == 2) { var %temp.1 $?="Please enter the name of the new channel." If (%temp.1) { writeini account/account.ini status output %temp.1 did -ra $dname 2 Output Channel: %temp.1 } start $dname } If ($did == 3) { dclose $dname start account_system } If ($did == 4) { If ($eas(settings,enforcechannelaccess) == on) { writeini account/account.ini settings enforcechannelaccess off did -ra $dname 4 Enforce Channel Access: Off } Else { writeini account/account.ini settings enforcechannelaccess on did -ra $dname 4 Enforce Channel Access: On } } If ($did == 5) { join $eas(status,output) did -b $dname 5 start $dname } If ($did == 6) { If ($eas(settings,autojoin) == on) { writeini account/account.ini settings autojoin off did -ra $dname 6 Autojoin on Connect: Off } Else { writeini account/account.ini settings autojoin on did -ra $dname 6 Autojoin on Connect: On } } } If ($devent == close) { start account_system } } on *:DIALOG:account_system_user:*:*: { If ($devent == init) { did -ra $dname 1 User Registration: $iif($eas(settings,registration) == on,On,Off) did -ra $dname 2 User Login: $iif($eas(settings,login) == on,On,Off) did -ra $dname 3 Require Password: $iif($eas(settings,password) == on,On,Off) did -ra $dname 4 Require Email: $iif($eas(settings,email) == on,On,Off) did -ra $dname 5 Email Validation: $iif($eas(settings,emailvalidate) == on,On,Off) } If ($devent == sclick) { If ($did == 1) { If ($eas(settings,registration) == on) { writeini account/account.ini settings registration off did -ra $dname 1 User Registration: Off } Else { writeini account/account.ini settings registration on did -ra $dname 1 User Registration: On } } If ($did == 2) { If ($eas(settings,login) == on) { writeini account/account.ini settings login off did -ra $dname 2 User Login: Off } Else { writeini account/account.ini settings login on did -ra $dname 2 User Login: On } } If ($did == 3) { If ($eas(settings,password) == on) { writeini account/account.ini settings password off did -ra $dname 3 Require Password: Off } Else { writeini account/account.ini settings password on did -ra $dname 3 Require Password: On } } If ($did == 4) { If ($eas(settings,email) == on) { writeini account/account.ini settings email off did -ra $dname 4 Require Email: Off } Else { writeini account/account.ini settings email on did -ra $dname 4 Require Email: On } } If ($did == 5) { If ($eas(settings,emailvalidate) == on) { writeini account/account.ini settings emailvalidate off did -ra $dname 5 Email Validation: Off } Else { writeini account/account.ini settings emailvalidate on did -ra $dname 5 Email Validation: On } } If ($did == 6) { dclose $dname start account_system } } If ($devent == close) { start account_system } } ;;;;;;;;;;;;;; ;;;;;Menu;;;;; ;;;;;;;;;;;;;; menu * { - EAS Console: /account open } ;;;;;;;;;;;;;;;;; ;;;;;on TEXT;;;;; ;;;;;;;;;;;;;;;;; on *:TEXT:!account*:*: { If ($readini(account/account.ini,status,installed) != yes) { halt } If ($eas(checkversion) != $eas(version)) { .msg $nick Please wait while the system is updated. | halt } If ($eas(isRegistered,$nick) != yes) { If (!$2) && ($2 != register) { .msg $nick You are not currently registered for an account. If ($eas(settings,registration) == on) { .msg $nick To register for an account, please type: !account register $iif($eas(settings,password) == on,$iif($eas(settings,email) == on,<password> <email>,<password>),$iif($eas(settings,email) == on,<email>,)) } Else { .msg $nick Currently, the owner is not allowing any new registrations. } } Else { If ($eas(settings,password) == on) { If ($eas(settings,email) == on) { If (!$4) { .msg $nick Please type !account register <password> <email> | halt } If ($eas(settings,emailvalidate) == on) { If ($readini(account/account.ini,emailvalidate,$4) == registered) { .msg $nick This email is already registered to another account. | halt } } account register $nick $3 $4 account login $nick -s .msg $nick You have been sucessfully registered for an account! To begin, please type !account If ($eas(settings,output) == on) { msg $eas(status,output) $nick has sucessfully registered for an account: $asctime(ddmmmyyyy hh:nn:ss TT) } halt } Else { If (!$3) { .msg $nick Please type !account register <password> | halt } account register $nick $3 account login $nick -s .msg $nick You have been sucessfully registered for an account! To begin, please type !account If ($eas(settings,output) == on) { msg $eas(status,output) $nick has sucessfully registered for an account: $asctime(ddmmmyyyy hh:nn:ss TT) } halt } } Else { If ($eas(settings,email) == on) { If (!$3) { .msg $nick Please type !account register <email> | halt } If ($eas(settings,emailvalidate) == on) { If ($readini(account/account.ini,emailvalidate,$4) == registered) { .msg $nick This email is already registered to another account. | halt } } account register $nick $3 account login $nick -s .msg $nick You have been sucessfully registered for an account! To begin, please type !account If ($eas(settings,output) == on) { msg $eas(status,output) $nick has sucessfully registered for an account: $asctime(ddmmmyyyy hh:nn:ss TT) } halt } Else { account register $nick account login $nick -s .msg $nick You have been sucessfully registered for an account! To begin, please type !account If ($eas(settings,output) == on) { msg $eas(status,output) $nick has sucessfully registered for an account: $asctime(ddmmmyyyy hh:nn:ss TT) } halt } } } } Elseif ($alock($nick) == yes) { If ($eas(perm,$nick,op) == true) { goto accountlogin } If ($eas(perm,$nick,lockBypass) == true) { goto accountlogin } If ($eas(gperm,$eas(staffGroup,$nick),op) == true) { goto accountlogin } If ($eas(gperm,$eas(staffGroup,$nick),lockBypass) == true) { goto accountlogin } If ($ctime >= $alock($nick,unlock)) { account unlock $nick goto accountlogin } .msg $nick You are currently locked out of your account. .msg $nick You are locked out for the following reason: $alock($nick,reason) .msg $nick Your account will unlock on: $asctime($alock($nick,unlock),ddmmmyyyy hh:nn:ss TT) halt } goto accountlogin :accountlogin If ($eas(loggedin,$nick) != yes) { If (!$3) || ($eas(userPass,$nick) !=== $3) { .msg $nick Please login first by typing /msg $me !account login <password> | halt } Else { account login $nick .msg $nick You have been logged-in sucessfully! To begin, please type !account halt } } Else { If (!$2) { .msg $nick Please select from the following options: .msg $nick To view your changeable account settings, please type !account settings .msg $nick To view your unchangeable account settings, please type !account uas .msg $nick To logout, please type !account logout } Elseif ($2 == settings) { If (!$3) { .msg $nick The following are your changeable account settings (and how to change them): .msg $nick Password: $iif($eas(userPass,$nick),$eas(userPass,$nick),Not Set) - !account settings pass <new password> .msg $nick Email: $iif($eas(userEmail,$nick),$eas(userEmail,$nick,),Not Set) - !account settings email <new email> } Elseif ($3 == pass) { If (!$4) { .msg $nick Please type !account settings pass <new pass> | halt } writeini account/ $+ $nick $+ /account.ini status password $4 .msg $nick Your password has been changed sucessfully! If ($eas(settings,password) != on) { .msg $nick Currently, a password is not required to login. } } Elseif ($3 == email) { If (!$4) { .msg $nick Please type !account settings email <new email> | halt } If ($eas(settings,emailvalidate) == on) { If ($readini(account/account.ini,emailvalidate,$4) == registered) { .msg $nick That email is already registered to another account. | halt } Else { remini account/account.ini emailvalidate $eas(userEmail,$nick) writeini account/account.ini emailvalidate $4 } } writeini account/ $+ $nick $+ /account.ini status email $4 .msg $nick Your email has been changed sucessfully! If ($eas(settings,email) != on) { .msg $nick Currently, an email is not required. } } Else { .msg $nick Unknown command. For more help with this, please type !account settings } } Elseif ($2 == uas) { .msg $nick The following are your unchangeable account settings: .msg $nick Join Date: $asctime($eas(joinTime,$nick),ddmmmyyyy hh:nn:ss TT) .msg $nick Is your account locked? $alock($nick) .msg $nick Most recent lock date: $asctime($alock($nick,date),ddmmmyyyy hh:nn:ss TT) - by: $alock($nick,locker) .msg $nick Reason: $alock($nick,reason) } Elseif ($2 == logout) { account logout $nick .msg $nick You've been logged-out sucessfully! } Else { .msg $nick Unknown command. For more help with this, please type !account } } } ;;;;;;;;;;;;;;;;;;; ;;;;;on *:JOIN;;;;; ;;;;;;;;;;;;;;;;;;; on *:JOIN:*: { If ($nick == $me) { halt } If ($chan == $eas(status,output)) && ($eas(settings,enforcechannelaccess) == yes) { If ($eas(isStaff,$nick) != yes) { kick $chan $nick } Else { msg $chan Welcome $nick $+ ! Please remember this channel access is restricted. } } } ;;;;;;;;;;;;;;;;;;;;;; ;;;;;on *:CONNECT;;;;; ;;;;;;;;;;;;;;;;;;;;;; on *:CONNECT: { If ($eas(settings,autojoin) == on) { join $eas(status,output) } }