Guest User

mapper.gmcp.aard.set

a guest
Oct 10th, 2016
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.19 KB | None | 0 0
  1. #var MapOutputWindow 0
  2.  
  3. #action {/^#Connection established\./}
  4. {
  5. #var MapperWorldName $HOSTNAME;
  6. #wclear $MapOutputWindow;
  7. #wname $MapOutputWindow {GMCP Automap - $MapperWorldName};
  8. #message mapper off;
  9. #var PrevVNum 0;
  10. #var CurrentVNum 0;
  11. #var AutoRun 0;
  12. #read maps/$MapperWorldName.gmcp.map
  13. }
  14. {automap}
  15. #action {/^#Connection lost\./} {#mapper write maps/$MapperWorldName.gmcp.map} {5} {automap}
  16. #action {/^#Connection closed by user\./} {#mapper write maps/$MapperWorldName.gmcp.map} {5} {automap}
  17.  
  18. #mapper clear
  19.  
  20. #mapper add direction {down,d} -1 -1 0 {up,u}
  21. #mapper add direction {east,e} 1 0 0 {west,w}
  22. #mapper add direction {north,n} 0 1 0 {south,s}
  23.  
  24. #mapper add flag {store} {$} {light green}
  25. #mapper add flag {quest} {@} {yellow}
  26. #mapper add flag {repair} {%} {brown}
  27. #mapper add flag {danger} {!} {light red}
  28. #mapper add flag {master} {*} {green}
  29. #mapper add flag {hell} {H} {light red}
  30. #mapper add flag {unexplored} {?} {brown}
  31.  
  32. #alias redrawMap
  33. {
  34. #wclear $MapOutputWindow;
  35. #mapper print normal header flags exits comment w$MapOutputWindow $MapVNum
  36. }
  37. {automap}
  38. #alias onRoom
  39. {
  40. #mapper add room $GmcpRoomInfoNum {$GmcpRoomInfoName} {} {$GmcpRoomInfoZone} {} {$GmcpRoomInfoTerrain};
  41. #mapper reset flag $GmcpRoomInfoNum unexplored;
  42. #if {$GmcpRoomInfoExitsLength > 0}
  43. {
  44. #loop {1, $GmcpRoomInfoExitsLength}
  45. {
  46. #mapper get id {$GmcpRoomInfoExitsValue%0} ExitVNum;
  47. #if {$ExitVNum == 0}
  48. {
  49. #mapper add room {$GmcpRoomInfoExitsValue%0} {?} {} {} {} {unexplored}
  50. };
  51. #mapper add exit $GmcpRoomInfoNum {$GmcpRoomInfoExitsKey%0} {$GmcpRoomInfoExitsValue%0}
  52. }
  53. };
  54. #var PrevVNum {$CurrentVNum};
  55. #var CurrentVNum {$GmcpRoomInfoNum};
  56. #var MapVNum {$CurrentVNum};
  57. redrawMap;
  58. #if {$AutoRun == 1} {stepAutoRun}
  59. }
  60. {automap}
  61.  
  62. #unaction {/^#oob GMCP room/}
  63. #action TEXT {/^#oob GMCP room/} {onRoom; #drop}
  64.  
  65. #alias saveexit {#mapper add exit $PrevVNum {$COMMAND} $CurrentVNum;redrawMap} {automap}
  66. #alias hereis
  67. {
  68. #mapper set flag $MapVNum %1;
  69. #strcmp %1 danger {#mapper set avoidance $MapVNum 100};
  70. #strcmp %1 hell {#mapper set avoidance $MapVNum 0};
  71. redrawMap
  72. }
  73. {automap}
  74. #alias hereisnot {#mapper reset flag $MapVNum %1;redrawMap} {automap}
  75. #alias comment {#mapper set comment $MapVNum {%%0};redrawMap} {automap}
  76. #alias {/^passto (\w+) (.*)/} {#mapper set pass $MapVNum {%%0} {%%1};redrawMap} {automap}
  77. #alias pathto {#mapper path $CurrentVNum $MapVNum} {automap}
  78.  
  79. #alias tonearest
  80. {
  81. #mapper search near $MapVNum flag %1 TargetVNum;
  82. #strcmp {$TargetVNum} 0 {}
  83. {
  84. #var AutoRun 1;
  85. stepAutoRun
  86. }
  87. }
  88. {automap}
  89.  
  90. #alias stepAutoRun
  91. {
  92. #strcmp $CurrentVNum $TargetVNum {#var AutoRun 0};
  93. #if {$AutoRun == 1}
  94. {
  95. #mapper path $CurrentVNum $TargetVNum AutoRunStep;
  96. #strcmp {$AutoRunStep} {}
  97. {
  98. #var AutoRun {0}
  99. }
  100. {
  101. $AutoRunStep
  102. }
  103. }
  104. }
  105. {automap}
  106. #alias runhere
  107. {
  108. #var TargetVNum $MapVNum;
  109. #var AutoRun 1;
  110. stepAutoRun
  111. }
  112. {automap}
  113. #alias stoprun {#var AutoRun 0} {automap}
  114.  
  115. #alias bymap
  116. {
  117. #mapper get exit %1 $MapVNum NextMapVNum;
  118. #if {$NextMapVNum != 0}
  119. {
  120. #var MapVNum $NextMapVNum;
  121. redrawMap
  122. }
  123. }
  124. {automap}
  125.  
  126. #hot {Alt+UP} {bymap north} {automap}
  127. #hot {Alt+LEFT} {bymap west} {automap}
  128. #hot {Alt+RIGHT} {bymap east} {automap}
  129. #hot {Alt+DOWN} {bymap south} {automap}
  130. #hot {Alt+0} {#var MapVNum $CurrentVNum;redrawMap} {automap}
  131.  
  132. #telnet GMCP on
  133. #oob GMCP add room
  134. #message oob ON
  135.  
  136. #group enable automap
Add Comment
Please, Sign In to add comment