Wednesday, January 2, 2013

T2T map project


#TR {You can't go that way!} {#NODIR}
#TR {The door is closed} {#DOOR %lastdir;#NODIR}
#TR {and} {survey}
______________________________________________

survey alias:
#if (%roomcol = 536870911)
  {
  #IF (%roomname( ) =~ "Plains") {#CALL %roomcol( %roomnum( ), lightgreen)};
  #IF (%roomname( ) =~ "swamp") {#CALL %roomcol( %roomnum( ), 8421376)};
  #IF (%roomname( ) =~ "Fields") {#CALL %roomcol( %roomnum( ), lightgreen)};
  #IF (%roomname( ) =~ "Forest") {#CALL %roomcol( %roomnum( ), green)};
  #IF (%roomname( ) =~ "Mirkwood") {#CALL %roomcol( %roomnum( ), green)};
  #IF (%roomname( ) =~ "Rocky") {#CALL %roomcol( %roomnum( ), lightgray)};
  #IF (%roomname( ) =~ "Mountains") {#CALL %roomcol( %roomnum( ), white)};
  #IF (%roomname( ) =~ "Road") {#CALL %roomcol( %roomnum( ), brown)};
  #IF (%roomname( ) =~ "Path") {#CALL %roomcol( %roomnum( ), brown)};
  #IF (%roomname( ) =~ "Greenway") {#CALL %roomcol( %roomnum( ), brown)};
  #IF (%roomname( ) =~ "Bridge") {#CALL %roomcol( %roomnum( ), blue)};
  } ;
______________________________________________

#BU Service {Service} {#CALL %roomcol( %roomnum( ), 16764057)}
#BU Bar {Bar} {#CALL %roomcol( %roomnum( ), 13434828)}
#BU Healer {Healer} {#CALL %roomcol( %roomnum( ), 13408767)}
#BU Shop {Shop} {#CALL %roomcol( %roomnum( ), 16776960)}
#BU Trainer {Trainer} {#CALL %roomcol( %roomnum( ), 10092543)}
#BU SP {SP} {#CALL %roomcol( %roomnum( ), 16711935)}
#BU POI {POI} {#CALL %roomcol( %roomnum( ), orange)}

______________________________________________

to check current room color:   #echo %roomcol( )

______________________________________________

CMUD saves its maps in SQL Lite format, so dig in it and get XY position of the cells, theor color and whatever else you need.

like: select Name,X,Y,Color,Desc from ObjectTbl where ObjId = 15940 or ObjId = 17764
______________________________________________

To export all that in Excel:

vbs script that outputs excel file with colored cells (can be edited in Notepad and saved with .vbs extension) Then just double-click it and it will kick :)


Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Add()
Set objWorksheet = objWorkbook.Worksheets(1)
objExcel.Cells(1,1).Interior.ColorIndex = 3
objExcel.Cells(2,1).Interior.ColorIndex = 4
objExcel.Cells(3,1).Interior.ColorIndex = 5


No comments:

Post a Comment