Jump to content

chain

Administrators
  • Posts

    5,971
  • Joined

  • Last visited

  • Days Won

    17

Posts posted by chain

  1. Popups

    rightclickmenunicklist.gifIn simple way, Popups are the menus that appear when you right click on an mIRC window. They are a list of predefined commands . Popups are also used to control window mouse events.

    Look at the screenshot shown at the right, that's how a Popup looks like. You get that one when you right click in the nickname list (the column at the right corner of the channel window, where you see the nicknames). Try clicking there. Depending on whether you are using a script or not you should see something similar to the picture shown here; it's the default mIRC nickname list Popup. As you can see from the shown picture there are some available menus such Info, Whois, Query, Control ect...
     

    Creating Popups

    There are 2 ways to create popups :

    1. One is to use the Popups Editor in the scripts editor which is divided into sections already, so, you don't have to declare what kind of manu it is, just create the menu items.
    2. And the second way is by using the Remote Tab and using the menu declaration.

    1. Creating Popus using Popups Editor

    Now let's start with creating your first Popup using the Popups tab section in the Scripts Editor.
    First take a look at the Popup files for the Popups in mIRC. Press ALT+P (this takes you directly to the Scripts Editor in Popups mode). See the codes? Most probably the Popups file for the Status window will be put in the Edit mode. Right click in the Status window and analyze the codes and the corresponding Popup. If you want to see the Popup file for NickList, click on View and choose Nick List. Now take a look at the codes and compare with what you see in the Nick List Popup when you right click. Making sense?

    Let's get going with what we were upto. First you have to decide which window you want to write the Popup for. If it's for the Channel window, click on View and select Channel, similarly, the same for other windows. Now write the following codes in the Popups Editor. We are going to make a Popup for the channel window. Make sure you have chosen Channel from the View Menu.

    - 
    My First Popup: / 
    - 
    Hello: say Hello everybody! 
    Bye: say Good bye everybody! 
    - 
    Greetings 
    .Thanks Friends:say Thanks for being wonderful friends!
    .New Year: say New Year Wishes to all! 
    .God Bless: say The blessing of God on all!
    -
    Love Sayings:{
      say The greatest healing therapy is friendship and love!
      .timer 1 3 say When you love someone, all your saved-up wishes start coming out!
      .timer 1 7 say Love is the emblem of eternity, it confounds all notion of time!
    }
    -
    Quit: quit Killed by a Popup! 
    Close mIRC: exit

    Sure you have to join a channel and right click in the main channel window to see the result of the above code. If you did all correctly you should see the Popup menu such the below picture:

    myfirstchannelpopupmenus.gif

    Using the above code as an example, I will cover the topic on Popups for beginners. Let me explain you the code. The - is to create a line separator between the menus. I used it in the first line to separate the new Popup menu from the already existing Channel Modes menu of the channel Popup. The menu 'My First Popup' is a functionless menu, I used it to give a name to the Popup we just created.

    Popups menu definitions follow this pattern Menu name: mIRC-command. For eg: Hello: /say Hello everybody will perform the command /say Hello everybody when you click on Hello in the Popup menu. Hello is the menu name and /say Hello everybody is the command executed by mIRC. Similarly Bye is the menu name and /say Good bye everybody! is the command.

    In the next menu we have Greetings as the main and Thanks Friends, God Bless and New Year as submenus. Submenus are created by putting a . (dot) infront of the submenu name following the menu name. And if you want to create submenus under a submenu, you need to put .. (two dots) in front of the sub-submenu name following the submenu name.

    In the Love Sayings menu, we have 3 commands. To include more than one command in the Popup (also in Remote), we enclose the commands within { } (curley brackets). Look at the Love Sayings Popup code...
     

    Love Sayings:{
      say The greatest healing therapy is friendship and love!
      .timer 1 3 say When you love someone, all your saved-up wishes start coming out!
      .timer 1 7 say Love is the emblem of eternity, it confounds all notion of time!
    }
    



    In additon to that In the commands of this popup you can see .timer 1 3. It's an mIRC command which starts a timer and executes the mIRC command(s) according to the specification. timer 1 3 will execute the command following it, once after 3 secs (1 3). You can observe the same in new menu if you want to. Say you want to sing "Show me Some Emotion" a song by Celine Dion and send some words of the lyric to the current channel, then your codes should be something like :
     

    A song by Celine Dion:{
      me would like to present "Show me Some Emotion" a song by Celine Dion!?
      .timer 1 5 say I've tried my best for so long
      .timer 1 8 say To break down these walls
      .timer 1 11 say But you build them strong
      .timer 1 14 say So I stand here waiting, wondering why
      .timer 1 17 say Oh why
      .timer 1 20 say Why you don't give a little bit
      .timer 1 23 say Break down and give a little bit
      .timer 1 26 say Show, show some emotion
      .timer 1 29 say Open, open your heart, ooh
      .timer 1 32 say Set free an ocean
      .timer 1 35 say Only a feeling can save us now
      .timer 1 38 say You say you've been hurt
      .timer 1 41 say Well you're not alone
      .timer 1 45 say and so on..
    }
    

    It contains 15 commands, all of them enclosed within { }. Try removing the . (dot) before the timer command and see what happens.

    2. Creating Popups using Remote Editor

    You can also create and write Popup code in the Remote Editor by using menu declaration. Below is the basic pattern to create Popup menus using this method :
     

    menu window_name(channel,nicklist,status,menubar,query,@window) {
      menu_name: mirc_command(s)
    }

    For example :
     

    menu channel {
      leave this channel: part
    }

    This code is to create a popup menu for the channel window. If you want to create a popup menus for the nick list section (the column at the right corner of the channel window, where you see the nicknames) then the code should look like menu nicklist { leave this channel:part }, and use the same way for other mIRC windows. Just make sure you write all the codes in the Remote tab section in the Scripts Editor. The codes for our first Popups (the popups which we've created in the first session of this tutorial) should look like in the below screenshot when we create this using this method:

    RemoteEditormyfirstpopups.gif

    easy right!?.

    If you want to create a Popup for more than one window name, you can include the locations (window name) separated with a comma after menu. like This :

    menu channel,nicklist,query {
      Exit Program: exit
    }

    wasn't that cool?. With this I close the chapter on Popups. Next I invite you to join me in the vastest and most important subject on mIRC scripting : "Remotes".

    Tips: You want to test and debug your remote online scripts without being connected to the Internet?, just run your own IRC server and connect to it. A good one is WIRCSRV. Once you get it running type /server 127.0.0.1 in mIRC to connect.

  2. mIRC has three tool sections in which it can be "programmed" in some way: The Aliases, Popups and the Remote section. In the Remote section you can define Users, Variables and Scripts. In scripts you can define how mIRC reacts to things happening on IRC, in CTCP's and Events.

    First of all we'll see what the mIRC Scripts Editor is. It's where you write your scripts. Refer the picture below:

    ScriptEditorIcon.gifYou click on the icon pointed by the cursor in the picture to open the mIRC Scripts Editor in mIRC v6.32 or later. If you are using an older version it will look different though. I am writing this tutorial with version 6.32 in mind. If you are using an older version you will need to download and install version 6.32 or later. It's not a huge file; only 1.74 Mb or less. So you can always do it.



    aliasessection.gifThe picture on the right shows the mIRC Scripts Editor. It's in the Aliases editing mode. The other modes are Popups, Remotes, Users and Variables. You change the mode by clicking on the corresponding Tabs. I'll be using the words work space, panel and editing mode interchangeably.

    Many script files can be loaded onto the editor at a given time. For example: 5 Alias scripts, 3 Popup scripts and 13 Remote scripts. Now how do you edit the files individually? Click on View and select the script you wanna edit. Make sure you are in the proper edit mode or you won't find your files. Writing a script in the wrong mode will make your script not function at all. You should be in the correct mode - look at the active tab.ScriptsRemote.gif

    The picture on the right shows the View menu. It's in the Remote edit mode. You can observe: 13 files are loaded and Protection.mrc is the currently the active file in the edit mode.

    To create a new script file you click on File>New. To load a file, File>Load. If you have ever used NotePad you should get the logic of how things work. The File commands are similar. Only make sure when you click Unload, the intended script file is selected in the editor. It's a common mistake which happens esp if you are in a hurry. You often end up unloading the wrong file. As a newbie you should take special care.
     

    Introduction to Aliases, Popups and Remote

    Now a brief introduction about Aliases, Popups and Remote. Wondering why I didn't include User and Variables? Because they contain values to be usually created and used by the 'active' scripts (Aliases, Popups and Remote). I never use Users, I find it boring =:) It's just my personal preference and scripting style. You can definitely do without it. Variables, you don't usually write a special Variables file. Maybe some people do. But I don't. I create the variables from the scripts itself. If I have to use a lot of Variable values I usually use an INI file. You can forget about all these for now. Just remember it's the Alias, Popup and Remote which you use to create mIRC script files. Now let's take a look what they are.
     

    1. Aliases:

      Typing /j #channel makes you join #channel. /op NickName will set NickName mode +o. Type /p #channel and you part the channel #chanel. They are examples of Aliases. Let's say you have a robot called CuteAngel. When you whistle Am she closes the windows. When you whistle G# she closes the door. When you whistle F she brings you a can of beer and plays 'Live to Tell' by Madonna. Now, you see you have used whistle notes to invoke predefined actions which would have otherwise taken you more than one word to express your will. Aliases have a similar function, they help you customize your short-cuts (or long-cuts if you are not very bright) for mIRC commands. You didn't have to type /join #channel or /part #channel or /mode #channel +o NickName, which are the actual mIRC commands. We'll see more about Aliases in the Chapter on Aliases.



    2.  
    3. Popups:

      rightclickmenunicklist.gifThat's what a Popup is, the picture at the right. You get that particular one when you right click in the query window (private message window). Aliases and Popups are very similar in function. Popups too are used to create (clickable) shortcuts. In Aliases you had to know the alias you created to envoke it. In Popups you are presented with the shortcuts you created when you RightClick the mouse. Analogy: You have a poster in your room with many words listed on it. When you point on "Pizza" CuteAngel brings you a Pizza. When you point on "Pizza-o" she cleans up all the Pizza mess you created on your table. When you point on "Pizza-p" she brings you a Pizza and a Pepsi. See, you save a lot of time and energy by not having to explain CuteAngel in detail again and again what you want. Popups are often used to call (envoke) the aliases you created. We'll see more about Popups in the Popups Chapter.



    4.  
    5. Remote:

      This is the ultimate one. Apart from it's native functions it can be used to create both Aliases and Popups. And yes also custom Identifiers, things like $CuteAngel(). We'll see more about Identifiers and custom Identifiers later. If you plan to distribute your scripts, I suggest you use Remote to create Aliases and Popups. Let's take a look at the native functions of Remotes. You must have seen or heard about scripts that will automatically voice (mode +v) the people who join the channel. Or those which will close the query window if the text contains www. They are all Remote based: If something happens, then do this or that. As long as the event you specified doesn't take place the commands are not executed. CuteAngel won't clean your room as long as it is clean, she won't feed you as long as you are not hungry, she won't bath you as long as you are not stinking like a Yeti. But at the same time you should have programed her to do the necessary when the condition is true. Remote is a compartively vast topic and a very very interesting one. More about Remotes in the Remote chapter.

     

    Loadding Script Files

    If you are a really really clueless newbie you may have no idea how to load an mIRC script file too. Just in case, I'll tell you how to do that. You know there are many types of script files and you need to load them appropriately or they won't work. Most of the scripts you get online are Remote scripts so you will be using the /load -rs <filename> most often. As you might have guessed you use the load command to load the scripts. Below I show you how to load the different scripts in their appropriate ways.
     

    /load -a <filename>
    /load -pc <filename>
    /load -pn <filename>
    /load -rs <filename>
    /load -ru <filename>
    /load -rv <filename>
    Loads an Aliases file.
    Loads a channel Popup file.
    Loads a nicklist Popup file.
    Loads a Remote file.
    Loads a Users file.
    Loads a Variables file.



    That was the way to load the script files from the command line. There's another way to load scripts in mIRC - from the mIRC Editor. First select the panel where you want to load the file. If it's a Remote script the active panel in the mIRC Editor should be Remote and likewise for other script types. Then you click on File > Load, browse for the file and select it.

    To unload the files from the command line you use the unload command with the appropriate switches and the file name to unload. For example if you want to unload a Remote file named test.mrc you use the command /unload -rs test.mrc. From the mIRC Editor you unload a script by bringing it in the editing mode (it should be the active script in the mIRC Editor) and then go to File menu and click on Unload.

    Now that you've gotten some idea about the mIRC Scripts Editor, Aliases, Popups, Remotes and how to load script files we can begin with the next chapter: Aliases. It's often necessary that you learn two or more things at the same time to be able to write interesting scripts as a beginner. So a strict step by step learning process won't help you much. It'd be really helpful to your progress if you learnt about identifiers and commands on your own and right from the start. I won't be discussing in detail about Identifiers and Commands because everything is there in the Help File already. Are we ready? Let's start with Aliases.

  3. So recently while chatting on IRC server on Rizon i managed to have a chat with a chatter called socerer who owns irc-nerds. We were talking about irc scripts and servers and was asking about my server and if i would like to have more chatter's and I was like any other irc server owner of course, but how? well the topic Pylink came up and now from this day were are connected with #nerds and coder-irc-lounge with the help of sorcerer and Pylink. So if you looking to establish on getting more chatter's to your server come join on rizon #nerds or go direct to https://www.irc-nerds.wikii !! Take a sneak peak and see what it's about. 

     
    • Like 1
  4. The vast majority of users who find themselves as moderators, do not know how a ban should be structured and rely on scripts. which 9 times out of 10 ban in this way:
    Let's take for example this user: ---> Utentecattivo!Ident123@Host.provider.it

    Uservillain! Ident123@Host.provider.it


    This is called "mask" and is the set of Nick,Ident,Host
    The scripts with the simple use of the "click" of the right button on the nick and the selection of the item "banna" 9 times out of 10 ban the entire mask, then execute this command:

    /mode #nomecanale +b Utentecattivo!Ident123@Host.provider.it

    in this way if the user is a minimum awake, changes one of the 3 components of his mask, (Nick, Ident, Host) and returns despite the ban ..
    Leaving aside the methods to change Nick, Ident, Host (Very simple the first 2 a little different speech x the host),
    let's see how to set a "total" ban on a mask:
    Divide the mask into 3 parts:
    Nick
    Ident
    Host
    We set 1 ban for each segment of the mask:

    /mode #nomecanale +b Nick!*@*
    /mode #nomecanale +b *! Ident@*
    /mode #nomecanale +b *!*@Host

    (In case your script allows it, even the syntax

    /mode #channel +bbb Nick!*@* *! Ident@* *!*@Host )

  5. menu channel {
    @clone scan: /vs
    }
    
    alias vs {
    hmake clones 500
    var %x = 1, %c = $iif($1 ischan,$1,$active),%ticks = $ticks,%clones
    if ($window(@clones)) window -c @clones
    window @clones
    if (%c ischan) && ($ialchan(*,%c,0) != $nick(%c,0)) { .enable #clones | aline @clones S tò a nalizzando l a I AL .. | .ial on | who %c }
    while ($nick(%c,%x)) {
    var %i = $ifmatch
    if ($hget(clones,$address(%i,2)) == $null) && ($ialchan($address(%i,2),%c,0) > 1) {
    inc %clones $ialchan($address(%i, 2),%c,0)
    hadd clones $address(%i,2) $address(%i,2)
    var %temp,%a = 1
    while ($ialchan($address(%i,2),%c,%a)) {
    set %temp %temp $+ $chr(44) $ialchan($address(%i,2),%c,%a).nick
    inc %a
    }
    aline @clones $ialchan($address(%i,2),%c,0) 4 Clones having as address: 11 $address(%i,2) $+ :
    aline @clones - Nick del Clone: 9 $mid(%temp,2,$calc($len(%temp) - 1))
    }
    inc %x
    }
    aline @clones -
    aline @clones - -- ---- C onnessioni c on C loni R ilevate: $hmatch(clones,*,0)
    aline @clones - -- ---- In all there are n° %clones clones
    aline @clones - -- ---- P er t rovarli c i h o m it: $duration($calc(($ticks - %ticks) / 1000)) $gettok($calc(($ticks - %ticks) / 1000),2,46) $+ millisecs
    hfree clones
    }
    #clones off
    raw 315:*: vs $2 | .disable #clones
    #clones end
    
    on *:connect: .disable #clones

     

    Clone Scan by mAx' - irc.ircgate.it, #angel_&_Devil.;

  6. pcinfo {
    say $me
    say Statistics Current Time: $time(h:nn:sstt)
    say Using mIRC $+ $version
    say My User Modes are: $usermode
    say Using Windows $os
    say My Host is: $address($me,2)
    say My nick is $nick
    say my IP is $ip
    say mIRC.exe is located in $mircdir
    say Windows $os is active from: $duration($int($calc($ticks / 1000)))
    say The mIRC is Connected to $server $+ : $+ $port from: $uptime(mirc,1)
    say The Resolution of my Monitor is: $window(-1).w $+ x $+ $window(-1).h
    say Currently on C:\: I have this space available $round($calc(($disk(c:).free) / 1024 / 1024000), 2) $+ GB
    }

     

  7. on 1:OPEN:?:*:{
    set %query.nick $nick
    set %query.address $address($nick,1)
    set %query.text $1-
    close -m $nick
    .msg $nick Query Manager: Wait, I have to decide whether or not to accept your Pvt...
    query.decide
    }
    alias -l query.decide {
    dialog -m Query Query
    }
    dialog Query {
    title "Query"
    size 300 250 200 50
    option dbu
    text "Nick:", 2, 5 12 12 10, nowrap
    text "Text:", 3, 5 22 12 10, nowrap
    edit %query.nick %query.address, 4, 20 10 170 10, read
    edit %query.text, 5, 20 20 170 10, read
    button "Accept", 6, 25 32 40 15
    button "Reject", 7, 75 32 40 15
    button "Ignore", 8, 125 32 40 15
    }
    on 1:dialog:Query:*:* {
    if ($devent == sclick) {
    if ($did == 6) {
    dialog -x Query Query
    query %query.nick
    echo -t %query.nick < $+ %query.nick $+ > %query.text
    .msg %query.nick Query Manager : Your Pvt Has Been Accepted!
    unset %query.*
    }
    if ($did == 7) {
    dialog -x Query Query
    .msg %query.nick Query Manager : Your Pvt Was Rejected!
    unset %query.*
    }
    if ($did == 8) {
    dialog -x Query Query
    ignore -p %query.nick
    .msg %query.nick Query Manager : Your Pvt was Rejected and I Put You in Ignore!
    unset %query.*
    }
    }
    }

     

  8. Here's a Zip file of some old IRC Scripts if your interested in keeping for your own archives.

     

    I take no responsibility to any damage caused by any noobs running somethings that I might upload for the mIRC community as I did not make even a dent of what I will be sharing. Anything I know for sure is dangerous I will surely Mark it as Such and if I do Heed the Warning. Like GtBots. for instance those can be dangerous toys if not used properly. This is for your own warning. coders-Resources is not responsible when or how you use these scripts.

    1325329690_mIRCScripts.zip

  9. Today I went to go see an old italian scripting site and seen that it hasn't been used in quite some time and has been let go. and all of the downloads shut down. Same has happen with Hawkee spammers left and right and no one controlling the forums. 

    This is why I've been collecting all the snippets and codes from various script sites to keep all the codes in archives for reference and just to save them. My good friend err0r from Tg007 has done that also. it's a shame to see scripting websites closing and not as popular as they use to be, it saddens me that people that have spend all that time coding will be lost and forgotten. 

    Hawkee - A Writing Platform for Web Developers

    https://calabria-irc.forumfree.it/

    very popular scripting sites in the day!!

  10. Last night I had fun chatting with a huge group on gotalk.to with some Rizon IRC users 

    Was a blast talking about how script's and websites and coding. I'm pretty much on a lot of server's and i even have a server, and hearing that chat isn't truly dead made me realize it's truly not you just have to find the right rooms on the right server.

    Geekshed is quite active and also Rizon I believe all servers have some chat but just locating them is what you need to do. I find scripting rooms less active as they mainly chat on script forum then in there room, but there still there watching in case you need a help in coding. I've made quite a lot of new friends on each server and have caught up with a few from hawkee well know scripter's. And there still active and continue to be active just that they work and some have families so time is less. But isn't that with everyone now.  So I believe chat hasn't died its just the time schedule that effects user's now. but go on weekends and wow chat has risen :04a97f13:

  11. THERE are not many sites that keep abreast of IRC. Many wrongly assume that it barely exists anymore, but it has been around for a very long time. As netsplit.de puts it: “Internet Relay Chat (short: IRC) [...] a chat protocol that was developed in 1988 and that’s internationally used for text based communication over the Internet.”

    Here’s a list of currently-known networks “in alphabetical order” (Techrights has only just been added, but like many other networks it was “unseen” for a long time).

    Based on these known networks alone, the number of users peaks at around third of a million:

     

    “The largest of them that take part in our comparison of IRC networks are contained in the top 100 list,” the page says, “but there are also some IRC networks that are big and run out of competition.”

  12. ;---------<  Robo-X - Topic Command:  >-----------
    on 1:text:@topic *:#robots: {
      if ( $nick isop $chan || $nick ishop $chan ) {
        set %topic $2-
        topic $chan Topic: 4 %topic / 7 %status / 3 %static-a / 9 %static-b
      }
    }
    on 1:text:@status *:#robots: {
      if ( $nick isop $chan || $nick ishop $chan ) {
        set %status $2-
        topic $chan Topic: 4 %topic / 7 %status / 3 %static-a / 9 %static-b
      }
    }
    
    on 1:text:@static-a *:#robots: {
      if ( $nick isop $chan || $nick ishop $chan ) {
        set %static-a $2-
        topic $chan Topic: 4 %topic / 7 %status / 3 %static-a / 9 %static-b
      }
    }
    
    on 1:text:@static-b *:#robots: {
      if ( $nick isop $chan || $nick ishop $chan ) {
        set %static-b $2-
        topic $chan Topic: 4 %topic / 7 %status / 3 %static-a / 9 %static-b
      }
    }

     

  13. alias sil {
      if ($me isop $chan) || ($me ishop $chan) {
        if (!$1) || (!$2) { echo -at * Error: Incorrect syntax used, /sil <nick> <timer in minutes> }
        elseif ($1) || ($2) {
          mode $chan +bb ~q: $+ $address($1,2) ~n: $+ $address($1,2)
          writeini Silence.ini $$1 chan $active
          if ($$1 ishop $active) { writeini Silence.ini $1 status HOP | mode $active -h $1 }
          if ($$1 isvoice $active) { writeini Silence.ini $1 status VOP | mode $active -v $1 }
          $iif($$1 isreg $active,writeini Silence.ini $1 status REG)
          .timer 1 $calc($2 * 60) desil $1 $address($1,2) $chan
        }
      }
    }
    
    on *:JOIN:#: {
      if ($ini(Silence.ini,$nick,chan)) {
        if ($readini(Silence.ini,$nick,status) == HOP) {
          mode $chan -h $nick
        }
        elseif ($readini(Silence.ini,$nick,status) == VOP) {
          mode $chan -v $nick
        }
      }
    }
    
    alias -l desil {
      if ($1 ison $3) {
        if ($readini(Silence.ini,$1,status) == HOP) { mode $$3 +h $1 | remini Silence.ini $1 }
        if ($readini(Silence.ini,$1,status) == VOP) { mode $$3 +v $1 | remini Silence.ini $1 }
        mode $3 -bb ~q: $+ $2 ~n: $+ $2
      }
      elseif ($1 !ison $3) { mode $3 -bb ~q: $+ $2 ~n: $+ $2 | remini Silence.ini $1 }
    }

     

  14. MuteBanEnforce by Ford_Lawnmower irc.GeekShed.net #Script-Help
    menu nicklist {
      .$iif(!$hget(MuteEnforce,$+($network,$chan,$address($$1,2))),$style(2)) RemoveMute $$1: {
        var %mask $+($network,$chan,$address($$1,2))
        hdel MuteEnforce %mask
        if ($timer(%mask).com) {
          $v1
          .notice $$1 Your ban has been lifted early! You may now speak in $+($chan,.) Please try not to repeat the same activity that caused you to be muted.
          $+(.timer,%mask) off
        }
        else mode $chan -b $+(~q:,$address($$1,2))
      }
      .Mute $$1
      ..3 Minutes:mute $$1 180 $$?="Reason for Muting $$1"
      ..5 Minutes:mute $$1 300 $$?="Reason for Muting $$1"
      ..10 Minutes:mute $$1 600 $$?="Reason for Muting $$1"
      ..30 Minutes:mute $$1 1800 $$?="Reason for Muting $$1"
      ..60 Minutes:mute $$1 3600 $$?="Reason for Muting $$1"
      ..Forever:mute $$1 $$?="Reason for Muting $$1"
    }
    alias mute {
      clipboard $$1
      var %nick $cb(1)
      if (%nick ison $chan) {
        ialcheck %nick
        var %usermodes $replace($remove($nick(#,%nick).pnick,%nick),~,q,&,a,!,a,@,o,%,h,+,v), %addy $iif($address(%nick,2),$v1,%nick)
        mode $chan $+(+b-,%usermodes) $+(~q:,%addy) $str($+(%nick,$chr(32)),$len(%usermodes))
        hadd -m MuteEnforce $+($network,$chan,%addy) mute
        if ($$2 isnum) {
          $+(.timer,$network,$chan,%addy) 1 $$2 removeMute $+($network,$chan,%addy) $chan $+(-b+,%usermodes) $+(~q:,%addy) $str($+(%nick,$chr(32)),$len(%usermodes))
          msg $chan $+(,%nick,) You have been Muted! Duration: $duration($2) Reason: $3-
        }
        else msg $chan %nick You have been Muted! $+(Reason:,$2-)
      }
      else echo -a %nick is not on $chan
    }
    alias -l ialcheck {
      if (!$ial($1)) .who $1
    }
    alias -l removeMute {
      if ($($+($,$0),2) !ison $2) mode $2 -b $4
      else mode $2-
      hdel MuteEnforce $1
    }
    alias -l parseMode {
      tokenize 32 $1
      var %start 1, %finish $len($1), %+-, %modes -1, %location $+(parseMode,$chr(3),$network,$chr(3),$chan)
      while (%start <= %finish) {
        if ($mid($1,%start,1) isin +-) { %+- = $replace($v1,+,1,-,-1) | inc %modes }
        elseif ($mid($1,%start,1) isin qaohvb) {
          var %mode $+($v1,$($+($,$calc(%start - %modes)),2))
          hadd -m %location %mode $calc($hget(%location,%mode) + %+-)
        }
        inc %start
      }
      var %hash $regsubex($regsubex($str(.,$hget(%location,0).item),/(.)/g,$+($hget(%location,\n).data,$hget(%location,\n).item,$chr(32))),/(\b0[^\s]*)/g,)
      if ($hget(%location)) hfree $v1
      var %count 1, %max $numtok(%hash,32), %return, %temp
      while (%count <= %max) {
        %temp = $gettok(%hash,%count,32)
        %return = $+(%return,$chr(32),$iif($left(%temp,1) == -,$+(-,$mid(%temp,3)),$+(+,$mid(%temp,2))))
        inc %count
      }
      return %return
    }
    On !*:rawmode:#: {
      checkMutes $network $chan $parsemode($1-)
    }
    alias -l checkMutes {
      var %network $1, %chan $2, %modes $3-
      tokenize 32 %modes
      checkMute %network %chan $*
    }
    alias -l checkMute {
      var %mode $left($3,2), %target $mid($3,3)
      if ((%mode isincs +v+h+o+a+q) && ($hget(MuteEnforce,$+($1,$2,$address(%target,2))))) mode $2 $replace(%mode,+,-) %target
      elseif ((%mode == -b) && ($hget(MuteEnforce,$+($1,$2,$gettok(%target,-1,58))))) mode $chan +b %target
    }

     

  15. menu channel {
      Peak Script v1.1:peakdia
    }
    
    alias -l peakdia {
      $iif($dialog(multi_peak),dialog -v,dialog -m multi_peak) multi_peak
    }
    
    dialog multi_peak {
      title "Peak Dialog by Danneh"
      size -1 -1 144 122
      option dbu
      box "Peak Setup", 4, 2 20 140 100
      combo 5, 5 38 60 50, sort size
      text "Networks:", 6, 5 28 25 8
      button "Add", 7, 5 90 30 12
      button "Del", 8, 36 90 30 12
      combo 9, 78 38 60 50, size
      text "Channels:", 10, 78 28 24 8
      button "Add", 11, 78 90 30 12
      button "Del", 12, 109 90 30 12
      button "Ok", 13, 29 104 37 12, ok
      button "Cancel", 14, 78 104 37 12
      box "Master Switch:", 15, 2 2 63 17
      check "On/Off", 16, 16 8 36 10
      box "Setting:", 17, 79 2 63 17
      check "Op's Only Switch", 18, 82 8 59 10
      menu "File", 1
      item "Unset All", 2, 1
      item "Exit", 3, 1
    }
    
    on *:DIALOG:multi_peak:init:*: {
      var %a = $numtok(%peak.networks,44)
      while (%a) {
        did -a $dname 5 $gettok(%peak.networks,%a,44)
        dec %a
      }
      if (%peakmaster == on) {
        did -c $dname 16
      }
      if (%peakmaster == $null) {
        did -b $dname 5,7-9,11,12,18
      }
      if (%peakops == on) {
        did -c $dname 18
      }
    }
    
    on *:DIALOG:multi_peak:menu:2,3: {
      if ($did == 2) {
        unset %peak.*
        did -r $dname 5,9
      }
      if ($did == 3) {
        dialog -x multi_peak multi_peak
      }
    }
    
    on *:DIALOG:multi_peak:sclick:5,7,8,11,12,16,18: {
      if ($did == 5) {
        did -r $dname 9
        var %a = $numtok(%peak. [ $+ [ $did($dname,5).text ] ],44)
        while (%a) {
          did -a $dname 9 $gettok(%peak. [ $+ [ $did($dname,5).text ] ],%a,44)
          dec %a
        }
      }
      if ($did == 7) {
        if (!$did($dname,5).text) { noop $input(Please enter a Network to add for Peaks.,o) }
        elseif ($istok(%peak.networks,$did($dname,5).text,44)) { noop $input(The Network you entered is already setup for Peaks.,o) }
        else {
          set %peak.networks $addtok(%peak.networks,$did($dname,5).text,44)
          did -a $dname 5 $did($dname,5).text
        }
      }
      if ($did == 8) {
        if (!$did($dname,5).text) { noop $input(Please enter a Network to remove from Peaks.,o) }
        elseif (!$istok(%peak.networks,$did($dname,5).text,44)) { noop $input(The Network you wish to remove is not in the Peak setup.,o) }
        else {
          set %peak.networks $remtok(%peak.networks,$did($dname,5).text,44)
          did -r $dname 5
          var %a = $numtok(%peak.networks,44)
          while (%a) {
            did -a $dname 5 $gettok(%peak.networks,%a,44)
            dec %a
          }
          $iif(%peak.networks == $null,unset %peak.networks)
        }
      }
      if ($did == 11) {
        if (!$did($dname,5).text) { noop $input(Please select a Network to add channels to.,o) }
        elseif (!$did($dname,9).text) { noop $input(Please enter a channel to add to the Peak Setup.,o) }
        elseif ($istok(%peak. [ $+ [ $did($dname,5).text ] ],$did($dname,9).text,44)) { noop $input(The Selected channel name is already setup for Peaks.o) }
        else {
          set %peak. [ $+ [ $did($dname,5).text ] ] $addtok(%peak. [ $+ [ $did($dname,5).text ] ],$did($dname,9).text,44)
          did -a $dname 9 $did($dname,9).text
        }
      }
      if ($did == 12) {
        if (!$did($dname,5).text) { noop $input(Please select a Network to remove channels from.,o) }
        elseif (!$did($dname,9).text) { noop $input(Please enter a channel to remove from the Peak Setup.,o) }
        elseif (!$istok(%peak. [ $+ [ $did($dname,5).text ] ],$did($dname,9).text,44)) { noop $input(The Selected channel name is not in the setup for Peaks.o) }
        else {
          set %peak. [ $+ [ $did($dname,5).text ] ] $remtok(%peak. [ $+ [ $did($dname,5).text ] ],$did($dname,9).text,44)
          unset %peak. [ $+ [ $did($dname,5).text ] $+ ] . [ $+ [ $did($dname,9).text ] $+ ] .*
          did -r $dname 9
          var %a = $numtok(%peak. [ $+ [ $did($dname,5).text,44)
          while (%a) {
            did -a $dname 9 $gettok(%peak. [ $+ [ $did($dname,5).text ] ],%a,44)
            dec %a
          }
          $iif(%peak. [ $+ [ $did($dname,5).text ] ] == $null,unset %peak. [ $+ [ $did($dname,5).text ] ])
        }     
      }
      if ($did == 16) {
        if ($did(16).state == 0) {
          unset %peakmaster
          noop $input(Peak script has been disabled.,o,Success!)
          did -b $dname 5,7-9,11,12,18
        }
        if ($did(16).state == 1) {
          set %peakmaster on
          noop $input(Peak script has been enabled.,o,Success!)
          did -e $dname 5,7-9,11,12,18
        }
      }
      if ($did == 18) {
        if ($did(18).state == 0) {
          unset %peakops
          noop $input(Peak trigger now works for everyone.,o,Success!)
        }
        if ($did(18).state == 1) {
          set %peakops on
          noop $input(Peak trigger now works for Ops only.,o,Success!)
        }
      }
    }
    
    on *:JOIN:#: {
      if ($istok(%peak. [ $+ [ $network ] ],$chan,44)) {
        if (!%peak. [ $+ [ $network ] $+ ] . [ $+ [ $chan ] $+ ] .peak) {
          set %peak. [ $+ [ $network ] $+ ] . [ $+ [ $chan ] $+ ] .peak $nick($chan,0)
          set %peak. [ $+ [ $network ] $+ ] . [ $+ [ $chan ] $+ ] .ctime $ctime
        }
        else {
          if ($nick($chan,0) <= %peak. [ $+ [ $network ] $+ ] . [ $+ [ $chan ] $+ ] .peak) { HALT }
          else {
            set %peak. [ $+ [ $network ] $+ ] . [ $+ [ $chan ] $+ ] .peak $nick($chan,0)
            msg $chan New Peak: %peak. [ $+ [ $network ] $+ ] . [ $+ [ $chan ] $+ ] .peak Last Peak: $duration($calc($ctime - %peak. [ $+ [ $network ] $+ ] . [ $+ [ $chan ] $+ ] .ctime)) ago.
            .timer 1 3 set %peak. [ $+ [ $network ] $+ ] . [ $+ [ $chan ] $+ ] .ctime $ctime
          }
        }
      }
    }
    
    on *:TEXT:!Peak:#: {
      if ($istok(%peak. [ $+ [ $network ] ],$chan,44)) {
        if (%peakops == on) {
          if ($nick isop $chan) {
            msg $chan Current Peak: %peak. [ $+ [ $network ] $+ ] . [ $+ [ $chan ] $+ ] .peak Peak Set: $duration($calc($ctime - %peak. [ $+ [ $network ] $+ ] . [ $+ [ $chan ] $+ ] .ctime)) ago.
          }
        }
        if (%peakops == $null) {
          msg $chan Current Peak: %peak. [ $+ [ $network ] $+ ] . [ $+ [ $chan ] $+ ] .peak Peak Set: $duration($calc($ctime - %peak. [ $+ [ $network ] $+ ] . [ $+ [ $chan ] $+ ] .ctime)) ago.
        }
      }
    }

     

  16. menu * {
      Away Dialog:awaydia
    }
    
    dialog awaydia {
      title "Away Dialog"
      size -1 -1 200 180
      option pixels
      tab "Set Away", 1, 0 0 199 150
      tab "Set Back", 12
      button "Ok", 4, 31 151 65 25, ok flat
      button "Cancel", 5, 103 151 65 25, cancel flat
      box "Away", 6, 6 27 184 110, tab 1
      edit "", 7, 72 41 110 20, tab 1
      text "Away Nick:", 8, 12 42 55 17, tab 1
      text "Away Msg:", 9, 11 65 55 17, tab 1
      edit "", 10, 72 64 108 20, tab 1
      button "Set Away", 11, 65 99 65 25, tab 1
      box "Back", 13, 6 27 184 110, tab 12
      text "Back Nick:", 14, 12 42 55 17, tab 12
      edit "", 15, 72 41 110 20, tab 12
      button "Set Back", 16, 65 82 65 25, tab 12
      menu "File", 2
      item "Exit", 3, 2
    }
    
    on *:DIALOG:awaydia:init:*: {
      if (!%away.nick) && (!%back.nick) {
        set %away.nick $$?="Please enter your away nick:"
        set %back.nick $$?="Please enter your normal nick:"
        did -a $dname 7 %away.nick
        did -a $dname 15 %back.nick
      }
      else {
        did -ra $dname 15 %back.nick
        did -ra $dname 7 %away.nick
      }
    }
    
    on *:DIALOG:awaydia:sclick:11,16: {
      if ($did == 11) {
        if (!$did($dname,10).text) {
          scon -a nick $did($dname,7).text
        }
        else {
          scon -a away $did($dname,10).text
          scon -a nick $did($dname,7).text
        }
      }
      if ($did == 16) {
        if ($away == $true) {
          scon -a away
          scon -a nick $did($dname,15).text
        }
        else {
          scon -a nick $did($dname,15).text
        }
      }
    }
    
    on *:DIALOG:awaydia:menu:3: {
      dialog -x awaydia awaydia
    }
    
    alias -l awaydia {
      $iif($dialog(awaydialog),dialog -v,dialog -m awaydia) awaydia
    }

     

  17. ;theSLAP 2.0
    on *:join:#:{
      if ($nick != $me) {
        var %u users_ $+ $nick
        if (!$readini(slapthegame.ini,%u,hp)) {
          writeini slapthegame.ini %u hp 100
          writeini slapthegame.ini %u money 15
        }
      }
      ;notice $nick Wellcome. This Channel has SLAPtheGame installed. go on and !slap :)
    }
    on *:text:!thegame:#:{
      notice $chan Noob in town :) !slap $nick everyone :D
      msg $chan !slap, !heal, !money, !gamble, !stats, !ladder, !alive, !beer, !punch (2.0)
    }
    on *:text:!money:#:{
      var %u users_ $+ $nick
      if ($readini(slapthegame.ini,%u,money) < 15) {
        writeini slapthegame.ini %u money 15
        notice $nick Your wallet has been refiled with 15coins
      }
      else {
        notice $nick Oi! this isn't a bank, Sir.
      }
    }
    
    on *:text:!slap*:#:{
      if (!$2) {
        notice $nick usage: !slap NICK
        notice $nick !slap command will trigger the end of the world. Go on, !slap someone :)
        halt
      }
      var %s1H $readini(slapthegame.ini,$+(users,_,$nick),hp)
      var %s2H $readini(slapthegame.ini,$+(users,_,$2),hp)
      if (%s2H < 1) && ($2 != me) {
        msg $chan player $2 is dead. You can !heal $2 for the price of 15coins and slap him to death again :)
        halt
      }
      if (%s1H > 0) {
        var %slapper $nick
        var %slapped $2
    
        if (%slapped !ison $chan) && (%slapped != me) {
          msg $chan That payer isn't online, not fair.
          halt
        }
        if (%slapped == me) { msg $chan Ye, I'm gona slap you real nice :D whatta tool! :) | var %slapper $me | var %slapped $nick }
        ;if (%slapped == $me) && ($nick != MoshMage) { msg $chan You wish? | halt }
    
        var %slap $rand(0,100)
        ;msg $chan Slap power %slap
        if (%slap >= 70) {
          var %slap_sneak 1
          slap2 $chan %slapper %slapped %slap %slap_sneak
        }
        if (%slap > 50) && (%slap <= 69) {
          ;notice %slapped OI! !dodge NOW or you'll be slapped!! $chan
          inc %slaps
          ;.$+(timer,Slap,%slaps) 1 5 slap2 $chan %slapper %slapped %slap %slap_sneak
          slap2 $chan %slapper %slapped %slap %slap_sneak
        }
        if (%slap == 50) {
          slap2 $chan %slapper %slapped %slap
          msg $chan %slapped was watching sharply and grabbed %slapper $+ 's hand, no harm done.
        }
        if (%slap < 50) {
          slap2 $chan %slapper %slapped %slap
        }
      }
      else {
        msg $chan Look! A ghost trying to Slap. How funny :)
        notice $nick you are DEAD. !heal to buy 100hp.
      }
    }
    alias slap2 {
      var %dmg $4
      var %slapped $+(users,_,$3)
      var %slapper $+(users,_,$2)
      var %s1H $readini(slapthegame.ini,%slapper,hp)
      var %s2H $readini(slapthegame.ini,%slapped,hp)
      if (%dmg < 50) {
        var %life $calc(%s1H - %dmg)
        if (%life < 0) { var %life 0 }
        writeini slapthegame.ini %slapper hp %life
        msg $1 $3 saw right trhough $2 $+ 's movement and counterslaps. $iif(%life < 1,AAAnd $2 is knockedout!! Cheers $+ $chr(44) $3 $+ !)
        notice $2 $3 counterslaped you, $iif(%life > 0, you have %life $+ hp,you're dead. !heal)
        if (%life < 0) {
          var %deaths $readini(slapthegame.ini,%slapper,deaths)
          var %deaths $calc(%deaths +1)
          var %kills $readini(slapthegame.ini,%slapped,kills)
          var %kills $calc(%kills +1)
          writeini slapthegame.ini %slapped kills %kills
          writeini slapthegame.ini %slapper deaths %deaths
        }
      }
      if (%dmg == 50) {
        msg $1 $3 was watching sharply and grabbed $2 $+ 's hand, no harm done. Also.. fucking amazing.
      }
      if (%dmg > 50) {
        var %life $calc(%s2H - %dmg)
        echo -a %life - %dmg - %s2H
        if (%life < 1) {
          var %deaths $readini(slapthegame.ini,%slapped,deaths)
          var %kills $readini(slapthegame.ini,%slapper,kills)
          var %deaths $calc(%deaths +1)
          var %kills $calc(%kills +1)
          writeini slapthegame.ini %slapper kills %kills
          writeini slapthegame.ini %slapped deaths %deaths
        }
        if (%life < 0) { var %life 0 }
        writeini slapthegame.ini %slapped hp %life
        if ($5 > 0) {
          var %money $rand(1,50)
          var %s1M $readini(slapthegame.ini,%slapper,money)
          var %s2M $readini(slapthegame.ini,%slapped,money)
    
          var %coins $calc(%money + %s1M)
          var %slapmsg $2 sneaks in on $3 and smacks his[er] face upright.
          notice $2 Whoa! whattasmack! You popped %money $+ coins from $3 $+ 's pocket :) (Wallet: %coins $+ )
          writeini slapthegame.ini %slapper money %coins
          ;steal ability?
          ;notice %slapped That Sir, was a Gloved Slap in teh Face. Also, you lost some coins.
          ;writeini slapthegame.ini %slapper money $calc(%s2M - %money)
        }
        if (!%slapmsg) { var %slapmsg $2 boldly slaps $3 $+ . }
        msg $1 %slapmsg
        notice $3 $2 slaped you, $iif(%life > 0, you have %life $+ hp,you're dead. !heal)
      }
      dec %slaps
      ;echo -a SLAPED $3 - $2 : %dmg
    }
    on *:text:!heal*:#:{
      var %u users_ $+ $iif($2,$2,$nick)
      if ($readini(slapthegame.ini,%u,money)) {
        var %slapper users_ $+ $nick
        var %s1M $readini(slapthegame.ini,%slapper,money)
        if (%s1M >= 15) {
          var %money $calc(%s1M - 15)
          writeini slapthegame.ini %slapper money %money
          writeini slapthegame.ini %u hp 100
          notice $remove(%slapper,users_) Medic Kit used :) Wallet: %money
          if (%u != $remove(%slapper,users_)) { msg $chan $nick healed $2 }
        }
        else {
          msg $chan Not enough cash! (15coins. You have %s1M $+ )
        }
      }
      else {
        msg $chan Not enough cash! (15coins. You have %s1M $+ )
      }
    }
    
    on *:text:!gamble*:#:{
      if ($2 == tehBunny) {
        var %s2M $readini(slapthegame.ini,gamble,money)
        msg $chan tehBuny holds %s2M coins for the lucky winner :)
        halt
      }
      if (!$3) || ($2 !isnum) || ($3 !isnum) { describe $chan Gamble How to: !gamble <cash> <1, 2 or 3> }
      else {
        var %bet $2
        var %bet_nick users_ $+ $nick
        var %s1M $readini(slapthegame.ini,%bet_nick,money)
        if (%bet > %s1M) {
          msg $chan Mate, you're short on Cash.
          halt
        }
        var %s2M $readini(slapthegame.ini,gamble,money)
    
        ;var %lie $rand(0,1)
        var %box $rand(1,102)
        if (%box < 95) { var %bunny 0 }
        if (%box >= 95) { var %bunny 1 }
    
        if (%box <= 34) { var %box 1 }
        if (%box > 34) && (%box <= 68) { var %box 2 }
        if (%box > 68) { var %box 3 }
        var %prize $rand(1,500)
        if (%prize > 350) { var %prize item }
        else { var %prize $calc(%bet * 2) }
        var %prize $calc(%bet * 2)
        ;echo %box
        if ($3 == %box) {
          msg $chan $iif(!%bunny,Well done. Won %prize,WOW!WOW!WOW! $nick won 3te5hB6u7n11n15y!! Grand Prize is $calc(%s2M + %prize))
          if (%bunny < 1) { var %money $calc(%s1M + %prize) }
          if (%bunny == 1) { var %money $calc(%s1M + %prize + %s2M) }
          if (%prize) && ($nick !isin %beer) {
            msg $chan WOW! You have access to BOOZE! and !beer has its downs and lows but you can always get drunk on it :) (one hour 'till the bar closes)
            set %beer $addtok(%beer,$nick,32)
            .timerbeer_ $+ $nick 1 3600 set %beer $remtok(%beer,$nick,1,32)
          }
          writeini slapthegame.ini %bet_nick money %money
          notice $nick Your wallet has %money $+ . You won $iif(!%bunny,%prize,$calc(%s2M + %prize))
        }
        else {
          var %lost $calc(%s1M - %bet)
          msg $chan Better luck next time.. tehBunny $calc(%s2M + %prize)
          writeini slapthegame.ini gamble money $calc(%s2M + %prize)
          writeini slapthegame.ini %bet_nick money %lost
        }
      }
    }
    on *:text:!stats*:#:{
      var %u users_ $+ $iif($2,$2,$nick)
      if ($ini(slapthegame.ini,%u,0)) {
        unset %stats
        var %inis $ini(slapthegame.ini,%u,0)
        var %x 1
        ;echo %inis $ini(slapthegame.ini,%u,0)
        while (%x <= %inis) {
          set %stats %stats $+(,$ini(slapthegame.ini,%u,%x),:,$readini(slapthegame.ini,%u,$ini(slapthegame.ini,%u,%x)))
          ;echo  $ini(slapthegame.ini,%u,%x) $readini(slapthegame.ini,%u,$ini(slapthegame.ini,%u,%x))
          inc %x
        }
        if (%stats) {
          var %k $readini(slapthegame.ini,%u,kills)
          var %d $readini(slapthegame.ini,%u,deaths)
          var %m $readini(slapthegame.ini,%u,money)
          if (%k < %d) {
            var %score $calc( ( %k - ( 0.5 * %d ) ) * %m / 100)   
          }
          else {
            var %score $calc( ( %k - %d ) * %m / 100)
          }
          msg $chan $remove(%u,users_) stats are %stats score %score
        }
      }
    }
    on *:text:!ladder:#:{
      unset %nicks
      unset %l*
      var %x 0
      while (%x <= $ini(slapthegame.ini,0)) {
        var %u $ini(slapthegame.ini,%x)
        if ($me !isin %u) {
          var %k $readini(slapthegame.ini,%u,kills)
          var %d $readini(slapthegame.ini,%u,deaths)
          var %m $readini(slapthegame.ini,%u,money)
          if (%m <= 0) { var %m 1 }
          if (%k < %d) {
            var %score $calc( ( %k - ( 0.5 * %d ) ) * %m / 100)   
          }
          else {
            var %score $calc( ( %k - %d ) * %m / 100)
          }
          if (%score > 0) {
            set %lscore $addtok(%lscore,%score,32)
            var %f $remove(%u,users_)
            set %lnscore $addtok(%lnscore,$+(%f,$chr(40),%score,$chr(41)),32)
          }
        }
        inc %x
      }
      if (%lscore) {
        var %sscore $sorttok(%lscore,32,nr)
        var %w $numtok(%lscore,32)
        var %l 0
        while (%l <= %w) {
          var %snick $gettok(%sscore,%l,32)
          var %n $matchtok(%lnscore,%snick,1,32)
          set %nicks $addtok(%nicks,%n,32)
          inc %l
        }
      }
      msg $chan slapLadder %nicks
    }
    on *:text:!alive*:#:{
      var %u users_ $+ $iif($2,$2,0)
      if (%u == users_0) {
        var %x 1
        var %z 0
        while (%x <= $nick($chan,0)) {
          if ($nick($chan,%x) != $me) {
            var %n $+(users_,$nick($chan,%x))
            var %hp $readini(slapthegame.ini,%n,hp)
            if (%hp > 0) {
              var %n $remove(%n,users_)
              var %s $+(,%n,,$chr(40),%hp,$chr(41),hp)
              var %alives $addtok(%alives,%s,32)
              inc %z
            }
          }
          inc %x
        }
        if (%z) {
          msg $chan Found $numtok(%alives,32) White-Gloved Gent. %alives
        }
        if (!%z) {
          msg $chan OMG! OMG! EVERYONE IS DEAAAATH! This, sir, is a Ghost Town. !heal someone.
        }
      }
      else {
        var %life $readini(slapthegame.ini,%u,hp)
        var %c users_ $+ $nick
        var %c $readini(slapthegame.ini,%c,money)
        msg $chan Player $remove(%u,users_) is $iif(%life > 0,Alive : $+ $chr(41),Death and you have $+(%c,coins))
      }
    }
    on *:text:!punch*:#:{
      ;ONLY DRUNK MAN AND SMALL MINDED PEOPLE PUNCH!
      if (!$2) { msg $chan look at the drunktard, doesn't even know who to punch. }
      else {
        var %puncher users_ $+ $nick
        var %punched users_ $+ $2
        var %hp $readini(slapthegame.ini,%puncher,hp)
        var %hp2 $readini(slapthegame.ini,%punched,hp)
        if (%hp > 0) {
          var %w $+(*,$2,*)
          if (%hp2 <= 0) {
            msg $chan $nick stumbles his feet on $2 $+ 's grave. Only drunk man punch.
            var %lost $rand(1,20)
            var %hp $calc(%hp - %lost)
            writeini slapthegame.ini %puncher hp %hp
            notice $nick You lost %lost $+ hp, you have %hp health points.
            unset %hp2
          }
          elseif (!$read(slapthegame.ini,w,%w)) || ($nick !isin %beer) {
            msg $chan $nick Punches the air and stumbles on his feet. Only drunk man punch.
            var %lost $rand(1,20)
            var %hp $calc(%hp - %lost)
            writeini slapthegame.ini %puncher hp %hp
            notice $nick You lost %lost $+ hp, you have %hp health points.
            ;halt
          }
          else {
            var %p $rand(1,25)
            if ($nick isin %beer) {
              var %beers $readini(slapthegame.ini,%puncher,beers)
              var %tb $calc(%beers *0.5)
              var %p $calc(%p * %tb)
            }
            if (%p >= 25) {
              var %hp $readini(slapthegame.ini,%punched,hp)
              var %f $calc(%hp - 50)
              if (%f > 0) {
                msg $chan It's amazing HOW $nick landed that punch. $remove(%punched,users_) $+ 's face will swell. %beers beer mugs were consumed for our amuse :)
                notice $remove(%punched,users_) You suffered a punch to teh face. $nick $+ 's little punk. you have %f $+ hp.
              }
              else {
                msg $chan the Drunktard punch: It can, and did, Kill. $remove(%punched,users_) Died. (note that, to land this punch $nick drunk %beers beer mugs)
                notice $remove(%punched,users_) That flippin honourless drunkar, $nick $+ , punched you. You were knocked out, !heal
              }
              notice $nick After such an amazing performance, the effect of the booze went away. such a shame.
              writeini slapthegame.ini %punched hp %f
              writeini slapthegame.ini %puncher beers 0
              set %beer $remtok(%beer,$nick,1,32)
            }
            else {
              msg $chan $nick Stumbles down for our amuse. Good one, Jester! :)
              var %hp $readini(slapthegame.ini,%puncher,hp)
              var %f $calc(%hp - 50)
              if (%f > 0) {
                notice $nick You bashed your head while on that poor performance. %f $+ hp.
              }
              else {
                notice $nick That blow to the head was really something. You knocked yourself out. !heal
              }
              writeini slapthegame.ini %puncher hp %f
            }
          }
        }
        else {
          msg $chan You are death, nick. !heal before punching. (Only drunk man punch.)
        }
      }
    }
    
    ;items.name_price[-quantity]
    ;
    ;beer.30-1
    
    on *:text:!beer*:#:{
      if ($nick !isin %beer) {
        msg $chan Bar's VIP only. earn vip status by !gambleing your money away :)
      }
      else {
        if ($2) {
          msg $chan Oh yeah, i know you wantz teh $iif($2 isnum,$2 beer mugs,beer mug) fast.
        }
        var %u users_ $+ $nick
        var %m $readini(slapthegame.ini,%u,money)
        var %b $readini(slapthegame.ini,%u,beers)
        if ($2 isnum) { var %hm $2 }
        if (%hm > 1) {
          var %m $calc(%m - (%hm * 30))
          var %b $calc(%b + %hm)
        }
        elseif (!%hm) || (%hm == 1) {
          var %m $calc(%m -30)
          var %b $calc(%b +1)   
        }
        if (%m > 0) {
          msg $chan $nick BOUGHT A BEER MUG! KEEP BEING AWESOME!
          writeini slapthegame.ini %u beers %b
          writeini slapthegame.ini %u money %m
        }
        if (%m < 0) {
          msg $chan $nick You poor twat. You already spent your money?! $duration($timer(beer_ $+ $nick).secs,2) till you loose Bar access
        }
      }
    }

     

  18. on *:TEXT:*:# {
      set %last.speaker $nick
    }
    
    alias hug {
      if ( $1- == $null ) {
        describe # hugs 12 $chan
      }
      elseif ( $1- = last ) {
        describe # huggles7 %last.speaker $+ !
      }
      else {
        describe # hugs3 $1.
      }
    }

     

×
×
  • Create New...