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
hierba
Beginner


Joined: 07 Jan 2001
Posts: 12
Location: USA

PostPosted: Mon Sep 09, 2002 6:29 pm   

Problem with Alias
 
I have 3 aliases I need to put together
But ill take 2 if thats all I can get.
#ALIAS randCount %rand(10, 25)
#ALIAS npcCount (This one is based on a trigger that sees how many npcs are in a room) that part works.
#ALIAS timeCount -----OK HERE IS WHERE PROBLEM IS--------

I have tried several things:
[@npcCount * 40]
#math timeCount [@npcCount * 40]
#math [@npcCount * 40]

and the one I realy want
#math [@npcCount * 40 + @randCount]

Now I created an alias like the "help" for aliases and triggers said. and the alias does a "say @timeCount" and if there are 2 npcs I get 80, if there are 3 it says 120. etc. WHEN I use "[@npcCount * 40].

But, when I try to use the value for a script I had previously got working, it does not take it.

Any ideas ;) ?
thanx

Dan
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Sep 09, 2002 7:26 pm   
 
#MATH timeCount {(@npcCount * 40) + @randCount}
#AL timeCount {#MATH timeCount {(@npcCount * 40) + @randCount}}

LightBulb
Senior Member
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Sep 10, 2002 1:48 pm   
 
I just took another look at this and realized you aren't creating the variable @randCount. Either change the randCount alias to
#AL randCount {#VAR randCount {%rand(10, 25)}}
or get the random number in the timeCount alias
#AL timeCount {#MATH timeCount {(@npcCount * 40) + %rand(10,25)}}

Similarly, this isn't going to work unless your npcCount alias is creating an npcCount variable.

LightBulb
Senior Member
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