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
quirk
Novice


Joined: 16 Aug 2003
Posts: 31
Location: USA

PostPosted: Fri Aug 22, 2003 4:00 am   

Help: Send the description to nother window
 
First of all you have all been of great help... expecially you lightbulb.

Anyways on to the question here is a sample of a stat room i am triggering off of.


Room name: Cilissa's Loveshack, Of zone : 2. V-Number : 300, R-number : 300
Sector type : Inside Special procedure : No
Room flags: NO_MOB NO_TRAVEL_OUT NO_TRAVEL_IN
Description:
This inviting room exudes a feeling of friendship, and warmth. A low,
glowing fire flickers in the hearth, casting dancing shadows over the dark
blue walls with their many murals of mythical creatures in fantasy realms.
Throw pillows cover the floor, inviting you to sit awhile and relax;
exchange ideas, or just talk quietly with friends. There appear to be no
exits here...but then, why would you want to leave?

Extra description keywords(s):
_room_damage_type

Room extra action data: None

------- Chars present -------
Strath(PC)

--------- Contents ---------
board bulletin imp

------- Exits defined -------
Direction down . Keyword : (null)
Description:
UNDEFINED
Exit flag: NONE
Key no: -1
To room (R-Number): 3005


I need a trigger to capture the room description in blue there.

Thanks again for all the help people.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Aug 22, 2003 7:49 am   
 
Kind of like the inventory example from the zMud library article on advanced triggers. Added #CO to it so you can visually check for matches.

#TRIGGER "StatRoomDescCapture" {^Description:$} {#VAR StatRoomDesc "";#CO 30;#TEMP StatRoomDescCaptureEnd {Extra description keywords~(s~)~:} {#STATE StatRoomDescCapture 0}}
#COND {^&%*{StatRoomDescLine}$} {#CO 31;#IF (!%begins(%expand(@StatRoomDescLine,1),"Extra description keywords")) {#VAR StatRoomDesc %concat(@StatRoomDesc," ",%expand(@StatRoomDescLine,1))}} {looppat|param=99}
Reply with quote
quirk
Novice


Joined: 16 Aug 2003
Posts: 31
Location: USA

PostPosted: Fri Aug 22, 2003 9:42 am   
 
Its highlighting the door desction also then it makes everything after that highlighted in blue also. Is there a way for it to cut out door descriptions? Ignore everything under --------Exits defined--------- until my next stat room?
Reply with quote
quirk
Novice


Joined: 16 Aug 2003
Posts: 31
Location: USA

PostPosted: Fri Aug 22, 2003 11:09 am   
 
I was just thinking.... I could have my alias that i use turn on the trigger correct? and then after Room extra action data: None or something down there a trigger that shuts #TRIGGER "StatRoomDescCapture" {^Description:$}
off
so i guess my question is that the best way to go about it and how to do it.... if not then what would you suggest.

Anyone who can help
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Aug 22, 2003 1:06 pm   
 
Didn't see the matching pattern there, sorry. The idea would be to grab the line before the pattern Description: marking the true start of the text. In this case the Room flags line. Could add another condition within 1 line or multiline it.

#TRIGGER "StatRoomDescCapture" {^Room flags*$Description:$} {#VAR StatRoomDesc "";#CO 30;#TEMP StatRoomDescCaptureEnd {Extra description keywords~(s~)~:} {#STATE StatRoomDescCapture 0}}
#COND {^&%*{StatRoomDescLine}$} {#CO 31;#IF (!%begins(%expand(@StatRoomDescLine,1),"Extra description keywords")) {#VAR StatRoomDesc %concat(@StatRoomDesc," ",%expand(@StatRoomDescLine,1))}} {looppat|param=99}

Untested and before coffee but something like
#TRIGGER "StatRoomDescCapture" {^Room flags} {}
#COND {^Description:$} {#VAR StatRoomDesc "";#CO 30;#TEMP StatRoomDescCaptureEnd {Extra description keywords~(s~)~:} {#STATE StatRoomDescCapture 0}} {within|param=1}
#COND {^&%*{StatRoomDescLine}$} {#CO 31;#IF (!%begins(%expand(@StatRoomDescLine,1),"Extra description keywords")) {#VAR StatRoomDesc %concat(@StatRoomDesc," ",%expand(@StatRoomDescLine,1))}} {looppat|param=99}
Reply with quote
quirk
Novice


Joined: 16 Aug 2003
Posts: 31
Location: USA

PostPosted: Fri Aug 22, 2003 7:15 pm   
 
Ok thanks I got it to work....
Now I tried dinking around with it but i cannot get whats in the @StatRoomDesc to output to my other mud screens command.
I want it to send what info it got to
:quirk:
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Aug 23, 2003 12:46 am   
 
As long as it is in a single variable you might just want to use a single alias and the @WindowName.Variable syntax. For example windows quirk and thaysome could use @quirk.StatRoomDesc from a script running in the thaysome window to access the variable in the quirk window. Just remember to use %expand around it, as it was captured with the %* pattern wildcard.
Reply with quote
quirk
Novice


Joined: 16 Aug 2003
Posts: 31
Location: USA

PostPosted: Sat Aug 23, 2003 2:40 am   
 
OK Now its doing wierd stuff... It will somtimes output the descript to my character twice. Another problem is the olc can't take so much room descript sometimes is there a way to enter the expanded variable StatRoomDesc line by line? It doesn't matter about spacing and whatnot the /fi will format the text the way we want it. Just as long as all the descript gets there.

anyways
here is sample room output of the mud

Room name: Hidden Wonders of Atlantis, Of zone : 115. V-Number : 32488, R-number : 32488
Sector type : Underwater Special procedure : No
Room flags: DARK INDOORS SILENCE
Description:
Located deep beneath the ocean floor, this dark dungeon like room is
well hidden from prying eyes and treasure seekers. Eight alcoves lead off
of each of the walls of the room, the complete darkness hiding their
contents or occupants in shadow. Bare granite with no art or design forms
the floors, walls, and ceiling of the area.
Extra description keywords(s): None
Room extra action data: None

------- Chars present -------
Strath(PC)

--------- Contents ---------

------- Exits defined -------
Direction north . Keyword : (null)
Description:
UNDEFINED
Exit flag: NONE
Key no: -1
To room (R-Number): 32492
Direction east . Keyword : (null)
Description:
UNDEFINED
Exit flag: NONE
Key no: -1
To room (R-Number): 32490
Direction south . Keyword : (null)
Description:
UNDEFINED
Exit flag: NONE
Key no: -1
To room (R-Number): 32489
Direction west . Keyword : (null)
Description:
UNDEFINED
Exit flag: NONE
Key no: -1
To room (R-Number): 32487


Here is a script of my class of triggers and alias

#CLASS {bulding} {disable}
#ALIAS rflag {:quirk:3;#LOOP %numparam( ) {#IF (%param( %i) = "DARK") {:quirk:1};#IF (%param( %i) = "DEATH") {:quirk:2};#IF (%param( %i) = "NO_MOB") {:quirk:3};#IF (%param( %i) = "INDOOR") {:quirk:4};#IF (%param( %i) = "PEACEFUL") {:quirk:5};#IF (%param( %i) = "SOUNDPROOF") {:quirk:6};#IF (%param( %i) = "NO_TRACK") {:quirk:7};#IF (%param( %i) = "NO_MAGIC") {:quirk:8};#IF (%param( %i) = "TUNNEL") {:quirk:9};#IF (%param( %i) = "PRIVATE") {:quirk:10};#IF (%param( %i) = "GODROOM") {:quirk:11};#IF (%param( %i) = "HOUSE") {:quirk:12};#IF (%param( %i) = "HCRSH") {:quirk:13};#IF (%param( %i) = "ATRIUM") {:quirk:14};#IF (%param( %i) = "OLC") {:quirk:15};#IF (%param( %i) = "*") {:quirk:16};#IF (%param( %i) = "NO_STEAL") {:quirk:17};#IF (%param( %i) = "NO_TRAVEL_OUT") {:quirk:18};#IF (%param( %i) = "NO_TRAVEL_IN") {:quirk:19};#IF (%param( %i) = "nopush") {:quirk:20};#IF (%param( %i) = "IMMORTAL") {:quirk:21};#IF (%param( %i) = "NO_RECALL") {:quirk:22};#IF (%param( %i) = "ARENA") {:quirk:23};#IF (%param( %i) = "DAM_ROOM") {:quirk:24}};#NOOP;:quirk:0}
#ALIAS check {go %1;:quirk:go 1210;:quirk:redit;stat room;#WAIT 3000;:quirk:q;:quirk:y}
#TRIGGER {Sector type : §ortype Special} {:quirk:4;#LOOP %numparam( ) {#IF (%param( %i) = "Inside") {:quirk:0};#IF (%param( %i) = "City") {:quirk:1};#IF (%param( %i) = "Field") {:quirk:2};#IF (%param( %i) = "Forest") {:quirk:3};#IF (%param( %i) = "Hills") {:quirk:4};#IF (%param( %i) = "Mountains") {:quirk:5};#IF (%param( %i) = "Water Swim") {:quirk:6};#IF (%param( %i) = "Water NoSwim") {:quirk:7};#IF (%param( %i) = "Air") {:quirk:8};#IF (%param( %i) = "Underwater") {:quirk:9}};#NOOP}
#TRIGGER {Room name: %1, Of zone} {:quirk:1;:quirk:%1}
#TRIGGER {Room flags: (*)} {rflag %1}
#TRIGGER "StatRoomDescCapture" {^Room flags} {:WAIT:100;:quirk:2;:quirk:/c;:quirk:<@strath.StatRoomDesc>;:quirk:/s}
#COND {^Description:$} {#VAR StatRoomDesc "";#CO 30;#TEMP StatRoomDescCaptureEnd {Extra description keywords~(s~)~:} {#STATE StatRoomDescCapture 0}} {within|param=1}
#COND {^&%*{StatRoomDescLine}$} {#CO 31;#IF (!%begins( %expand( @StatRoomDescLine, 1), "Extra description keywords")) {#VAR StatRoomDesc %concat( @StatRoomDesc, " ", %expand( @StatRoomDescLine, 1))}} {looppat|param=99}
#CLASS 0

Its probably really messy. Help clean and get working right if you can.
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