Pulling Directions from Slow Speedwalk Plugin

Posted by Honestly on Fri 22 May 2020 08:03 PM — 4 posts, 16,823 views.

#0
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
USA Global Moderator #1
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)
#2
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!
Australia Forum Administrator #3
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".