Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ VBscript
➜ problem: is this possible?
problem: is this possible?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Dabura
(11 posts) Bio
|
Date
| Thu 17 Feb 2005 11:57 PM (UTC) Amended on Thu 17 Feb 2005 11:59 PM (UTC) by Dabura
|
Message
| 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. | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #1 on Fri 18 Feb 2005 12:34 AM (UTC) |
Message
| 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) |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Dabura
(11 posts) Bio
|
Date
| Reply #2 on Fri 18 Feb 2005 03:23 AM (UTC) |
Message
| Thanks, I got it to work. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
10,332 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top