TinTin++ Configs for DiscworldMUD
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.

320 lines
12 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. #CLASS {quow} {kill};
  2. #CLASS {quow} {open};
  3. #VARIABLE {map_id_names} {
  4. {1}{Ankh-Morpork}
  5. {2}{AM Assassins}
  6. {3}{AM Buildings}
  7. {4}{AM Cruets}
  8. {5}{AM Docks}
  9. {6}{AM Guilds}
  10. {7}{AM Isle of Gods}
  11. {8}{Shades Maze}
  12. {9}{Temple of Small Gods}
  13. {10}{AM Temples}
  14. {11}{AM Thieves}
  15. {12}{Unseen University}
  16. {13}{AM Warriors}
  17. {14}{Pseudopolis Watch House}
  18. {15}{Magpyr's Castle}
  19. {16}{Bois}
  20. {17}{Bes Pelargic}
  21. {18}{BP Buildings}
  22. {19}{BP Estates}
  23. {20}{BP Wizards}
  24. {21}{Brown Islands}
  25. {22}{Death's Domain}
  26. {23}{Djelibeybi}
  27. {24}{IIL - DJB Wizards}
  28. {25}{Ephebe}
  29. {26}{Ephebe Underdocks}
  30. {27}{Genua}
  31. {28}{Genua Sewers}
  32. {29}{GRFLX Caves}
  33. {30}{Hashishim Caves}
  34. {31}{Klatch Region}
  35. {32}{Lancre Region}
  36. {33}{Mano Rossa}
  37. {34}{Monks of Cool}
  38. {35}{Netherworld}
  39. {37}{Pumpkin Town}
  40. {38}{Ramtops Regions}
  41. {39}{Sto-Lat}
  42. {40}{Academy of Artificers}
  43. {41}{Cabbage Warehouse}
  44. {42}{AoA Library}
  45. {43}{Sto-Lat Sewers}
  46. {44}{Sprite Caves}
  47. {45}{Sto Plains Region}
  48. {46}{Uberwald Region}
  49. {47}{UU Library}
  50. {48}{Klatchian Farmsteads}
  51. {49}{CTF Arena}
  52. {50}{PK Arena}
  53. {51}{AM Post Office}
  54. {52}{Ninja Guild}
  55. {53}{The Travelling Shop}
  56. {54}{Slippery Hollow}
  57. {55}{House of Magic - Creel}
  58. {56}{Special Areas}
  59. {57}{Skund Wolf Trail}
  60. }
  61. #LIST {last_query_list} {create};
  62. #ALIAS {db gatherable %1} {
  63. #unvariable {gatherable_display};
  64. #variable {search_term} {%1};
  65. #replace {search_term} {'} {''};
  66. #format {query} {SELECT item_name, room_short, shop_items.room_id, map_id, INSTR(item_name, '%s') pos FROM shop_items INNER JOIN rooms on rooms.room_id = shop_items.room_id WHERE pos > 0 AND sale_price = 'gather' LIMIT 10;} {$search_term};
  67. #format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
  68. #script {gatherable_query_result} {$db_command};
  69. #list {gatherable_query_result} {size} {gatherable_result_size};
  70. #list {last_query_list} {clear};
  71. #if {$gatherable_result_size > 0} {
  72. #format {gatherable_display} {%cResults for gatherables matching "%c%s%c":} {bold blue}{yellow}{%1}{bold blue};
  73. #echo {$gatherable_display};
  74. #var {gather_count} {0};
  75. #foreach {$gatherable_query_result[%*]} {inner_query_result} {
  76. #replace {inner_query_result} {\\} {};
  77. #list gatherable_results create {${inner_query_result}};
  78. #variable {gatherable_info} {
  79. {item_name}{$gatherable_results[1]}
  80. {room_short}{$gatherable_results[2]}
  81. {room_id}{$gatherable_results[3]}
  82. {map_name}{$map_id_names[$gatherable_results[4]]}
  83. };
  84. #format {gatherable_display} {%c [%c%d%c]: %c%s%c found in %c%s%c,%c %s%c} {bold blue}{cyan}{$gather_count}{bold blue}{green}{$gatherable_info[item_name]}{bold blue}{orange}{$gatherable_info[room_short]}{bold blue}{orange}{$gatherable_info[map_name]}{bold blue};
  85. #echo {$gatherable_display};
  86. #variable {last_query_list[$gather_count]} {$gatherable_info};
  87. #math {gather_count} {$gather_count + 1};
  88. }
  89. } {
  90. #format {gatherable_display} {%cQuery Result: %c%s%c was not found.} {bold blue}{green}{%1}{bold blue};
  91. #echo {$gatherable_display};
  92. }
  93. }
  94. #ALIAS {db npc %1} {
  95. #unvariable {npc_display};
  96. #variable {search_term} {%1};
  97. #replace {search_term} {'} {''};
  98. #format {query} {SELECT npc_name, rooms.map_id, rooms.room_id, rooms.room_short, INSTR(npc_name, '%s') pos FROM npc_info INNER JOIN rooms on rooms.room_id = npc_info.room_id WHERE pos > 0 LIMIT 10} {$search_term};
  99. #format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
  100. #script {npc_query_result} {$db_command};
  101. #list {npc_query_result} {size} {npc_result_size};
  102. #list {last_query_list} {clear};
  103. #if {$npc_result_size > 0} {
  104. #format {npc_display} {%cResults for NPCs matching "%c%s%c":} {bold blue}{yellow}{%1}{bold blue};
  105. #echo {$npc_display};
  106. #var {npc_count} {0};
  107. #foreach {$npc_query_result[%*]} {inner_query_result} {
  108. #replace {inner_query_result} {\\} {};
  109. #list npc_results create {${inner_query_result}};
  110. #variable {npc_info} {
  111. {npc_name}{$npc_results[1]}
  112. {map_name}{$map_id_names[$npc_results[2]]}
  113. {room_id}{$npc_results[3]}
  114. {room_short}{$npc_results[4]}
  115. };
  116. #format {npc_display} {%c [%c%d%c]: %c%s%c found in %c%s%c,%c %s%c} {bold blue}{cyan}{$npc_count}{bold blue}{green}{$npc_info[npc_name]}{bold blue}{orange}{$npc_info[room_short]}{bold blue}{orange}{$npc_info[map_name]}{bold blue};
  117. #echo {$npc_display};
  118. #variable {last_query_list[$npc_count]} {$npc_info};
  119. #math {npc_count} {$npc_count + 1};
  120. }
  121. } {
  122. #format {npc_display} {%cQuery Result: %c%s%c was not found.} {bold blue}{green}{%1}{bold blue};
  123. #echo {$npc_display};
  124. }
  125. };
  126. #ALIAS {db npcitem %1} {
  127. #unvariable {npcitem_display};
  128. #variable {search_term} {%1};
  129. #replace {search_term} {'} {''};
  130. #format {query} {SELECT npc_info.map_id, npc_name, npc_info.room_id, item_name, room_short, INSTR(item_name, '%s') pos FROM 'npc_info' INNER JOIN npc_items ON npc_items.npc_id = npc_info.npc_id INNER JOIN rooms on npc_info.room_id = rooms.room_id WHERE pos > 0 LIMIT 10} {$search_term};
  131. #format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
  132. #script {npcitem_query_result} {$db_command};
  133. #list {npcitem_query_result} {size} {npcitem_result_size};
  134. #list {last_query_list} {clear};
  135. #if {$npcitem_result_size > 0} {
  136. #format {npcitem_display} {%cResults for NPC items matching "%c%s%c":} {bold blue}{yellow}{%1}{bold blue};
  137. #echo {$npcitem_display};
  138. #var {npcitem_count} {0};
  139. #foreach {$npcitem_query_result[%*]} {inner_query_result} {
  140. #replace {inner_query_result} {\\} {};
  141. #list npcitem_results create {${inner_query_result}};
  142. #variable {npcitem_info} {
  143. {map_name}{$map_id_names[$npcitem_results[1]]}
  144. {npc_name}{$npcitem_results[2]}
  145. {room_id}{$npcitem_results[3]}
  146. {item_name}{$npcitem_results[4]}
  147. {room_short}{$npcitem_results[5]}
  148. };
  149. #format {npcitem_display} {%c [%c%d%c]: %c%s%c found on %c%s%c in %c%s%c,%c %s%c} {bold blue}{cyan}{$npcitem_count}{bold blue}{green}{$npcitem_info[item_name]}{bold blue}{white}{$npcitem_info[npc_name]}{bold blue}{orange}{$npcitem_info[room_short]}{bold blue}{orange}{$npcitem_info[map_name]}{bold blue};
  150. #echo {$npcitem_display};
  151. #variable {last_query_list[$npcitem_count]} {$npcitem_info};
  152. #math {npcitem_count} {$npcitem_count + 1};
  153. }
  154. } {
  155. #format {npcitem_display} {%cQuery Result: %c%s%c was not found.} {bold blue}{green}{%1}{bold blue};
  156. #echo {$npcitem_display};
  157. }
  158. };
  159. #ALIAS {db item %1} {
  160. #unvariable {item_display};
  161. #variable {search_term} {%1};
  162. #replace {search_term} {'} {''};
  163. #format {query} {SELECT item_name, sale_price, room_short, shop_items.room_id, map_id, INSTR(item_name, '%s') pos FROM shop_items INNER JOIN rooms on rooms.room_id = shop_items.room_id WHERE pos > 0 AND sale_price != 'gather' LIMIT 10;} {$search_term};
  164. #format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
  165. #script {item_query_result} {$db_command};
  166. #list {item_query_result} {size} {item_result_size};
  167. #list {last_query_list} {clear};
  168. #if {$item_result_size > 0} {
  169. #format {item_display} {%cResults for items items matching "%c%s%c":} {bold blue}{yellow}{%1}{bold blue};
  170. #echo {$item_display};
  171. #var {item_count} {0};
  172. #foreach {$item_query_result[%*]} {inner_query_result} {
  173. #replace {inner_query_result} {\\} {};
  174. #list item_results create {${inner_query_result}};
  175. #variable {item_info} {
  176. {item_name}{$item_results[1]}
  177. {sale_price}{$item_results[2]}
  178. {room_short}{$item_results[3]}
  179. {room_id}{$item_results[4]}
  180. {map_name}{$map_id_names[$item_results[5]]}
  181. };
  182. #format {item_display} {%c [%c%d%c]: %c%s%c (%c%s%c) found in %c%s%c,%c %s%c} {bold blue}{cyan}{$item_count}{bold blue}{green}{$item_info[item_name]}{bold blue}{yellow}{$item_info[sale_price]}{bold blue}{orange}{$item_info[room_short]}{bold blue}{orange}{$item_info[map_name]}{bold blue};
  183. #echo {$item_display};
  184. #variable {last_query_list[$item_count]} {$item_info};
  185. #math {item_count} {$item_count + 1};
  186. }
  187. } {
  188. #format {item_display} {%cQuery Result: %c%s%c was not found.} {bold blue}{green}{%1}{bold blue};
  189. #echo {$item_display};
  190. }
  191. }
  192. #ALIAS {db room %1} {
  193. #unvariable {room_display};
  194. #variable {search_term} {%1};
  195. #replace {search_term} {'} {''};
  196. #format {query} {SELECT room_id, map_id, room_short, room_type, INSTR(room_short, '%s') pos FROM rooms WHERE pos > 0 LIMIT 10;} {$search_term};
  197. #format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
  198. #script {room_query_result} {$db_command};
  199. #list {room_query_result} {size} {room_result_size};
  200. #list {last_query_list} {clear};
  201. #if {$room_result_size > 0} {
  202. #format {room_display} {%cResults for items items matching "%c%s%c":} {bold blue}{yellow}{%1}{bold blue};
  203. #echo {$room_display};
  204. #var {room_count} {0};
  205. #foreach {$room_query_result[%*]} {inner_query_result} {
  206. #replace {inner_query_result} {\\} {};
  207. #list room_results create {${inner_query_result}};
  208. #variable {room_info} {
  209. {room_id}{$room_results[1]}
  210. {map_name}{$map_id_names[$room_results[2]]}
  211. {room_short}{$room_results[3]}
  212. {room_type}{$room_results[4]}
  213. };
  214. #format {room_display} {%c [%c%d%c]: %c%s%c (%c%s%c) found in %c%s%c} {bold blue}{cyan}{$room_count}{bold blue}{green}{$room_info[room_short]}{bold blue}{yellow}{$room_info[room_type]}{bold blue}{orange}{$room_info[map_name]}{bold blue};
  215. #echo {$room_display};
  216. #variable {last_query_list[$room_count]} {$room_info};
  217. #math {room_count} {$room_count + 1};
  218. }
  219. } {
  220. #format {room_display} {%cQuery Result: %c%s%c was not found.} {bold blue}{green}{%1}{bold blue};
  221. #echo {$room_display};
  222. };
  223. };
  224. #ALIAS {db route %1} {
  225. #if {&last_query_list[%1]} {
  226. #var {target_room} {$last_query_list[%1]};
  227. #format {route_display} {%c[speedwalk] Generating speedwalk from current location to %c%s%c, %c%s%c...} {bold blue}{green}{$target_room[room_short]}{bold blue}{orange}{$target_room[map_name]}{bold blue};
  228. #echo {$route_display};
  229. #var {route_current_room_id} {$GMCP[room][info][identifier]};
  230. #var {route_target_room_id} {$target_room[room_id]};
  231. #format {route_command} {python src/maproute.py %s %s} {$route_current_room_id} {$route_target_room_id};
  232. #script {speedwalk_result} {$route_command};
  233. #if {"$speedwalk_result[1]" == "0"} {
  234. #format {route_error} {%c[speedwalk] Unable to find route to %c%s%c or unknown current room.} {bold blue}{green}{$target_room[room_short]}{bold blue};
  235. #echo {$route_error};
  236. #return;
  237. }
  238. #send {$speedwalk_result[1]};
  239. #variable {route_length} {$speedwalk_result[1]};
  240. #replace {route_length} {\\\;} {;};
  241. #replace {route_length} { } {};
  242. #list {route_length} {create} {$route_length};
  243. #list {route_length} {size} {route_length};
  244. #format {route_confirm} {%c[speedwalk] A route was found, type "%cspeedwalk%c" to fast travel. [%g steps]} {bold blue}{green}{bold blue}{$route_length};
  245. #echo {$route_confirm};
  246. } {
  247. #format {route_display} {%c[speedwalk] No previous query data found, try searching first.} {bold blue};
  248. #echo {$route_display};
  249. }
  250. };
  251. #ALIAS {speedwalk} {
  252. #send {RuhsSpeedRun};
  253. }
  254. #CLASS {quow} {close};