|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Thu Jan 04, 2007 10:02 am
[1.24] GSL |
I was messing around with GSL triggers tonight, trying to find some may to make an inline menu creator.
The code for the menu i have, but for some reason, when i try to use #SUB in a GSL trigger, it does not change the output on the screen, at all.
#TR {M} {#SUB {<send 'ask %word(%2, %numwords(%2)) for bounty'>%2</send>}} "" {gsl}
I can get the trigger to work in an array, but compiling the array would be timely.
#TR {({@monster})} {#SUB {<send 'ask %word(%1, %numwords(%1)) for bounty'>%1</send>}}
I tried indirectly accessing the the %gsl.M variable, which holds the current value of the creatures they want to stand out at any given moment via:
#FUNC monster {%gsl.M}
And that seemed to work for a moment. The current value of it at least showed up in the sent link i wanted. But when I moved to another room and the value of %gsl.M got updated, it stopped working. Even if i looked at the room a few times to give it another chance to catch. This seems rather odd to me.
Anyone able to shed some light? |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Jan 17, 2007 8:50 pm |
Unfortunately, some commands, like #SUB (#CW, #PSUB, #PCOL), do not work within GSL triggers. This was true in zMUD too.
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Wed Jan 17, 2007 11:48 pm |
Is there a way to make them work, or another way to accomplish the same goal.
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Jan 18, 2007 8:46 pm |
No, not really. The problem is that #SUB and #CW require a matched pattern string in order to determine what text to substitute or color. With a GSL trigger, you are not triggering on displayed text from the MUD...you are triggering on invisible control codes (GSL codes). The same problem exists with using #SUB and #CW within an MXP trigger (which triggers on invisible MXP codes).
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Thu Jan 18, 2007 11:31 pm |
alright ill just have it populate an array and work off that then
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|