|
quirk Novice
Joined: 16 Aug 2003 Posts: 31 Location: USA
|
Posted: Sat Aug 23, 2003 5:54 pm
HELP: Splitting variable and also double outputs |
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 |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Aug 24, 2003 1:40 am |
Change this one so that it captures the current line break structure...
#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))}}
to
#TRIGGER "StatRoomDescCapture" {^Room flags} {:WAIT:100;:quirk:2;:quirk:/c}
#COND {^Description:$} {#VAR StatRoomDesc "";#CO 30;#TEMP StatRoomDescCaptureEnd {Extra description keywords~(s~)~:} {#STATE StatRoomDescCapture 0;:quirk:DescOut;:quirk:/s}} {within|param=1}
#COND {^&%*{StatRoomDescLine}$} {#CO 31;#IF (!%begins( %expand( @StatRoomDescLine, 1), "Extra description keywords")) {#VAR StatRoomDesc %concat( @StatRoomDesc, %cr, %expand( @StatRoomDescLine, 1))}}
and add
:quirk:#ALIAS DescOut {#SEND {%expand(@strath.StatRoomDesc,1)}} |
|
|
|
quirk Novice
Joined: 16 Aug 2003 Posts: 31 Location: USA
|
Posted: Sun Aug 24, 2003 2:18 am |
In the example room is what i am using. When it triggers now it only outputs this.
You are falling in mid air as you descend towards the water
Which is the first line and that is it. Does the /s
I looked at my Variables and here is what they are
for StatRoomDesc
There is a little quare before this one You are falling in mid air as you descend towards the water
for STATROOMDESCLINE
You are falling in mid air as you descend towards the water
I need it to pick up the whole description and then i need :quirk: to do /fi;/s after the description is in
Here is the current trigger and I added that alias also
#TRIGGER "StatRoomDescCapture" {^Room flags} {:WAIT:100;:quirk:2;:quirk:/c}
#COND {^Description:$} {#VAR StatRoomDesc "";#CO 30;#TEMP StatRoomDescCaptureEnd {Extra description keywords~(s~)~:} {#STATE StatRoomDescCapture 0;:quirk:DescOut;:quirk:/s}} {within|param=1}
#COND {^&%*{StatRoomDescLine}$} {#CO 31;#IF (!%begins( %expand( @StatRoomDescLine, 1), "Extra description keywords")) {#VAR StatRoomDesc %concat( @StatRoomDesc, %cr, %expand( @StatRoomDescLine, 1))}}
Thanks for helping. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Aug 24, 2003 6:14 am |
Oops I didn't copy the options for the second condition. Guess I will add the other %expand that really should be there and switch it so the %cr is at the end of each line instead of beginning while I am at it.
#TRIGGER "StatRoomDescCapture" {^Room flags} {:WAIT:100;:quirk:2;:quirk:/c}
#COND {^Description:$} {#VAR StatRoomDesc "";#CO 30;#TEMP StatRoomDescCaptureEnd {Extra description keywords~(s~)~:} {#STATE StatRoomDescCapture 0;:quirk:DescOut;:quirk:/s}} {within|param=1}
#COND {^&%*{StatRoomDescLine}$} {#CO 31;#IF (!%begins( %expand( @StatRoomDescLine, 1), "Extra description keywords")) {#VAR StatRoomDesc %concat( %expand(@StatRoomDesc,1), %expand( @StatRoomDescLine, 1), %cr)}} {looppat|param=99} |
|
|
|
quirk Novice
Joined: 16 Aug 2003 Posts: 31 Location: USA
|
Posted: Sun Aug 24, 2003 7:15 am |
THANK YOU VERY MUCH!! Works great
One last question.
With that current trigger running off of
^Room flags:
i have an alias rflag that i can use like rflag DARK INDOORS SILENCE
and it works fine... is there a way to incorperate that into that trigger but to happen after it finishes with the room description? I seem to be having timing problems with it. So basically I want it to pick up whats after ^Room flags: and run that through rflag. But only when it is done with the /s for saving descript. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Aug 24, 2003 3:53 pm |
Sure can, you can integrate the 2 triggers. The 0 state for you description capture starts at the same line, so combine the capturing activities there. State 1 creates a #TEMP trigger to detect completion of the description, that is where you put the execution of your rflag alias to control its timing. You will have to do the combining because I am too lazy to find the other thread and put it all together for you.
|
|
|
|
|
|
|
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
|
|