Basic mIRC Scripting
welcome to Game-Tuts.com - Register
Results 1 to 4 of 4
  1. #1
    Taylor Swift & Drew Ryniewicz ♥

    Join Date
    Jun 2009
    Location
    USA
    Posts
    7,148
    Thanks
    2282

    Default Basic mIRC Scripting

    Hello, I will teach you some simple scripts and other things with mIRC

    What is mIRC?

    mIRC is a client that is used to make "bots". They are used for Justin.tv and other things that allow IRC. The "bot" will be able to say and perform certain things on certain commands.

    Everything in this tutorial is added to the, Remote Tab in mIRC

    Basic Scripts

    Your basic script will start like this:
    Code:
    on *:TEXT:
    This command will have your "bot" do an action on a certain text.

    So let's have our "bot" say "Hello I'm MetsBot" when the user types, "MetsBot"

    Here is the code we would use: on
    Code:
     *:TEXT:MetsBot:#: { $msg $chan Hello I'm Metsbot }
    Now, every script where to "bot" says something when a user says a certain thing you MUST start it like this:
    Code:
     { $msg $chan
    The $msg starts the message and the $chan is for the IRC channel.

    Now, let's make a script that greets EVERY user when they join the IRC channel.

    The code will look like this:
    Code:
     on *:JOIN:#:{ $msg $chan $nick Has Joined }
    as you can see we started the code with
    Code:
     { $msg $chan
    Now, $nick will automatically place the users, "nickname" wherever $nick is.

    How to Make a Script with Variables

    This one is pretty basic, use this code:
    Code:
     on *:TEXT:!kiss*:#: {
    msg $chan $nick Pukers Up and Kisses $2- }
    You have to start it like this:
    Code:
     on *:TEXT:!kiss*:#: { $msg $chan
    Here the $2- is whatever you put in place of the * So for example if you put, "!kiss Mets08123" the bot would say, "(your nickname) Puckers Up and Kissed Mets08123"


    This is your basics of easy scripts.

    More Advanced Scripts

    Sometimes having the Join script gets the chat a little flooded, so we will create a script in which you will be able to disable it by saying, "!joinoff"

    Here is the code to turn it off:
    Code:
     on *:TEXT:!joinoff:#: { /disable #group1 } { $msg $chan Join Notices Turned OFF  }
    Here is the code to turn it on:
    Code:
     on *:TEXT:!joinon:#: { /enable #group1 } { $msg $chan Join Notices Turned ON  }
    Now we have to set up the "Group" as you can see in this code the group is named #group1, here is how you would set it up:

    #group1 on
    on *:JOIN:#:{ $msg $chan $nick Has Joined }
    #group1 end

    In between #group1 on and #group1 end you will put the script you would want to disable/enable.

    Your can change the #group1 to #group2, #group3 and so on for other things you want to disable/enable.

    MAKE SURE THIS GOES AFTER THE DISABLE/ENABLE SCRIPTS!

    How to Make it So ONLY moderators of the channel can do the command


    You would use this code:
    Code:
    on *:TEXT:clear:#: { if ($nick isop $chan) { msg $chan /clear }
      else { $msg $chan $nick You Can Not Clear the Chat! }
    }
    You would have to start the script like so:
    Code:
     { if ($nick isop $chan) { $msg $chan
    The { if ($nick isop $chan) will check to see if the user is a moderator in the channel.
    For the, else { $msg $chan , you will put what your "bot" will say if the user is NOT a moderator.


    I hope this will teach you a thing or two about basic mIRC scripting! If you have ANY questions just reply to the thread and I will try and help you out the best I can!
    Last edited by Mets08123; 04-26-2011 at 07:35 PM.

  2. The Following 6 Users Say Thank You to Mets08123 For This Useful Post:

    Brandon (04-26-2011), imnotanoob (04-26-2011), NoVa Gamester (04-26-2011), Panther (04-26-2011), XBeast (04-27-2011)

  3. #2
    Everybody Lies

    Join Date
    Dec 2010
    Age
    18
    Posts
    3,928
    Thanks
    2372

    Default Re: Basic mIRC Scripting

    Good post!


  4. #3
    Admin

    Join Date
    Oct 2009
    Posts
    12,250
    Thanks
    4435

    Default Re: Basic mIRC Scripting

    Good post, but why is this stickied?
    All questions and comments should be posted in the forums!



  5. #4
    Taylor Swift & Drew Ryniewicz ♥

    Join Date
    Jun 2009
    Location
    USA
    Posts
    7,148
    Thanks
    2282

    Default Re: Basic mIRC Scripting

    Quote Originally Posted by NoVa Gamester View Post
    Good post, but why is this stickied?
    cause it can be :D


 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
visit GameTuts on these social networking sites