mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2005
Posts: 75
C
Babel fish
OP Offline
Babel fish
C
Joined: Oct 2005
Posts: 75
i made another one for my bot

on @*:join:#: {
if (ircop isin $wildsite) { disable #flyby | disable #wordmon }
elseif (somecity isin $wildsite) { disable #flyby | disable #wordmon }
elseif (admin isin $wildsite) { disable #flyby | disable #wordmon }
elseif (somecity isin $wildsite) { disable #flyby | disable #wordmon }
}

i wanna know if theres any way to make it shorter than it appears

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
On @*:Join:#: {
  var %moo = $wildsite
  if (ircop isin %moo) || (somecity isin %moo) || (admin isin %moo) { .disable #flyby | .disable #wordmon }
}


or..

Code:
On @*:Join:#: {
  var %moo = $wildsite
  if (ircop isin %moo) || (somecity isin %moo) || (admin isin %moo) $&
    { .disable #flyby | .disable #wordmon }
}



-Andy

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Code:
on @*:join:#:{
  if ($regex($wildsite,/ircop|somecity|admin/i)) { 
    .disable #flyby 
    .disable #wordmon 
  }
}


Gone.
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
Code:
on @*:join:#: if ($regex($wildsite,/ircop|somecity|admin/i)) { .disable #flyby | .disable #wordmon }


saved 20bytes shocked , sorry i couldnt resist FO wink


$maybe
Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
Code:
on @*:join:#:if ($regex($site,/ircop|somecity|admin/i)) .disable #flyby #wordmon

and another 20 off :tongue:


Saturn, QuakeNet staff
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Heh, I wasn't going for shortest code possible (I think shortest code challenges are idiotic btw), but ok :tongue:

I would like to point out to the original requester btw, that shorter code doesn't mean faster code, although it's possible. What you had is fine, although a bit repetitive, but you won't notice any speed difference with your original code. Speed, imo, is far more important than length of code, and even this should come after user friendliness, adaptability, maintainability of code etc.


Gone.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Hey, those old 4k, 8k, 16k, etc DEMOs were awesome to watch! Very little code, yet when done by someone who knows what they are doing, some pretty cool graphics, effects and sound can be done in very little code. laugh


Invision Support
#Invision on irc.irchighway.net
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
I hope you're not talking about mIRC demos, because those are the best example of how not to code something.

Take a look at any demo by Stanz, it's really cool, but the code is unreadable, which is completely ridiculous, one can't learn from it, until you rename all variables, identifiers, and commands to something that actually makes sense instead of vars like %^::$)!

Here's a little excerpt from the purple television demo:

Code:
alias -l em {
  drawpic -c | %i = 0 | %kb = $+(",$scriptdir,2_b7209cbf.png,") | %bu = $+(",$scriptdir,pptstar.png,") | %¤ = .timera | Tk SEEh | Tk WUVTIE1ZIEZBVk9SSVRFIENIQU5ORUwuIFdIQVQgQUJPVVQgQ09MT1IgPw== | Tk REVBUiBTUEVDVEFUT1IgVEhBVCBJU04nVCBBIFBST0JMRU0gRk9SIFNUQU5aICE= | Tk VEhYIFNUQU5aLiBCVVQgSVQnUyBBIEJJVCBXRUlSRCAhIENBTiBZT1UgRklYIFRIQVQgPw== | Tk WU9VUiBXSElTSEVTIEFSRSBPUkRFUlMuIERPIFlPVSBMSUtFIFRIT1NFIFJBU1RFUlMgPw== | Tk U0VYWTogQlVUIElUJ1MgR0VUVElORyBCT1JJTkcuIEFORCBJIFdBTlQgTVVTSUMu
  Tk U1RJTEwgQVQgWU9VUiBTRVJWSUNFLiBJIFNVR0dFU1QgQSBMSVRUTEUgUExBU01BLg== | Tk SSBNQURFIFRISVMgQ0hJUFRVTkUgV0lUSCBDVUJBU0UsIERPIFlPVSBMSUtFIEl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8sIElUJ1MgQSBMQU1FIC0+U1RBVElDICYgSE9SUklCTEUgLT5OT1JNQUwgLT5DUkFQLg== | Tk VElNRSBGT1IgVE8gU0hPVyBUSEUgRk9SQ0UgT0YgVEhJUyBST1VUSU5FICE= | Tk VVNFIFlPVVIgTU9VU0UgQU5EIFtDVFJMXSBLRVkgRk9SIFJPVEFUSU9OUy4= | Tk MjA3OQ== | Tk VCBSIEkgQSBOIEcgTCBFIFM= | Tk TiBFIFcgoCBXIE8gUiBMIEQgoCBSIEUgQyBPIFIgRA== | Tk VEhFIEZJUlNUIFJVQkJFUiBFVkVS | Tk UFBUMQ== | Tk UFBU | Tk cHJlc2VudGVkIHlvdQ== | Tk IlB1cnBsZSB0ZWxldmlzaW9uIg== | Tk QSBtaXJjIGRlbW8= | Tk Y29kZWQgaW4gMjAwNC4=
  Tk oA== | Tk QWxsIHNjcmlwdCwgZ2Z4IGFuZCBtdXNpYw== | Tk YnkgU3Rhblou | Tk oA== | Tk R3JlZXRpbmdzIHRvIDo= | Tk KG5vIHNwZWNpYWwgb3JkZXIp | Tk S2Vuamk= | Tk QmlnQmV6dXM= | Tk dmlzaW9ueg== | Tk RXBzaWxvbg== | Tk VG9LZU4= | Tk QXR0aWxh | Tk WmVyZw== | Tk Qm9tYlN0cmlrZQ== | Tk c2F4 | Tk Q2FtZWxvdA== | Tk Umltb3V4 | Tk T3B0aW11cw== | Tk oA== | Tk VG9vbHMgYW5kIGNyZWRpdHMgOg== | Tk RnVsbHNjcmVlbiBieSBTdHIzaWJlcg== | Tk Rm1vZCBmb3IgbWlyYyBieSBjYXB0YWluRU8= | Tk Q3ViYXNlIGJ5IFN0ZWluYmVyZw== | Tk SG9lZ2FhcmRlbiBhbmQgTGVmZmUgbW9yYWwgc3VwcG9ydHM= | Tk oA== | Tk oA== | Tk oA== | Tk oA== | Tk UFBUIHByb2QgLSBEZWNlbWJlciAyMDA0oA== | Tk qSBQdXJwbGUgdGVudGFjbGVzIGluYw==
  %fa = 310 | %ve = 0 | %v = 0 | v£ | %9 = 0 0 2 | %10 = 0 0 -2 | %11 = 2 0 0 | %12 = -2 0 0 | %13 = 0 2 0 | %14 = 0 -2 0 | %{ = 550 | %@ = @Ü£ | %rt = 0 | %\ = drawscroll -n @Ü£ | %/ = drawtext -nr @Ü£ | %§ = drawtext -nor @Ü£ | window -CpdofB +d @Ü£ 0 0 320 200 | window -Cpfdohn @£Ü 0 0 320 1200 | window -phnBf @ka 0 0 60 60 | window -lh @ÜE 0 0 0 0 | fs SetWidth 320 | fs SetHeight 200 | fs SetBits 16 | fs SetFrequency 60 | fs HideMouse | fs Fullscreen $window($active).hwnd | drawdot -r @Ü£ 5244245 400 160 100 | drawpic -smt @Ü£ 0 72 12 176 176 %kb | %¤ $+ d -m 1 780 splay -w $+(",$scriptdir,krazy.wav,") | %¤ $+ c -m 11 380 ha
  %¤ $+ b 1 4 drawdot -r @Ü£ 255 4 150 63 158 63 | %m = 0 | %a = 0 | %u = 350 | %k = %\ | %& = 0 | %ë = 1 | %ñ = 0 | %® = 0 | %¤ 1 6 ro
}

To me, this is beyond ridiculous.


Gone.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
No. Usually they were in ASM, I believe... though some may have been done in other languages. You can see remnants of them now, but they were done more often back 10+ years ago. The results are .com or .exe files that are the size required for the "competition." I've seen some really nice ones. If you look around, you can probably find some. They're hard to search for because the word is the same as how most games offer previews, so googling can be difficult. The best way is to include the size... "4k demos" or whatever.

Btw, there are some really poor quality ones out there, so if you do look and you see some garbage, keep looking. Also, probably 40% will not run on XP (or NT/2000).


Invision Support
#Invision on irc.irchighway.net
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
hehe yeah propper syntax all the way!

I was just being funny as i finally got to reply on you and not the other way round :tongue:, which doesnt mean you should refrain from doing so in the future btw grin


P.S: Damn you sat! smile


$maybe
Joined: Oct 2005
Posts: 75
C
Babel fish
OP Offline
Babel fish
C
Joined: Oct 2005
Posts: 75
i wasn't going for the fastest way you EXPERT!!,
i only wanted to make it shorter than it appears cause it looks a bit slobby to me even tho it works for me remember i'm a newbie...no need to get all eriotic on me now

Joined: Oct 2005
Posts: 75
C
Babel fish
OP Offline
Babel fish
C
Joined: Oct 2005
Posts: 75
thank you all for the help i tried all all works fine for the first time but when i restart mirc it stopped working i don't know why,

when ever i join with my city in the addy, it usually does this

-
* Group(s) enabled
-

but after i restarted mirc and try to do the same thing again it stopped showing the

-
* Group(s) enabled
-
any ideas?

Last edited by Confuzzled; 14/11/05 04:25 AM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Unless you are disabling the group(s) before you quit mIRC, then they'll stay enabled when you restart mIRC.

Groups maintain their enabled/disabled status between mIRC sessions.

Joined: Oct 2005
Posts: 75
C
Babel fish
OP Offline
Babel fish
C
Joined: Oct 2005
Posts: 75
nvm slade's still works but without the dots before enable and disable, it worked after i removed them thanks again

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Ahh...Yes, those dots act as silencers, so you wouldn't see the information on the copy that's running the script. I use them a fair bit on my bots, since the bots normally run in minimized mode anyways, there's little sense in having the information displayed.


Link Copied to Clipboard