TinTin++ setup for Aardwolf MUD
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

272 lines
6.1 KiB

  1. #class paths kill
  2. #class paths open
  3. #NOP ############################################################################################
  4. #NOP ### Portals variable, used by the speedwalking aliases (afind, rfind, vfind)
  5. #NOP ############################################################################################
  6. #var {portals}
  7. {
  8. {1}{{zone}{aylor}{name}{garbage}{vnum}{32418}{cmd}{get garbage from $portalbag;hold garbage;enter;hold wad;put garbage in $portalbag}}
  9. {2}{{zone}{petstore}{name}{collar}{vnum}{995}{cmd}{get collar from $portalbag;hold collar;enter;hold wad;put collar in $portalbag}}
  10. {3}{{zone}{amusement}{name}{amulet}{vnum}{29364}{cmd}{get amulet from $portalbag;hold amulet;enter;hold wad;put amulet in $portalbag}}
  11. }
  12. #NOP ###########################################################################
  13. #NOP ### Adding/Clearing Portal List
  14. #NOP ###########################################################################
  15. #alias addportals
  16. {
  17. #foreach {$portals[]} {x}
  18. {
  19. #map dig {$portals[$x][cmd]} {$portals[$x][vnum]}
  20. }
  21. }
  22. #alias clearportals
  23. {
  24. #foreach {$portals[]} {y}
  25. {
  26. #map unlink {$portals[$y][cmd]}
  27. }
  28. }
  29. #alias lvladdportals
  30. {
  31. #foreach {$portals[]} {x}
  32. {
  33. #IF {$tier_level>=$portals[$x][lvl]}
  34. {
  35. #map dig {$portals[$x][cmd]} {$portals[$x][vnum]}
  36. }
  37. }
  38. }
  39. #alias lvlclearportals
  40. {
  41. #foreach {$portals[]} {y}
  42. {
  43. #IF {$tier_level>=$portals[$y][lvl]}
  44. {
  45. #map unlink {$portals[$y][cmd]}
  46. }
  47. }
  48. }
  49. #NOP ###########################################################################
  50. #NOP ### Advanced speedwalking aliases afind, rfind, vfind (area, room, vnum)
  51. #NOP ###########################################################################
  52. #ALIAS {afind}
  53. {
  54. #IF "%0"==""
  55. {
  56. #show <169>Syntax:<099> af <zone>
  57. };
  58. #else
  59. {
  60. #unvar path;
  61. #if {"$GMCP[ROOM][INFO][zone]"=="%1"} {#show <169>Already at <099>%1.};
  62. #else
  63. {
  64. #show <169>Area Find:<099> %1;
  65. #var checkportal {};
  66. #map get roomnote checkportal;
  67. #if {"$checkportal"!="noportal"}
  68. {
  69. #var portalsused 1;
  70. lvladdportals;
  71. #map find {} {} {} {%1};
  72. };
  73. #ELSE
  74. {
  75. #map find {} {} {} {%1}
  76. };
  77. #if {$portalsused}
  78. {
  79. #var portalsused 0;
  80. lvlclearportals
  81. };
  82. #path run;
  83. }
  84. }
  85. }
  86. #ALIAS {vfind}
  87. {
  88. #IF "%0"==""
  89. {
  90. #show <169>Syntax:<099> vf <vnum>
  91. };
  92. #else
  93. {
  94. #unvar path;
  95. #if {"$GMCP[ROOM][INFO][num]"=="%1"} {#show <169>Already at <099>%1.};
  96. #else
  97. {
  98. #show <169>Vnum Find:<099> %1;
  99. #var checkportal {};
  100. #map get roomnote checkportal;
  101. #if {"$checkportal"!="noportal"}
  102. {
  103. #var portalsused 1;
  104. lvladdportals;
  105. #map find {%1}
  106. };
  107. #else
  108. {
  109. #map find {%1}
  110. };
  111. #if {$portalsused}
  112. {
  113. #var portalsused 0;
  114. lvlclearportals
  115. };
  116. #path run;
  117. }
  118. }
  119. }
  120. #ALIAS {rfind}
  121. {
  122. #IF "%0"==""
  123. {
  124. #show <169>Syntax:<099> rf <roomname>
  125. };
  126. #else
  127. {
  128. #show <169>Room Find:<099> %0;
  129. #var checkportal {};
  130. #map get roomnote checkportal;
  131. #if {"$checkportal"!="noportal"}
  132. {
  133. #var portalsused 1;
  134. lvladdportals;
  135. #map find {%0}
  136. };
  137. #else
  138. {
  139. #map find {%0}
  140. };
  141. #if {$portalsused}
  142. {
  143. #var portalsused 0;
  144. lvlclearportals;
  145. };
  146. #path run;
  147. }
  148. }
  149. #NOP ###########################################################################
  150. #NOP ### Mfind alias, will only find the path and show it to you, not run it
  151. #NOP ###########################################################################
  152. #ALIAS mfind
  153. {
  154. lvladdportals;
  155. #map find %0;
  156. #path show;
  157. lvlclearportals
  158. }
  159. #NOP ###########################################################################
  160. #NOP ### Hfind alias
  161. #NOP ### This let's you use a very loose string to find a path to the closest
  162. #NOP ### matching room in the current area.
  163. #NOP ###########################################################################
  164. #ALIAS hfind {#map find {%i%*%0%*} {} {} {$GMCP[ROOM][INFO][zone]};#path run}
  165. #NOP ###########################################################################
  166. #NOP ### Advanced runto alias "go"
  167. #NOP ###########################################################################
  168. #ALIAS {go}
  169. {
  170. #if {$GMCP[ROOM][INFO][num]==32418}
  171. {
  172. #if "%0"==""
  173. {
  174. #show Already at Recall
  175. };
  176. #else
  177. {
  178. rt %0
  179. }
  180. };
  181. #elseif {$GMCP[ROOM][INFO][num]==26151}
  182. {
  183. #if "%0"==""
  184. {
  185. d
  186. };
  187. #else
  188. {
  189. d;
  190. rt %0
  191. }
  192. };
  193. #elseif {$GMCP[ROOM][INFO][num]==26152}
  194. {
  195. #if "%0"==""
  196. {
  197. #send {enter elevator};
  198. d
  199. };
  200. #else
  201. {
  202. #send {enter elevator};
  203. d;
  204. rt %0
  205. }
  206. };
  207. #elseif {"$GMCP[ROOM][INFO][zone]"=="aylor"}
  208. {
  209. #if "%0"==""
  210. {
  211. rt recall
  212. };
  213. #else
  214. {
  215. rt recall;
  216. rt %0
  217. }
  218. };
  219. #else
  220. {
  221. #if "%0"==""
  222. {
  223. vf 32418
  224. };
  225. #else
  226. {
  227. vf 32418;
  228. rt %0
  229. }
  230. }
  231. }
  232. #NOP ###########################################################################
  233. #NOP ### Abbreviated aliases for afind, hfind, mfind, rfind, vfind
  234. #NOP ###########################################################################
  235. #ALIAS af {afind}
  236. #ALIAS hf {hfind}
  237. #ALIAS mf {mfind}
  238. #ALIAS rf {rfind}
  239. #ALIAS vf {vfind}
  240. #class paths close