Advertisement
kolpastebin

Level 7.ash

Oct 20th, 2014
426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.35 KB | None | 0 0
  1. void QuestLevel7GenerateActionChain(Chain [int] chains)
  2. {
  3. if (my_level() < 7) return;
  4. QuestState state = QuestState("questL07Cyrptic");
  5.  
  6. if (state.finished)
  7. return;
  8.  
  9.  
  10. int default_priority = 0;
  11. if ($effect[human-fish hybrid].have_effect() == 0 && CounterLookup("Rain Monster").CounterMayHitNextTurn() && get_campground()[$item[Little Geneticist DNA-Splicing Lab]] > 0)
  12. default_priority = 40;
  13.  
  14. if (!state.started)
  15. {
  16. chains.listAppend(Chain().ChainAction(ActionVisitURL("council.php")));
  17. return;
  18. }
  19.  
  20. if (get_property_int("cyrptAlcoveEvilness") > 26)
  21. {
  22. if (my_meat() >= 1000)
  23. {
  24. boolean avoid_appending = false;
  25. string waiting_for = "";
  26. Chain c;
  27. if (true)
  28. {
  29. if ($effect[frosty].have_effect() == 0 && $effect[Human-Insect Hybrid].have_effect() == 0)
  30. {
  31. if (chains.count() > 0 && false)
  32. {
  33. avoid_appending = true;
  34. waiting_for = "frost flower";
  35. }
  36. if (get_property("sidequestOrchardCompleted") == "none" || get_property("sidequestNunsCompleted") == "none" || !QuestState("questL12War").started)
  37. {
  38. int main_substats = my_basestat(my_primesubstat());
  39. int substats_remaining = substatsForLevel(my_level() + 1) - main_substats;
  40. if (my_level() <= 10 && (my_level() < 10 || substats_remaining >= 300))
  41. c.ChainPriority(default_priority + 24);
  42. else
  43. c.ChainPriority(default_priority + 60);
  44. }
  45. }
  46. else if (!temporarily_disable_alternate_frosty_uses)
  47. {
  48. if ($effect[Human-Insect Hybrid].have_effect() > 0)
  49. c.ChainPriority(WAR_PRIORITY - 6);
  50. else
  51. c.ChainPriority(WAR_PRIORITY);
  52. }
  53. }
  54.  
  55. if (get_campground()[$item[Little Geneticist DNA-Splicing Lab]] > 0)
  56. {
  57. if ($item[gene tonic: insect].available_amount() == 0 && $effect[human-insect hybrid].have_effect() == 0 && my_daycount() <3 ) //try for potion first
  58. {
  59. avoid_appending = true;
  60. waiting_for = "insect DNA potion";
  61. }
  62. }
  63.  
  64. boolean requiring_offhand = false;
  65. if ($item[Sheila Take a Crossbow].available_amount() >= 2)
  66. {
  67. c.ChainAction(ActionCLICommand("equip offhand Sheila Take a Crossbow"));
  68. requiring_offhand = true;
  69. }
  70. if ($item[hors d'oeuvre tray].available_amount() > 0 && !requiring_offhand)
  71. {
  72. c.ChainRequireEquipment($item[hors d'oeuvre tray]);
  73. requiring_offhand = true;
  74. }
  75.  
  76. if ($item[1-ball].available_amount() > 0)
  77. {
  78. if ($effect[Blessing of Pikachutlotal].have_effect() == 0 && QuestState("questL11Worship").mafia_internal_step >= 4 && get_property_int("hiddenOfficeProgress") >= 1)
  79. {
  80. c.ChainAction(ActionCLICommand("abort use 1-ball in north-east shrine"));
  81. }
  82. else if (!requiring_offhand)
  83. {
  84. requiring_offhand = true;
  85. c.ChainRequireEquipment($item[1-ball]);
  86. }
  87. }
  88. if ($item[buddy bjorn].available_amount() > 0)
  89. c.ChainDesireBjornFamiliar($familiar[cuddlefish]);
  90. if ($item[Sheila Take a Crossbow].available_amount() > 0)
  91. {
  92. c.ChainRequireEquipment($item[Sheila Take a Crossbow]);
  93. if (!requiring_offhand && $item[half a purse].available_amount() > 0)
  94. {
  95. c.ChainRequireEquipment($item[half a purse]);
  96. requiring_offhand = true;
  97. }
  98. }
  99. c.ChainDesireInit(850);
  100. if ($item[over-the-shoulder folder holder].available_amount() > 0 && $item[lord soggyraven's slippers].available_amount() > 0 && $item[furniture dolly].available_amount() > 0)
  101. {
  102. c.ChainAvoidEquipment($item[duonoculars]);
  103. c.ChainAvoidEquipment($item[red shoe]);
  104. c.ChainAvoidEquipment($item[ring of conflict]);
  105. }
  106. c.ChainDesireCombatRate(-25);
  107. c.ChainAction(ActionAdventure($location[the defiled alcove]));
  108. if (!avoid_appending)
  109. chains.listAppend(c);
  110. else
  111. chains.listAppend(Chain().ChainUnimplemented("defiled alcove waiting for " + waiting_for));
  112. }
  113. }
  114. else if (get_property_int("cyrptAlcoveEvilness") > 0)
  115. {
  116. Chain c;
  117. //boss
  118. if (get_property_int("cyrptAlcoveEvilness") <= 25)
  119. {
  120. c.ChainDesireMeat();
  121. c.ChainHackStopTheWasabi();
  122. }
  123. c.ChainAction(ActionAdventure($location[the defiled alcove]));
  124. c.ChainPriority(default_priority);
  125. chains.listAppend(c);
  126. }
  127.  
  128. if (get_property_int("cyrptCrannyEvilness") > 26)
  129. {
  130. if (my_path_id() != PATH_HEAVY_RAINS && $items[spooky putty sheet,empty rain-doh can].available_amount() == 0)
  131. {
  132. Chain c;
  133. c.ChainDesireCombatRate(-25);
  134. c.ChainDesireML(250);
  135. c.ChainAction(ActionAdventure($location[the defiled cranny]));
  136. c.ChainPriority(default_priority);
  137. chains.listAppend(c);
  138. }
  139. else
  140. {
  141. Chain c;
  142. c.ChainUnimplemented("cranny");
  143. c.ChainPriority(default_priority);
  144. chains.listAppend(c);
  145. }
  146. }
  147. else if (get_property_int("cyrptCrannyEvilness") > 0)
  148. {
  149. //boss
  150. Chain c;
  151. if (get_property_int("cyrptCrannyEvilness") <= 25)
  152. {
  153. c.ChainDesireMeat();
  154. c.ChainHackStopTheWasabi();
  155. }
  156. c.ChainAction(ActionAdventure($location[the defiled cranny]));
  157. c.ChainPriority(default_priority);
  158. chains.listAppend(c);
  159. }
  160.  
  161. if (get_property_int("cyrptNicheEvilness") > 26)
  162. {
  163. Chain c;
  164. if (CounterLookup("Rain Monster").CounterMayHitNextTurn() && !$skill[thunder bird].have_skill())
  165. c.ChainPriority(-21);
  166. c.ChainDesireMonster($monster[dirty old lihc]);
  167. c.ChainAction(ActionAdventure($location[the defiled niche]));
  168. c.ChainPriority(default_priority);
  169. chains.listAppend(c);
  170. }
  171. else if (get_property_int("cyrptNicheEvilness") > 0)
  172. {
  173. //boss
  174. Chain c;
  175. c.ChainIgnoreMonstersBanishedInZone();
  176. c.ChainAction(ActionAdventure($location[the defiled niche]));
  177. c.ChainPriority(default_priority);
  178. chains.listAppend(c);
  179. }
  180.  
  181. if (get_property_int("cyrptNookEvilness") > 26)
  182. {
  183. if ($item[evil eye].available_amount() > 0)
  184. {
  185. chains.listAppend(Chain().ChainAction(ActionUseItem($item[evil eye])));
  186. }
  187. else if (dispensary_available() || true)
  188. {
  189. Chain c;
  190.  
  191. boolean using_limited = false;
  192. if (my_daycount() == 1)
  193. {
  194. if ($item[carrot nose].available_amount() > 0 && availableSpleen() >= 3 && $effect[Pla-see-bo].have_effect() == 0)
  195. {
  196. c.ChainAction(ActionAcquireItem($item[carrot juice]));
  197. c.ChainAction(ActionCLICommand("chew carrot juice"));
  198. using_limited = true;
  199. }
  200. if ($item[carrot juice].available_amount() > 0 && availableSpleen() >= 3 && $effect[Pla-see-bo].have_effect() == 0)
  201. {
  202. c.ChainAction(ActionCLICommand("chew carrot juice"));
  203. using_limited = true;
  204. }
  205. }
  206. if ($item[resolution: be happier].available_amount() > 1 && $effect[Joyful Resolve].have_effect() == 0)
  207. {
  208. using_limited = true;
  209. c.ChainAction(ActionUseItem($item[resolution: be happier]));
  210. }
  211. c.ChainDesireItem(400);
  212. c.ChainAction(ActionAdventure($location[the defiled nook]));
  213. c.ChainIgnoreWashaway();
  214. c.ChainPriority(default_priority);
  215. if (!dispensary_available())
  216. c.ChainPriority(40);
  217. else if (CounterWanderingMonsterMayHitInXTurns(2) && using_limited)
  218. c.ChainPriority(10);
  219. else if (CounterWanderingMonsterMayHitInXTurns(7) && using_limited)
  220. c.ChainPriority(3);
  221. if ($effect[Pla-see-bo].have_effect() > 0)
  222. c.ChainPriority(-4);
  223. chains.listAppend(c);
  224. }
  225. else
  226. chains.listAppend(Chain().ChainUnimplemented("no dispensary available"));
  227. }
  228. else if (get_property_int("cyrptNookEvilness") > 0)
  229. {
  230. //boss
  231. Chain c;
  232. c.ChainAction(ActionAdventure($location[the defiled nook]));
  233. c.ChainPriority(default_priority);
  234. chains.listAppend(c);
  235. }
  236.  
  237.  
  238. boolean dragon_up = true;
  239. foreach s in $strings[cyrptAlcoveEvilness,cyrptCrannyEvilness,cyrptNicheEvilness,cyrptNookEvilness]
  240. {
  241. if (get_property_int(s) != 0)
  242. dragon_up = false;
  243. }
  244. if (dragon_up)
  245. {
  246. Chain c;
  247. c.ChainDesireEasyFight();
  248.  
  249. if (my_path_id() == PATH_HEAVY_RAINS)
  250. c.ChainRequireFamiliar($familiar[warbear drone]);
  251. c.ChainPreferWanderingMonster();
  252. c.ChainAction(ActionVisitURL("crypt.php?action=heart"));
  253. c.ChainAction(ActionVisitURL("choice.php?whichchoice=527&option=1"));
  254. c.ChainAction(ActionRunCombat());
  255. c.ChainAction(ActionVisitURL("council.php")); //is this some sort of joke, commander shepard? are you calling in just to cut us off again?
  256. c.ChainPriority(default_priority);
  257. c.ChainSetWillUseAdventure();
  258. chains.listAppend(c);
  259. }
  260.  
  261. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement