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.

170 lines
2.2 KiB

  1. #class spellup kill;
  2. #class spellup open;
  3. #ALIAS {^spup{| spup}}
  4. {
  5. #send {spellup learned}
  6. }
  7. {5}
  8. #ACTION {^%d,%2,%d,%d,%d,%6,%d$}
  9. {
  10. #if {%3 == 2 || %3 == 3}
  11. {
  12. #if {"%6" == "-1"}
  13. {
  14. #if {%7 == 1}
  15. {
  16. #if {$slisting}
  17. {
  18. #variable {spellup[learned][%1]} {1}
  19. }
  20. }
  21. }
  22. };
  23. #line gag
  24. }
  25. {5}
  26. #ACTION {^\{/noteedit\}$}
  27. {
  28. #if {$spellup[state][was_casting]}
  29. {
  30. #read $dir/setup.tin;
  31. #variable {spellup[state][was_casting]} {0};
  32. spellup resume
  33. };
  34. #else
  35. {
  36. #read $dir/setup.tin;
  37. #variable {spellup[state][was_casting]} {0}
  38. };
  39. }
  40. {5}
  41. #ACTION {^\{/spellheaders}$}
  42. {
  43. #variable slisting 1;
  44. #line gag
  45. }
  46. {5}
  47. #ACTION {^\{affoff}%d$}
  48. {
  49. #if {$spellup[state][cast]}
  50. {
  51. #if {$spellup[learned][%1]}
  52. {
  53. #if {!$spellup[bad][%1]}
  54. {
  55. #if {"$position" == "Standing"}
  56. {
  57. #send {cast %1}
  58. };
  59. #else
  60. {
  61. #if {!$spellup[bad][%1]}
  62. {
  63. #variable {spellup[pending][%1]} {1}
  64. }
  65. }
  66. }
  67. }
  68. };
  69. #variable spellup[pending][%1][1];
  70. #line gag
  71. }
  72. {5}
  73. #ACTION {^\{affon\}%d,%d$}
  74. {
  75. #unvariable spellup[pending][%1];
  76. #line gag
  77. }
  78. {5}
  79. #ACTION {^\{noteedit\}$}
  80. {
  81. #if {$spellup[state][cast]}
  82. {
  83. #variable {spellup[state][was_casting]} {1};
  84. spup pause
  85. };
  86. #else
  87. {
  88. #variable {spellup[state][was_casting]} {0}
  89. };
  90. write;
  91. #killall tick
  92. }
  93. {5}
  94. #ACTION {^\{sfail\}%d,%d,%d,%4$}
  95. {
  96. #if {$spellup[state][cast]}
  97. {
  98. #if {$spellup[learned][%1]}
  99. {
  100. #if {%2 == 0}
  101. {
  102. #if {%3 == 1}
  103. {
  104. #if {!$spellup[bad][%1]}
  105. {
  106. #if {"$position" == "Standing"}
  107. {
  108. #line gag
  109. #send {cast %1}
  110. }
  111. }
  112. };
  113. #elseif {%3 == 4}
  114. {
  115. #line gag;
  116. #show Not enough mana. Put spell in spellup[pending];
  117. #variable spellup[pending][%1] 1
  118. }
  119. }
  120. }
  121. }
  122. }
  123. {5}
  124. #ACTION {^\{spellheaders spellup learned\}$}
  125. {
  126. #variable slisting 1;
  127. #variable {spellup[learned]} {};
  128. #line gag
  129. }
  130. {5}
  131. #ALIAS {^badspell %1}
  132. {
  133. #if {$spellup[bad][%1]}
  134. {
  135. #variable spellup[bad][%1] 0
  136. };
  137. #else
  138. {
  139. #variable spellup[bad][%1] 1
  140. }
  141. }
  142. {5}
  143. #ALIAS {^spup pause$}
  144. {
  145. #variable {spellup[state][cast]} {0}
  146. }
  147. {5}
  148. #ALIAS {^spup resume$}
  149. {
  150. #variable {spellup[state][cast]} {1};
  151. #foreach {$spellup[pending][]} {spell_pending}
  152. {
  153. #send {cast $spell_pending}
  154. }
  155. }
  156. {5}
  157. #class spellup close;