link between actions and triggers
Posted: Sun Oct 04, 2020 2:49 am
Hello,
I am new to Mudlet and have been unsuccessful trying to solve a task I'd like to perform.
What I would like to have is an action that moves me around a fixed path one time - when I type search for example. However, if, while moving from location to location in that path, a specific string is encountered (item, npc, whatever), I want the action to terminate the loop leaving me in the location where the item was found. It seems to me this would require communication between triggers and actions. Or, perhaps, there is another way and I just haven't found it yet. A simplified version of what I envision would be an action along the lines of:
I know a trigger can sense the text via the output but how can the action be made aware of this discovery causing it to break the loop stopping the moves.
Thanks in advance for any assistance anyone can provide.
Dano.
I am new to Mudlet and have been unsuccessful trying to solve a task I'd like to perform.
What I would like to have is an action that moves me around a fixed path one time - when I type search for example. However, if, while moving from location to location in that path, a specific string is encountered (item, npc, whatever), I want the action to terminate the loop leaving me in the location where the item was found. It seems to me this would require communication between triggers and actions. Or, perhaps, there is another way and I just haven't found it yet. A simplified version of what I envision would be an action along the lines of:
Code: Select all
path = { "n","n","n","e","e","e", "s","s","s","w","w","w" }
for step = 1, #path do
if ThingFound == true then
break
else
send( path[step] )
end
end
Thanks in advance for any assistance anyone can provide.
Dano.