Author Topic: mIRC Scripts  (Read 5579 times)

0 Members and 1 Guest are viewing this topic.

Offline Mr. Wizard

  • Karate Champ
  • *****
  • Posts: 3047
    • View Profile
mIRC Scripts
« on: May 24, 2010, 06:37:04 am »
Hello, this thread has been expanded to showcase any scripts because of my giant and incredibly generous heart, and fulfill any special needs new scripts may need from anyone particularly interested in helping expand the scripts functionality. If you have a script you would like to share, go ahead and post it.


-----------------------------------------------------------------------------------------------------------------------------------------
Old Post:

Hello, this thread has been expanded to showcase my scripts because of my monstrous and all consuming ego, and fulfill any special needs my scripts may have from anyone particularly interested in helping expand the scripts functionality.

Look below to see if you can help!
Link to latest Script topic

-----------------------------------------------------------------------------------------------------------------------------------------
Original Post:

I want to share a little mIRC script I made for our IRC channel. This script requires that you be using mIRC in order to access it inside our chatroom. Once you have it installed, you should be able to draw simple black and white doodles in IRC. Below is the installation process, which is simply copy and pasting the code into the specified areas.

Have fun with it :D

If you already have it from testing it with me, erase the old code and replace it with this. this is the most up to date code

HOW TO USE type /doodle into the chat window, and that will open a drawing window. Holding down left click lets you draw lines. Holding down right click draws white lines, suitable for erasing previous mistakes. Double Clicking the left button will change the size of the pen , incrementing the pixel radius by 1 pixel. See below for more commands


These scripts go into the "Aliases" section under Tools -> Script Editor
Code: [Select]
/doodle {
  /window -p @doodle 10 10 810 629
  /renwin @doodle @doodle %linesize px
}

/savedoodle {
  /drawsave -b1 @doodle lastdoodle.bmp
}

/savedoodleas {
  var %savename = $$1- $+ .bmp
  /drawsave -b1 @doodle %savename
}

/lastdoodle {
  /window -p @doodle 10 10 810 629
  /drawpic @doodle 0 0 lastdoodle.bmp
  /renwin @doodle @doodle %linesize px
}

/opendoodle {
  /window -p @doodle 10 10 810 629
  /drawpic @doodle 0 0 $$1-
  /renwin @doodle @doodle %linesize px
}

/getdoodle {
  /window -p @doodle 10 10 810 629
  /drawpic @doodle 0 0 downloads\sentdoodle.bmp
  /renwin @doodle @doodle %linesize px
}

/passdoodle {
  /drawsave -b1 @doodle sentdoodle.bmp
  /send $$1 sentdoodle.bmp
}
/mod {
  var %n = $1
  var %d = $2
  var %result
  var %remainder
  %result = $calc(%n / %d)
  %remainder = $calc(%result - $int(%result))
  %result = $abs($calc(%remainder * %d))
  return $round(%result,0)
}

Explanation

/doodle opens a drawing window.

/savedoodle will save the currently opened doodle. Will overwrite the old last saved save

/savedoodleas will save the currently opened doodle with a name you specify

/lastdoodle will open the last saved doodle

/opendoodle will open an doodle file you specify.

/getdoodle will open the last doodle sent to you in an editable window.

/passdoodle will try to send the currently opened doodle to a person you specify.

/mod is used by the doodle code to increment a wrap around counter. It is not a command

These scripts go into the "Remote" section under Tools -> Script Editor
Code: [Select]
menu @doodle {
  mouse: if ($mouse.key & 1) { /drawline -r @doodle $rgb(0,0,0) %linesize %oldx %oldy $mouse.x $mouse.y  } | if ($mouse.key & 16) { /drawline -r @doodle $rgb(255,255,255) %linesize %oldx %oldy $mouse.x $mouse.y } | %oldx = $mouse.x | %oldy = $mouse.y
  dclick: %linesize = $calc( $mod(%linesize, 10) + 1 ) | /renwin @doodle @doodle %linesize px
  leave: /drawsave -b1 @doodle yourdoodle.bmp
}

menu code does all the drawing in doodle.  It is not a command

These scripts go into the "Variables" section under Tools -> Script Editor
Code: [Select]
%oldx
%oldy
%linesize 1

The variables used by the drawing program.  They are not commands

TROUBLE SHOOTING

Text Commands do not work:
Double check to make sure all the scripts are where they should be. If commands still do not work contact me in IRC.

The Doodle window pops up, but I can't draw:
You're remote scripts may be turned off. To enable them, type /remote on in the chat line. If that still does not work, contact me in IRC.

I can't send my doodles to other people/I can't receive other peoples doodles:
Go to 'Tools'->'Options'->'DCC'->'Options' and check the box named "Passive DCCs".  If that still does not work, contact me in IRC.

I can't find where my doodles are being saved:
They are usually saved in C:\Program Files\mIRC or C:\Program Files\mIRC\downloads  in Windows XP
If they are not there, try C:\Documents and Settings\<your XP login name>\Application Data\mIRC
For other operating systems, contact me in IRC.

Sickly Samples
Link

Link

Link
« Last Edit: September 02, 2011, 04:49:12 am by Mr. Wizard »



Offline Mr. Wizard

  • Karate Champ
  • *****
  • Posts: 3047
    • View Profile
Re: Wizard mIRC Scripts
« Reply #1 on: July 14, 2010, 03:22:42 am »
I need help expanding the usefulness of my !alchemy script. Anyone is welcome to join and make suggestions  :)

How !alchemy works
First, you look in your backpack, like so
Code: [Select]
<Kratok> !backpack private
<Wizard> Contents sent to Private chat.

Then you look through your backpack and pick 2 items, and call the !alchemy script, like so:

Code: [Select]
<Kratok> !alchemy Dalokohs bar+Eyelander
<Wizard> Window: Dalokohs bar && Eyelander
<Wizard> Kratok alchemized: The Scotsmanslayer of Sweetness!
<Kratok> !alchemy Dalokohs bar+Eyelander
<Wizard> Window: Dalokohs bar && Eyelander
<Wizard> Kratok alchemized: The Candy Sword!

The output is generated from a list of all my "droppable" items. Each item has 6 words associated with it. The words can combine in 9 different ways, meaning that any combination has 9 possible outcomes. Order matters, so if you switch the order of the 2 items, you get another 9 possibilities.

That is all well and good, but coming up with 6 associated words can get pretty tedious So I am going to post a bunch of the words I need help with here, and invite any one reading this to come up with new associated words!  ;D I'm awesome, I know.

It's not that simple, there is a pattern, but you got me to teach you that pattern :D

Lets look at 2 items and their associated words

Item Name |---|
Alternate Name |---|
Related Noun |---|
Related Noun Action |---|
Descriptive Adjective |---|
Slightly Less Descriptive Adj. |---|
Descriptive Suffix |---|
Backburner
Flare gun
Napalmgun
Signal gun
Flame
Warning
thrower
lighter
Flaming
Emergency
Dragon's
Serial
on Fire
of Signals

The 9 possible Combinations are:
the first part comes from Item1, the second part comes from Item2.
Parenthesis means they come from the same item
1. Descriptive Adjective + Item Name
2. Slightly Less Descriptive Adj. + Item Name
3. Descriptive Adjective + Alternate Name
4. Slightly Less Descriptive Adj. + Alternate Name
5. Descriptive Adjective + (Related Noun + Related Noun Action)
6. Slightly Less Descriptive Adj. + (Related Noun + Related Noun Action)

the first part comes from Item2, the second part comes from Item1
7. Alternate Name + Descriptive Suffix
8. (Related Noun + Related Noun Action) + Descriptive Suffix
9. Related Noun + Related Noun Action

Any suggestions must have an alternate name. The alternate name could be a reinterpretation of the original item, or its baser item.
(Example Force-a-Nature :: Shotgun)

They need 2 descriptive adjectives, at least 1 adjective should directly describe the item. One or both can involve a noun "owning" it.
(Example Backburner :: Dragon's)

Must have a Descriptive Suffix, it is best something like "of *" (Example Flare Gun :: of Signals) But other types will also work, such as "in *" "on *"
(Example Backburner :: on Fire)

And lastly, it must have a Related Noun and Action that can be combined to form one word. (Example Backburner :: Flame + thrower = Flamethrower) The action is usually a verb that is turned into a noun (such as "throw" being "thrower")

Now, after you read all that, you have the knowledge necessary to make some awesome alchemies. Lets get started!
Select your words by declaring them ahead of time, to avoid conflicts.
You can suggest "naughty" words too, but better to send those in private messages.
DO NOT TRY TO GET AROUND THE LANGUAGE FILTER

The first batch of words will be the TF2 Hats and related miscellaneous items!

Code: [Select]
Bonk helmet
Ye olde baker boy
Baseball Bill's Sports Shine
Soldier's stash
Tyrant's helm
Stainless pot
Pyro's beanie
Brigade helmet
Respectless rubber glove
Demoman's 'fro
Glengarry bonnet
Scotsman's stove pipe
Football helmet
Officer's ushanka
Tough guy's tuque
Mining light
Texas ten gallon
Engineer's cap
Texas Slim's Dome Shine
Prussian pickelhaube
Vintage Tyrolean
Otolaryngologist's mirror
Trophy belt
Professional's panama
Master's yellow belt
Ritzy Rick's Hair Fixative
Fancy fedora
Backbiter's billycock
Troublemaker's tossle cap
Killer's kabuto
Triboniophorus tyrannus
Hustler's hallmark
Hound dog
Hotrod
Shooter's sola topi
Magistrate's mullet
Ghastly gibus
Bill's hat
Modest pile of hat
Noble amassment of hats
Towering pillar of hats
Tippler's tricorne
Whoopee cap
Sergeant's drill hat
Vintage merryweather
Heavy duty rag
Safe'n'Sound
Cheater's Lament
Earbuds
Ze goggles
Bloke's bucket hat
Frenchman's beret
$nick $+ 's Underpants
$nick $+ 's Panties
$nick $+ 's Boxers
Camera beard
Physician's procedure mask

If you don't know what a specific hat looks like, search for it here!
« Last Edit: July 14, 2010, 05:31:04 am by Mr. Wizard »

Offline PatMan33

  • Fable Hero
  • *****
  • Posts: 28788
  • M I RITE? STICKERS?
    • View Profile
    • DuckDuckGo
Re: Wizard mIRC Scripts
« Reply #2 on: July 14, 2010, 10:48:57 am »
Wizard mIRC scrips are getting freaking irritating, dude. :-\

I don't care where you are and I don't need to get an automated message telling me what you're doing every time someone joins the server. If I want to know what you're doing, I'll ask you. Not some cold, unfeeling script that does more to annoy me than it does to assist me. You can make all the scripts you want as long as they're in the background and activated by some code word. All of these intrusive front-end scripts end up doing is spamming the chat with stuff we don't need to know.

Offline Mr. Wizard

  • Karate Champ
  • *****
  • Posts: 3047
    • View Profile
Re: Wizard mIRC Scripts
« Reply #3 on: July 14, 2010, 01:41:08 pm »
Yes, using my messaging script was a bad idea. I was excited this morning when I made this post, but nobody was on. I was tired and knew I would pass out soon so I thought "Oh, didn't I write that message script for just such an occasion?!" And didn't really consider the irritation factor before hand. So I wrote a message that was too long and set it to "everyone"  :P

No apologies necessary though. The message script performed flawlessly.  :)

Offline Tesla

  • Street Fighter Champion
  • *****
  • Posts: 10620
    • View Profile
Re: Wizard mIRC Scripts
« Reply #4 on: July 14, 2010, 01:43:12 pm »
While we're on the subject, that whole random item thing is starting to annoy me too. >_>
No way dude, you're trolling me.

Offline PatMan33

  • Fable Hero
  • *****
  • Posts: 28788
  • M I RITE? STICKERS?
    • View Profile
    • DuckDuckGo
Re: Wizard mIRC Scripts
« Reply #5 on: July 14, 2010, 01:51:32 pm »
No apologies necessary though. The message script performed flawlessly.  :)

That's where your wrong. I found this thread through the forum, not the script that I made sure to ignore every time it came up.

Offline Mr. Wizard

  • Karate Champ
  • *****
  • Posts: 3047
    • View Profile
Re: Wizard mIRC Scripts
« Reply #6 on: July 14, 2010, 02:06:23 pm »
I am not going to justify myself to you. :D

Offline PatMan33

  • Fable Hero
  • *****
  • Posts: 28788
  • M I RITE? STICKERS?
    • View Profile
    • DuckDuckGo
Re: Wizard mIRC Scripts
« Reply #7 on: July 14, 2010, 02:11:27 pm »
Just please do something about your scripts spamming the IRC channel. Spend some time making them less-intrusive rather than making new ones.

This is the same reason I asked you make a lock function all that time ago. But since nobody really likes using it (despite complaints about the channel being spammed) there's got to be some other kind of solution.

Offline Krakow Sam

  • Moderator
  • Dungeon Sieger
  • *****
  • Posts: 24485
  • Stern dissaproval
    • View Profile
Re: Wizard mIRC Scripts
« Reply #8 on: July 14, 2010, 03:00:34 pm »
Item Name |---|
Alternate Name |---|
Related Noun |---|
Related Noun Action |---|
Descriptive Adjective |---|
Slightly Less Descriptive Adj. |---|
Descriptive Suffix |---|
Bonk helmet
Ye olde baker boy
Baseball Bill's Sports Shine
Soldier's stash
Tyrant's helm
Stainless pot
Headguard
Newsboy's Cap
Wax
Helmet
Helmet
Saucepan
Thirst
News
Grease
Ace
Viking
Pot
Protector
Seller
Shiner
Stasher
Marauder
Boiler
Bonktastic
Hipster
Greasy
Militant
Nordic
Stainless
Novelty
Retro
Slicked-Back
Quagmire
Historically Innacurate
Cordon Bleu
of Beverage Dispensing
of Manhattan
of Hurting People
of Saigon
pillaged from a monastery
from Hell's Kitchen
Sam is basically right, he's just cranky.

Offline Mr. Wizard

  • Karate Champ
  • *****
  • Posts: 3047
    • View Profile
Re: Wizard mIRC Scripts
« Reply #9 on: September 02, 2011, 04:44:40 am »
This is the latest iteration of the Dice Roller script, rewritten from scratch to be as robust and serve as many needs as possible. It will work as it is written here, without any modifications. There are some instructions later on for small modifications you may wish to do.

Installation:
Open up mIRC. Press Tools > Scripts editor. Click on the Aliases tab.

Copy and paste the following into the aliases tab:
Code: [Select]
/roll {
  ; change ? in ?roll into another identifying character of your choosing!
  /msg $chan ?roll $$1-
  /msg $chan $rollpure($me,$$1-)
}

/RollPure {
  var %name = $$1
  var %input = $2-
  %input = $remove(%input,$chr(32),|,&,$,#,@,;)
  %input = $replace(%input,a,1,b,2,c,3,e,4,f,5,g,6,h,7,i,8,j,9,z,0,k,10,l,11,m,12,n,13,o,14,p,15,q,16,r,17,s,18,t,19,u,20,v,21,w,22,x,23,y,24)
  var %result
  var %output
  %result = $calc($diceparser(%input))
  %output = %name rolled %input for a total of %result $+  $+ . %diceResultRef
  return %output
}

/DiceParser {
  var %uncalculable = $$1-
  var %calculable = $null
  var %charcount = $len(%uncalculable)
  var %dcount = 0
  var %count = 0
  var %curDice = 0
  var %sides = 0
  var %quantity = 0
  var %total = 0
  var %curPos = 0
  var %sidestart = 0
  var %right = 0
  var %qend = 0
  var %qLoop = 0
  var %left = 0
  %listTrueRef = 0
  %diceResultRef = $null
  %dcount = $count(%uncalculable,d)
  while (%count < %dcount) {
    %count = $calc(%count + 1)
    %curDice = $pos(%uncalculable,d,1)
    %sidestart = $calc(%curDice + 1)
    %qend = $calc(%curDice - 1)
    %curPos = 1
    while ($count($mid(%uncalculable,%sidestart,%curPos),+,-,*,/,^,%,$chr(40),$chr(41),d) == 0) {
      if ($calc(%sidestart + %curPos) > %charcount) {
        %curPos = $calc(%curPos + 1)
        /break
      }
      %curPos = $calc(%curPos + 1)
    }
    %curPos = $calc(%curPos - 1)
    %right = $calc(%charcount - (%sidestart + (%curPos - 1)))
    if ($calc(%sidestart + %curPos) > %charcount) {
      %right = 0
    }
    %sides = $mid(%uncalculable,%sidestart,%curPos)
    %curPos = %qend
    while ($count($mid(%uncalculable,%curPos,$calc(%qend - %curPos + 1)),+,-,*,/,^,%,$chr(40),$chr(41),d) == 0) {
      %qLoop = 1
      if (%curPos < 1) {
        /break
      }
      %curPos = $calc(%curPos - 1)
    }
    %left = %curPos
    %curPos = $calc(%curPos + 1)
    %quantity = $mid(%uncalculable,%curPos,$calc(%qend - %curPos + 1))
    if (%qLoop == 0) {
      %quantity = 1
    }
    %qLoop = 0
    if (%quantity > 10) {
      %listTrueRef = 1
    }
    if (%quantity < 200) {
      %total = $PureDiceRoll(%quantity,%sides)
    }
    else {
      %calculable = 0
      /break
    }
    %curDice = %quantity $+ d $+ %sides
    if (%listTrueRef == 0) {
      %diceResultRef = %diceResultRef  %curDice Rolls:  [ %randomListRef ]
    }
    if (%left > 1) {
      %calculable = $left(%uncalculable,%left)
    }   
    %calculable = %calculable $+ %total
    if (%right > 0) {
      %calculable = %calculable $+ $right(%uncalculable,%right)
    }
    %uncalculable = %calculable
    %charcount = $len(%uncalculable)
  }
  return %calculable
}

/PureDiceRoll {
  var %diceQ = $abs($$1)
  var %diceS = $$2
  var %count = 0
  var %randomNew = 0
  var %randomTotal = 0
  %randomListRef = $null
  while (%count < %diceQ) {
    %count = $calc(%count + 1)
    %randomNew = $rand(1,%diceS)
    if (%listTrueRef == 0) {
      %randomListRef = %randomListRef $+ * %randomNew *
    }
    %randomTotal = $calc(%randomTotal + %randomNew)
  }
  return %randomTotal
}


Optional If you plan on allowing other IRC users to use the dice roller, do the following:
Click on the Remote tab.

Copy and paste the following into the Remote tab:
Code: [Select]
on *:TEXT:?roll *:*:{
    ;change ? in ?roll into another identifying character of your choosing!
    var %ending = $rollpure($nick,$$2-)
    msg $chan %ending
}

Usage Instructions
The owner of the mIRC client with this script installed can call this script with /roll. /roll uses normal simple equation syntax, with dice as a new operation.

Syntax of dice is #Qd#S, where #Q is the number of dice being rolled, and #S is the sides of the dice. 1d20 will roll 1 dice with 20 sides.

Example:
Input
Code: [Select]
/roll 1d20

Output
Code: [Select]
<Wizard> ?roll 1d20
<Wizard> Wizard rolled 1d20 for a total of 5.  1d20 Rolls:  * 5 *


Dice rolls may be modified by an equation, and the dice may be placed within any element of that equation. Multiple dice may be present at multiple points in an equation.

Example:
Input
Code: [Select]
/roll 1d20+(1d10*1d10)/2

Output
Code: [Select]
<Wizard> ?roll 1d20+(1d10*1d10)/2
<Wizard> Wizard rolled 1d20+(1d10*1d10)/2 for a total of 14.5.  1d20 Rolls:  * 12 *  1d10 Rolls:  * 5 *  1d10 Rolls:  * 1 *

Finally, the dice roller can be called remotely using an identifier of your choosing. A friend in chat needs only use the syntax ?roll instead of /roll.

Example:
Code: [Select]
<Didero> ?roll 2d22
<Wizard> Didero rolled 2d22 for a total of 24.  2d22 Rolls:  * 22 ** 2 *

The ? in ?roll may be changed to another character of your choosing, such as >,<,^,!,~,(,),-,_,+, or =. The word "roll" may also be changed, for example to ?dice or ?random.
Please coordinate with other users of this script in the channel to ensure that your identifier is unique, to prevent multiple dice rollers from firing on a single remote call.

Thank you and enjoy. :D

Example:
Input
Code: [Select]
/roll 1d20+(1d10*1d10)/(2d20-3d6)

Output
Code: [Select]
<Wizard> ?roll 1d20+(1d10*1d10)/(2d20-3d6)
<Wizard> Wizard rolled 1d20+(1d10*1d10)/(2d20-3d6) for a total of 19.666667. 
1d20 Rolls:  * 19 *  1d10 Rolls:  * 2 *  1d10 Rolls:  * 5 *  2d20 Rolls:  * 17 ** 10 *  3d6 Rolls:  * 5 ** 1 ** 6 *

Example:
Code: [Select]
<Didero> ?roll 120^2d12 + (-1*d12 / 4d6 - 2d4) - 2d4
<Wizard> Didero rolled 120^2d12+(-1*d12/4d6-2d4)-2d4 for a total of 8916100448256000000000000. 
2d12 Rolls:  * 5 ** 7 *  1d12 Rolls:  * 11 *  4d6 Rolls:  * 1 ** 4 ** 4 ** 6 *  2d4 Rolls:  * 3 ** 2 *  2d4 Rolls:  * 4 ** 1 *

Offline Mr. Wizard

  • Karate Champ
  • *****
  • Posts: 3047
    • View Profile
Re: mIRC Scripts
« Reply #10 on: May 22, 2014, 02:47:39 pm »
Hello, I am bumping this old Topic to make available the entirety of my script library. This collection has almost 0% documentation, little to no organization, and even I can't remember how half of this stuff works anymore. Have fun swimming through my spaghetti.

Muh Scripts

Install directly to mIRC install folder. Be aware this will overwrite your current scripts, so back them up ahead of time.

EDIT:Also there is a bug somewhere that makes it automatically shut off Remote commands at random. Good luck!
« Last Edit: May 22, 2014, 03:09:17 pm by Mr. Wizard »

Offline Tesla

  • Street Fighter Champion
  • *****
  • Posts: 10620
    • View Profile
Re: mIRC Scripts
« Reply #11 on: May 22, 2014, 04:41:31 pm »
Wizard_Scripts_Complete/languages/Simplexicon/english.txt

hi
my
name
is
emmet

Wow, loooong time ago.
No way dude, you're trolling me.

Offline Didero

  • Turkey Shoot Terminator
  • *****
  • Posts: 3196
    • View Profile
Re: mIRC Scripts
« Reply #12 on: May 23, 2014, 12:42:42 am »
Oh hey, thanks!
I've been messing around with an IRC bot, and I could possibly port some functions over (with credit of course).