mIRC Home    About    Download    Register    News    Help

Print Thread
#189955 14/11/07 06:06 AM
Joined: Sep 2007
Posts: 7
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Sep 2007
Posts: 7
who i do a easter egg

on 1:dialog:new_table:init:*: {
.did -a $dname 1 --= 1 =-- Opcion Menu
.did -a $dname 1 --= 2 =-- Configuracion Scripts
.did -a $dname 1 --= 3 =-- Cargar Configuracion
.did -a $dname 1 --= 4 =-- Grabar Configuracion
.did -a $dname 1 --= 5 =-- salida del menu
.did -a $dname 1 --= 6 =-- no habilitada
.did -a $dname 1 --= 7 =-- configuracion Nick
.did -a $dname 1 --= 8 =-- sysinfo
}


i want add some --= 9 =-- secret stuff

if any can help preciate


TheDalekSec #189959 14/11/07 08:28 AM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
You can hide (and at some point show) a whole dialog item with did -h (or using the style "hidden"), but you can not hide a line of text in a dialog item.

TheDalekSec #189962 14/11/07 10:26 AM
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
You can add a empty line with a $chr(160) for example but since the line is visible, it's not really a *secret thing*...



#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Horstl #189977 14/11/07 03:24 PM
Joined: Sep 2007
Posts: 7
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Sep 2007
Posts: 7
thanx for the tip

Wims #189979 14/11/07 03:25 PM
Joined: Sep 2007
Posts: 7
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Sep 2007
Posts: 7
thanx for the tip!!!!!!!!!!

TheDalekSec #189982 14/11/07 05:16 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Here's my shot at an easter egg going over the idea of (Mirc's yellow icon right click for happy face)

Don't mind the cheap design its really no design just a square with a text label.

The syntax is /egg

once open right click the word happy and see what happens, right click it again to see what happens. (Images can be loaded in dialogs)

and BTW if $decode is locked in your options this won't work

if it is locked unlock it or replace the first line $decode section with Happy Label and the second line with Happy Label smile

Code:
dialog egg {
  title "The Egg"
  size -1 -1 143 123
  option dbu
  text "Happy Label", 1, 32 44 40 8
}
on *:DIALOG:egg:rclick:*:{ 
  if ($regex($mouse.x,/([6-9][0-9])/g) == 1) && ($regex($mouse.y,/([8-9][0-9])/g) == 1) && (%e.1) { did -ra $dname 1 $decode(.2&%P<'D@3&%B96P@.E``) | unset %e.1 }
  elseif ($regex($mouse.x,/([6-9][0-9])/g) == 1) && ($regex($mouse.y,/([8-9][0-9])/g) == 1) && (!%e.1) { did -ra $dname 1 $decode(+2&%P<'D@3&%B96P`) | %e.1 = 1 }
}
alias eggs dialog -m egg egg


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Lpfix5 #190028 15/11/07 03:34 AM
Joined: Sep 2007
Posts: 7
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Sep 2007
Posts: 7
thnx friend

Lpfix5 #190031 15/11/07 04:44 AM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
I'm no regex genius, but can you please stop suggesting the use of it when it is highly unnecessary? You've done it a number of times and I'm surprised nobody else has said anything yet. A much simpler and faster approach (although speed is of least importance here) would have been to use "isnum".

Besides that, it seems like you don't even understand regex that well because your provided pattern has a fair amount of useless overhead. For example why are you capturing matching results if you're not going to do anything with them elsewhere in the code? The 'g' modifier also has no application here. You might want to view some tutorials before using it further as well as note when it may or may not be the most practical solution.

schaefer31 #190032 15/11/07 04:58 AM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

Originally Posted By: schaefer31

I'm surprised nobody else has said anything yet.


Maybe others have mentioned it to him... in private where it would be more appropriate. whistle

schaefer31 #190040 15/11/07 08:32 AM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Way to bash,... does it even matter it does what it does and who cares. I used to post scripts without regex in it and people would post exactly what I wrote with regex in it, take a look back.

Seem's that everytime I have a good idea of concept either someone is mad or angry.

You should never bash if someone does actually work. And keep your mind outside the box


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
schaefer31 #190047 15/11/07 12:09 PM
Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
$inrect() would've been even simpler :P but i agree, people shouldn't just jump to regex to solve their problems but should consider the suitability of other methods first. it'll improve your scripting logic!


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
Lpfix5 #190048 15/11/07 12:44 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Quote:
does it even matter it does what it does and who cares
I'm afraid it does matter. Good scripting practice should be encouraged, and that's not 'elitist' or anything: even if something "does what it does", it may not do it fast enough or clearly/cleanly enough. More importantly, even if in a specific case there is no perceivable difference between a good and a not-so-good solution, that doesn't mean that there would be no difference in similar cases in the future.

Quote:
I used to post scripts without regex in it and people would post exactly what I wrote with regex in it
So? This is not a "use regex for everything or don't use it at all" situation. If somebody once told you "use a saw to cut that tree, not a knife", you wouldn't then use a saw to cut meat, bread etc would you? Perhaps you should be putting some more thought as to which cases warrant the use of regex and which don't.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Lpfix5 #190074 15/11/07 07:16 PM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
Originally Posted By: Lpfix5
You should never bash if someone does actually work. And keep your mind outside the box


It wasn't intended to bash you in any way, and I apologize if that's how you perceived it. I was merely trying to make a suggestion to you. It would only benefit you in the long run. Sometimes it's also best to think inside the box, since everyone else is too busy thinking outside.

Originally Posted By: RoCk
Maybe others have mentioned it to him... in private where it would be more appropriate. whistle


I have to disagree with you there. It's more beneficial to post it here where others can see it, and take note that using regex is not always practical. As qwerty put it, good scripting practice should always be encouraged.

schaefer31 #190077 15/11/07 07:36 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

Originally Posted By: schaefer31

It's more beneficial to post it here where others can see it, and take note that using regex is not always practical.


Perhaps you could have offered a better, non-regex solution to the op and pointed out the fact that regex was not
necessary rather than trash in public someone who seems to prefer using regex more than you, but was actually
offering his help rather than just criticizing someone elses scripting methods which he didn't like.

RoCk #190083 15/11/07 08:02 PM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
Originally Posted By: RoCk
Perhaps you could have offered a better, non-regex solution to the op and pointed out the fact that regex was not
necessary rather than trash in public someone who seems to prefer using regex more than you, but was actually
offering his help rather than just criticizing someone elses scripting methods which he didn't like.


I did offer a more practical non-regex solution, and I did point out regex was unnecessary both in the first couple lines. Read my post again smile . And I wasn't bashing him as I already mentioned, I think that's pretty obvious by my choice of words. Again it comes down to good scripting practice. If you don't want to partake in it fine, but you shouldn't be upset if someone criticizes you for it. Perhaps this topic ought to be locked before it gets out of hand.

schaefer31 #190085 15/11/07 08:06 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

Originally Posted By: schaefer31

I did offer a more practical non-regex solution,


You offered criticism, not an alternative solution.

Originally Posted By: schaefer31

Perhaps this topic ought to be locked before it gets out of hand.


It's not your thread, go away and nothing will get out of hand.

RoCk #190087 15/11/07 08:10 PM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
I clearly suggested to use "isnum", it's even marked. Just because I didn't directly apply it to the code, doesn't discredit the fact that I didn't offer the solution.

Anyhow, I have a class to go to and I'm not going to sit here and argue this with you. I know what my intentions were. If you want to take them out of context and twist them around, then that is your problem to deal with. The OP has already been answered and this has strayed off topic enough. Adios!

schaefer31 #190103 15/11/07 10:34 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
wow, out of hand. ... chill guys, There's always many ways to write a script. What's to say that by the use of regex in post one person who inquires about regex stumbles across it then uses it to their advantages. It seems for the last 3 months this forum has been nothing but a who can write it better kind of thing.

There should only be a one time post of a script unless there's an error.

Even to the best they sometimes forget the little calls that can not only make the script less lenghty but also more user readable.

I've picked up many scripts and cut down the size on many, I just overly abused regex because I recently learned my way around it a bit.

Like any other thing, just let things go. Instead of bashing one could say here use this instead because regex is not neccesary.

And one OP via this post was right, all comments should go to Private messages and be dealt with personally.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Lpfix5 #190104 15/11/07 11:13 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
In general I'd agree that using regex for things like this is a bad idea, but in this instance I think it actually does a good job of hiding the easter egg code grin

hixxy #190106 16/11/07 12:13 AM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Thanks hixxy hugs for u :P


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Link Copied to Clipboard