Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // LORD AHRIMAN
- //
- // Leader of the Vanguard
- // May send astral stalker against us
- // Will seek tablets and will not sell them
- // Has to reflect any good relationship we have with Vanguard
- // Once we have joined Vanguard conversation will reflect this
- const int Flag_First_Encounter = 0;
- const int Flag_First_Exit = 1;
- const int Flag_First_Exit_Talk = 2;
- const int Flag_Recruited_Into_Party = 3;
- const int Flag_Mentioned_White_Owl = 4;
- const int Flag_Mentioned_White_Owl_Again = 5;
- const int Flag_Destroyed_Clock = 6;
- const int Flag_Saved_Balderdash = 7;
- const int Flag_Rescued_Princess = 8;
- const int Flag_Got_Seahorse_Chariot = 9;
- const int Flag_Recovered_Pipes_Majestyk = 10;
- const int Flag_Killed_Kraken = 11;
- const int Flag_Signaled_King = 12;
- const int Flag_Mandarin_Rumored_Dead = 13;
- const int Flag_Conachur_Imprisoned = 14;
- const int Flag_Sent_To_Axis_Gaol = 15;
- const int Flag_Gave_Havoc_Seed_Away = 16;
- const int Flag_Inducted_Into_Vanguard = 17;
- const int Flag_Took_Havoc_Seed = 18;
- const int Flag_Visited_Owl_Lair = 19;
- const int Flag_Knows_We_Killed_Stalker = 20;
- const int Flag_Flabbergasted_At_Oblivion_Escape = 21;
- const int Flag_Checked_Owl_Gift = 22;
- const int Flag_Took_LACHESIS = 23;
- const int Flag_Took_NEMESIS = 24;
- const int Flag_Took_ATROPOS = 25;
- const int Flag_Took_MEGAERA = 26;
- const int Flag_Took_SCYLLA = 27;
- const int Flag_Took_ARACHNE = 28;
- const int Flag_Took_AURORA = 29;
- const int Flag_Took_GORGON = 30;
- const int Flag_Took_THANATOS = 31;
- const int Flag_Noted_Exemplar_Codex = 32;
- const int Flag_Noted_Hex_Curse = 33;
- const int Flag_Gloated_Hex_Curse = 34;
- const int Flag_Noted_Haunted_Wasteland = 35;
- const int Flag_Noted_Deathstone_Vision = 36;
- const int Flag_Rewound_Clock = 37;
- const int Flag_Cursed_The_Party = 38;
- const int Flag_Teleported_The_Party = 39;
- const int Flag_Called_Astral_Stalker = 40;
- const int Flag_Attempted_Fight = 41;
- const int Flag_Induction_Reminder = 42;
- const int Flag_Congratulated_Capture = 43;
- const int Flag_Has_Spoken_Of_Havoc_Seed = 44;
- const int ITEM_LACHESIS = 1;
- const int ITEM_NEMESIS = 2;
- const int ITEM_ATROPOS = 3;
- const int ITEM_MEGAERA = 4;
- const int ITEM_SCYLLA = 5;
- const int ITEM_ARACHNE = 6;
- const int ITEM_AURORA = 7;
- const int ITEM_GORGON = 8;
- const int ITEM_Exemplar_Codex = 368;
- const int ITEM_Thanatos_Tablet = 403;
- const int ITEM_Havoc_Seed = 381;
- const int ITEM_Pipes_Majestyk = 256;
- const int ITEM_World_Manager_Monthly = 690;
- const int ITEM_World_Manager_Monthly_Page1 = 691;
- const int ITEM_World_Manager_Monthly_Page2 = 692;
- const int NPC_The_White_Owl = 50;
- const int NPC_Lt_Shrike = 20;
- const int NPC_Elias_Conachur = 14;
- const int NPC_Balderdash = 39;
- const int NPC_Black_Pierre = 32;
- const int NPC_Khan_Raji = 37;
- const int NPC_Nefarge = 23;
- const int NPC_Princess_Dahlia = 45;
- const int NPC_Green_Mandarin = 36;
- const int NPC_Nebulon = 53;
- const int NPC_Zyrinx = 54;
- const int NPC_Kraken = 30;
- const int NPC_AstralStalker = 63;
- const int SPELL_Curse = 203;
- const int MAX_SPELL_POWER_LEVEL = 7;
- const int ADJECTIVE_CODE_DEAD = 27;
- const int CHECKPOINT_Haunted_Wastes = 110;
- const int CHECKPOINT_Snark_Mistress = 46;
- const int CHECKPOINT_Skulheim = 71;
- const int CHECKPOINT_OBLIVION = 189;
- const int XPOS_COSMIC_OBLIVION = 31;
- const int YPOS_COSMIC_OBLIVION = 127;
- const int DISPOSITION_NEUTRAL = 0;
- const int DISPOSITION_AMITY = 1;
- const int DISPOSITION_ENMITY = 2;
- const int DISPOSITION_JOINED_VANGUARD = 3;
- const int DISPOSITION_JOINED_BETRAYED = 4;
- const int COMMENT_MAX = 10;
- const int COMMENT_BASE_NEUTRAL = 60;
- const int COMMENT_BASE_AMITY = 70;
- const int COMMENT_BASE_ENMITY = 80;
- const int COMMENT_BASE_JOINED_VANGUARD = 90;
- const int COMMENT_BASE_JOINED_BETRAYED = 100;
- const int ACTION_SPEAK = 0;
- const int ACTION_FIGHT = 1;
- const int ACTION_CURSE = 2;
- const int ACTION_STALKER = 3;
- const int ACTION_TAKE = 4;
- const int ACTION_TELEPORT = 5;
- const int LOOKUP_ROWSIZE = 12;
- const int LOOKUP_FLAGSET = 0;
- const int LOOKUP_ACTION = 1;
- const int LOOKUP_GLOBALFLAG = 2;
- const int LOOKUP_CHECKPOINT = 3;
- const int LOOKUP_ITEMINDEX = 4;
- const int LOOKUP_NEUTRALTEXT = 5;
- const int LOOKUP_AMITYTEXT = 6;
- const int LOOKUP_ENMITYTEXT = 7;
- const int LOOKUP_JOINEDTEXT = 8;
- const int LOOKUP_BETRAYEDTEXT = 9;
- const int LOOKUP_NARRATIVE = 10;
- const int LOOKUP_MODIFIER = 11;
- // Exclude(10,11,12,13,14,15,16,17,18,19,20);
- int [] Reaction_Lookup =
- {
- // FLAGSET,ACTION,GLOBALFLAG,CHECKPOINT,ITEMINDEX,NEUTRALTEXT,AMITYTEXT,ENMITYTEXT,JOINEDTEXT,BETRAYEDTEXT,NARRATIVE,MODIFIER
- Flag_Destroyed_Clock, ACTION_FIGHT, cGLOBAL_DESTROYED_CLOCK,0,0,8,8,8,9,9,10,-10,
- Flag_Rewound_Clock, ACTION_FIGHT, cGLOBAL_REWOUND_THE_CLOCK,0,0,8,8,8,9,9,10,-10,
- Flag_Saved_Balderdash, ACTION_TELEPORT, cGLOBAL_SAVED_BALDERDASH,0,0,4,4,4,6,6,5,-2,
- Flag_Rescued_Princess, ACTION_CURSE, cGLOBAL_RESCUED_PRINCESS,0,0,11,11,11,12,12,13,-2,
- Flag_Got_Seahorse_Chariot, ACTION_SPEAK, cGLOBAL_GOT_THE_SEAHORSE_CHARIOT,0,0,14,14,15,16,16,0,-1,
- Flag_Recovered_Pipes_Majestyk, ACTION_SPEAK, cGLOBAL_RECOVERED_PIPES_MAJESTYK,0,0,17,17,17,18,18,0,0,
- Flag_Killed_Kraken, ACTION_STALKER, cGLOBAL_KILLED_KRAKEN,0,0,19,19,19,21,21,20,-2,
- Flag_Gave_Havoc_Seed_Away, ACTION_FIGHT, cGLOBAL_GAVE_HAVOC_SEED_TO_ZYRINX,0,0,22,22,22,23,23,10,-10,
- Flag_Gave_Havoc_Seed_Away, ACTION_FIGHT, cGLOBAL_GAVE_HAVOC_SEED_TO_NEBULON,0,0,22,22,22,23,23,10,-10,
- Flag_Took_Havoc_Seed, ACTION_SPEAK, 0,0,ITEM_Havoc_Seed,33,33,34,35,0,0,3,
- Flag_Inducted_Into_Vanguard, ACTION_SPEAK, cGLOBAL_INDUCTED_INTO_VANGUARD,0,0,41,41,42,41,41,0,5,
- Flag_Signaled_King, ACTION_SPEAK, cGLOBAL_SIGNALED_KING,0,0,43,43,43,44,45,0,-1,
- Flag_Mandarin_Rumored_Dead, ACTION_SPEAK, cGLOBAL_MANDARIN_RUMORED_DEAD,0,0,46,46,46,47,47,0,2,
- Flag_Conachur_Imprisoned, ACTION_SPEAK, cGLOBAL_CONACHUR_WAS_IMPRISONED,0,0,48,48,48,49,49,0,2,
- Flag_Sent_To_Axis_Gaol, ACTION_SPEAK, cGLOBAL_SENT_TO_AXIS_GAOL,0,0,50,50,50,51,51,0,-1,
- Flag_Took_LACHESIS, ACTION_TAKE, 0,0,ITEM_LACHESIS,36,38,37,39,40,0,0,
- Flag_Took_NEMESIS, ACTION_TAKE, 0,0,ITEM_NEMESIS,36,38,37,39,40,0,1,
- Flag_Took_ATROPOS, ACTION_TAKE, 0,0,ITEM_ATROPOS,36,38,37,39,40,0,1,
- Flag_Took_MEGAERA, ACTION_TAKE, 0,0,ITEM_MEGAERA,36,38,37,39,40,0,1,
- Flag_Took_SCYLLA, ACTION_TAKE, 0,0,ITEM_SCYLLA,36,38,37,39,40,0,1,
- Flag_Took_ARACHNE, ACTION_TAKE, 0,0,ITEM_ARACHNE,36,38,37,39,40,0,1,
- Flag_Took_AURORA, ACTION_TAKE, 0,0,ITEM_AURORA,36,38,37,39,40,0,1,
- Flag_Took_GORGON, ACTION_TAKE, 0,0,ITEM_GORGON,36,38,37,39,40,0,1,
- Flag_Took_THANATOS, ACTION_TAKE, 0,0,ITEM_Thanatos_Tablet,36,38,37,39,40,0,1,
- Flag_Noted_Exemplar_Codex, ACTION_SPEAK, 0,0,ITEM_Exemplar_Codex,54,54,54,55,55,0,-1,
- Flag_Checked_Owl_Gift, ACTION_SPEAK, cGLOBAL_GIVEN_CHOICE_OF_ARTIFACTS,0,0,52,52,52,53,53,0,-1,
- Flag_Noted_Haunted_Wasteland, ACTION_SPEAK, 0,CHECKPOINT_Haunted_Wastes,0,56,56,56,57,57,0,1,
- Flag_Noted_Deathstone_Vision, ACTION_SPEAK, cGLOBAL_TOUCHED_THE_DEATHSTONE,0,0,24,24,24,25,25,0,1,
- -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
- };
- bool TestReaction(int globeflag, int chekpt, int itemidx)
- {
- bool testvalue = false;
- if(globeflag != 0)testvalue = GetGlobal(globeflag);
- if(chekpt != 0)testvalue = PartyVisited(chekpt);
- if(itemidx != 0)testvalue = FindItem(itemidx);
- return(testvalue);
- }
- void DoAction(int actidx, int itemkey, int atext, int narrater, int modifier,int disposed)
- {
- if(modifier != 0 && actidx != ACTION_TAKE)
- {
- if(modifier < 0)
- {
- ModifyEnmity(cPARTY_AGENTSOFWHITEOWL,-1*modifier);
- }
- else
- {
- ModifyAmity(cPARTY_AGENTSOFWHITEOWL,modifier);
- }
- }
- if(atext != 0)Say(atext);
- if(narrater != 0)Narrative(narrater);
- switch(actidx)
- {
- case ACTION_SPEAK:
- break;
- case ACTION_FIGHT:
- MeStopRunning();
- Fight();
- break;
- case ACTION_CURSE:
- MeStopRunning();
- if(CastSpell(SPELL_Curse,MAX_SPELL_POWER_LEVEL)==true)
- {
- Say(111);
- }
- else
- {
- Say(141);
- }
- Set(Flag_Cursed_The_Party);
- ExitNow();
- break;
- case ACTION_STALKER:
- MeStopRunning();
- Set(Flag_Called_Astral_Stalker);
- SummonStalker();
- ExitNow();
- break;
- case ACTION_TAKE:
- if(FindItem(itemkey) == true)
- {
- if(TakeItem(itemkey,2) == true)
- {
- ModifyEnmity(cPARTY_AGENTSOFWHITEOWL,-1*modifier);
- ModifyAmity(cPARTY_AGENTSOFWHITEOWL,modifier);
- if(disposed < DISPOSITION_JOINED_VANGUARD)
- {
- RandomSay(115,116,117);
- }
- else
- {
- RandomSay(118,119,120);
- }
- ExitNow();
- }
- else
- {
- ModifyEnmity(cPARTY_AGENTSOFWHITEOWL,modifier);
- ModifyAmity(cPARTY_AGENTSOFWHITEOWL,-1*modifier);
- RandomSay(30,31,32);
- MeStopRunning();
- Fight();
- }
- }
- break;
- case ACTION_TELEPORT:
- Set(Flag_Teleported_The_Party);
- DimensionDoor(); // save current location into teleport door buffer
- Teleport(XPOS_COSMIC_OBLIVION ,YPOS_COSMIC_OBLIVION ,cCOLOR_YELLOW,cEAST);
- Say(3);
- MeStopRunning();
- ExitNow();
- break;
- default:
- break;
- }
- return;
- }
- bool Reactions(int disposed)
- {
- int indexbase = 0;
- int flagset = 0;
- int action = -1;
- int keyindex = -1;
- int text = -1;
- int narrate = -1;
- int aemod = -1;
- int globalflag = -1;
- int chkpt = -1;
- bool reacted = false;
- // step through the data 12 ints at a time
- indexbase = 0;
- while(Reaction_Lookup[indexbase] != -1 and !reacted)
- {
- flagset = Reaction_Lookup[indexbase];
- if(Get(flagset) == false)
- {
- globalflag = Reaction_Lookup[indexbase + LOOKUP_GLOBALFLAG];
- chkpt = Reaction_Lookup[indexbase + LOOKUP_CHECKPOINT];
- keyindex = Reaction_Lookup[indexbase + LOOKUP_ITEMINDEX];
- // test to see if an event occurred which requires a reaction from Ahriman
- if(TestReaction(globalflag,chkpt,keyindex) == true)
- {
- // we will not do this check at encounter any more
- Set(flagset);
- // now Ahriman reacts to change in game logic
- action = Reaction_Lookup[indexbase + LOOKUP_ACTION];
- text = Reaction_Lookup[indexbase + LOOKUP_NEUTRALTEXT + disposed];
- narrate = Reaction_Lookup[indexbase + LOOKUP_NARRATIVE];
- aemod = Reaction_Lookup[indexbase + LOOKUP_MODIFIER];
- // carry out the action assigned with this event
- DoAction(action, keyindex,text,narrate,aemod,disposed);
- // set reacted to true to escape this loop check
- reacted = true;
- }
- }
- indexbase += LOOKUP_ROWSIZE;
- }
- return(reacted);
- }
- int Disposition()
- {
- int disposed = DISPOSITION_NEUTRAL;
- if(GetGlobal(cGLOBAL_INDUCTED_INTO_VANGUARD) == true)
- {
- disposed = (Amicable()==true) ? DISPOSITION_JOINED_VANGUARD : DISPOSITION_JOINED_BETRAYED;
- }
- else
- {
- if(Amicable()==true)
- {
- disposed = DISPOSITION_AMITY;
- }
- else
- {
- if(GetEnmity() > GetAmity())
- {
- disposed = DISPOSITION_ENMITY;
- }
- }
- }
- return(disposed);
- }
- bool OnSubject_YOU(int querytype)
- {
- Say(121,122);
- return(true);
- }
- bool OnSubject_JOB(int querytype)
- {
- Say(123,124);
- return(true);
- }
- bool OnSubject_ENLIST(int querytype)
- {
- if(GetGlobal(cGLOBAL_INDUCTED_INTO_VANGUARD) == true)
- {
- Say(142);
- return(true);
- }
- if(IsAlive(NPC_Lt_Shrike) == false)
- {
- Say(144);
- return(true);
- }
- switch(querytype)
- {
- case cDISPATCH_WHERE:
- Say(150,149);
- break;
- case cDISPATCH_WHO:
- // if we have already met Shrike in Kublai Axis
- if(HasMetNPC(NPC_Lt_Shrike)==true)
- {
- Say(147);
- }
- else
- {
- Say(148, 149);
- }
- break;
- default:
- RandomSay(148,149,150);
- break;
- }
- return(true);
- }
- bool OnSubject_OWL(int querytype)
- {
- int adj;
- switch(querytype)
- {
- case cDISPATCH_WHERE:
- if(HasMetNPC(NPC_The_White_Owl)==true)
- {
- Say(129);
- }
- else
- {
- Say(128);
- }
- break;
- case cDISPATCH_DECLARE:
- adj = GetDispatch(cDISPATCH_ADJECTIVE);
- if(adj == ADJECTIVE_CODE_DEAD)
- {
- if(HasMetNPC(NPC_The_White_Owl)==true)
- {
- Say(130);
- }
- else
- {
- Say(127);
- }
- }
- else
- {
- Say(125,126);
- }
- break;
- default:
- Say(125,126);
- break;
- }
- return(true);
- }
- bool OnSubject_BALDERDASH(int querytype)
- {
- if(Get(Flag_Saved_Balderdash)==true)
- {
- Say(151);
- }
- else
- {
- if(IsAlive(NPC_Balderdash) == false)
- {
- if(KilledByParty(NPC_Balderdash) == true)
- {
- Say(143);
- }
- else
- {
- Say(152);
- }
- }
- else
- {
- Say(151);
- }
- }
- return(true);
- }
- bool OnSubject_BLACKPIERRE(int querytype)
- {
- if(IsAlive(NPC_Black_Pierre) == false)
- {
- if(KilledByParty(NPC_Black_Pierre) == true)
- {
- Say(144);
- }
- else
- {
- Say(153);
- }
- }
- else
- {
- if(HasMetNPC(NPC_Black_Pierre)==true)
- {
- Say(154);
- }
- else
- {
- Say(155);
- }
- }
- return(true);
- }
- bool OnSubject_ELIASCONACH(int querytype)
- {
- if(Get(Flag_Conachur_Imprisoned)==true)
- {
- if(Get(Flag_Congratulated_Capture) == false)
- {
- Say(161);
- Set(Flag_Congratulated_Capture);
- }
- else
- {
- Say(159,160);
- }
- }
- else
- {
- if(IsAlive(NPC_Elias_Conachur) == true)
- {
- if(InParty(NPC_Elias_Conachur) == true)
- {
- Say(156);
- }
- else
- {
- Say(162,163);
- }
- }
- else
- {
- if(KilledByParty(NPC_Elias_Conachur) == true)
- {
- Say(143);
- if(InParty(NPC_Elias_Conachur) == true)
- {
- Say(157);
- }
- }
- else
- {
- Say(158);
- }
- }
- }
- return(true);
- }
- bool OnSubject_SHRIKE(int querytype)
- {
- if(KilledByParty(NPC_Lt_Shrike)==true)
- {
- Say(144);
- }
- else
- {
- if(HasMetNPC(NPC_Lt_Shrike)==true)
- {
- if(Get(Flag_Inducted_Into_Vanguard)==true)
- {
- RandomSay(164,165,166);
- }
- else
- {
- Say(148,149);
- }
- }
- else
- {
- Say(148,149);
- }
- }
- return(true);
- }
- bool OnSubject_GREENMAND(int querytype)
- {
- if(Get(Flag_Mandarin_Rumored_Dead)==true)
- {
- Say(167);
- }
- else
- {
- if(HasMetNPC(NPC_Green_Mandarin)==true)
- {
- if(KilledByParty(NPC_Green_Mandarin)==true)
- {
- Say(143);
- }
- else
- {
- Say(168);
- }
- }
- else
- {
- Say(169);
- }
- }
- return(true);
- }
- bool OnSubject_HAVOCSEED(int querytype)
- {
- switch(querytype)
- {
- case cDISPATCH_WHERE:
- if(Get(Flag_Noted_Haunted_Wasteland) == true)
- {
- Say(176);
- }
- Say(173);
- break;
- default:
- if(Get(Flag_Has_Spoken_Of_Havoc_Seed)==false)
- {
- Say(175);
- Set(Flag_Has_Spoken_Of_Havoc_Seed);
- }
- if(Get(Flag_Noted_Deathstone_Vision) == true)
- {
- Say(174);
- }
- RandomSay(170,171,172);
- break;
- }
- return(true);
- }
- bool OnSubject_HYPERBOREA(int querytype)
- {
- Say(177);
- return(true);
- }
- bool OnSubject_KHANRAJI(int querytype)
- {
- if(IsAlive(NPC_Khan_Raji) == false)
- {
- if(KilledByParty(NPC_Khan_Raji) == true)
- {
- Say(143);
- }
- else
- {
- Say(178);
- }
- }
- else
- {
- if(HasMetNPC(NPC_Khan_Raji)==true)
- {
- Say(179);
- }
- else
- {
- Say(180);
- }
- }
- return(true);
- }
- bool OnSubject_KRAKEN(int querytype)
- {
- if(Get(Flag_Killed_Kraken)==true)
- {
- Say(181,182);
- }
- else
- {
- if(IsAlive(NPC_Kraken) == false)
- {
- Say(183,184);
- }
- else
- {
- Say(185);
- }
- }
- return(true);
- }
- bool OnSubject_KUBLAIAXIS(int querytype)
- {
- if(GetGlobal(cGLOBAL_INDUCTED_INTO_VANGUARD)==true)
- {
- Say(186,187);
- }
- else
- {
- Say(188,189);
- }
- return(true);
- }
- bool OnSubject_MRNEBULON(int querytype)
- {
- Say(151);
- return(true);
- }
- bool OnSubject_MRZYRINX(int querytype)
- {
- Say(151);
- return(true);
- }
- bool OnSubject_NAGA(int querytype)
- {
- Say(190,191);
- return(true);
- }
- bool OnSubject_NEFARGE(int querytype)
- {
- if(IsAlive(NPC_Nefarge) == false)
- {
- if(KilledByParty(NPC_Nefarge) == true)
- {
- Say(144);
- }
- else
- {
- Say(192);
- }
- }
- else
- {
- if(HasMetNPC(NPC_Nefarge)==true)
- {
- Say(193);
- }
- else
- {
- Say(194);
- }
- }
- return(true);
- }
- bool OnSubject_NULLSPACE(int querytype)
- {
- Say(195,196);
- if(Get(Flag_Flabbergasted_At_Oblivion_Escape)==true)
- {
- Say(200);
- }
- return(true);
- }
- bool OnSubject_PALACE(int querytype)
- {
- Say(197);
- return(true);
- }
- bool OnSubject_PIPES(int querytype)
- {
- Say(198);
- return(true);
- }
- bool OnSubject_PIRATE(int querytype)
- {
- Say(199);
- return(true);
- }
- bool OnSubject_PRINCESS(int querytype)
- {
- if(IsAlive(NPC_Princess_Dahlia) == false)
- {
- if(KilledByParty(NPC_Princess_Dahlia) == true)
- {
- Say(201);
- }
- else
- {
- Say(202);
- }
- }
- else
- {
- if(HasMetNPC(NPC_Princess_Dahlia) == true)
- {
- if(Get(Flag_Rescued_Princess) == true)
- {
- Say(203);
- }
- else
- {
- Say(207);
- RandomSay(204,205,206);
- }
- }
- else
- {
- RandomSay(204,205,206);
- }
- }
- return(true);
- }
- bool OnSubject_PRISON(int querytype)
- {
- if(Get(Flag_Sent_To_Axis_Gaol)==true)
- {
- if(Get(Flag_Inducted_Into_Vanguard)==true)
- {
- Say(208);
- }
- else
- {
- RandomSay(209,210,211);
- }
- }
- else
- {
- Say(210);
- }
- return(true);
- }
- bool OnSubject_SACRIFICE(int querytype)
- {
- return(OnSubject_PRINCESS(querytype));
- }
- bool OnSubject_SARGASSO(int querytype)
- {
- return(OnSubject_KRAKEN(querytype));
- }
- bool OnSubject_SHELACH(int querytype)
- {
- if(GetGlobal(cGLOBAL_DEFEATED_SHELACH) == true)
- {
- Say(212);
- return(true);
- }
- if(Get(Flag_Rescued_Princess)==true)
- {
- Say(212);
- return(true);
- }
- switch(querytype)
- {
- case cDISPATCH_WHERE:
- Say(222);
- break;
- default:
- RandomSay(223,224,225);
- break;
- }
- return(true);
- }
- bool OnSubject_SKULHEIM(int querytype)
- {
- if(PartyVisited(CHECKPOINT_Skulheim) == true)
- {
- Say(219);
- }
- RandomSay(213,215,217);
- if(Get(Flag_Rescued_Princess)==true)
- {
- Say(221);
- return(true);
- }
- return(true);
- }
- bool OnSubject_SNARKMISTRES(int querytype)
- {
- if(PartyVisited(CHECKPOINT_Snark_Mistress)==true)
- {
- Say(220);
- }
- RandomSay(214,216,218);
- return(true);
- }
- bool OnEncounter(int value)
- {
- int count = 0;
- int attitude = 0;
- int textbase = 0;
- count = GetCounter(0);
- attitude = Disposition();
- textbase = COMMENT_BASE_NEUTRAL + (COMMENT_MAX * attitude);
- if(count >= COMMENT_MAX) count=0;
- SetCounter(0,count + 1);
- if(Get(Flag_First_Encounter)==false)
- {
- Narrative(1);
- Set(Flag_First_Encounter);
- }
- if(Get(Flag_Teleported_The_Party)==true and Get(Flag_Flabbergasted_At_Oblivion_Escape)==false)
- {
- Set(Flag_Flabbergasted_At_Oblivion_Escape);
- Say(58);
- }
- if(Get(Flag_Called_Astral_Stalker)==true and
- Get(Flag_Knows_We_Killed_Stalker)==false and
- KilledByParty(NPC_AstralStalker) == true
- )
- {
- Set(Flag_Knows_We_Killed_Stalker);
- Say(59);
- }
- if(Get(Flag_Cursed_The_Party)==true and Get(Flag_Gloated_Hex_Curse)==false)
- {
- Say(113);
- Set(Flag_Gloated_Hex_Curse);
- }
- if(Reactions(attitude)==false)
- {
- Say(textbase + count);
- }
- return(true);
- }
- bool OnExitEncounter(int value)
- {
- if(Get(Flag_First_Exit)==false)
- {
- Say(114);
- Set(Flag_First_Exit);
- }
- else
- {
- RandomSay(114,139,140);
- }
- if(Get(Flag_Cursed_The_Party) == true and
- Get(Flag_Noted_Hex_Curse) == false
- )
- {
- Narrative(112);
- Set(Flag_Noted_Hex_Curse);
- }
- return(true);
- }
- bool OnExitTalk(int value)
- {
- if(Get(Flag_First_Exit_Talk)==false)
- {
- //*TODO
- Set(Flag_First_Exit_Talk);
- return(true);
- }
- if(Get(Flag_Inducted_Into_Vanguard)==true and
- Get(Flag_Induction_Reminder) == false
- )
- {
- Say(138);
- Set(Flag_Induction_Reminder);
- }
- return(true);
- }
- bool OnFightFail(int value)
- {
- if(Get(Flag_Attempted_Fight)==false)
- {
- Say(26);
- Set(Flag_Attempted_Fight);
- }
- else
- {
- RandomSay(27,28,29);
- }
- return(true);
- }
- bool OnMindRead(int value)
- {
- RandomSay(131,132,133);
- return(true);
- }
- bool OnGiveItem(int value)
- {
- bool btest = false;
- switch(value)
- {
- case ITEM_Havoc_Seed:
- // make sure it is identified for us
- IdentifyMouse();
- Narrative(137);
- if(Get(Flag_Inducted_Into_Vanguard)==true)
- {
- Say(134);
- }
- else
- {
- Say(135);
- }
- Narrative(136);
- MeStopRunning();
- Fight();
- btest = true;
- break;
- case ITEM_Pipes_Majestyk:
- // make sure it is identified for us
- IdentifyMouse();
- Say(146);
- break;
- default:
- break;
- }
- return(btest);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement