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.

259 lines
9.5 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. #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';} {%1};
  65. #format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
  66. #script {gatherable_query_result} {$db_command};
  67. #list {gatherable_query_result} {size} {gatherable_result_size};
  68. #list {last_query_list} {clear};
  69. #if {$gatherable_result_size > 0} {
  70. #format {gatherable_display} {%cResults for gatherables matching %c"%c%s%c"%c.} {bold blue}{green}{yellow}{%1}{green}{bold blue};
  71. #echo {$gatherable_display};
  72. #var {gather_count} {0};
  73. #foreach {$gatherable_query_result[%*]} {inner_query_result} {
  74. #replace {inner_query_result} {\\} {};
  75. #list gatherable_results create {${inner_query_result}};
  76. #variable {gatherable_info} {
  77. {item_name}{$gatherable_results[1]}
  78. {room_short}{$gatherable_results[2]}
  79. {room_id}{$gatherable_results[3]}
  80. {map_name}{$map_id_names[$gatherable_results[4]]}
  81. };
  82. #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};
  83. #echo {$gatherable_display};
  84. #variable {last_query_list[$gather_count]} {$gatherable_info};
  85. #math {gather_count} {$gather_count + 1};
  86. }
  87. } {
  88. #format {gatherable_display} {%cQuery Result: %c%s%c was not found.} {bold blue}{green}{%1}{bold blue};
  89. #echo {$gatherable_display};
  90. }
  91. }
  92. #ALIAS {db npc %1} {
  93. #unvariable {npc_display};
  94. #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} {%1};
  95. #format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
  96. #script {npc_query_result} {$db_command};
  97. #list {npc_query_result} {size} {npc_result_size};
  98. #list {last_query_list} {clear};
  99. #if {$npc_result_size > 0} {
  100. #format {npc_display} {%cResults for NPCs matching %c"%c%s%c"%c.} {bold blue}{green}{yellow}{%1}{green}{bold blue};
  101. #echo {$npc_display};
  102. #var {npc_count} {0};
  103. #foreach {$npc_query_result[%*]} {inner_query_result} {
  104. #replace {inner_query_result} {\\} {};
  105. #list npc_results create {${inner_query_result}};
  106. #variable {npc_info} {
  107. {npc_name}{$npc_results[1]}
  108. {map_name}{$map_id_names[$npc_results[2]]}
  109. {room_id}{$npc_results[3]}
  110. {room_short}{$npc_results[4]}
  111. };
  112. #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}
  113. {green}{$npc_info[npc_name]}{bold blue}{orange}{$npc_info[room_short]}{bold blue}{orange}{$npc_info[map_name]}{bold blue};
  114. #echo {$npc_display};
  115. #variable {last_query_list[$npc_count]} {$npc_info};
  116. #math {npc_count} {$npc_count + 1};
  117. }
  118. } {
  119. #format {npc_display} {%cQuery Result: %c%s%c was not found.} {bold blue}{green}{%1}{bold blue};
  120. #echo {$npc_display};
  121. }
  122. };
  123. #ALIAS {db item %1} {
  124. #unvariable {item_display};
  125. #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;} {%1};
  126. #format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
  127. #script {item_query_result} {$db_command};
  128. #list {item_query_result} {size} {item_result_size};
  129. #list {last_query_list} {clear};
  130. #if {$item_result_size > 0} {
  131. #format {item_display} {%cResults for items matching %c"%c%s%c"%c.} {bold blue}{green}{yellow}{%1}{green}{bold blue};
  132. #echo {$item_display};
  133. #var {item_count} {0};
  134. #foreach {$item_query_result[%*]} {inner_query_result} {
  135. #replace {inner_query_result} {\\} {};
  136. #list item_results create {${inner_query_result}};
  137. #variable {item_info} {
  138. {item_name}{$item_results[1]}
  139. {sale_price}{$item_results[2]}
  140. {room_short}{$item_results[3]}
  141. {room_id}{$item_results[4]}
  142. {map_name}{$map_id_names[$item_results[5]]}
  143. };
  144. #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};
  145. #echo {$item_display};
  146. #variable {last_query_list[$item_count]} {$item_info};
  147. #math {item_count} {$item_count + 1};
  148. }
  149. } {
  150. #format {item_display} {%cQuery Result: %c%s%c was not found.} {bold blue}{green}{%1}{bold blue};
  151. #echo {$item_display};
  152. }
  153. }
  154. #ALIAS {db room %1} {
  155. #unvariable {room_display};
  156. #format {query} {SELECT room_id, map_id, room_short, room_type, INSTR(room_short, '%s') pos FROM rooms WHERE pos > 0 LIMIT 10;} {%1};
  157. #format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
  158. #script {room_query_result} {$db_command};
  159. #list {room_query_result} {size} {room_result_size};
  160. #list {last_query_list} {clear};
  161. #if {$room_result_size > 0} {
  162. #format {room_display} {%cResults for rooms matching %c"%c%s%c"%c.} {bold blue}{green}{yellow}{%1}{green}{bold blue};
  163. #echo {$room_display};
  164. #var {room_count} {0};
  165. #foreach {$room_query_result[%*]} {inner_query_result} {
  166. #replace {inner_query_result} {\\} {};
  167. #list room_results create {${inner_query_result}};
  168. #variable {room_info} {
  169. {room_id}{$room_results[1]}
  170. {map_name}{$map_id_names[$room_results[2]]}
  171. {room_short}{$room_results[3]}
  172. {room_type}{$room_results[4]}
  173. };
  174. #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};
  175. #echo {$room_display};
  176. #variable {last_query_list[$room_count]} {$room_info};
  177. #math {room_count} {$room_count + 1};
  178. }
  179. } {
  180. #format {room_display} {%cQuery Result: %c%s%c was not found.} {bold blue}{green}{%1}{bold blue};
  181. #echo {$room_display};
  182. };
  183. };
  184. #ALIAS {db route %1} {
  185. #if {&last_query_list[%1]} {
  186. #var {target_room} {$last_query_list[%1]};
  187. #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};
  188. #echo {$route_display};
  189. #var {route_current_room_id} {$GMCP[room][info][identifier]};
  190. #var {route_target_room_id} {$target_room[room_id]};
  191. #format {route_command} {python src/maproute.py %s %s} {$route_current_room_id} {$route_target_room_id};
  192. #script {speedwalk_result} {$route_command};
  193. #if {$speedwalk_result[1] = 0} {
  194. #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};
  195. #echo {$route_error};
  196. #return;
  197. }
  198. #send {$speedwalk_result[1]};
  199. #format {route_confirm} {%c[speedwalk] A route was found, type "%cspeedwalk%c" to fast travel.} {bold blue}{green}{bold blue};
  200. #echo {$route_confirm};
  201. } {
  202. #format {route_display} {%c[speedwalk] No previous query data found, try searching first.} {bold blue};
  203. #echo {$route_display};
  204. }
  205. };
  206. #ALIAS {speedwalk} {
  207. #send {RuhsSpeedRun};
  208. }
  209. #CLASS {quow} {close};