Advertisement
Guest User

Untitled

a guest
Jul 11th, 2017
467
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.35 KB | None | 0 0
  1. // LORD AHRIMAN
  2. //
  3. // Leader of the Vanguard
  4. // May send astral stalker against us
  5. // Will seek tablets and will not sell them
  6. // Has to reflect any good relationship we have with Vanguard
  7. // Once we have joined Vanguard conversation will reflect this
  8.  
  9. const int Flag_First_Encounter = 0;
  10. const int Flag_First_Exit = 1;
  11. const int Flag_First_Exit_Talk = 2;
  12. const int Flag_Recruited_Into_Party = 3;
  13. const int Flag_Mentioned_White_Owl = 4;
  14. const int Flag_Mentioned_White_Owl_Again = 5;
  15. const int Flag_Destroyed_Clock = 6;
  16. const int Flag_Saved_Balderdash = 7;
  17. const int Flag_Rescued_Princess = 8;
  18. const int Flag_Got_Seahorse_Chariot = 9;
  19. const int Flag_Recovered_Pipes_Majestyk = 10;
  20. const int Flag_Killed_Kraken = 11;
  21. const int Flag_Signaled_King = 12;
  22. const int Flag_Mandarin_Rumored_Dead = 13;
  23. const int Flag_Conachur_Imprisoned = 14;
  24. const int Flag_Sent_To_Axis_Gaol = 15;
  25. const int Flag_Gave_Havoc_Seed_Away = 16;
  26. const int Flag_Inducted_Into_Vanguard = 17;
  27. const int Flag_Took_Havoc_Seed = 18;
  28. const int Flag_Visited_Owl_Lair = 19;
  29. const int Flag_Knows_We_Killed_Stalker = 20;
  30. const int Flag_Flabbergasted_At_Oblivion_Escape = 21;
  31. const int Flag_Checked_Owl_Gift = 22;
  32. const int Flag_Took_LACHESIS = 23;
  33. const int Flag_Took_NEMESIS = 24;
  34. const int Flag_Took_ATROPOS = 25;
  35. const int Flag_Took_MEGAERA = 26;
  36. const int Flag_Took_SCYLLA = 27;
  37. const int Flag_Took_ARACHNE = 28;
  38. const int Flag_Took_AURORA = 29;
  39. const int Flag_Took_GORGON = 30;
  40. const int Flag_Took_THANATOS = 31;
  41. const int Flag_Noted_Exemplar_Codex = 32;
  42. const int Flag_Noted_Hex_Curse = 33;
  43. const int Flag_Gloated_Hex_Curse = 34;
  44. const int Flag_Noted_Haunted_Wasteland = 35;
  45. const int Flag_Noted_Deathstone_Vision = 36;
  46. const int Flag_Rewound_Clock = 37;
  47. const int Flag_Cursed_The_Party = 38;
  48. const int Flag_Teleported_The_Party = 39;
  49. const int Flag_Called_Astral_Stalker = 40;
  50. const int Flag_Attempted_Fight = 41;
  51. const int Flag_Induction_Reminder = 42;
  52. const int Flag_Congratulated_Capture = 43;
  53. const int Flag_Has_Spoken_Of_Havoc_Seed = 44;
  54.  
  55. const int ITEM_LACHESIS = 1;
  56. const int ITEM_NEMESIS = 2;
  57. const int ITEM_ATROPOS = 3;
  58. const int ITEM_MEGAERA = 4;
  59. const int ITEM_SCYLLA = 5;
  60. const int ITEM_ARACHNE = 6;
  61. const int ITEM_AURORA = 7;
  62. const int ITEM_GORGON = 8;
  63.  
  64. const int ITEM_Exemplar_Codex = 368;
  65. const int ITEM_Thanatos_Tablet = 403;
  66. const int ITEM_Havoc_Seed = 381;
  67. const int ITEM_Pipes_Majestyk = 256;
  68. const int ITEM_World_Manager_Monthly = 690;
  69. const int ITEM_World_Manager_Monthly_Page1 = 691;
  70. const int ITEM_World_Manager_Monthly_Page2 = 692;
  71.  
  72. const int NPC_The_White_Owl = 50;
  73. const int NPC_Lt_Shrike = 20;
  74. const int NPC_Elias_Conachur = 14;
  75. const int NPC_Balderdash = 39;
  76. const int NPC_Black_Pierre = 32;
  77. const int NPC_Khan_Raji = 37;
  78. const int NPC_Nefarge = 23;
  79. const int NPC_Princess_Dahlia = 45;
  80. const int NPC_Green_Mandarin = 36;
  81. const int NPC_Nebulon = 53;
  82. const int NPC_Zyrinx = 54;
  83. const int NPC_Kraken = 30;
  84. const int NPC_AstralStalker = 63;
  85.  
  86. const int SPELL_Curse = 203;
  87. const int MAX_SPELL_POWER_LEVEL = 7;
  88.  
  89. const int ADJECTIVE_CODE_DEAD = 27;
  90.  
  91. const int CHECKPOINT_Haunted_Wastes = 110;
  92. const int CHECKPOINT_Snark_Mistress = 46;
  93. const int CHECKPOINT_Skulheim = 71;
  94. const int CHECKPOINT_OBLIVION = 189;
  95. const int XPOS_COSMIC_OBLIVION = 31;
  96. const int YPOS_COSMIC_OBLIVION = 127;
  97.  
  98. const int DISPOSITION_NEUTRAL = 0;
  99. const int DISPOSITION_AMITY = 1;
  100. const int DISPOSITION_ENMITY = 2;
  101. const int DISPOSITION_JOINED_VANGUARD = 3;
  102. const int DISPOSITION_JOINED_BETRAYED = 4;
  103.  
  104. const int COMMENT_MAX = 10;
  105. const int COMMENT_BASE_NEUTRAL = 60;
  106. const int COMMENT_BASE_AMITY = 70;
  107. const int COMMENT_BASE_ENMITY = 80;
  108. const int COMMENT_BASE_JOINED_VANGUARD = 90;
  109. const int COMMENT_BASE_JOINED_BETRAYED = 100;
  110.  
  111. const int ACTION_SPEAK = 0;
  112. const int ACTION_FIGHT = 1;
  113. const int ACTION_CURSE = 2;
  114. const int ACTION_STALKER = 3;
  115. const int ACTION_TAKE = 4;
  116. const int ACTION_TELEPORT = 5;
  117.  
  118. const int LOOKUP_ROWSIZE = 12;
  119. const int LOOKUP_FLAGSET = 0;
  120. const int LOOKUP_ACTION = 1;
  121. const int LOOKUP_GLOBALFLAG = 2;
  122. const int LOOKUP_CHECKPOINT = 3;
  123. const int LOOKUP_ITEMINDEX = 4;
  124. const int LOOKUP_NEUTRALTEXT = 5;
  125. const int LOOKUP_AMITYTEXT = 6;
  126. const int LOOKUP_ENMITYTEXT = 7;
  127. const int LOOKUP_JOINEDTEXT = 8;
  128. const int LOOKUP_BETRAYEDTEXT = 9;
  129. const int LOOKUP_NARRATIVE = 10;
  130. const int LOOKUP_MODIFIER = 11;
  131.  
  132. // Exclude(10,11,12,13,14,15,16,17,18,19,20);
  133. int [] Reaction_Lookup =
  134. {
  135. // FLAGSET,ACTION,GLOBALFLAG,CHECKPOINT,ITEMINDEX,NEUTRALTEXT,AMITYTEXT,ENMITYTEXT,JOINEDTEXT,BETRAYEDTEXT,NARRATIVE,MODIFIER
  136. Flag_Destroyed_Clock, ACTION_FIGHT, cGLOBAL_DESTROYED_CLOCK,0,0,8,8,8,9,9,10,-10,
  137. Flag_Rewound_Clock, ACTION_FIGHT, cGLOBAL_REWOUND_THE_CLOCK,0,0,8,8,8,9,9,10,-10,
  138. Flag_Saved_Balderdash, ACTION_TELEPORT, cGLOBAL_SAVED_BALDERDASH,0,0,4,4,4,6,6,5,-2,
  139. Flag_Rescued_Princess, ACTION_CURSE, cGLOBAL_RESCUED_PRINCESS,0,0,11,11,11,12,12,13,-2,
  140. Flag_Got_Seahorse_Chariot, ACTION_SPEAK, cGLOBAL_GOT_THE_SEAHORSE_CHARIOT,0,0,14,14,15,16,16,0,-1,
  141. Flag_Recovered_Pipes_Majestyk, ACTION_SPEAK, cGLOBAL_RECOVERED_PIPES_MAJESTYK,0,0,17,17,17,18,18,0,0,
  142. Flag_Killed_Kraken, ACTION_STALKER, cGLOBAL_KILLED_KRAKEN,0,0,19,19,19,21,21,20,-2,
  143. Flag_Gave_Havoc_Seed_Away, ACTION_FIGHT, cGLOBAL_GAVE_HAVOC_SEED_TO_ZYRINX,0,0,22,22,22,23,23,10,-10,
  144. Flag_Gave_Havoc_Seed_Away, ACTION_FIGHT, cGLOBAL_GAVE_HAVOC_SEED_TO_NEBULON,0,0,22,22,22,23,23,10,-10,
  145. Flag_Took_Havoc_Seed, ACTION_SPEAK, 0,0,ITEM_Havoc_Seed,33,33,34,35,0,0,3,
  146. Flag_Inducted_Into_Vanguard, ACTION_SPEAK, cGLOBAL_INDUCTED_INTO_VANGUARD,0,0,41,41,42,41,41,0,5,
  147. Flag_Signaled_King, ACTION_SPEAK, cGLOBAL_SIGNALED_KING,0,0,43,43,43,44,45,0,-1,
  148. Flag_Mandarin_Rumored_Dead, ACTION_SPEAK, cGLOBAL_MANDARIN_RUMORED_DEAD,0,0,46,46,46,47,47,0,2,
  149. Flag_Conachur_Imprisoned, ACTION_SPEAK, cGLOBAL_CONACHUR_WAS_IMPRISONED,0,0,48,48,48,49,49,0,2,
  150. Flag_Sent_To_Axis_Gaol, ACTION_SPEAK, cGLOBAL_SENT_TO_AXIS_GAOL,0,0,50,50,50,51,51,0,-1,
  151. Flag_Took_LACHESIS, ACTION_TAKE, 0,0,ITEM_LACHESIS,36,38,37,39,40,0,0,
  152. Flag_Took_NEMESIS, ACTION_TAKE, 0,0,ITEM_NEMESIS,36,38,37,39,40,0,1,
  153. Flag_Took_ATROPOS, ACTION_TAKE, 0,0,ITEM_ATROPOS,36,38,37,39,40,0,1,
  154. Flag_Took_MEGAERA, ACTION_TAKE, 0,0,ITEM_MEGAERA,36,38,37,39,40,0,1,
  155. Flag_Took_SCYLLA, ACTION_TAKE, 0,0,ITEM_SCYLLA,36,38,37,39,40,0,1,
  156. Flag_Took_ARACHNE, ACTION_TAKE, 0,0,ITEM_ARACHNE,36,38,37,39,40,0,1,
  157. Flag_Took_AURORA, ACTION_TAKE, 0,0,ITEM_AURORA,36,38,37,39,40,0,1,
  158. Flag_Took_GORGON, ACTION_TAKE, 0,0,ITEM_GORGON,36,38,37,39,40,0,1,
  159. Flag_Took_THANATOS, ACTION_TAKE, 0,0,ITEM_Thanatos_Tablet,36,38,37,39,40,0,1,
  160. Flag_Noted_Exemplar_Codex, ACTION_SPEAK, 0,0,ITEM_Exemplar_Codex,54,54,54,55,55,0,-1,
  161. Flag_Checked_Owl_Gift, ACTION_SPEAK, cGLOBAL_GIVEN_CHOICE_OF_ARTIFACTS,0,0,52,52,52,53,53,0,-1,
  162. Flag_Noted_Haunted_Wasteland, ACTION_SPEAK, 0,CHECKPOINT_Haunted_Wastes,0,56,56,56,57,57,0,1,
  163. Flag_Noted_Deathstone_Vision, ACTION_SPEAK, cGLOBAL_TOUCHED_THE_DEATHSTONE,0,0,24,24,24,25,25,0,1,
  164. -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
  165. };
  166.  
  167. bool TestReaction(int globeflag, int chekpt, int itemidx)
  168. {
  169. bool testvalue = false;
  170.  
  171. if(globeflag != 0)testvalue = GetGlobal(globeflag);
  172.  
  173. if(chekpt != 0)testvalue = PartyVisited(chekpt);
  174.  
  175. if(itemidx != 0)testvalue = FindItem(itemidx);
  176.  
  177. return(testvalue);
  178. }
  179.  
  180. void DoAction(int actidx, int itemkey, int atext, int narrater, int modifier,int disposed)
  181. {
  182. if(modifier != 0 && actidx != ACTION_TAKE)
  183. {
  184. if(modifier < 0)
  185. {
  186. ModifyEnmity(cPARTY_AGENTSOFWHITEOWL,-1*modifier);
  187. }
  188. else
  189. {
  190. ModifyAmity(cPARTY_AGENTSOFWHITEOWL,modifier);
  191. }
  192. }
  193.  
  194. if(atext != 0)Say(atext);
  195.  
  196. if(narrater != 0)Narrative(narrater);
  197.  
  198. switch(actidx)
  199. {
  200. case ACTION_SPEAK:
  201. break;
  202.  
  203. case ACTION_FIGHT:
  204. MeStopRunning();
  205. Fight();
  206. break;
  207.  
  208. case ACTION_CURSE:
  209. MeStopRunning();
  210.  
  211. if(CastSpell(SPELL_Curse,MAX_SPELL_POWER_LEVEL)==true)
  212. {
  213. Say(111);
  214. }
  215. else
  216. {
  217. Say(141);
  218. }
  219.  
  220. Set(Flag_Cursed_The_Party);
  221. ExitNow();
  222. break;
  223.  
  224. case ACTION_STALKER:
  225. MeStopRunning();
  226. Set(Flag_Called_Astral_Stalker);
  227. SummonStalker();
  228. ExitNow();
  229. break;
  230.  
  231. case ACTION_TAKE:
  232. if(FindItem(itemkey) == true)
  233. {
  234. if(TakeItem(itemkey,2) == true)
  235. {
  236. ModifyEnmity(cPARTY_AGENTSOFWHITEOWL,-1*modifier);
  237. ModifyAmity(cPARTY_AGENTSOFWHITEOWL,modifier);
  238.  
  239. if(disposed < DISPOSITION_JOINED_VANGUARD)
  240. {
  241. RandomSay(115,116,117);
  242. }
  243. else
  244. {
  245. RandomSay(118,119,120);
  246. }
  247.  
  248. ExitNow();
  249. }
  250. else
  251. {
  252. ModifyEnmity(cPARTY_AGENTSOFWHITEOWL,modifier);
  253. ModifyAmity(cPARTY_AGENTSOFWHITEOWL,-1*modifier);
  254.  
  255. RandomSay(30,31,32);
  256.  
  257. MeStopRunning();
  258. Fight();
  259. }
  260. }
  261. break;
  262.  
  263. case ACTION_TELEPORT:
  264. Set(Flag_Teleported_The_Party);
  265.  
  266. DimensionDoor(); // save current location into teleport door buffer
  267. Teleport(XPOS_COSMIC_OBLIVION ,YPOS_COSMIC_OBLIVION ,cCOLOR_YELLOW,cEAST);
  268. Say(3);
  269.  
  270. MeStopRunning();
  271. ExitNow();
  272. break;
  273.  
  274. default:
  275. break;
  276. }
  277.  
  278. return;
  279. }
  280.  
  281. bool Reactions(int disposed)
  282. {
  283. int indexbase = 0;
  284. int flagset = 0;
  285. int action = -1;
  286. int keyindex = -1;
  287. int text = -1;
  288. int narrate = -1;
  289. int aemod = -1;
  290. int globalflag = -1;
  291. int chkpt = -1;
  292. bool reacted = false;
  293.  
  294. // step through the data 12 ints at a time
  295.  
  296. indexbase = 0;
  297.  
  298. while(Reaction_Lookup[indexbase] != -1 and !reacted)
  299. {
  300. flagset = Reaction_Lookup[indexbase];
  301.  
  302. if(Get(flagset) == false)
  303. {
  304. globalflag = Reaction_Lookup[indexbase + LOOKUP_GLOBALFLAG];
  305. chkpt = Reaction_Lookup[indexbase + LOOKUP_CHECKPOINT];
  306. keyindex = Reaction_Lookup[indexbase + LOOKUP_ITEMINDEX];
  307.  
  308. // test to see if an event occurred which requires a reaction from Ahriman
  309. if(TestReaction(globalflag,chkpt,keyindex) == true)
  310. {
  311. // we will not do this check at encounter any more
  312. Set(flagset);
  313.  
  314. // now Ahriman reacts to change in game logic
  315. action = Reaction_Lookup[indexbase + LOOKUP_ACTION];
  316. text = Reaction_Lookup[indexbase + LOOKUP_NEUTRALTEXT + disposed];
  317. narrate = Reaction_Lookup[indexbase + LOOKUP_NARRATIVE];
  318. aemod = Reaction_Lookup[indexbase + LOOKUP_MODIFIER];
  319.  
  320. // carry out the action assigned with this event
  321. DoAction(action, keyindex,text,narrate,aemod,disposed);
  322.  
  323. // set reacted to true to escape this loop check
  324. reacted = true;
  325. }
  326. }
  327.  
  328. indexbase += LOOKUP_ROWSIZE;
  329. }
  330.  
  331. return(reacted);
  332. }
  333.  
  334. int Disposition()
  335. {
  336. int disposed = DISPOSITION_NEUTRAL;
  337.  
  338. if(GetGlobal(cGLOBAL_INDUCTED_INTO_VANGUARD) == true)
  339. {
  340. disposed = (Amicable()==true) ? DISPOSITION_JOINED_VANGUARD : DISPOSITION_JOINED_BETRAYED;
  341. }
  342. else
  343. {
  344. if(Amicable()==true)
  345. {
  346. disposed = DISPOSITION_AMITY;
  347. }
  348. else
  349. {
  350. if(GetEnmity() > GetAmity())
  351. {
  352. disposed = DISPOSITION_ENMITY;
  353. }
  354. }
  355. }
  356.  
  357. return(disposed);
  358. }
  359.  
  360. bool OnSubject_YOU(int querytype)
  361. {
  362. Say(121,122);
  363.  
  364. return(true);
  365. }
  366.  
  367. bool OnSubject_JOB(int querytype)
  368. {
  369. Say(123,124);
  370.  
  371. return(true);
  372. }
  373.  
  374. bool OnSubject_ENLIST(int querytype)
  375. {
  376. if(GetGlobal(cGLOBAL_INDUCTED_INTO_VANGUARD) == true)
  377. {
  378. Say(142);
  379.  
  380. return(true);
  381. }
  382.  
  383. if(IsAlive(NPC_Lt_Shrike) == false)
  384. {
  385. Say(144);
  386.  
  387. return(true);
  388. }
  389.  
  390. switch(querytype)
  391. {
  392. case cDISPATCH_WHERE:
  393. Say(150,149);
  394. break;
  395.  
  396. case cDISPATCH_WHO:
  397. // if we have already met Shrike in Kublai Axis
  398. if(HasMetNPC(NPC_Lt_Shrike)==true)
  399. {
  400. Say(147);
  401. }
  402. else
  403. {
  404. Say(148, 149);
  405. }
  406. break;
  407.  
  408. default:
  409. RandomSay(148,149,150);
  410. break;
  411. }
  412.  
  413. return(true);
  414. }
  415.  
  416. bool OnSubject_OWL(int querytype)
  417. {
  418. int adj;
  419.  
  420. switch(querytype)
  421. {
  422. case cDISPATCH_WHERE:
  423.  
  424. if(HasMetNPC(NPC_The_White_Owl)==true)
  425. {
  426. Say(129);
  427. }
  428. else
  429. {
  430. Say(128);
  431. }
  432.  
  433. break;
  434.  
  435. case cDISPATCH_DECLARE:
  436.  
  437. adj = GetDispatch(cDISPATCH_ADJECTIVE);
  438.  
  439. if(adj == ADJECTIVE_CODE_DEAD)
  440. {
  441. if(HasMetNPC(NPC_The_White_Owl)==true)
  442. {
  443. Say(130);
  444. }
  445. else
  446. {
  447. Say(127);
  448. }
  449. }
  450. else
  451. {
  452. Say(125,126);
  453. }
  454.  
  455. break;
  456.  
  457. default:
  458. Say(125,126);
  459. break;
  460. }
  461.  
  462. return(true);
  463. }
  464.  
  465. bool OnSubject_BALDERDASH(int querytype)
  466. {
  467. if(Get(Flag_Saved_Balderdash)==true)
  468. {
  469. Say(151);
  470. }
  471. else
  472. {
  473. if(IsAlive(NPC_Balderdash) == false)
  474. {
  475. if(KilledByParty(NPC_Balderdash) == true)
  476. {
  477. Say(143);
  478. }
  479. else
  480. {
  481. Say(152);
  482. }
  483. }
  484. else
  485. {
  486. Say(151);
  487. }
  488. }
  489.  
  490. return(true);
  491. }
  492.  
  493. bool OnSubject_BLACKPIERRE(int querytype)
  494. {
  495. if(IsAlive(NPC_Black_Pierre) == false)
  496. {
  497. if(KilledByParty(NPC_Black_Pierre) == true)
  498. {
  499. Say(144);
  500. }
  501. else
  502. {
  503. Say(153);
  504. }
  505. }
  506. else
  507. {
  508. if(HasMetNPC(NPC_Black_Pierre)==true)
  509. {
  510. Say(154);
  511. }
  512. else
  513. {
  514. Say(155);
  515. }
  516. }
  517.  
  518. return(true);
  519. }
  520.  
  521. bool OnSubject_ELIASCONACH(int querytype)
  522. {
  523. if(Get(Flag_Conachur_Imprisoned)==true)
  524. {
  525. if(Get(Flag_Congratulated_Capture) == false)
  526. {
  527. Say(161);
  528.  
  529. Set(Flag_Congratulated_Capture);
  530. }
  531. else
  532. {
  533. Say(159,160);
  534. }
  535. }
  536. else
  537. {
  538. if(IsAlive(NPC_Elias_Conachur) == true)
  539. {
  540. if(InParty(NPC_Elias_Conachur) == true)
  541. {
  542. Say(156);
  543. }
  544. else
  545. {
  546. Say(162,163);
  547. }
  548. }
  549. else
  550. {
  551. if(KilledByParty(NPC_Elias_Conachur) == true)
  552. {
  553. Say(143);
  554.  
  555. if(InParty(NPC_Elias_Conachur) == true)
  556. {
  557. Say(157);
  558. }
  559. }
  560. else
  561. {
  562. Say(158);
  563. }
  564. }
  565. }
  566.  
  567.  
  568. return(true);
  569. }
  570.  
  571. bool OnSubject_SHRIKE(int querytype)
  572. {
  573. if(KilledByParty(NPC_Lt_Shrike)==true)
  574. {
  575. Say(144);
  576. }
  577. else
  578. {
  579. if(HasMetNPC(NPC_Lt_Shrike)==true)
  580. {
  581. if(Get(Flag_Inducted_Into_Vanguard)==true)
  582. {
  583. RandomSay(164,165,166);
  584. }
  585. else
  586. {
  587. Say(148,149);
  588. }
  589. }
  590. else
  591. {
  592. Say(148,149);
  593. }
  594. }
  595.  
  596. return(true);
  597. }
  598.  
  599. bool OnSubject_GREENMAND(int querytype)
  600. {
  601. if(Get(Flag_Mandarin_Rumored_Dead)==true)
  602. {
  603. Say(167);
  604. }
  605. else
  606. {
  607. if(HasMetNPC(NPC_Green_Mandarin)==true)
  608. {
  609. if(KilledByParty(NPC_Green_Mandarin)==true)
  610. {
  611. Say(143);
  612. }
  613. else
  614. {
  615. Say(168);
  616. }
  617. }
  618. else
  619. {
  620. Say(169);
  621. }
  622. }
  623.  
  624. return(true);
  625. }
  626.  
  627. bool OnSubject_HAVOCSEED(int querytype)
  628. {
  629. switch(querytype)
  630. {
  631. case cDISPATCH_WHERE:
  632. if(Get(Flag_Noted_Haunted_Wasteland) == true)
  633. {
  634. Say(176);
  635. }
  636.  
  637. Say(173);
  638. break;
  639.  
  640. default:
  641. if(Get(Flag_Has_Spoken_Of_Havoc_Seed)==false)
  642. {
  643. Say(175);
  644.  
  645. Set(Flag_Has_Spoken_Of_Havoc_Seed);
  646. }
  647.  
  648. if(Get(Flag_Noted_Deathstone_Vision) == true)
  649. {
  650. Say(174);
  651. }
  652.  
  653. RandomSay(170,171,172);
  654. break;
  655. }
  656. return(true);
  657. }
  658.  
  659. bool OnSubject_HYPERBOREA(int querytype)
  660. {
  661. Say(177);
  662.  
  663. return(true);
  664. }
  665.  
  666. bool OnSubject_KHANRAJI(int querytype)
  667. {
  668. if(IsAlive(NPC_Khan_Raji) == false)
  669. {
  670. if(KilledByParty(NPC_Khan_Raji) == true)
  671. {
  672. Say(143);
  673. }
  674. else
  675. {
  676. Say(178);
  677. }
  678. }
  679. else
  680. {
  681. if(HasMetNPC(NPC_Khan_Raji)==true)
  682. {
  683. Say(179);
  684. }
  685. else
  686. {
  687. Say(180);
  688. }
  689. }
  690.  
  691. return(true);
  692. }
  693.  
  694. bool OnSubject_KRAKEN(int querytype)
  695. {
  696. if(Get(Flag_Killed_Kraken)==true)
  697. {
  698. Say(181,182);
  699. }
  700. else
  701. {
  702. if(IsAlive(NPC_Kraken) == false)
  703. {
  704. Say(183,184);
  705. }
  706. else
  707. {
  708. Say(185);
  709. }
  710. }
  711.  
  712. return(true);
  713. }
  714.  
  715. bool OnSubject_KUBLAIAXIS(int querytype)
  716. {
  717. if(GetGlobal(cGLOBAL_INDUCTED_INTO_VANGUARD)==true)
  718. {
  719. Say(186,187);
  720. }
  721. else
  722. {
  723. Say(188,189);
  724. }
  725.  
  726. return(true);
  727. }
  728.  
  729. bool OnSubject_MRNEBULON(int querytype)
  730. {
  731. Say(151);
  732.  
  733. return(true);
  734. }
  735.  
  736. bool OnSubject_MRZYRINX(int querytype)
  737. {
  738. Say(151);
  739.  
  740. return(true);
  741. }
  742.  
  743. bool OnSubject_NAGA(int querytype)
  744. {
  745. Say(190,191);
  746.  
  747. return(true);
  748. }
  749.  
  750. bool OnSubject_NEFARGE(int querytype)
  751. {
  752. if(IsAlive(NPC_Nefarge) == false)
  753. {
  754. if(KilledByParty(NPC_Nefarge) == true)
  755. {
  756. Say(144);
  757. }
  758. else
  759. {
  760. Say(192);
  761. }
  762. }
  763. else
  764. {
  765. if(HasMetNPC(NPC_Nefarge)==true)
  766. {
  767. Say(193);
  768. }
  769. else
  770. {
  771. Say(194);
  772. }
  773. }
  774.  
  775. return(true);
  776. }
  777.  
  778. bool OnSubject_NULLSPACE(int querytype)
  779. {
  780. Say(195,196);
  781.  
  782. if(Get(Flag_Flabbergasted_At_Oblivion_Escape)==true)
  783. {
  784. Say(200);
  785. }
  786.  
  787. return(true);
  788. }
  789.  
  790. bool OnSubject_PALACE(int querytype)
  791. {
  792. Say(197);
  793.  
  794. return(true);
  795. }
  796.  
  797. bool OnSubject_PIPES(int querytype)
  798. {
  799. Say(198);
  800.  
  801. return(true);
  802. }
  803.  
  804. bool OnSubject_PIRATE(int querytype)
  805. {
  806. Say(199);
  807.  
  808. return(true);
  809. }
  810.  
  811. bool OnSubject_PRINCESS(int querytype)
  812. {
  813. if(IsAlive(NPC_Princess_Dahlia) == false)
  814. {
  815. if(KilledByParty(NPC_Princess_Dahlia) == true)
  816. {
  817. Say(201);
  818. }
  819. else
  820. {
  821. Say(202);
  822. }
  823. }
  824. else
  825. {
  826. if(HasMetNPC(NPC_Princess_Dahlia) == true)
  827. {
  828. if(Get(Flag_Rescued_Princess) == true)
  829. {
  830. Say(203);
  831. }
  832. else
  833. {
  834. Say(207);
  835.  
  836. RandomSay(204,205,206);
  837. }
  838. }
  839. else
  840. {
  841. RandomSay(204,205,206);
  842. }
  843. }
  844.  
  845. return(true);
  846. }
  847.  
  848. bool OnSubject_PRISON(int querytype)
  849. {
  850. if(Get(Flag_Sent_To_Axis_Gaol)==true)
  851. {
  852. if(Get(Flag_Inducted_Into_Vanguard)==true)
  853. {
  854. Say(208);
  855. }
  856. else
  857. {
  858. RandomSay(209,210,211);
  859. }
  860. }
  861. else
  862. {
  863. Say(210);
  864. }
  865.  
  866. return(true);
  867. }
  868.  
  869. bool OnSubject_SACRIFICE(int querytype)
  870. {
  871. return(OnSubject_PRINCESS(querytype));
  872. }
  873.  
  874. bool OnSubject_SARGASSO(int querytype)
  875. {
  876. return(OnSubject_KRAKEN(querytype));
  877. }
  878.  
  879. bool OnSubject_SHELACH(int querytype)
  880. {
  881. if(GetGlobal(cGLOBAL_DEFEATED_SHELACH) == true)
  882. {
  883. Say(212);
  884.  
  885. return(true);
  886. }
  887.  
  888. if(Get(Flag_Rescued_Princess)==true)
  889. {
  890. Say(212);
  891.  
  892. return(true);
  893. }
  894.  
  895. switch(querytype)
  896. {
  897. case cDISPATCH_WHERE:
  898. Say(222);
  899. break;
  900.  
  901. default:
  902. RandomSay(223,224,225);
  903. break;
  904. }
  905.  
  906. return(true);
  907. }
  908.  
  909. bool OnSubject_SKULHEIM(int querytype)
  910. {
  911. if(PartyVisited(CHECKPOINT_Skulheim) == true)
  912. {
  913. Say(219);
  914. }
  915.  
  916. RandomSay(213,215,217);
  917.  
  918. if(Get(Flag_Rescued_Princess)==true)
  919. {
  920. Say(221);
  921.  
  922. return(true);
  923. }
  924.  
  925. return(true);
  926. }
  927.  
  928. bool OnSubject_SNARKMISTRES(int querytype)
  929. {
  930. if(PartyVisited(CHECKPOINT_Snark_Mistress)==true)
  931. {
  932. Say(220);
  933. }
  934.  
  935. RandomSay(214,216,218);
  936.  
  937. return(true);
  938. }
  939.  
  940. bool OnEncounter(int value)
  941. {
  942. int count = 0;
  943. int attitude = 0;
  944. int textbase = 0;
  945.  
  946. count = GetCounter(0);
  947. attitude = Disposition();
  948. textbase = COMMENT_BASE_NEUTRAL + (COMMENT_MAX * attitude);
  949.  
  950. if(count >= COMMENT_MAX) count=0;
  951.  
  952. SetCounter(0,count + 1);
  953.  
  954. if(Get(Flag_First_Encounter)==false)
  955. {
  956. Narrative(1);
  957.  
  958. Set(Flag_First_Encounter);
  959. }
  960.  
  961. if(Get(Flag_Teleported_The_Party)==true and Get(Flag_Flabbergasted_At_Oblivion_Escape)==false)
  962. {
  963. Set(Flag_Flabbergasted_At_Oblivion_Escape);
  964.  
  965. Say(58);
  966. }
  967.  
  968. if(Get(Flag_Called_Astral_Stalker)==true and
  969. Get(Flag_Knows_We_Killed_Stalker)==false and
  970. KilledByParty(NPC_AstralStalker) == true
  971. )
  972. {
  973. Set(Flag_Knows_We_Killed_Stalker);
  974.  
  975. Say(59);
  976. }
  977.  
  978. if(Get(Flag_Cursed_The_Party)==true and Get(Flag_Gloated_Hex_Curse)==false)
  979. {
  980. Say(113);
  981.  
  982. Set(Flag_Gloated_Hex_Curse);
  983. }
  984.  
  985. if(Reactions(attitude)==false)
  986. {
  987. Say(textbase + count);
  988. }
  989.  
  990. return(true);
  991. }
  992.  
  993. bool OnExitEncounter(int value)
  994. {
  995. if(Get(Flag_First_Exit)==false)
  996. {
  997. Say(114);
  998.  
  999. Set(Flag_First_Exit);
  1000. }
  1001. else
  1002. {
  1003. RandomSay(114,139,140);
  1004. }
  1005.  
  1006. if(Get(Flag_Cursed_The_Party) == true and
  1007. Get(Flag_Noted_Hex_Curse) == false
  1008. )
  1009. {
  1010. Narrative(112);
  1011.  
  1012. Set(Flag_Noted_Hex_Curse);
  1013. }
  1014.  
  1015. return(true);
  1016. }
  1017.  
  1018. bool OnExitTalk(int value)
  1019. {
  1020. if(Get(Flag_First_Exit_Talk)==false)
  1021. {
  1022. //*TODO
  1023.  
  1024. Set(Flag_First_Exit_Talk);
  1025.  
  1026. return(true);
  1027. }
  1028.  
  1029. if(Get(Flag_Inducted_Into_Vanguard)==true and
  1030. Get(Flag_Induction_Reminder) == false
  1031. )
  1032. {
  1033. Say(138);
  1034.  
  1035. Set(Flag_Induction_Reminder);
  1036. }
  1037.  
  1038. return(true);
  1039. }
  1040.  
  1041. bool OnFightFail(int value)
  1042. {
  1043. if(Get(Flag_Attempted_Fight)==false)
  1044. {
  1045. Say(26);
  1046.  
  1047. Set(Flag_Attempted_Fight);
  1048. }
  1049. else
  1050. {
  1051. RandomSay(27,28,29);
  1052. }
  1053.  
  1054. return(true);
  1055. }
  1056.  
  1057. bool OnMindRead(int value)
  1058. {
  1059. RandomSay(131,132,133);
  1060.  
  1061. return(true);
  1062. }
  1063.  
  1064. bool OnGiveItem(int value)
  1065. {
  1066. bool btest = false;
  1067.  
  1068. switch(value)
  1069. {
  1070. case ITEM_Havoc_Seed:
  1071.  
  1072. // make sure it is identified for us
  1073. IdentifyMouse();
  1074.  
  1075. Narrative(137);
  1076.  
  1077. if(Get(Flag_Inducted_Into_Vanguard)==true)
  1078. {
  1079. Say(134);
  1080. }
  1081. else
  1082. {
  1083. Say(135);
  1084. }
  1085.  
  1086. Narrative(136);
  1087.  
  1088. MeStopRunning();
  1089. Fight();
  1090.  
  1091. btest = true;
  1092.  
  1093. break;
  1094.  
  1095. case ITEM_Pipes_Majestyk:
  1096. // make sure it is identified for us
  1097. IdentifyMouse();
  1098.  
  1099. Say(146);
  1100. break;
  1101.  
  1102. default:
  1103. break;
  1104. }
  1105.  
  1106. return(btest);
  1107. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement