About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Delrayne
Beginner


Joined: 01 Feb 2008
Posts: 16

PostPosted: Thu Jun 12, 2008 5:28 am   

Help in making an alias more efficient
 
So here's my alias:

#if (@targetaura = 1 and @targetshield = 0) {rkick1}
#if (@targetaura = 1 and @bladesurge = 1 and @targetshield = 0) {rkick2}
#if (@targetshield = 1 and @targetaura = 0) {raze}
#if (@targetaura = 1 and @targetshield = 1) {raze}
#if (@targetaura = 0 and @targetshield = 0 and @bladesurge = 0) {cres1}
#if (@targetaura = 0 and @targetshield = 0 and @bladesurge = 1) {cres2}

I don't know of a more efficient way to do this, but I'm sure with the masterminds we have around here, we can find one. If there isn't one, just say so and I'll leave it as is. My main concern is the huge amount #if statements possibly slowing things down, as there are about 10 or so similar aliases and with varying internet conditions/ping/serving lag/many other things, the possibility of it not picking up aura or shield is very possible. As always, thanks for any help given.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Thu Jun 12, 2008 9:20 am   
 
#if (@targetaura) {#if (@targetshield) {raze} {#if (@bladesurge) {rkick2} {rkick1}}} {#if (@targetshield) {raze} {#if (@bladesurge) {cres2} {cres1}}

I think. Haven't tested it so the bracket count might be wrong. In your original one, you have (@targetaura = 1 and @targetshield = 0) and (@targetaura=1 and @bladesurge = 1 and @targetshield = 0). In the event that the second one's true, the first one is also true, and both will go off. I assumed that that's unintentional, and that the first one should have @bladesurge = 0 in it as well.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net