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.

309 lines
6.9 KiB

  1. #class gmcp kill;
  2. #CLASS {gmcp} OPEN
  3. #format IAC %a 255
  4. #format DONT %a 254
  5. #format DO %a 253
  6. #format WONT %a 252
  7. #format WILL %a 251
  8. #format SB %a 250
  9. #format SE %a 240
  10. #format GMCP %a 201
  11. #ALIAS {debug {on|off}}
  12. {
  13. #if {"%1" == "on"}
  14. {
  15. #variable debug 1
  16. };
  17. #else
  18. {
  19. #variable debug 0
  20. };
  21. #nop;
  22. }
  23. {5}
  24. #EVENT {IAC SB GMCP char.maxstats IAC SE}
  25. {
  26. #variable GMCP[CHAR][MAXSTATS] {%0};
  27. #if {$debug}
  28. {
  29. #showme %1
  30. };
  31. #nop;
  32. }
  33. #event {IAC SB GMCP group IAC SE}
  34. {
  35. #var GMCP[GROUP] {%0};
  36. #line log {$dir/group} {\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n};
  37. #format {name_line} {};
  38. #format {leader_line} {} {light cyan} {light white};
  39. #foreach {$GMCP[GROUP][members][]} {gmcp_groupie}
  40. {
  41. #if {"gmcp_groupie_list" != ""}
  42. {
  43. #var {pregroup} {$gmcp_groupie_list\n}
  44. }
  45. {
  46. #var pregroup {}
  47. };
  48. #math {hp_percent_tmp} {1.0*($GMCP[GROUP][members][$gmcp_groupie][info][hp]/$GMCP[GROUP][members][$gmcp_groupie][info][mhp])*100};
  49. #math {mn_percent_tmp} {1.0*($GMCP[GROUP][members][$gmcp_groupie][info][mn]/$GMCP[GROUP][members][$gmcp_groupie][info][mmn])*100};
  50. #math {mv_percent_tmp} {1.0*($GMCP[GROUP][members][$gmcp_groupie][info][mv]/$GMCP[GROUP][members][$gmcp_groupie][info][mmv])*100};
  51. #format {gmcp_groupie_list}
  52. {
  53. $pregroup
  54. %c$GMCP[GROUP][members][$gmcp_groupie][name] %cLevel%c: %c$GMCP[GROUP][members][$gmcp_groupie][info][lvl]\n
  55. %cHP%c:%c${hp_percent_tmp} %cMN%c:%c${mn_percent_tmp} %cMV%c:%c${mv_percent_tmp}\n
  56. %cTNL%c:%c$GMCP[GROUP][members][$gmcp_groupie][info][tnl] %cAlign%c:%c$GMCP[GROUP][members][$gmcp_groupie][info][align] <acc>QT<eff>: <afc>$GMCP[GROUP][members][$gmcp_groupie][info][qt]
  57. } {light red} {cyan} {light black} {blue} {green} {light black} {light green} {blue} {light black} {light blue} {yellow} {light black} {light yellow} {light white} {light black} {green} {light white} {light black} {light cyan}
  58. };
  59. #line log {$dir/group} {$name_line\n\n$leader_line\n\n\n$gmcp_groupie_list};
  60. #var gmcp_groupie_list {};
  61. }
  62. #EVENT {IAC SB GMCP char.status IAC SE}
  63. {
  64. #variable GMCP[CHAR][STATUS] {%0};
  65. #if {$debug}
  66. {
  67. #showme %1
  68. };
  69. ||gmcp_prompt_statmon;
  70. #nop;
  71. }
  72. #EVENT {IAC SB GMCP char.vitals IAC SE}
  73. {
  74. #variable GMCP[CHAR][VITALS] {%0};
  75. #if {$debug}
  76. {
  77. #showme %1
  78. };
  79. ||gmcp_prompt_statmon;
  80. #nop;
  81. }
  82. #EVENT {IAC SB GMCP char.worth IAC SE}
  83. {
  84. #variable GMCP[CHAR][WORTH] {%0};
  85. #if {$debug}
  86. {
  87. #showme %1
  88. };
  89. #nop
  90. }
  91. #alias {afk {on|off}}
  92. {
  93. #if {"%1" == "on"}
  94. {
  95. #var afk 1;
  96. #var prewarning 0;
  97. }
  98. {
  99. #var afk 0;
  100. #var tellsent {};
  101. }
  102. }
  103. #EVENT {IAC SB GMCP comm.channel IAC SE}
  104. {
  105. #var {GMCP[COMM][CHATLOGGER]} {%0};
  106. #var {chanrec} {$GMCP[COMM][CHATLOGGER][chan]};
  107. #var {player} {$GMCP[COMM][CHATLOGGER][player]};
  108. #if {"$GMCP[COMM][CHATLOGGER][chan]" != "mobsay"}
  109. {
  110. #line log {$dir/Aardwolf-chats} {$GMCP[COMM][CHATLOGGER][msg]};
  111. };
  112. #if {$debug}
  113. {
  114. #showme %1
  115. };
  116. #if {"$GMCP[COMM][CHATLOGGER][chan]" == "tell"}
  117. {
  118. #if {$afk}
  119. {
  120. #if {!$tellsent[$GMCP[COMM][CHATLOGGER][player]]}
  121. {
  122. #if {"$GMCP[COMM][CHATLOGGER][player]" != "Cheezburger"}
  123. {
  124. #var {tellsent[$GMCP[COMM][CHATLOGGER][player]]} {1};
  125. reply Sorry, but I'm afk: @Y[@R$afk_reason@Y]@c;
  126. }
  127. }
  128. }
  129. };
  130. }
  131. #EVENT {IAC SB GMCP char.stats IAC SE}
  132. {
  133. #variable GMCP[CHAR][STATS] {%0};
  134. #if {$debug}
  135. {
  136. #showme %1
  137. };
  138. #nop;
  139. }
  140. #EVENT {IAC SB GMCP comm.repop IAC SE}
  141. {
  142. #var {GMCP[COMM][REPOP]} {%0};
  143. #format {curr_time} {%T};
  144. #if {$repoptrack}
  145. {
  146. #if {$repop}
  147. {
  148. #format {last_repop} {%T};
  149. }
  150. };
  151. #format {time} {%t} {%H:%M:%S};
  152. $repchan @WRepop @w= @r$GMCP[COMM][REPOP][zone]@w @@ @r$time;
  153. #var time {};
  154. #nop;
  155. }
  156. #alias {^repopwatch {on|off}$}
  157. {
  158. #if {"%1" == on"}
  159. {
  160. #var repoptrack 1;
  161. }
  162. {
  163. #var repoptrack 0;
  164. }
  165. }
  166. #alias {^check repop$}
  167. {
  168. #format curr_time {%T};
  169. #math {time_till_pop} {($last_repop+606)-$curr_time};
  170. #send {$repchan @CNext repop@w: @R$time_till_pop @Wseconds.};
  171. };
  172. #EVENT {IAC SB GMCP char.base IAC SE}
  173. {
  174. #variable GMCP[CHAR][BASE] {%0};
  175. #nop;
  176. }
  177. #event {IAC SB GMCP room.info IAC SE}
  178. {
  179. #var GMCP[ROOM][INFO] {%0};
  180. #if {$mapping}
  181. {
  182. #if {"$GMCP[ROOM][INFO][details]" != "%*maze%*" && $GMCP[ROOM][INFO][num] != -1}
  183. {
  184. #map goto {$GMCP[ROOM][INFO][num]} {dig};
  185. #map get roomname {mapresult};
  186. #if {"$mapresult" == "{\d+}"}
  187. {
  188. #map set roomname $GMCP[ROOM][INFO][name];
  189. #map set roomvnum $GMCP[ROOM][INFO][num];
  190. #map set roomarea $GMCP[ROOM][INFO][zone];
  191. #map set roomterrain $GMCP[ROOM][INFO][terrain];
  192. #map set roomcolor <178>
  193. };
  194. #foreach {$GMCP[ROOM][INFO][exits][]} {exit}
  195. {
  196. #map get {roomexit} {mapresult};
  197. #if {&mapresult[$exit] == 0}
  198. {
  199. #map get {roomvnum} {mapresult} {$GMCP[ROOM][INFO][exits][$exit]};
  200. #map dig {$exit} {$GMCP[ROOM][INFO][exits][$exit]};
  201. #if {$mapresult == 0}
  202. {
  203. #map set {roomcolor} {<fca>} {$GMCP[ROOM][INFO][exits][$exit]}
  204. }
  205. }
  206. }
  207. };
  208. };
  209. #if {$GMCP[ROOM][INFO][num] != -1}
  210. {
  211. #MAP GOTO {$GMCP[ROOM][INFO][num]}
  212. }
  213. }
  214. #event {IAC SB GMCP comm.tick IAC SE}{#var ticks 30};
  215. #var repop 0;
  216. #var ticks 30;
  217. #tic TICKING
  218. {
  219. #if {$ticks > 0}
  220. {
  221. #math ticks {$ticks - 1};
  222. };
  223. #if {$ticks < 10}
  224. {#show {<139> $ticks<099> secs to tick QUEST<099>: <139>$timer} 3}
  225. {#show {<139> $ticks<099> secs to tick QUEST<099>: <139>$timer} 3}
  226. }
  227. {1};
  228. #EVENT {IAC WILL GMCP}
  229. {
  230. #send {$IAC$DO$GMCP\};
  231. #send {$IAC$SB$GMCP Core.Hello { "client": "$CLIENT_NAME", "version": "$CLIENT_VERSION" } $IAC$SE\};
  232. #send {$IAC$SB$GMCP Core.Supports.Set [ "Room 1", "Char 1", "Core 1", "Comm 1", "Debug 1", "Group 1" ] $IAC$SE\}
  233. }
  234. #EVENT {MAP ENTER ROOM}
  235. {
  236. #if $mapping
  237. {
  238. #map get roomarea oldarea;
  239. #if {"$oldarea"==""}
  240. {
  241. #map set roomarea $GMCP[ROOM][INFO][zone]
  242. };
  243. #map get roomterrain oldterrain;
  244. #if {"$oldterrain"==""}
  245. {
  246. #map set roomterrain $GMCP[ROOM][INFO][terrain]
  247. };
  248. #map get roomname oldname;
  249. #if {"$oldname"==""}
  250. {
  251. #map set roomname $GMCP[ROOM][INFO][name]
  252. }
  253. }
  254. }
  255. #EVENT {PROGRAM START}
  256. {
  257. #variable CLIENT_NAME %0;
  258. #variable CLIENT_VERSION %1;
  259. }
  260. #EVENT {SESSION DISCONNECTED}
  261. {
  262. #map write {$dir/map-discon.txt};
  263. #history write {$dir/history-discon.txt};
  264. #class variables write {$dir/variables.tin}
  265. }
  266. #EVENT {SESSION CONNECTED}
  267. {
  268. $name;
  269. $password;
  270. #unvar name;
  271. #unvar password;
  272. #history read {$dir/history-discon.txt}
  273. }
  274. protocol gmcp sendchar
  275. #CLASS {gmcp} CLOSE