Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4715
Location: Pensacola, FL, USA

PostPosted: 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
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: 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.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4715
Location: Pensacola, FL, USA

PostPosted: 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
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: 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).
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4715
Location: Pensacola, FL, USA

PostPosted: Thu Jan 18, 2007 11:31 pm   
 
alright ill just have it populate an array and work off that then
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net