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.

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