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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Stregone
Wanderer


Joined: 07 Aug 2001
Posts: 53
Location: USA

PostPosted: Wed Feb 19, 2003 12:59 am   

speed menus
 
So far I've gotten the menu part down..i think. Now to get it to actualy do something. What I want this to do is add a trigger (in a particular class folder) to highlight a name with MXP. Heres what I have so far.



#CLASS {Highlight}
#TRIGGER {Also here: (*)} {#sub {<color #FF6600>Also here: %1</color>}}
#TRIGGER {You say,} {#sub {<color #33FF08>You say,</color>}}
#TRIGGER {You also see (*).} {#sub {<color #7B3900>You also see %1.</color>}}
#TRIGGER {(*) says,} {#sub {<color #33FF08>%1 says,</color>}}
#TRIGGER {(*) asks,} {#sub {<color #33FF08>%1 asks,</color>}}
#TRIGGER {Obvious ({exits|paths}): (*)} {#sub {<color #2108D6>Obvious %1: %2</color>}}
#TRIGGER {You ask,} {#sub {<color #33FF08>You ask,</color>}}
#TRIGGER {(*) exclaims,} {#sub {<color #33FF08>%1 exclaims,</color>}}
#TRIGGER {You exclaim,} {#sub {<color #33FF08>You exclaim,</color>}}
#MENU {Highlight} {} "" {Highlight Menu}
#CLASS 0
#CLASS {Highlight|names}
#CLASS 0
#CLASS {Highlight|names|friends}
#CLASS 0
#CLASS {Highlight|Highlight Menu} {menu}
#MENU {Names} {} "" {name Menu}
#CLASS 0
#CLASS {Highlight|Highlight Menu|Name Menu} {menu}
#MENU {Highlight %selword as a friend} {#trigger {%selword}{#sub {<color #2108E7>%selword</color>}}} ""
#CLASS 0


This keeps creating a trigger named: {%selword}{#sub {color #2108E7%selword/color}}

How can I get it to create a trigger (in a specific folder) based on what %selword is?

Thanks alot..yet again :)

-Stregone
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Feb 19, 2003 1:25 am   
 
#CLASS {Highlight|Highlight Menu|Name Menu} {menu}
#MENU {Highlight %selword as a friend} {#EXEC %concat("#trigger {",%selword,"} {#sub {<color #2108E7>",%selword,"</color>}}")} ""
#CLASS 0

Since it looks like you plan on having menu items for names as you add them I would suggest you rethink how to do it. Speed menus are highly limited on what they can display. If you only plan to have the menu item for that specific name remove itself and the trigger then you should be fine, but if you want to make it toggle highlighting of that person then you should redesign to a multistate button, and even that would be an excedingly complex script.
Reply with quote
Stregone
Wanderer


Joined: 07 Aug 2001
Posts: 53
Location: USA

PostPosted: Wed Feb 19, 2003 1:44 am   
 
Nah, nothing complex like that. I just want it to create a new trigger exactly like this:
#TRIGGER {Stregone} {#sub {<color #2108E7>Stregone</color>}}

But instead of "Stregone" put whatever %selword happens to be. Is it possible to get it to create this trigger in the highlight>names>friends folder, instead of the root folder? (to keep it organized)

I'm also going to add submenus like this(once I get this one working), each highlighting in a different color:
highlight>name>highlight %selword as a healer
highlight>name>highlight %selword as a locksmith
highlight>object>highlight %selword as a gem
highlight>object>highlight %selword as a magic item

and prolly some others I haven't thought of yet. And again, thanks. hehe :)

-Stregone
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Feb 19, 2003 2:17 am   
 
You left out a space.
#MENU {Highlight %selword as a friend} {#trigger {%selword}{#sub {<color #2108E7>%selword</color>}}} ""
#MENU {Highlight %selword as a friend} {#trigger {%selword} {#sub {<color #2108E7>%selword</color>}}} ""
This will make a trigger that works, but not the one you want.

I usually use list-variables for this sort of thing, rather than individual triggers.
#TR {{@friends}} {#CW #2108E7}
So the menu becomes
#MENU {Highlight %selword as a friend} {#ADDI friends %selword}

By the way, it's usually better NOT to use the forum's [ code ] tag. It interferes with
both word-wrap and cut-and-paste.

LightBulb
Advanced Member
Reply with quote
Stregone
Wanderer


Joined: 07 Aug 2001
Posts: 53
Location: USA

PostPosted: Wed Feb 19, 2003 2:40 am   
 
Ah, now thats a fantastic idea :) Say, does the rgb coloring work with #color and #cw? The helpfiles didn't mention it at all so I assumed not.

-Stregone
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Feb 19, 2003 3:16 am   
 
Try it and find out.
No, the helpfiles don't mention it but I saw a reference to using HTML colors in the new
command #PCOL. Since that's similar to the older #CW and #COLOR commands, I figured the
new colors might work with them also, and it turns out they do.

LightBulb
Advanced Member
Reply with quote
GuinnessDNA
Beginner


Joined: 12 Feb 2003
Posts: 23

PostPosted: Wed Feb 26, 2003 1:06 am   
 
Is this completed? or in working form? looks like a great highlighter for GS, better than just creating CW triggers for everything as I go.
Reply with quote
Stregone
Wanderer


Joined: 07 Aug 2001
Posts: 53
Location: USA

PostPosted: Wed Feb 26, 2003 1:18 am   
 
The framework is completed. But I'm having alot of trouble highlighting something inside of a string that is also highlighted (gives some rather odd results). So I'm waiting untill I figure that out to complete it. Check the thread "Highlighting with MXP" for details on what the problem is, any help would be greatly appreciated :)

-Stregone
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion 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