Gammon Forum
Entire forum
MUSHclient
VBscript
Using Scripting in a timer
Using Scripting in a timer
|
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| Madrox
(40 posts) bio
|
Date
| Sat 09 Sep 2006 05:04 AM (UTC) |
Message
| Okay, so i plan on using a timer that shoots off every 1 second that sends to a script to check if i have certain afflictions. If I do it will heal them in order of priorities. But, I don't see a Expand Variables thing on the timers page. Is that going to matter if i use world.getvariable or setvariable and what not? | top |
|
Posted by
| Ked
Russia (524 posts) bio
|
Date
| Reply #1 on Sat 09 Sep 2006 05:29 AM (UTC) |
Message
| The "expand variables" option doesn't have anything to do with scripting, as far as I know, so its absence doesn't prevent you from using GetVariable in any way. | top |
|
Posted by
| Madrox
(40 posts) bio
|
Date
| Reply #2 on Sat 09 Sep 2006 05:31 AM (UTC) |
Message
| Awsome, thanks man. Didnt wanna go writing a large script (probably small to most of you) and have it end up unable to work | top |
|
Posted by
| Nick Gammon
Australia (22,973 posts) bio
Forum Administrator |
Date
| Reply #3 on Sat 09 Sep 2006 05:58 AM (UTC) |
Message
| Well, you can use expand variables in triggers and aliases in conjunction with "send to script".
However using GetVariable and SetVariable is probably the best way to go when writing scripts, rather than relying on inline substitution of variables.
As someone else noted before in a query, the substitution of things like @level is done in advance of the script starting, so if you change the level variable in the middle the new value is not incorporated in subsequent script lines. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
Posted by
| Madrox
(40 posts) bio
|
Date
| Reply #4 on Sat 09 Sep 2006 04:28 PM (UTC) |
Message
| I see, I see. All my vars are going to be changed by trigs, So, I'd have to use get/set var if I want it to work right. hehe. Thanks for all your help. I'm sure I'll be posting again when I get stuck :P | 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.
16,047 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.