Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, 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.
Entire forum
➜ MUSHclient
➜ Plugins
➜ Pulling Directions from Slow Speedwalk Plugin
Pulling Directions from Slow Speedwalk Plugin
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Honestly
(2 posts) Bio
|
Date
| Fri 22 May 2020 08:03 PM (UTC) |
Message
| Hi,
So I'm trying to pull the queued direction in the slow_speedwalk.xml plugin, (walk_line). Basically the purpose of this is that my speedwalk will occasionally get interrupted by an aggressive mob, so the direction that was intended to be input is lost in combat, and then the rest of my speedwalk is one room behind.
The solution I thought of for this was to save (walk_line) to a variable, and then make a trigger to input that variable and resume my speedwalk when I'm out of combat again, so I went into the plugin itself and set a secondary variable for the value of walk_line, like this:
SetVariable("direction", (walk_line))
Ok, so then to test it I went into the world itself and make a trigger to pull the variable and check it in the say channel:
<triggers>
<trigger
enabled="y"
expand_variables="y"
group="test"
match="Kudo tests something"
regexp="y"
send_to="12"
sequence="100"
>
<send>SetVariable ("aggrod", (GetPluginVariable ("56c9c5763d0c9c6ccf1e5b60", "direction")))
Send 'say @aggrod'
</send>
</trigger>
</triggers>
Cool, now this ALMOST works, but I get this compile error:
Compile error
World: DBE
Immediate execution
[string "Trigger: "]:2: unfinished string near ''say west'
Apparently the value of walk_line always formats with a ' in front of the string, and this is where I get stuck. Can I format this out or is there a better method to accomplish what I'm trying to do? Any help would be much appreciated!
Thank you | Top |
|
Posted by
| Fiendish
USA (2,533 posts) Bio
Global Moderator |
Date
| Reply #1 on Fri 22 May 2020 08:25 PM (UTC) |
Message
| I don't understand why you're using SetVariable and then @variable expansion on the next line.
I would do
aggrod = GetPluginVariable("56c9c5763d0c9c6ccf1e5b60", "direction")
Send("say "..aggrod)
|
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Honestly
(2 posts) Bio
|
Date
| Reply #2 on Fri 22 May 2020 09:39 PM (UTC) |
Message
| The worked perfect, Fiendish, thank you. To answer your question of why I was doing it that way; it was the only way I could think of doing it, appreciate the insight! | Top |
|
Posted by
| Nick Gammon
Australia (23,070 posts) Bio
Forum Administrator |
Date
| Reply #3 on Sat 23 May 2020 05:33 AM (UTC) |
Message
|
Fiendish said:
I don't understand why you're using SetVariable and then @variable expansion on the next line.
Which wouldn't work anyway. The variable expansion is done before the script is executed.
So, if foo currently contains "bar" and you execute this:
SetVariable ("foo", "abcd")
print ("@foo")
It will print "bar" and not "abcd". |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
11,316 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top