DrFetus

Arachne Raw Script

Dec 21st, 2019
717
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.91 KB | None | 0 0
  1.  
  2. //
  3. // FlowScript decompiled by AtlusScriptLib by TGE (2017)
  4. // In the unfortunate case of any bugs, please report them back to me.
  5. //
  6.  
  7.  
  8. //
  9. // Procedure declarations
  10. //
  11.  
  12. void arachne_proc()
  13. {
  14. set_max_ailment_duration(8, 3);
  15. set_max_ailment_duration(0x2000, 3);
  16. set_max_ailment_duration(0x0100, 4);
  17. set_max_ailment_duration(0x40, 4);
  18. set_max_ailment_duration(0x0400, 4);
  19. set_max_ailment_duration(0x0800, 4);
  20. set_max_ailment_duration(0x1000, 4);
  21. store(rand(99), 0);
  22. run_script_at_action_time();
  23. enable_out_of_turn();
  24. if (!out_of_turn_action() && !action_time_turn())
  25. {
  26. if (!get_local_flag(0x10))
  27. {
  28. store(4, 1);
  29. set_local_flag(0x10);
  30. }
  31. if (retrieve(1) >= 1)
  32. {
  33. store(retrieve(1) - 1, 1);
  34. }
  35. }
  36. else if (out_of_turn_action())
  37. {
  38. if (get_local_flag(20) && action_time_turn())
  39. {
  40. store(4, 1);
  41. clear_local_flag(18);
  42. clear_local_flag(20);
  43. if (get_local_flag(14))
  44. {
  45. clear_local_flag(14);
  46. }
  47. else if (get_local_flag(13))
  48. {
  49. clear_local_flag(13);
  50. }
  51. else if (get_local_flag(12))
  52. {
  53. clear_local_flag(12);
  54. }
  55. else if (get_local_flag(11))
  56. {
  57. clear_local_flag(11);
  58. }
  59. else if (get_local_flag(10))
  60. {
  61. clear_local_flag(10);
  62. }
  63. else if (get_local_flag(9))
  64. {
  65. clear_local_flag(9);
  66. }
  67. else if (get_local_flag(8))
  68. {
  69. clear_local_flag(8);
  70. }
  71. else if (get_local_flag(7))
  72. {
  73. clear_local_flag(7);
  74. }
  75. }
  76. else if (get_local_flag(18) && action_time_turn())
  77. {
  78. store(4, 1);
  79. clear_local_flag(18);
  80. }
  81. if (self_ailment_check(4 + 8))
  82. {
  83. do_nothing_and_display_message(0);
  84. target_self();
  85. if (action_time_turn())
  86. {
  87. clear_persistent_flag(30);
  88. }
  89. return;
  90. }
  91. if (retrieve(1) == 2)
  92. {
  93. action_skill_with_message(515, 1, 654);
  94. target_self();
  95. return;
  96. }
  97. else
  98. {
  99. do_nothing_and_display_message(0);
  100. target_self();
  101. return;
  102. }
  103. }
  104. if (check_persistent_flag(30) && retrieve(1) == 1)
  105. {
  106. action_skill(308);
  107. target_front_row();
  108. if (action_time_turn())
  109. {
  110. clear_persistent_flag(30);
  111. }
  112. return;
  113. }
  114. else if (action_time_turn())
  115. {
  116. clear_persistent_flag(30);
  117. }
  118. if (!get_local_flag(17))
  119. {
  120. if (self_hp_below_threshold(45) || action_count() >= 4)
  121. {
  122. action_skill_with_message(305, 1, 569);
  123. target_standard();
  124. if (self_ailment_check(0x0400) && action_time_turn())
  125. {
  126. set_local_flag(20);
  127. }
  128. return;
  129. }
  130. }
  131. else if (retrieve(1) <= 0 && !get_local_flag(7))
  132. {
  133. action_skill_with_message(305, 1, 569);
  134. target_standard();
  135. if (self_ailment_check(0x0400) && action_time_turn())
  136. {
  137. set_local_flag(20);
  138. }
  139. return;
  140. }
  141. else if (retrieve(1) <= 0 && !get_local_flag(8))
  142. {
  143. action_skill_with_message(305, 2, 569);
  144. target_standard();
  145. if (self_ailment_check(0x0400) && action_time_turn())
  146. {
  147. set_local_flag(20);
  148. }
  149. return;
  150. }
  151. else if (retrieve(1) <= 0 && !get_local_flag(9))
  152. {
  153. action_skill_with_message(305, 3, 569);
  154. target_standard();
  155. if (self_ailment_check(0x0400) && action_time_turn())
  156. {
  157. set_local_flag(20);
  158. }
  159. return;
  160. }
  161. else if (retrieve(1) <= 0 && !get_local_flag(10))
  162. {
  163. action_skill_with_message(305, 4, 569);
  164. target_standard();
  165. if (self_ailment_check(0x0400) && action_time_turn())
  166. {
  167. set_local_flag(20);
  168. }
  169. return;
  170. }
  171. else if (retrieve(1) <= 0 && !get_local_flag(11))
  172. {
  173. action_skill_with_message(305, 5, 569);
  174. target_standard();
  175. if (self_ailment_check(0x0400) && action_time_turn())
  176. {
  177. set_local_flag(20);
  178. }
  179. return;
  180. }
  181. else if (retrieve(1) <= 0 && !get_local_flag(12))
  182. {
  183. action_skill_with_message(305, 6, 569);
  184. target_standard();
  185. if (self_ailment_check(0x0400) && action_time_turn())
  186. {
  187. set_local_flag(20);
  188. }
  189. return;
  190. }
  191. else if (retrieve(1) <= 0 && !get_local_flag(13))
  192. {
  193. action_skill_with_message(305, 7, 569);
  194. target_standard();
  195. if (self_ailment_check(0x0400) && action_time_turn())
  196. {
  197. set_local_flag(20);
  198. }
  199. return;
  200. }
  201. else if (retrieve(1) <= 0 && !get_local_flag(14))
  202. {
  203. action_skill_with_message(305, 8, 569);
  204. target_standard();
  205. if (self_ailment_check(0x0400) && action_time_turn())
  206. {
  207. set_local_flag(20);
  208. }
  209. return;
  210. }
  211. else if (retrieve(1) <= 0)
  212. {
  213. action_skill_with_message(305, 9, 569);
  214. target_standard();
  215. if (self_ailment_check(0x0400) && action_time_turn())
  216. {
  217. set_local_flag(20);
  218. }
  219. return;
  220. }
  221. if (self_hp_below_threshold(15))
  222. {
  223. if (!get_local_flag(6) && !action_time_turn())
  224. {
  225. clear_local_flag(1);
  226. clear_local_flag(2);
  227. clear_local_flag(3);
  228. clear_local_flag(4);
  229. set_local_flag(6);
  230. }
  231. if (!get_local_flag(1))
  232. {
  233. action_skill(307);
  234. target_standard();
  235. if (action_time_turn())
  236. {
  237. set_local_flag(1);
  238. }
  239. return;
  240. }
  241. else if (!get_local_flag(2))
  242. {
  243. action_skill(309);
  244. target_front_row();
  245. if (action_time_turn())
  246. {
  247. set_local_flag(2);
  248. }
  249. return;
  250. }
  251. else
  252. {
  253. action_skill(306);
  254. target_standard();
  255. if (action_time_turn())
  256. {
  257. clear_local_flag(1);
  258. clear_local_flag(2);
  259. }
  260. return;
  261. }
  262. }
  263. else if (self_hp_below_threshold(30))
  264. {
  265. if (!get_local_flag(5) && !action_time_turn())
  266. {
  267. clear_local_flag(1);
  268. clear_local_flag(2);
  269. clear_local_flag(3);
  270. set_local_flag(5);
  271. }
  272. if (!get_local_flag(1))
  273. {
  274. action_skill(307);
  275. target_standard();
  276. if (action_time_turn())
  277. {
  278. set_local_flag(1);
  279. }
  280. return;
  281. }
  282. else if (!get_local_flag(2))
  283. {
  284. action_attack();
  285. target_standard();
  286. if (action_time_turn())
  287. {
  288. set_local_flag(2);
  289. }
  290. return;
  291. }
  292. else if (!get_local_flag(3))
  293. {
  294. action_skill(306);
  295. target_standard();
  296. if (action_time_turn())
  297. {
  298. set_local_flag(3);
  299. }
  300. return;
  301. }
  302. else
  303. {
  304. action_skill(309);
  305. target_front_row();
  306. if (action_time_turn())
  307. {
  308. clear_local_flag(1);
  309. clear_local_flag(2);
  310. clear_local_flag(3);
  311. }
  312. return;
  313. }
  314. }
  315. else if (get_local_flag(17))
  316. {
  317. if (!get_local_flag(1))
  318. {
  319. action_skill(307);
  320. target_standard();
  321. if (action_time_turn())
  322. {
  323. set_local_flag(1);
  324. }
  325. return;
  326. }
  327. else if (!get_local_flag(2))
  328. {
  329. action_attack();
  330. target_standard();
  331. if (action_time_turn())
  332. {
  333. set_local_flag(2);
  334. }
  335. return;
  336. }
  337. else
  338. {
  339. action_skill(306);
  340. target_standard();
  341. if (action_time_turn())
  342. {
  343. clear_local_flag(1);
  344. clear_local_flag(2);
  345. }
  346. return;
  347. }
  348. }
  349. else
  350. {
  351. action_attack();
  352. target_standard();
  353. return;
  354. }
  355. }
Advertisement
Add Comment
Please, Sign In to add comment