Degausser

Degausser

Joined
Nov 13, 2016
Location
Belgium
Website

Activity Stream

Degausser created a Page  -  Aug 01, 2017
1 63 

A few functions to handle conversion between different types

 Respond   mIRC  
Degausser commented on a Page, Bar Script (Randomized) v2  -  Jul 24, 2017

You should really cut down this script a bit. Here are a couple examples.

For the last "else" block in the whole script, you randomly select 1-8, and describe as appropriate. With only 8 options, a good method is adding a local alias which just returns a string of possibilities. In this case i would add something like this near the top of my page:

alias -l listSnacks return Boost.Flake.Cherry Ripe.Mars Bar.Snickers Bar.box of Chocolate Hearts.box of Florentins.box of Mont Chocos

Each result is seperated by a dot. The idea is, you can easily add another element to your list, and the code will handle it. If this alias were present within your script, your last else statement could look like this:

else { describe $chan gives $nick a $gettok($listSnacks,$rand(1,$numtok($listSnacks,46)),46) }

Like this, you're simply selecting a random element from your list, using ASCII value 46 (a dot) as your token separator. If you have a longer list of elements, Okay next, you repeat everything twice. Once if %name exists, and once if not. Again taking the last TEXT event as an example, you can replace both if and else statements with a function call, passing in either $2 or $nick. The function will take care of the describe commands. So first the new if and else statement:

if (%name) { describeSnack $chan $2 }
else { describeSnack $chan $nick }

Then youd create a describeSnack alias, with your commands, such as:

alias -l describeSnack {
  var %snack $rand(1,8)
    if (%snack == 1) { describe $1 gives $2 a Boost }
    ... etc / or
    describe $1 gives $2 a $gettok($listSnacks,$rand(1,$numtok($listSnacks,46)),46)
}

And of course, you can minimise these a little more using $iif, so your if/else statement in the end wouldn't need a separate function, or even separation within itself. It would just look like:

describe $chan gives $iif(%name,$2,$nick) a $gettok($listSnacks,$rand(1,$numtok($listSnacks,46)),46)

Just some ideas to save you time!

 Respond  
Degausser created a Page  -  Mar 03, 2017
103 

$cleanEquation(2+4/3^3) - Output: (2 + (4 / (3 ^ 3)))

Degausser created a Page  -  Feb 13, 2017
1 67 

Multidimensional array wrapper based off hash tables, with a few nice features

  1 Thread   mIRC  
Degausser created a Page  -  Feb 11, 2017
165 

Does about the same as the default nicklist menu, but allows you to highlight multiple users and perform batch actions with one click. Probably worth removing the default script within the nicklist popups file.

  1 Thread   mIRC  
Degausser created a Page  -  Jan 17, 2017
4 313 

Blackjack Race is a channel based multiplayer game, supporting up to your standard 7 players.

Degausser created a Page  -  Nov 13, 2016
2 129 

It's probably been done, but here's a varient of the $iif identifier which helps keep everything cleaner and easier

  1 Thread   mIRC  
Degausser created a Page  -  Nov 13, 2016
87 

A simple but powerful nickname completor, to make sure someone acknowledges your message.

 Respond  
Degausser commented on a Page, Elimination Game for mIRC  -  Nov 13, 2016

Nice job :P

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.