|
hierba Beginner
Joined: 07 Jan 2001 Posts: 12 Location: USA
|
Posted: 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 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Sep 09, 2002 7:26 pm |
#MATH timeCount {(@npcCount * 40) + @randCount}
#AL timeCount {#MATH timeCount {(@npcCount * 40) + @randCount}}
LightBulb
Senior Member |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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 |
|
|
|
|
|