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
JSteensen
Newbie


Joined: 12 Apr 2003
Posts: 9
Location: USA

PostPosted: Sun Feb 29, 2004 11:09 pm   

Need Help Mapping Accursed Lands
 
Hey all. I needed a hand figuring out how to map the MUD Accursed Lands. Basically a room is fairly normal, but the outdoors are ANSI mapped, by symbol and color coded. I saw there was another thread on this, but I can't access it for some reason.

Thanks,

John
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Mar 03, 2004 4:19 am   
 
Something I spit out long time ago.
#CLASS {AccursedLandsMappingProofOfConcept}
#ALIAS st {#ST Star:@SurveyCountStarX,@SurveyCountStarY Travel:@Map_Desired_X,@Map_Desired_Y Old: @Map_Absolute_Xold,@Map_Absolute_Yold New: @Map_Absolute_X,@Map_Absolute_Y Partial: @MapPartial_X,@MapPartial_Y SC: @SurveyCount 1}
#ALIAS logread {#CLR;#CAP Map;:MAP:#CLR;#CAP Check;:Check:#CLR;#VAR MapPartial_Y 200;#VAR MapPartial_X 200;#VAR Map_Desired_X 0;#VAR Map_Desired_Y 0;#VAR Map_Absolute_Y 200;#VAR Map_Absolute_X 200;#VAR Map_Absolute_Xold 200;#VAR Map_Absolute_Yold 200;#VAR Map_Lower_X 2500;#VAR Map_Lower_Y 2500;#VAR Map_Higher_X 0;#VAR Map_Higher_Y 0;#VAR MapPartialCurrent @MapPartial400x400;#T- TriggerMapCapture;#T- TriggerWatchForSurveyBlank2;#T- TriggerWatchForSurveyBlank;#noop FILE 1 C:crapzmud661pubalmaplog.txt;#noop FILE 1 c:crapzmud662defmap.txt;#noop FILE 1 c:crapzmud662AL1107032202.txt;#noop FILE 1 c:crapzmud662AL1207030243p.txt done;#noop FILE 1 c:crapzmud662AL1207031014p.txt;#noop FILE 1 c:crapzmud662AL1207031553.txt;#noop FILE 1 1 c:crapzmud662AL1207032045.txt;#VAR File1Pos 1;#NOOP doread}
#ALIAS Process_Map {#ST PROCESS MAP;#IF ((@MapPartial_Y-@SurveyCountStarY) < @Map_Lower_Y) {#MATH Map_Lower_Y @MapPartial_Y-@SurveyCountStarY};#IF ((@MapPartial_Y-@SurveyCountStarY+@SurveyCount) > @Map_Higher_Y) {#MATH Map_Higher_Y @MapPartial_Y-@SurveyCountStarY+@SurveyCount};#T- doreadtrig;#LOOP %eval( @SurveyCount-1) {#VAR LineOfInterest %item( @MapPartialCurrent, %eval( @MapPartial_Y-@SurveyCountStarY+%i));#VAR SurveyLineOfInterest %trimright( @{MapSurvey_Line%i});#IF (@SurveyLineOfInterest != %null) {#noop ST Process Map @surveylineofinterest;#IF ((@MapPartial_X-@SurveyCountStarX-1) < @Map_Lower_X) {#MATH Map_Lower_X @MapPartial_X-@SurveyCountStarX-1};#IF ((@MapPartial_X-@SurveyCountStarX-1+%len( @SurveyLineOfInterest)) > @Map_Higher_X) {#MATH Map_Higher_X @MapPartial_X-@SurveyCountStarX-1+%len( @SurveyLineOfInterest)};#LOOP %len( @SurveyLineOfInterest) {#IF (%copy( %expand( @SurveyLineOfInterest, 1), %j, 1)!=" ") {#VAR LineOfInterest %concat( %copy( %expand( @LineOfInterest, 1), 1, %eval( @MapPartial_X-@SurveyCountStarX+%j-1)), %copy( %expand( @SurveyLineOfInterest, 1), %j, 1), %copy( %expand( @LineOfInterest, 1), %eval( @MapPartial_X-@SurveyCountStarX+%j+1), %len( %expand( @LineOfInterest, 1))))}};#VAR MapPartialCurrent %replaceitem( %expand( @LineOfInterest, 1), %eval( @MapPartial_Y-@SurveyCountStarY+%i), %expand( @MapPartialCurrent, 1))}};#VAR SurveyCountStarX 0;#VAR SurveyCountStarY 0;#VAR SurveyCount 0;#NOOP show_map;st;#T+ doreadtrig}
#ALIAS Show_Map {:Map:#CLR;#noop VAR ShowMapLine1 "yyy ";#noop LOOP 1,250 {~#VAR ShowMapLine1 %concat( @ShowMapLine1, %if( %i<100, " ", %eval( %i/100)))};#noop WIN MAP @ShowMapLine1;#noop VAR ShowMapLine2 "yyy ";#noop LOOP 1,250 {~#VAR ShowMapLine2 %concat( @ShowMapLine2, %copy( %format( "&3.0n", %i), 2, 1))};#noop WIN MAP @ShowMapLine2;#noop VAR ShowMapLine3 "yyy ";#noop LOOP 1,250 {~#VAR ShowMapLine3 %concat( @ShowMapLine3, %eval( %i10))};#noop WIN MAP @ShowMapLine3;#LOOP @Map_Lower_Y,@Map_Higher_Y {#IF %trimright( %item( %expand( @MapPartialCurrent, 1), %i)) {#WIN Map %format( "&3.0n", %i) %copy( %trimright( %item( %expand( @MapPartialCurrent, 1), %i)), @Map_Lower_X, %len( %trimright( %item( %expand( @MapPartialCurrent, 1), %i))))}}}
#ALIAS doread {#noop if;#if (@File1Pos <= %filesize( 1)) {#SH %read( 1, @File1Pos);#ADD File1Pos 1;#T+ doreadtrig};#IF (@File1Pos > %filesize( 1)) {#T- doreadtrig;#CLOSE 1}}
#TRIGGER "TriggerMapCapture" {^&%*{surveyline}$} {#IF (((@SurveyCount == 1) AND (%copy( %expand( @surveyline, 1), 1, 1) == " ")) OR (@SurveyCount > 1)) {#noop SUB {%format( "&2.0n", @SurveyCount): %expand( @SurveyLine, 1)};#NOOP VAR MapSurvey_Line@SurveyCount %expand( @surveyline, 1);#VAR MapSurvey_Line@SurveyCount %replace( %replace( %replace( %replace( %expand( @SurveyLine, 1), %char( 42), " "), %char( 61), "R"), %char( 35), "X"), ~~, "W");#IF ((@SurveyCount > 1) AND (%len( @{MapSurvey_Line%eval( @SurveyCount-1)}) = %len( @{MapSurvey_Line@SurveyCount}))) {#IF (%pos( "*", %expand( @SurveyLine, 1))>0) {#VAR SurveyCountStarX %pos( "*", %expand( @SurveyLine, 1));#VAR SurveyCountStarY @SurveyCount;#VAR Map_Absolute_Xold @Map_Absolute_X;#VAR Map_Absolute_Yold @Map_Absolute_Y;#ADD Map_Absolute_X @Map_Desired_X;#ADD Map_Absolute_Y @Map_Desired_Y;#ADD MapPartial_X @Map_Desired_X;#ADD MapPartial_Y @Map_Desired_Y;#CO 110} {#CO 110};#add SurveyCount 1} { #IF ((@SurveyCountStarX > 0)) {#CO 78;:check:From @Map_Absolute_Xold,@Map_Absolute_Yold Heading:@Map_Desired_X,@Map_Desired_Y To @Map_Absolute_X,@Map_Absolute_Y;#NOOP Need sometimes another to catch;#T- TriggerMapCapture;Process_Map} { #IF (@SurveyCount == 1) {#CO 46;#add SurveyCount 1} {#VAR SurveyCount 1;#ECHO False positive}}}}} "" {disable}
#TRIGGER "TriggerWatchForSurveyBlank" {^$} {#IF (!@Map_BlankSpace_False) {#T+ TriggerMapCapture;#T- TriggerWatchForSurveyBlank;#T- TriggerWatchForSurveyBlank2;#VAR SurveyCount 1}} "" {disable}
#TRIGGER {You glance (%w).} {#VAR Map_BlankSpace_False 1}
#COND {^$} {#VAR Map_BlankSpace_False 1}
#COND {^$} {#VAR Map_BlankSpace_False 1}
#COND {^*$} {#VAR Map_BlankSpace_False 0}
#TRIGGER {You {begin to swim off|begin to jog off|begin to walk off|jog|walk|swim} to the (%w)} {#CO 31;#VAR Map_Desired_X @Map_Convert_X(%1);#VAR Map_Desired_Y @Map_Convert_Y(%1);st;#NOOP There seem to be cases where the prompt forwarns of the survey.;#T+ TriggerWatchForSurveyBlank;#T+ TriggerWatchForSurveyBlank2;#T- TriggerMapCapture;#VAR Map_BlankSpace_False 0;:check:@Map_Desired_X,@Map_Desired_Y} "" {prompt}
#TRIGGER "TriggerWatchForSurveyBlank2" { > $} {#IF (!@Map_BlankSpace_False) {#T+ TriggerMapCapture;#T- TriggerWatchForSurveyBlank2;#T- TriggerWatchForSurveyBlank;#VAR SurveyCount 1}} "" {disable}
#ALARM "doreadtrig" {*1} {doread} "" {disable}
#ALARM {*10:00} {#SAVE}
#BUTTON 1 {show_map} {show_map} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} "" {} {} {}
#BUTTON 2 {FRAG} {#VAR Map_Desired_X 0;#VAR Map_Desired_Y 0;:check:FRAG 0 0} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} "" {} {} {} {2}
#BUTTON 3 {Map_Desired_Y} {} {} {} {} {} {} {Size} {100} {23} {} {} {} {} {} {} {} "" {} {} {} {2}
#BUTTON 4 {Map_Desired_X} {} {} {} {} {} {} {Size} {100} {23} {} {} {} {} {} {} {} "" {} {} {} {2}
#STAT {Star:@SurveyCountStarX,@SurveyCountStarY Travel:@Map_Desired_X,@Map_Desired_Y Old: @Map_Absolute_Xold,@Map_Absolute_Yold New: @Map_Absolute_X,@Map_Absolute_Y Partial: @MapPartial_X,@MapPartial_Y SC: @SurveyCount 1}
#CLASS 0

#CLASS {AccursedLandsMappingProofOfConcept|MapVariables}
#ALIAS SetPopulateMapPartial {#VAR MapPartial400x400 "";#LOOP 400 {#VAR MapPartial400x400 %additem( %format( "&400s", " ") , @MapPartial400x400)};#VAR MapPartialCurrent @MapPartial400x400}
#VAR Map_Desired_X {2}
#VAR Map_Desired_Y {-1}
#VAR Map_Convert_Y {%if( %pos( north, %1), -1, %if( %pos( south, %1), 1, 0))}
#VAR Map_Size {250}
#VAR Map_Convert_X {%if( %pos( east, %1), 2, %if( %pos( west, %1), -2, 0))}
#VAR Map_BlankSpace_False {0}
#VAR File1Pos {1}
#VAR SurveyCount {0}
#VAR SURVEYLINE {| > sit}
#VAR MapSurvey_Line1 { :: }
#VAR MapSurvey_Line2 { :::::: }
#VAR SurveyCountStarY {0} {0}
#VAR MapSurvey_Line3 {::::: ::++}
#VAR MapSurvey_Line4 { ::::++ }
#VAR MapSurvey_Line5 { ++ }
#VAR MapSurvey_Line6 {| > sit}
#VAR MapSurvey_Line7 { ::::::::::::++++ }
#VAR MapSurvey_Line8 { ::::::::::::::++++ }
#VAR MapSurvey_Line9 { //::::::::::++++ }
#VAR MapSurvey_Line10 { ::::::::::::++ }
#VAR MapSurvey_Line11 { :: }
#VAR MapSurvey_Line12 {------------------------------------------------------------------}
#VAR MapSurvey_Line13 { ::::::::::::::::::::::::::::::::::WW:: }
#VAR MapSurvey_Line14 { ::::::::::::::::::::::::::::::::::WW:: }
#VAR MapSurvey_Line15 { ::::::::::::::::::::::::::::::WW::WW:: }
#VAR MapSurvey_Line16 { ::::::::::::::::::::::::::::WWWW:: }
#VAR MapSurvey_Line17 { ::::::::::::::::::::::::::::WWWW:: }
#VAR MapSurvey_Line18 { ::::::::::::::::::::::::::WWWW }
#VAR MapSurvey_Line19 { :::::::::::::::::::::::::: }
#VAR MapSurvey_Line20 { :::::::::::::::::: }
#VAR MapSurvey_Line21 { :: }
#VAR MapSurvey_Line22 {| > You begin to jog off to the northeast.}
#VAR MapPartial400x400 {}
#VAR Map_Absolute_X {150}
#VAR Map_Absolute_Y {157}
#VAR MapAbsoluteXYtoMapRecord {%eval(%2*2500+%1)}
#VAR MapPartial_X {150}
#VAR MapPartial_Y {157}
#VAR MapPartialCurrent {}
#VAR Map_Absolute_Xold {148}
#VAR Map_Absolute_Yold {158}
#VAR SurveyCountStarX {0} {0}
#VAR LineOfInterest { /::::::::::::++++ }
#VAR SurveyLineOfInterest { ++}
#VAR Map_Higher_Y {208}
#VAR Map_lower_Y {154}
#VAR Map_lower_x {123}
#VAR Map_higher_x {209}
#VAR ShowMapLine1 {yyy 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222}
#VAR ShowMapLine2 {yyy 1111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000111111111122222222223333333333444444444455555555556666666666777777777788888888889999999999000000000011111111112222222222333333333344444444445}
#VAR ShowMapLine3 {yyy 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890}
#CLASS 0
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Mar 03, 2004 4:21 am   
 
Use at own risk.
Reply with quote
saplingg
Novice


Joined: 06 Oct 2005
Posts: 31

PostPosted: Mon Oct 10, 2005 3:58 am   
 
I could not get some of the triggers to work, and some of the files weren't created like "c:crapzmud662AL1207030243p.txt"..

Tom if you see this, perhaps you could kindly debug it for us?

Thank you
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Dec 14, 2005 6:12 pm   
 
I wonder if I still have my scripts that converted the c:crapzmud662AL1207030243p.txt into .gif files so you could use a paint program to put them together.

I'll add it my list of things to do, Saplingg.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Mon Dec 19, 2005 4:34 am   
 
Its functional but brutal, bad code as it is above.

~30seconds each survey to splice it into the map
~3min 30seconds to show the map below:

An example of moving north 1 tile and merging the two surveys.
Code:

yyy 111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222
yyy 555555555666666666677777777778888888888999999999900000000001111111111222222222233333333334444444444555555555566666666667777777777888888
yyy 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345
185                                               :: 185
186                                         ::::::::::WWWW 186
187                                       ::::::::::::WWWWWW 187
188                                     ::::::::::::::WWWWWWWW 188
189                                     ::::::::::::WWWWWWWWWW 189
190                                     ::::::::::::WWWWWWWW:: 190
191                                   ::::::::::::::WWWWWWWW:::: 191
192                                   ::++++++::::::WWWWWWWW:::: 192
193                                   WW++WW++::::::WWWWWWWW:::: 193
194                                   ++++WW++::::::WWWWWWWWWW:: 194
195                                   ++WW++++::WW::WWWWWWWWWWWW 195
196                                     WW++++::WW::WWWWWWWWWW 196
197                                     ++++WWWWWWWWWWWWWWWWWW 197
198                                     WWWWWWWWWWWWWWWW++++WW 198
199                                       ::WWWWWWWWWWWW++:: 199
200                                         WWWWWWWWWWWWWW 200
201                                               WW 201

This probably would better serve as a log reader and log processor during off cycle times.
Not sure if its worth putting time into it.
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