Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Fri May 29, 2009 4:00 pm   

Need help with alias and variable
 
Ok basically what i want to do is make an variable that referencs an alias for casting spells.

#alias burnh {cast 'burning hands'}
#alias chill {cast 'chill touch'}
#alias sleep {cast 'sleep'}
#alias acidb {cast 'acid blast'}
#alias shockg {cast 'shocking grasp'}
#alias renf {cast 'ray of enfeeb'}
#alias pwkill {cast 'power word kill'}
#alias pwstun {cast 'power word stun'}
#alias pwblind {cast 'power word blind'}
#alias cone {cast 'cone of cold'}
#alias slow {cast 'slowness'}
#alias bigbyscf {cast 'bigbys clenched fist'}
#alias immo {cast 'immolate'}
#alias aimmo {cast 'acid immolate'}
#alias chain {cast 'chain lightning'}
#alias meteor {cast 'meteorswarm'}
#alias solbeep {cast 'solbeeps missile barrage'}
#alias bigbysch {cast 'bigbys crushing hand'}
#alias antimagic {cast 'anti-magic ray'}
#alias chaosv {cast 'chaos volley'}
#alias ripple {cast 'chaotic ripple'}

#alias nuke1 {#var primarynuke %params;#ECHO {---------- Your primarynuke is now %params ----------}}
#alias v {#if (%numparam() = 0) {@primarynuke @target} {@primarynuke %params}}

so I want to be able to set nuke1 as pwkill so that when i type v it cast's power word kill vs my target. What i've tried is above and that doesn't smee to be working, it doesn't want to use the alias, it will just pump out pwkill when i type v. I want it to reference the actual alias and use that. any suggestions? is this even possible?

Thanks in advance
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Fri May 29, 2009 4:21 pm   
 
#alias v {#if (%numparam() = 0) {#EXEC {@primarynuke @target}} {#EXEC {@primarynuke %params}}

You need to wrap indirect alias calls in #EXEC
_________________
Discord: Shalimarwildcat
Reply with quote
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Fri May 29, 2009 5:13 pm   
 
Hrmm that doesn't seem to work for me when i type v it just gives the entire line

#if (%numparam() = 0) {#EXEC {@primarynuke @target}} {#EXEC {@primarynuke %params}
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Fri May 29, 2009 9:56 pm   
 
That's because you have a syntax error, you're missing the final }.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Sat May 30, 2009 12:58 am   
 
Heh, oops.

Thanks agian to all, That worked.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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