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
cuff
Newbie


Joined: 24 Jan 2003
Posts: 6

PostPosted: Wed Apr 23, 2003 11:40 am   

about variable to alias
 
I have already used a alias to create a long strings variable, just like this:
#al mkhm {hm=;hm=[@hm]#ts 300';';#if (@jin>26) {temp=[@jin-27];hm=[@hm]#27 hit jin %i';'}

and now I want to change this vraiable to a alias named 'hm'.
I tried like this:
#al hm [@hm]
but it doesn't work.

How can I do?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Apr 23, 2003 3:17 pm   
 
I don't see any reason to use one alias to make another. However, if you really think it's necessary, start by fixing your first alias.

It would probably be easier to just explain what you want the "hm" alias to do, so we could tell you how to make it directly.

LightBulb
Advanced Member
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Apr 23, 2003 8:38 pm   
 
quote:

I have already used a alias to create a long strings variable, just like this:
#al mkhm {hm=;hm=[@hm]#ts 300';';#if (@jin>26) {temp=[@jin-27];hm=[@hm]#27 hit jin %i';'}

and now I want to change this vraiable to a alias named 'hm'.
I tried like this:
#al hm [@hm]
but it doesn't work.

How can I do?



You can't make a variable into an alias. Aliases can execute #commands, while functions (what you want @hm to be) can only execute %functions() and @functions().


li'l shmoe of Dragon's Gate MUD
Reply with quote
cuff
Newbie


Joined: 24 Jan 2003
Posts: 6

PostPosted: Thu Apr 24, 2003 9:38 am   
 
Well,the mud allows palyer to collect 80 npcs to hit,and there's 3 types of npc which named 'jin','fo','mu'.
When I finished the work of collecting, I used alias 'hm' to hit all npcs. Eachtime, the number and the type of npc I collected is different, so I want to create the alias 'hm' automaticly by enter the command 'look'.

Now,I have got the exact number of each type of npc through a serial of system commands to the screen infomation after 'look'.
'mkhm' is the just alias to parse the number of all kinds of npc to create a variable 'hm' which contains a full serial of commands to hit all npcs, and I want to convert the variable 'hm' to alias 'hm'.

I know I can use '[@hm]' to excute the contain of the variable, but I think it a bit complex.

a full set commands to hit all npc just like below:
#ts 300;#27 hit jin %{i};#wa 15000;#loop {28,54} hit jin %{i};#wa 10000;#loop {55,57} hit jin %{i};#23 hit fo %{i};#0 hit mu %{i};#wa 1000;#ts 129;hp

Above is just what I think, could it do?
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