problem: is this possible?

Posted by Dabura on Thu 17 Feb 2005 11:57 PM — 3 posts, 13,463 views.

#0
In Achaea, my packs, potions, and pipes have specific numbers, so I can "get pack" or "get 12321" or whatever the number happens to be. I'd like to make it so I can make an alias so I can type "get health1 from pack" and it would "get (number) from pack". I've tried a few things in order to make that work but none have been successful.

Edit: I reread my post and it might not be obvious to some people, so I decided I should clarify. I have about 20 potions, a pack, and 3 pipes, and I'd like to be able to interact with them in more ways than simply "get" or "put". I'd like to use a variable with their number stored in them but what I tried didn't work.
Amended on Thu 17 Feb 2005 11:59 PM by Dabura
USA #1
Use an array. Not a VBScript Array, but a MC array (its basically a Hash, if youre familiar with other script languages).

Each unit in the array has a key, and a value. So you could lookup "pack" and it would return "12321".

The functions you'll use (for simple arrays) are ArrayCreate, ArraySet, and ArrayGet (check the function list for all of the array functions, and examples, etc)
#2
Thanks, I got it to work.