Jan 05, 2010

Activity Stream

Meta commented on a Page, Roulette need help script only work for mods/broadcaster  -  Jul 25, 2014

This block:

if ($nick isop #) {
    var %randmods = $rand(1,1)
    if (%randmods == 1) msg $chan Nazi mods are only released upon spam DansGame you know that $nick ...

Is essentially just:

if ($nick isop #) msg $chan Nazi mods are only released upon spam DansGame you know that $nick ...

I'm not sure if that's what you want, or you're just saving that block for more options later, but anyway.

You're missing a { after if (%randnumber == 1), and you will need to close the event with a third } at the end. The else in else (%randnumber == 3) should also be changed to elseif. Finally, you're missing the (I presume) msg command before $chan for both /timeouts

Meta commented on a Page, Better way to write code for mIRC remote.ini  -  Jun 14, 2014

Based on your excerpt, it looks to me like you'll cut about 2/3rds of your script by removing all of the:

if ((%general) || ($($+(%,general.,$nick),2))) { return }
                set -u10 %general On
                set -u1800 %general. $+ $nick On

And checking that neither of the vars are set at the top of the script, and putting everything within that block instead:

(Also, I'm assuming you're using * as the matchtext for the event rather than trying to match every possible trigger, so if you want those vars to only be set if someone enters something that triggers a response by the bot, you can just add an else after all the text match conditions that unsets them)

on *:TEXT:*:#whatever:{
  if !%general && !%general. [ $+ [ $nick ] ] {
    set -u10 %general On
    set -u1800 %general. $+ $nick On


    else unset %general %general. $+ $nick

Note - There's no need to return, either.

By the way, depending on how you use timers, you may want to be wary of some issues mentioned this... This becomes especially important if your bot relays some part of the triggering text in its responses...

Also, this is not too important but in the following condition:

(*how are you* iswm $1-) || (*how are you? iswm $1-) || (*how are you ? iswm $1-)

Only the first would ever be met, so you could omit the other two... Additionally, ? would actually be considered a wildcard character here for a single (non-null) character... so something like *how are you? iswm $1- would be true for how are youa, how are you!, etc.

I'm also trying to think of with a better method for storing the responses and possible triggers, so I'll let you know when I come up with something.

Meta commented on a Page, RGBMixer - An alias to equally blend two rgb values  -  Apr 19, 2014

Shouldn't you be adding the two like values together and dividing by two..?

Meta commented on a Page, Help coding Random Reply mIRC  -  Apr 02, 2014

You're on the right track; the main problem is the parentheses around the $rand(1,3) -- It should just be:

var %randnumber $rand(1,3)

otherwise the ( ) will be part of the variable, (e.g. ( 1) rather than 1)

Meta commented on a Page, Wildcard Nick List  -  Oct 26, 2013

Lol why not regex?

alias nicksearch {
  var %r $regsubex($str(.,$nick($1,0)),/./g,$iif( [ $2 ] iswm $nick( [ $1 ] ,\n),$v2 $+ $chr( [ $3 ] )))
  return $deltok($iif($4,$sorttok(%r,$3),%r),,$3)

Edit: Don't need a capture group. Also, now removes null tokens.

Meta   -  Oct 13, 2013

@Hawkee - On some pages (such as in a snippet), the links in the footer are unclickable. Adding position:relative; to the #footer declaration should fix the issue since the z-index property doesn't work on statically positioned elements.

Meta commented on a Page, !go and !leave for bot  -  Oct 13, 2013

You can place regex directly in the matchtext parameter of an event by placing a $ before the level (in this case, *) -- This will prevent the script from trying to trigger when it shouldn't, and also help avoid conflicts with other on text events in the same file:

*on $:TEXT:/^!(go|leave)$/Si:#: {**

Meta created a Page  -  Sep 16, 2013

A simple regex tester. To activate, type /retest or just right click in any window and select "Regex Tester", then, simply follow the instructions in the dialog.

  1 Thread   mIRC  
Meta created a Page  -  Sep 15, 2013
1 504 

UPDATE: Incorporated Wiz126's $safe() alias to prevent unwanted evaluation caused by the timers. (informational link within comment in script)

  1 Thread   mIRC  
Meta commented on a Page, Avoid a slap :p  -  Nov 03, 2012

Ah, just one thing... it should be if ($istok($1-,$me,32)) {

Meta commented on a Page, Avoid a slap :p  -  Nov 02, 2012

I'd recommend changing the if condition from $me isin $1- to $istok($1-,$me,32), otherwise, the script could trigger on false positives... example: if your nick is "Mark", somebody else's nick is "Mark12345", and someone ("John") slaps Mark12345, you'll end up dodging a slap that wasn't aimed at you and subsequently punching John in the face for no reason.

You could also use regex for better matching , but I'd have to check which characters aren't allowed in nicks first.

Meta   -  Jun 02, 2012

For some reason, even though the header remains on screen at all times, I still scroll to the top to use it. I feel like I'm not doing it properly. =P

Meta   -  May 27, 2012

Hawkee, quick suggestion. Could you add a button to expand or collapse the main header? It can be a bit distracting when trying to read something on the site.

Meta commented on a Page, ASCII Battleship v0.2  -  Apr 19, 2012

o_O @Arigateaux - What error are you getting?

I've added a video demonstrating this script in action above.

Meta commented on a Page, ASCII Battleship v0.2  -  Apr 14, 2012

Ok, I've made a few updates to the script.

Meta commented on a Page, Poison-Kick  -  Apr 12, 2012

Nah, all that would really happen in these cases by using $2- is that the remaining tokens would work their way into the notices and kick message. "Aha2y Drarqua 5, Aha2y Drarqua 4, Aha2y Drarqua 3, Aha2y Drarqua 2 ,Aha2y Drarqua 1". Probably not what you'd want, and of course $2 is better, but $2- shouldn't prevent the script from working.

Meta commented on a Page, ASCII Battleship v0.2  -  Apr 11, 2012

Meta inconspicuously points at his tags and code description. (KilllerX)

Btw, I have made some improvements over the last couple of days, so expect an update soon. Hopefully some of the major bugs will be completely fixed (if anyone was able to test this and find any) and hopefully the script will be more reliable as a result.

Meta commented on a Page, ASCII Battleship v0.2  -  Apr 09, 2012

Hmm... something might've happened to the code while I was pasting it. I'll look at it and try to fix it when I get home. I should probably mention that this script (currently) relies almost entirely on custom CTCPs. so make sure that the person you are challenging can recieve them. I'll add error alerts for these things as well when I get home. Spoof, this script is still pretty much in the alpha phase, which is why I'm calling it v0.1 rather than v1.0

Meta created a Page  -  Apr 09, 2012

First release of an ASCII based battleship game. There are a few things I plan on adding (such as a help system) and there may be a few bugs, but the game should work.

Meta commented on a Page, jHIKa - Slaps Back It  -  Mar 29, 2012

First, I think I see what you are attempting to do with the long $replace, and I'll show you a trick I learned to make your job so much easier:

$!decode( $encode($reptok($strip($1-),$me,$nick,0,32),m) ,m)


The spaces here are necessary, as is the ! in $!decode, so don't omit them. What this will do is first encode the raw input with whatever encryption the m switch provides**, then decode that once the timer executes, returning the original string with nothing evaluated.

*I've decided to use $reptok rather than $replace, and I'll explain why later on.

**there was a specific reason for this, I think it has to do with parentheses and other such characters...

Second, the 'isin' check is an inefficient method for something like this because it runs the risk of false positives:

Say, for example, your nick is 'ger', and three other people in the channel are named "liger' 'gerbil' and 'lingerer'. (or something, I don't know)... If somebody, e.g., 'mel', slaps liger, gerbil, or lingerer, the script will trigger and you will slap mel for no reason...

Let me make a minor adjustment to that.

Because your script uses $replace, it will take any instance of 'ger' (or - your nick) in the string and replace it with 'mel'... So when mel slaps gerbil, the script will react and you will slap some person named melbil for no reason. Poor melbil! He/she's not even in the channel!

The best way to avoid these problems is to use something that only matches your nick exactly. Token identifiers work well, as can regex. Here's one regex-free way to do this:

on *:ACTION:*slaps*:#: {
  if ($istok($strip($1-),$me,32)) && (!%f1) {
    inc -u10 %f1
    .timer 1 2 describe # $!decode( $encode($reptok($strip($1-),$me,$nick,0,32),m) ,m)

This should work for our purpose, and problems will only arise if your nick happens to be 'slaps'. However, it requires that your nick be a token exactly as is, so if you want to take it a step further, you can use regex - replace the $istok(...) with:

$regex($1-,/(?<![][}{a-z0-9^`|-])(Q $+ $me $+ E)(?![][}{a-z0-9^`|-])/gSi)

and the $reptok can be replaced with a similar $regsubex:

$regsubex($1-,/(?<![][}{a-z0-9^`|-])(Q $+ $me $+ E)(?![][}{a-z0-9^`|-])/gSi,$nick)

What these will do is not only check to see if your nick is a token within the string, but also match if your nick is immediately surrounded by characters that can't be used in nicks (at least according to someone).

So the code becomes something like this - (And I'll set a var to the regex match pattern to make things shorter):

on *:ACTION:*slaps*:#: {
  var %rgx /(?<![][}{a-z0-9_^`|-])(Q $+ $me $+ E)(?![][}{a-z0-9_^`|-])/gSi
  if ($regex($1-,%rgx)) && (!%f1) {
    inc -u10 %f1
    .timer 1 2 describe # $!decode( $encode($regsubex($1-,%rgx,$nick),m) ,m)
Meta commented on a Page, No Facebook? Get Kicked (Work In Progress)  -  Mar 23, 2012

The on JOIN event triggers before any modes are set, so you will need to use a timer in order to check if the person joining is an op or similar. I'd recommend creating an alias to perform the commands, and then call that with a timer in the event.

As for the rest of the script, you might want to be careful about calling your timer "timer1" as well as using the on open event for this...

  • I can't check right now, but since timers use numbered names by default, the one used in the on JOIN will probably replace an unnamed timer that happened to be set before
  • I believe the on OPEN event will only trigger when the query window is opened, so if the bot already happens to have a query window with the person answering, it'll never trigger.

Also, quick idea: maybe you could set a temporary storage system so that the bot doesn't ask the same person over and over whether or not they have a facebook every time they join the/a channel..?

Meta commented on a Page, Slogan Maker  -  Sep 12, 2011

Frenetic, are you trying to trigger the script from the client it's running on?

Btw, it works for me in 7.19, so I can't really see why it wouldn't work in 7.17 if it doesn't...

Meta created a Page  -  Aug 11, 2011

UPDATE: Complete rewrite of the code. It's not pretty, but so far it works. Uses only two if statements. $v1 and $v2 appear to be working correctly thus far, unless used within the identifier. Thanks to SReject for helping on #msl. I have yet to test everything jaytea's mentioned.

Meta commented on a Page, RoOm LoCkDoWn   -  Jul 11, 2011

The on TEXT's can be combined:

on $*:TEXT:/^([+-])TK$/i:#: {
  mode # $+($regml(1),smiljnut) 1
  msg # 12Lockdown $iif($regml(1) == -,de) Active

PuNkTuReD is correct though, to an extent, though technically speaking, anyone will be able to lock down the channel, but only voices up will be able to unlock it.

Meta commented on a Page, Simple Qoute Bot  -  Jun 30, 2011

Sorry, disregard my comment.

Meta created a Page  -  Jun 25, 2011
1 566 

Just a semi-quick hangman snippet I've developed over the past couple of days. The coding is not the most elegant in the world, but I will probably improve it and/or shorten it later on.

Meta commented on a Page, $isover  -  Jun 18, 2011

Done, thanks. I've never used chatspace so I wasn't aware.

If anyone knows any other network types (don't know if that's the correct term) where this would be useful (or useless), please let me know.

Meta commented on a Page, Random Password Generator  -  Jun 16, 2011

Jethro_, pretty sure that's caused by the fact that %temp only increases in the while loop if one of the conditionals is met.

Meta commented on a Page, Hash View/Edit Dialog  -  Aug 20, 2010


/meta is confused.

By the way, the alignment of stuff is better in this dialog compared to your channel modes one, especially in the sense that nothing is overlapping or being cut off.

what is the "..." button for anyways? Also, a small suggestion -- maybe make an option to save the hash table, since they are deleted as soon as mIRC is closed.

Meta commented on a Page, SB5 Op Level Module  -  Aug 17, 2010

$modespl is the maximum amount of modes that can be set on one line at a time. So in your case, if you try to set modes on 13 people, it would at most only set the mode on the first 12.

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.