Update of /cvsroot/exult/./exult/content/bgkeyring/src/npcs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6030/src/npcs Added Files: laurianna.uc lordheather.uc perrin.uc reyna.uc wisps.uc zauriel.uc Log Message: Adding the Keyring mod to CVS. --- NEW FILE: laurianna.uc --- /* * This source file contains usecode for the Keyring Quest. * Specifically, it is the (modular) function for Laurianna. * * Author: Marzo Junior * Last Modified: 2001-01-20 */ Laurianna 0x494 () { var queststate = getQuestState(); //Leave if Laundo is still alive: if (queststate < PLAYER_KILLED_MAGE) return; var bark; if (event == CLEAR_FLAGS) { if (get_distance(AVATAR) > 15) { //Loop if avatar is too far away: script item after 5 ticks call Laurianna, CLEAR_FLAGS; abort; } //Globals take a different meaning when Laurianna is freed; //this is done to avoid wasting globals on an ending quest: gflags[ACCEPTED_ZAURIEL_QUEST] = false; gflags[ZAURIEL_TOLD_LOCATION] = false; gflags[ZAURIEL_TELEPORTED] = false; gflags[ISLAND_NO_ONE_THERE] = false; gflags[GAVE_GEM_SUBQUEST] = false; gflags[PLAYER_USED_GEM] = false; //Delete any remaining eggs: deleteNearbyEggs(get_object_position(), 6); //Register that Laundo and his goons are gonners: set_npc_id(0); //Ensure met flag is not set: clear_item_flag(MET); script item { nohalt; call trueFreeze; wait 2; face find_direction(AVATAR); wait 2; say "@Avatar...@"; wait 6; call lauriannaPrePotionDialog; } script AVATAR { nohalt; call trueFreeze; wait 6; face AVATAR->find_direction(item); wait 2; say "@Yes?@"; wait 1; call trueUnfreeze; } } else if (get_npc_id() != 0) //Abort if ID is not zero: return; else if (event == DEATH) //Nope, she can't die: abort; else if (event == EVENT_TELEPORT) { //Move her to the destination and unfreeze her: item->trueUnfreeze(); /* DISABLED //Remove Laurianna's invulnerability: clear_item_flag(SI_TOURNAMENT); */ set_last_created(); UI_update_last_created([0x103, 0x195, 0x0]); run_schedule(); gflags[LAURIANNA_IN_YEW] = true; } else if (event == DOUBLECLICK) { //Player message according to flags: if (queststate >= POTION_WAS_USED) bark = "@Hello again, Laurianna.@"; else bark = "@Might we speak?@"; //SI-style start of dialog, although the NPC does not move to the Avatar: script AVATAR { call trueFreeze; face AVATAR->find_direction(item); actor frame STAND; say bark; wait 10; } //Laurianna's response according to flags: if (queststate >= POTION_WAS_USED) bark = "@Hi, Avatar!@"; else bark = "@Thou dost have no potions, right?@"; //SI-style start of dialog, although the NPC does not move to the Avatar: script item { call trueFreeze; wait 5; face find_direction(AVATAR); actor frame STAND; say bark; wait 8; call Laurianna; } } else if (event == SCRIPTED) { item->trueUnfreeze(); AVATAR->trueUnfreeze(); //Call appropriate dialog: if (queststate == LAURIANNA_MOVED_TO_YEW) lauriannaYewDialog(); else if (queststate == LAURIANNA_IS_CURED) lauriannaPostQuestDialog(); else if (queststate == POTION_WAS_USED) lauriannaPostPotionDialog(); else lauriannaPrePotionDialog(); } else if (event == PROXIMITY) { //Scgedule barks: var schedule = get_schedule_type(); var barks; var partofday = UI_part_of_day(); if (queststate == LAURIANNA_MOVED_TO_YEW) { scheduleBarks(item); abort; } else if (queststate == POTION_WAS_USED) { if ((partofday < 2) || (partofday == 7)) schedule = SLEEP; if (schedule != SLEEP) { barks = ["@Looks like rain...@", "@Canst thou take me to my father?@", "@I am -so- hungry... -In Mani Ylem!-@", "@I am tired...@"]; if (count_objects(SHAPE_AMULET, QUALITY_ANY, FRAME_ANY)) barks = barks & "Canst thou not help me with this necklace?"; } else barks = "Z-z-z-z..."; } else if (queststate == PLAYER_KILLED_MAGE) { if ((partofday < 2) || (partofday == 7)) schedule = SLEEP; if (schedule != SLEEP) barks = ["@Tra-la-la...@", "@Fire is so pretty...@", "@Can I burn those flowers?@", "@When do I get some food?@", "@Pretty bird. Can I kill it?@"]; else barks = "Z-z-z-z..."; } script item say barks[UI_get_random(UI_get_array_size(barks))]; } } --- NEW FILE: lordheather.uc --- /* * This source file contains usecode for the Lock Lake Cleanup mod. * Specifically, the Cove mayor now returns Mack's key to the Avatar * if the Avatar wants it. * * Author: Marzo Junior * Last Modified: 2001-01-20 */ LordHeather 0x44D () { var player_female; var msg; if (event == DOUBLECLICK) { LORD_HEATHER->show_npc_face(0); player_female = UI_is_pc_female(); add(["name", "job", "bye"]); if (gflags[HEARD_ABOUT_NATASSIA]) add("Nastassia"); if (gflags[HAS_MIRANDAS_BILL]) add(["bill", "Lock Lake"]); if (gflags[KNOWS_MACKS_KEY_WITH_COVE_MAYOR] && gflags[MACKS_KEY_WITH_COVE_MAYOR]) add("key"); if (!gflags[MET_LORD_HEATHER]) { say("This regal gentleman epitomizes a well-liked politician."); say("@Hello! Lord British sent word that thou might come to visit us. Welcome to Cove, Avatar!@"); gflags[MET_LORD_HEATHER] = true; } else say("@Hello again, Avatar!@ Lord Heather proclaims."); converse (0) { case "name" (remove): say("@I am Lord Heather. And I recognize thee, Avatar!@"); case "job": say("@I am the Town Mayor of Cove, home of the Shrine of Compassion.@"); add(["Cove", "Shrine"]); case "Cove" (remove): say("@It's a small place, I know. Many of our residents have moved away to the larger towns, especially Britain. But we have maintained a small core of loyal Covites.@"); case "Shrine" (remove): say("@We are proud of our Shrine. One of our residents takes good care of it. Thou must try and visit the Shrine if thou hast not already. It is a monument to all the lovers in town.@"); add("lovers"); case "lovers" (remove): say("@Britain may be the city of Compassion, but Cove has become the city of Passion. Everyone here seems to fall in love rather easily. Thou wilt find that everyone loves someone. Almost everyone, that is.@"); add(["everyone", "almost everyone"]); case "everyone" (remove): say("@Well, let's see... I am in love with Jaana, our healer. And she is in love with me, of course. Then there is Zinaida, who runs the Emerald. She has an interest in De Maria, our local bard. And vice versa. Rayburt, our trainer, is courting Pamela, the innkeeper.@"); if (isNearby(IOLO)) { IOLO.say("@Sounds like bad theatre to me!@"); IOLO.hide(); } if (isNearby(SPARK)) { SPARK.say("@Any wenches mine own age around here?@*"); SPARK.hide(); } gflags[KNOWS_COVE_GOSSIP] = true; if (isNearby(JAANA)) { say("@I see that thou art leaving Cove for a while, my dear?@*"); JAANA.say("@Yes, milord. But I shall return. I promise thee.@*"); LORD_HEATHER.say("@I shall try not to worry about thee, but it will be difficult.@*"); JAANA.say("@Do not worry. I shall be safe with the Avatar.@*"); LORD_HEATHER.say("@I do hope so.@ The Mayor embraces Jaana.*"); JAANA.hide(); } case "almost everyone" (remove): say("@Except for Nastassia.@"); add("Nastassia"); case "Nastassia" (remove): if (!gflags[HEARD_ABOUT_NATASSIA]) { say("@She is a lovely young woman who is always melancholy. De Maria can tell thee more about her. I suggest thou seekest him at the Emerald. 'Tis a sad but compelling tale.@"); gflags[KNOWS_DEMARIA_KNOWS] = true; } else { if (player_female) msg = "someone"; else msg = "a man like thee"; say("@I do hope thou canst help her. She needs " + msg + " to bring her out of her depression.@"); } case "bill" (remove): if (!gflags[LOCK_LAKE_BILL_SIGNED]) { if (contHasItemCount(PARTY, 1, SHAPE_SCROLL, 4, FRAME_ANY)) { say("@'Tis about time that the government did something about the awful stench coming from that lake! I shall be happy to sign thy bill of law! Take it back to the Great Council post haste!@ Lord Heather signs the bill and hands it back to you."); gflags[LOCK_LAKE_BILL_SIGNED] = true; UI_set_timer(LOCK_LAKE_TIMER); } else say("@But thou dost not have a bill of law!@"); } else say("@I thought I already signed that bill!@"); case "key" (remove): say("@Hast thou changed thy mind about trying to find the key's owner?@"); if (askYesNo()) { var key = UI_create_new_object(SHAPE_KEY); key->set_item_quality(55); key->set_item_frame(19); gflags[MACKS_KEY_WITH_COVE_MAYOR] = false; if (AVATAR->give_last_created()) say("@Here is the key, then. Farewell, Avatar!@"); else { UI_update_last_created(AVATAR->get_object_position()); say("@Since thou art too encumbered to take the key, I shall place it upon the ground at thy feet. Farewell, Avatar!@"); } } else say("@If thou dost change thy mind, come and talk to me again. Farewell, Avatar!@"); case "Lock Lake" (remove): say("@It has gotten so putrid that on hot summer days the stink is suffocating. I believe that the Britannian Mining Company in Minoc is the source of the problem. Mining waste is being deposited in the Lake. Thou shouldst be glad it is nearly winter!@"); case "bye": break; } if (gflags[MACKS_KEY_WITH_COVE_MAYOR] && !gflags[KNOWS_MACKS_KEY_WITH_COVE_MAYOR]) { //Mack's key was found by the cleaners and is with Lord Heather //Make Avatar aware of that: say("@Oh, I almost forgot! While cleaning Lock Lake, one of the residents found this key. It belongs to no one in town, and nobody really wants to keep it."); say("@Maybe in thy travels thou wilt find its rightful owner, if thou art willing to try. What dost thou say? Wilt thou take it?@"); gflags[KNOWS_MACKS_KEY_WITH_COVE_MAYOR] = true; if (askYesNo()) { //Avatar wants the key; give it to him: var key = UI_create_new_object(SHAPE_KEY); key->set_item_quality(55); key->set_item_frame(19); gflags[MACKS_KEY_WITH_COVE_MAYOR] = false; if (AVATAR->give_last_created()) say("@Here is the key, then. Farewell, Avatar!@"); else { UI_update_last_created(AVATAR->get_object_position()); say("@Since thou art too encumbered to take the key, I shall place it upon the ground at thy feet. Farewell, Avatar!@"); } } else //Avatar doesn't want it, so leave the option of //coming for it later: say("@If thou dost change thy mind, come and talk to me again. Farewell, Avatar!@"); } else say("@Do come and visit again, Avatar!@*"); } else if (event == PROXIMITY) scheduleBarks(LORD_HEATHER); } --- NEW FILE: perrin.uc --- /* * This source file contains usecode for the Keyring Quest. * Specifically, Perryn will now talk about Laurianna once she has * settled in Yew. * * Author: Marzo Junior * Last Modified: 2001-01-20 */ //Externs: extern perrinTrain 0x8CA (var props, var cost); Perrin 0x4EE () { var avatar_name; var avatar_title; if (event == DOUBLECLICK) { //Avatar's name and title: avatar_name = getAvatarName(); avatar_title = getPoliteTitle(); add(["name", "job", "bye"]); if (!gflags[MET_PERRIN]) { item.say("The man before you stretches and inhales deeply."); gflags[MET_PERRIN] = true; } else item.say("@Glorious day, " + avatar_name + ".@ Perrin grins."); converse (0) { case "name" (remove): say("@Please, " + avatar_title + ", call me Perrin. I reside here in Empath Abbey.@"); add("Empath Abbey"); case "job" (remove): say("@I am a scholar, " + avatar_title + ". Dost thou want training in the realm of books?@"); if (askYesNo()) { //Avatar wants training: say("@My price is 45 gold for each training session, but I will also teach thee what little I know about magic. Is this acceptable?@"); if(askYesNo()) //If the price is OK, then train: perrinTrain([INTELLIGENCE, MAX_MANA], 45); else say("@Very well, " + avatar_title + ".@"); } else say("@Forgive me, I am a bit overzealous in my search for students. I hope thou wilt return in the future.@"); case "Empath Abbey" (remove): say("@This is a pleasant location. I like the privacy, which gives me a chance to study when I need to. The Brotherhood is across the road, and I am near a healer. Also, I have begun a study on the effects of dealing with death for undertakers. I am using Tiery as a case study.@"); add(["Brotherhood", "healer", "Tiery"]); if (gflags[LAURIANNA_IN_YEW]) { //Lauriana is now in Yew, so mention her too: say("@Recently, a new woman named Laurianna also came to live nearby.@"); add("Laurianna"); } case "Brotherhood" (remove): say("@That is the abbey. The monks who reside there are famous for their ability to produce exquisite wine. Nearby is the Highcourt and a prison.@"); add(["wine", "highcourt", "prison"]); case "wine" (remove): say("@Thou shouldst try some. The monks have been making it for more than three hundred years!@"); case "highcourt" (remove): say("@The official there is named Sir Jeff. From what I hear, he runs his ship very tight. I do not envy the jailer that works with him. It must be extremely difficult to be near such a strict disciplinarian all day long.@"); case "prison" (remove): say("@It is located just behind the court. And,@ he grins, @I am proud to say that is at least one thing about which I know nothing.@"); case "Tiery" (remove): say("@He is the undertaker who lives just north of the Brotherhood.@"); case "Laurianna" (remove): say("@She is very friendly, that one. She is living in the healer's house, as well as taking daily classes with me."); say("@I must confess that she is not the only one learning, however -- I've learned a great deal about magic from her.@"); case "healer" (remove): say("@I have yet to meet her, but I know she loves animals. I have seen her playing with the deer and squirrels that inhabit this region.@"); gflags[KNOWS_REYNA_LOVES_ANIMALS] = true; case "bye" (remove): say("@Goodbye, " + avatar_name + ". Best of luck in thy journeys.@*"); break; } } else if (event == PROXIMITY) scheduleBarks(item); } --- NEW FILE: reyna.uc --- /* * This source file contains usecode for the Keyring Quest. * Specifically, Reyna will now talk about Laurianna once she has * settled in Yew. * * Author: Marzo Junior * Last Modified: 2001-01-20 */ //Externs: extern reynaHeal 0x8D2 (var price_heal, var price_cure, var price_resurrect); //New functions extern askAboutMother 0xCC5 (var tomb, var has_flowers); extern giveReynaFlowers (); Reyna 0x46C () { var avatar_title; var part_of_day; var dont_add_aimi; var dont_add_heal; var has_flowers; var tomb; var used_half_price; if (!(event == DOUBLECLICK)) return; //Get title for avatar: avatar_title = getPoliteTitle(); //Get the part of day (used to see if Reyna will heal //while not at the shop): part_of_day = UI_part_of_day(); //To prevent adding options again and again: dont_add_aimi = false; dont_add_heal = false; //If party has brought flowers: has_flowers = contHasItemCount(PARTY, 1, SHAPE_PLANT, QUALITY_ANY, 4); add(["name", "job", "bye"]); if (!gflags[MET_REYNA]) { item.say("The woman greets you with shining eyes."); gflags[MET_REYNA] = true; } else item.say("@Hello, " + avatar_title + ",@ says Reyna."); tomb = AVATAR->find_nearest(SHAPE_TOMBSTONE, -1); if (tomb) //Reyna is at the cemetery: if (!gflags[ASKED_REYNA_ABOUT_MOTHER]) add("cemetery"); if (has_flowers) //Avatar has flowers: if (gflags[ASKED_REYNA_ABOUT_MOTHER]) add("brought flowers"); if (gflags[KNOWS_REYNA_JOB]) { //Avatar knows that Reyna is a healer, so add the option: add("heal"); dont_add_heal = true; } converse(0) { case "name" (remove): say("@I am Reyna,@ she says, brushing the hair out of her face."); case "job" (remove): say("@I am a healer. I have chosen to set up shop here near the forest.@"); gflags[KNOWS_REYNA_JOB] = true; if (!dont_add_heal) add("heal"); add("forest"); if (gflags[KNOWS_REYNA_LOVES_ANIMALS]) add("animals"); case "forest" (remove): say("@I wanted to live and work here because the land is very beautiful. I have found many things to do and see. Unfortunately, the forest is so spread out that I have yet to meet many of the others who live in this area. I do know that the Abbey is just across the way from mine house.~~@And somewhere nearby is a scholar.@ She appears thoughtful for a moment. @Also, I believe there is a prison just east of the Abbey."); add(["Abbey", "scholar", "prison"]); case "prison" (remove): say("@I've never actually seen it,@ she laughs, @but rumor has it that the cells are located right next to the court, for quick, easy imprisonment after the trial.@"); case "scholar" (remove): if (gflags[LAURIANNA_IN_YEW]) { say("@From Aimi and Laurianna I have heard that he is brilliant, and... also a bit overzealous to instruct those interested in increasing their knowledge. I believe his name is Perrin.@"); add("Laurianna"); } else say("@From Aimi I have heard that he is brilliant, and... also a bit overzealous to instruct those interested in increasing their knowledge.@"); if (!dont_add_aimi) add("Aimi"); case "Laurianna" (remove): say("@She moved recently to Yew. She has lost her father recently, and is trying to find her place in the world."); say("@Laurianna is helping me run my shop. She is also spending a lot of her time studying with Perrin the scholar.@"); case "Aimi" (remove): dont_add_aimi = true; if (gflags[0x015A]) say("@She is the monk who tends the garden at the Abbey.@"); else say("@She is one of the monks who lives at the Abbey. At this time, she is the only other person I have actually met here in the forest.@"); case "Abbey" (remove): say("@That is how this area -- Empath Abbey -- got its name, from the monks who live at the abbey of the Brotherhood of the Rose. They are said to make delicious wine. One of the monks cares for a beautiful garden in her spare time. In fact, I often buy flowers from her.~~ But,@ she grins, @as for the other monks, all that I ever see them do is make wine and wander the countryside.@"); gflags[0x015A] = true; add(["flowers", "others"]); case "others" (remove): say("@Aimi is the only one I have met, but I know there are one or two others who make wine there.@"); if (!dont_add_aimi) add("Aimi"); case "flowers" (remove): say("@Yes, I get them for my mother.@"); if (!gflags[ASKED_REYNA_ABOUT_MOTHER]) add("mother"); case "mother": askAboutMother(tomb, has_flowers); case "cemetery": askAboutMother(tomb, has_flowers); case "brought flowers": giveReynaFlowers(); case "have flowers": giveReynaFlowers(); case "heal": if ((part_of_day == MORNING) || ((part_of_day == NOON) || (part_of_day == AFTERNOON))) //If Reyna is working, so she will heal: gflags[REYNA_EMERGENCY] = true; if (gflags[REYNA_EMERGENCY]) { //She will also heal in emergencies (see below) if (gflags[GAVE_REYNA_FLOWERS]) { //50% discount if the Avatar gave her flowers: used_half_price = true; say("@For thy kindly gift of flowers, I will aid thee for half price.@ She smiles at you."); reynaHeal(15, 5, 200); } else reynaHeal(30, 10, 400); } else { //Reyna won't heal if she is not at the shop unless it is //an emergency: say("@I am sorry, " + avatar_title + ", but, unless this is an emergency, I would prefer to wait until my shop is open.@"); add("emergency"); } case "emergency" (remove): //Avatar claims it is an emergency //Get party list: var party = UI_get_party_list(); var npc; var index; var count; var is_emergency = false; for (npc in party with index to count) { //For every party member, if (npc->get_item_flag(POISONED) || (npc->get_npc_prop(HEALTH) < 10)) { //If he is badly hurt or poisoned, it *is* an //emergency, so break: is_emergency = true; break; } } //Feedback: var msg; if (UI_get_array_size(party) > 1) msg = " and your companions"; else msg = ""; say("She quickly examines you" + msg + "."); if (is_emergency == true) { //It is an emercency, so set flag: gflags[REYNA_EMERGENCY] = true; say("@Thou art correct, " + avatar_title + ". This is a true emergency!@"); add("heal"); } else //Not an emergency; send Avatar away: say("@I am sorry, but thy wounds are not mortal. Perhaps thou canst visit me when my shop is open.@"); case "animals" (remove): say("She smiles shyly.~~@I very much love animals. When I was very young, I found an ailing dove that I was unable to nurse back to health. Since that time, I began to study the healing arts, so that I would be able to help other animals who might need healing.~~ @Of course,@ she laughs, @now that I have the skills, I use them to help people, too.@"); case "bye": say("@Goodbye, " + avatar_title + "."); if (gflags[GAVE_REYNA_FLOWERS]) { say("@I thank thee for the bouquet!"); if (used_half_price) gflags[GAVE_REYNA_FLOWERS] = false; } say("@May health always follow thee!@*"); gflags[REYNA_EMERGENCY] = false; break; } } askAboutMother 0xCC5 (var tomb, var has_flowers) { var plant; var index; var count; var msg; gflags[ASKED_REYNA_ABOUT_MOTHER] = true; if (tomb) { var msg = ""; //Check to see if there are flowers at Reyna's mother's grave: var plants = find_nearby(SHAPE_PLANT, 10, MASK_NONE); for (plant in plants with index to count) { if (plant->get_item_frame() == 4) //There are: msg = "I realize there are already very beautiful flowers here, but there can never be enough to demonstrate how much she is missed. "; } } say("She looks down at her feet, and then back up at you. It is obvious she is fighting an urge to cry."); say("@Several months ago, my mother passed away in her home town. She was born here in the forests, and had asked to be buried here, near me. Every morning I come out here to visit her and set flowers by her grave."); say("@But,@ a lone tear escapes and trickles down her cheek, @I am the only member of our family who lives nearby. No one else is able to visit or leave flowers very often."); say("@Her grave looks so bare sometimes.@ She looks off into the horizon and sighs. @" + msg + "It would be nice if there were some way to have more flowers brought to her.@"); say("She quickly turns and looks at you."); say("@I am terribly sorry for rambling on like that. Please excuse me, " + getPoliteTitle() + ".@"); remove(["mother", "cemetery"]); if (has_flowers) add("have flowers"); } giveReynaFlowers () { say("Her eyes light up as she sees the bouquet of flowers."); say("@They are lovely! Thou art too kind, " + getPoliteTitle() + ", to bring flowers for my mother! I cannot wait to set them by her grave.@"); UI_remove_party_items(1, SHAPE_PLANT, QUALITY_ANY, 4, true); //Give a random amount of experience for the nice Avatar: var rand = UI_die_roll(1, 6); var exp; if ((rand == 1) || (rand == 2)) exp = 9; else if ((rand == 3) || ((rand == 4) || (rand == 5))) exp = 19; else if (rand == 6) exp = 90; giveExperience(exp); //Mark the (one-shot) 50% discount: gflags[GAVE_REYNA_FLOWERS] = true; remove(["have flowers", "brought flowers"]); } --- NEW FILE: wisps.uc --- /* * This source file contains usecode for the Wisps, for compatibility * with the Improved Orb of the Moons. * * Author: Marzo Junior * Last Modified: 2001-01-20 */ const int QUALITY_ALAGNER_NOTEBOOK = 2; //0x002 const int WISP_FACE = -256; Wisp 0x500 () { var party; var wisp_sched; var party_has_notebook; if (event == PROXIMITY) return; party = UI_get_party_list(); wisp_sched = UI_get_schedule_type(get_npc_object()); if (!(wisp_sched == TALK)) { WISP_FACE.say("The wisp does not respond.*"); return; } //Standard options: add(["name", "job", "bye"]); //If the party has Alagner's notebook, add the option to talk about it: if (contHasItemCount(PARTY, 1, SHAPE_BOOK, QUALITY_ALAGNER_NOTEBOOK, FRAME_ANY)) add("notebook"); //The party has seen the gypsy and knows about the Timelord: if (gflags[TALKED_TO_GYPSY]) add("Time Lord"); if(!gflags[HAD_FIRST_WISP_TALK]) { item.say("A ball of light approaches you.~~@'You' are not the entity known as 'Trellek'. 'You' call out in the manner of the species called 'emps'. 'Xorinia' was expecting the entity 'Trellek'."); say("@But that is not of importance. From the information 'I' have, the local manifestation before 'me' is the entity known as 'Avatar'."); say("The Wisp glows brightly a second or two.~~@'Xorinia' wishes to exchange information with the human entity.@"); gflags[HAD_FIRST_WISP_TALK] = true; giveExperience(500); } else item.say("@Once again a local manifestation addresses the Xorinite dimension.@"); converse(0) { case "name" (remove): say("@Highest probabilities indicate that a manifestation from the Xorinite dimension will be called 'Wisp' by the entities known as 'humans'. I am also called 'Xorinia' by other manifestations of the Xorinite dimension.@"); add("Wisp"); case "Wisp" (remove): say("@This label has been implemented by human entities to name manifestations from the Xorinite dimension since the time when this dimension was discovered by Xorinite manifestations. Another common name is 'Will-o-the-wisp'.~~ @The preceding sample of information was provided without charge. Usually there is a fee for information.@"); case "information" (remove): say("@The Undrian Council seeks information regarding a certain entity by the name of 'Alagner'. 'You' have access to this information. 'I' have information regarding a certain entity which 'you' are seeking. The Undrian Council proposes a trade.@"); add(["Undrian Council", "Alagner", "trade"]); case "Undrian Council" (remove): say("@The Council represents what 'your' language defines as 'government'.@"); case "job": say("@'Xorinia' is a conduit for information between different planes and dimensions. 'Xorinia' also catalogs information which is necessary for growth of the Xorinite community. 'You' have information which may be valuable to 'me'. 'I' also have information that 'you' want.@"); add("information"); case "Alagner" (remove): say("@The Undrian Council has information that there is a human entity in 'your' dimension that has been called 'the wisest man in Britannia.' This entity is known as 'Alagner' and lives in 'your' colony of 'New Magincia'. 'Alagner' has what the entity calls a 'notebook'. The 'notebook' is a collection of information.@"); case "trade" (remove): say("@'I' want to absorb the information in Alagner's 'notebook'. If 'you' bring the 'notebook' here, the Undrian Council will release information useful to 'you'. Do 'you' agree to the trade?@"); gflags[WISP_OFFERED_TRADE] = true; if (askYesNo()) say("@'Xorinia' recognizes 'your' usefulness. 'I' shall be here. Human entities will call 'my' activity 'waiting'.@"); else { say("@'Xorinia' recognizes 'your' hostility. 'I' shall be here should 'you' reflect upon 'your' decision and decide to change it.@*"); set_schedule_type(SHY); return; } case "Time Lord" (remove): if (!gflags[WISP_OFFERED_TRADE]) { say("@The entity known as 'Time Lord' requests an audience with 'you'. Before 'I' can give 'you' more information about this, 'I' must propose a trade.@"); add("information"); } else say("@The entity known as 'Time Lord' is a being from the space/time dimension. The Xorinite Dimension has been communicating with 'Time Lord' for what 'humans' call 'centuries'.@"); case "notebook" (remove): say("@The human entity is welcomed by 'Xorinia'. 'You' have brought the item 'notebook'. 'I' shall now absorb the information contained therein.@~~The Wisp glows brightly for a few seconds. The notebook remains in your possession.~~@'I' have completed my absorption of the information. 'You' may now return the item 'notebook' to the entity 'Alagner'.~~@And now for the exchange of information and delivery of a message.@"); gflags[DELIVERED_NOTEBOOK_TO_WISPS] = true; giveExperience(700); add(["exchange", "message"]); case "message" (remove): say("@'Xorinia' must deliver a message to 'you'. The entity known as 'Time Lord' requests 'your' audience. 'Time Lord' is trapped at the plane known as the Shrine of Spirituality. 'You' can reach 'him' by using 'your' object 'Orb of the Moons' in the location directly to 'your' 'far' 'southwest'."); gflags[ORB_FIXED_TIMELORD] = true; add("Time Lord"); case "exchange" (remove): say("@Now for the information 'you' seek. 'This' dimension known as 'Britannia' is under attack by an entity called 'The Guardian'.~~@'The Guardian' lives in another dimension. 'Xorinia' sometimes trades information with this entity. Do 'you' want to know more about 'The Guardian'?@"); if(askYesNo()) { say("@'Xorinia' has digested information about 'The Guardian' and can state the following facts:~~@'The Guardian' possesses qualities which human entities label 'vain', 'greedy', 'egocentric', and 'malevolent'. 'The Guardian' thrives on power and domination. 'The Guardian' takes 'pleasure' from conquering other worlds. His sensory organs are now focused on 'this' dimension known as 'Britannia'.~~@'The Guardian' is attempting to enter 'this' dimension by means of an item human entities call a 'Moongate'. This 'Moongate' is not a 'red' color or 'blue' color 'Moongate', which 'Xorinia' knows is the standard form of this item. 'The Guardian' is building a 'Moongate' of the color 'black'.@"); add("Black Gate"); } else say("@'Xorinia' always responds to free information. Transaction complete.@*"); case "Black Gate" (remove): say("@The 'Black Gate' will be fully functional when the phenomenon known as 'Astronomical Alignment' next occurs.~~ @Although 'Xorinia' does not normally seek to influence actions of other manifestations, 'Xorinia' warns 'you' that if 'The Guardian' enters 'this' dimension, it will be the end of the dimension known as 'Britannia'. 'The Guardian' is powerful in 'his' own dimension. In 'your' dimension, 'he' will be unstoppable.~~@The Undrian Council sincerely hopes this information is useful. Transaction complete.@*"); gflags[LEARNED_ABOUT_ALIGNMENT] = true; case "bye": say("@'Xorinia' always welcomes the exchange of information. Farewell.@*"); set_schedule_type(SHY); return; } } --- NEW FILE: zauriel.uc --- /* * This source file contains usecode for the Keyring Quest. * Specifically, this is the (modular) function for Zauriel. * * Author: Marzo Junior * Last Modified: 2001-01-20 */ Zauriel 0x48B () { var met_zauriel; var bark; //For the main quest itself: //See if the daughter is near the father: var laurianna_near = (get_distance(LAURIANNA) <= 20); //For the "destroy Britannia" sequence: var has_amulet; //The current quest's state: var quest_state = getQuestState(); //If she is near, check to see if she has already teleported; for fun, also see if she //has the amulet: if ((event == DEATH) && (get_item_shape() == SHAPE_DRAGON)) { clear_item_flag(SI_TOURNAMENT); script item hit 50; script LAURIANNA after 6 ticks call zaurielRitualCutscene, ZAURIEL_DIED; abort; } else if (event == DEATH) { /* DISABLED if (!in_usecode()) { item->begin_casting_mode(); event = DOUBLECLICK; item->spellGreatHeal(item); } */ abort; } else if (laurianna_near) { //This should always return false unless the player hack moved Laurianna //near to Zauriel; this triggers the end of Birtannia: has_amulet = LAURIANNA->count_objects(SHAPE_AMULET, QUALITY_ANY, FRAME_ANY); } else if ((event == SCRIPTED) && (quest_state >= GEM_USED)) { //Player used the gem var barks; if (quest_state == GEM_USED) //But not killed Laundo: barks = ["@Thou hast used the gem!@", "@Find and kill the mage!@", "@Rescue my daughter!@"]; else //But is not with Laurianna: barks = ["@Thou hast killed the mage!@", "@Why art thou not with my daughter?@", "@Go and rescue her!@"]; script item { face find_direction(AVATAR); say barks[1]; wait 12; say barks[2]; wait 12; say barks[3];} AVATAR->trueUnfreeze(); item->trueUnfreeze(); return; } var in_gem_subquest; if (quest_state == NO_ONE_THERE) in_gem_subquest = true; else in_gem_subquest = false; if (event == DOUBLECLICK) { //Close all gumps so the animation starts at once: UI_close_gumps(); //Sees if the player has met Zauriel: met_zauriel = get_item_flag(MET); //Player message according to flags: if (!met_zauriel) bark = "@Might we speak, sir?@"; else if (in_gem_subquest) bark = "@There is a problem...@"; else if (!laurianna_near) bark = "@Hello again, Zauriel.@"; else bark = "@Here is thy daughter, Zauriel.@"; //SI-style start of dialog, although the NPC does not move to the Avatar: script AVATAR { call trueFreeze; face AVATAR->find_direction(item); actor frame STAND; say bark; wait 10; } //Zauriel's response according to flags: if (!met_zauriel) bark = "@The Avatar at last!@"; else if (in_gem_subquest) bark = "@Please elaborate.@"; else if (!laurianna_near) bark = "@How may I help?@"; else if (has_amulet) bark = "@NO! THE AMULET! NOOOOO!@"; else bark = "@Bless thee, Avatar!@"; //SI-style start of dialog, although the NPC does not move to the Avatar: script item { call trueFreeze; wait 5; face find_direction(AVATAR); actor frame STAND; say bark; wait 8; call Zauriel; } if (laurianna_near) { if (has_amulet) { //This should only happen if the player cheated (hack moved) Laurianna //near to her father, as she will be unable to move for as long as she //is wearing the necklace. Let's have some fun destroying the world: //Start end of world: event = LAURIANNA_DIES; AVATAR->beginCataclysm(); } else { //Laurianna has yet to teleport to her father; do so. LAURIANNA->remove_from_party(); LAURIANNA->set_schedule_type(WAIT); var eggs = find_nearby(SHAPE_EGG, 20, MASK_EGG); var egg; var index; var max; var pos; for (egg in eggs with index to max) if (egg->get_item_quality() == -1 * LAURIANNA->get_npc_number()) { pos = egg->get_object_position(); break; } LAURIANNA->move_object(pos); UI_sprite_effect(ANIMATION_TELEPORT, pos[X], pos[Y], 0, 0, 0, -1); //LAURIANNA->move_object([0x224, 0x628, 0x0]); //UI_sprite_effect(ANIMATION_TELEPORT, 0x224, 0x628, 0, 0, 0, -1); script LAURIANNA { sfx SOUND_TELEPORT; wait 4; face SOUTH; actor frame STAND; say "@Father!@"; wait 4; } } } return; } else if (event == SCRIPTED) { //Unfreeze Avatar and Zauriel: AVATAR->trueUnfreeze(); item->trueUnfreeze(); //Select which dialog to use: if (laurianna_near) { //The quest is finished. //Begin post-quest talk: zaurielLastTalk(); } else if (quest_state>= NO_ONE_THERE) zaurielTalkGemSubquest(); else zaurielTalkPreQuest(); } } |