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.

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