|
milty111 Beginner
Joined: 16 Jan 2017 Posts: 19 Location: Oregon
|
Posted: Mon Feb 13, 2017 4:00 pm
variables question |
Greetings!
I do foraging and depending on what I find, I'd like to enter that in a variable to be used for other commands.
Triggered on "You have found some" next word would be entered into a variable named foraged
Any help is greatly appreciated.
Thanks,
Mike |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Tue Feb 14, 2017 2:03 pm |
#TR {You have found some (%w)} {foraged=%1}
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
milty111 Beginner
Joined: 16 Jan 2017 Posts: 19 Location: Oregon
|
Posted: Tue Feb 14, 2017 2:54 pm |
Thank you much! You guys are awesome!
|
|
|
|
milty111 Beginner
Joined: 16 Jan 2017 Posts: 19 Location: Oregon
|
Posted: Tue Feb 14, 2017 3:06 pm |
shalimar wrote: |
#TR {You have found some (%w)} {foraged=%1} |
You guys are still awesome, but I'm having a problem.
Instead of using the #TR, I manually created the trigger in a particular CLASS
{You have found some (%w)} {foraged=%1}
Then I have a trigger on "You are done foraging" with the following commands
get all @foraged
put all @foraged in back
This results in trying to get %w which for some reason seems nil and the mud doesn't try to "get" anything.
If I replace @foraged with %1 it works but in the sense that %1 is just ignored and my trigger is attempting to get all that's in the room.
So I am kind of confused and wondering what I did wrong. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Tue Feb 14, 2017 3:53 pm |
in the second trigger, unless you have something in the pattern surrounded bu parenthesis %1 will have no value, so that looks like expected behavior.
As for the first trigger... try deleting what you have and entering my #TR on the command line, instead of manually from the settings editor.
You can always drag it into a given class folder later. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
milty111 Beginner
Joined: 16 Jan 2017 Posts: 19 Location: Oregon
|
Posted: Tue Feb 14, 2017 4:09 pm |
Worked like a charm! Thanks again!
|
|
|
|
|
|