Meta

Meta

Joined:
Jan 05, 2010
Location:
Somewhere...

Activity Stream

Meta commented on a Snippet, Easy Alias Creator  -  11 days ago
There is already a built in /alias command for this kind of thing.
Meta commented on a Snippet, Roulette need help script only work for mods/broadcaster  -  29 days ago
This block:

Code
 


Is essentially just:

Code
 


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 Snippet, 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:

Code
 


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)

Code
 


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:

Code
 


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.
 Respond  
Meta commented on a Snippet, 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 Snippet, 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:
Code
 
otherwise the ( ) will be part of the variable, (e.g. ( 1) rather than 1)
 Respond  
Meta commented on a Snippet, Wildcard Nick List  -  Oct 26, 2013
Lol why not regex?

Code
 


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 Snippet, !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:#: {
 Respond  
Meta commented on a Snippet, delete  -  Oct 07, 2013
Quick tip: you can make variables and identifiers* evaluate directly in the dialog definition by omitting the quotes around the text portion of suitable controls... for example, rather than the on DIALOG init event you have for the yes or no dialog to fill in the text, you could simply do:
text Do you want to threeway chat with %threeway1 and %threeway2, ...

*Just keep in mind that if your text contains commas and you omit the quotes, you'll need to use $chr(44)... this applies to identifiers with multiple parameters too, eg: $nick(#,2).
 Respond  
Meta posted a Snippet  -  Sep 16, 2013
Meta posted a Snippet  -  Sep 15, 2013
Meta commented on a Snippet, Avoid a slap :p  -  Nov 03, 2012
Ah, just one thing... it should be if ($istok($1-,$me,32)) {
 Respond  
Meta commented on a Snippet, 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.
 Respond  
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 Snippet, ASCII Battleship v0.2  -  Apr 19, 2012
o_O @evilMonkey - What error are you getting?

I've added a video demonstrating this script in action above.
 Respond  
Meta commented on a Snippet, ASCII Battleship v0.2  -  Apr 14, 2012
Ok, I've made a few updates to the script.
 Respond  
Meta commented on a Snippet, 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.
 Respond  
Meta commented on a Snippet, 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.
 Respond  
Meta commented on a Snippet, 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
 Respond  
Meta posted a Snippet  -  Apr 09, 2012
Meta commented on a Snippet, 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:

Code
 
*

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:

Code
 


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):

Code
 
 Respond  
Meta commented on a Snippet, 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..?
 Respond  
Meta commented on a Snippet, 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...
 Respond  
Meta posted a Snippet  -  Aug 11, 2011
Meta commented on a Snippet, RoOm LoCkDoWn   -  Jul 11, 2011
The on TEXT's can be combined:

Code
 


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.
 Respond  
Meta commented on a Snippet, Simple Qoute Bot  -  Jun 30, 2011
Sorry, disregard my comment.
 Respond  
Meta posted a Snippet  -  Jun 25, 2011
Meta commented on a Snippet, $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.
 Respond  
Meta commented on a Snippet, 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.
 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.