1/* 2 * 3 * Copyright (C) 2006 The Exult Team 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 */ 19 20void Baiyanda object#(0x48F) () 21{ 22 if (event == DOUBLECLICK) 23 { 24 AVATAR->item_say("@Greetings@"); 25 delayedBark(BAIYANDA, "@We knew thou would come.@", 3); 26 BAIYANDA->set_schedule_type(TALK); 27 } 28 if (event == STARTED_TALKING) 29 { 30 BAIYANDA->run_schedule(); 31 BAIYANDA->clear_item_say(); 32 BAIYANDA->show_npc_face0(0); 33 34 if (BAIYANDA->get_item_flag(MET)) 35 say("@We meet again.@"); 36 else 37 say("@Thou art Avatar!@"); 38 39 add(["name", "bye"]); 40 if (hasItemCount(PARTY, 1, SHAPE_BUCKET, 9, 2)) 41 add("got blood"); 42 43 converse (0) 44 { 45 case "got blood" (remove): 46 say("@Hurry! Take Ice Dragon blood to Yenani! No time to delay!@"); 47 abort; 48 49 case "name" (remove): 50 say("@I am Baiyanda, mate of Mwaerno and healer for Gwani people.@"); 51 BAIYANDA->set_item_flag(MET); 52 add(["Mwaerno", "healer"]); 53 54 case "Mwaerno" (remove): 55 say("@He great hunter. Mwaerno and Baiyanda joined by Yenani many years ago.@"); 56 add(["hunter", "Yenani"]); 57 58 case "hunter" (remove): 59 say("@Myauri Master Hunter of Gwani. He know where game are and how to find. But Mwaerno best at catching game. I very proud of him.@"); 60 61 case "Yenani" (remove): 62 say("@She our chieftain. Gwani people always led by females. Yenani good friend of Gwenno.@"); 63 add("Gwenno"); 64 65 case "Gwenno" (remove): 66 if (GWENNO->get_schedule_type() == WAIT) 67 { 68 say("@Gwenno dead. She good woman. Very generous. She once make gift of bucket to Baiyanda. Baiyanda place body at sacred Gwani Death Temple.@"); 69 gflags[TALKED_TO_GWANI_ABOUT_GWENNO] = true; 70 add("Where is the temple?"); 71 } 72 else 73 say("@Baiyanda happy that Gwenno alive again!@"); 74 75 case "Where is the temple?" (remove): 76 say("@It not thing for thou to know. Gwenno must rest now, her soul rest. Leave her. I know it painful, but thou must do this. Even if thou found her thou could not unseal her body without sacred horn of Gwani. Long ago it taken by fiend who steals our dead from us.@"); 77 78 case "healer" (remove): 79 say("@I treat all wounds and illness of Gwani people. Baiyanda not use ways of human healers. Gwani live simple in balance with nature, not force on nature. Gwani healers learn secrets of herbs and animals. If thou need healer, I will help thou.@"); 80 add(["I need a healer", "herbs and animals"]); 81 82 case "I need a healer" (remove): 83 say("@Rest easy. I will help thou.@"); 84 say("@Who thou want to heal?@"); 85 var living_npcs = getNonAutomatonPartyMembers(); 86 var namelist = ["nobody"]; 87 var npc; 88 var index; 89 var max; 90 91 for (npc in living_npcs with index to max) 92 namelist = (namelist & npc->get_npc_name()); 93 94 living_npcs = [0, living_npcs]; 95 96 var choice = chooseFromMenu2(namelist); 97 choice = living_npcs[choice]; 98 if (choice == 0) 99 say("@Maybe thou return later.@"); 100 else 101 { 102 var npcnumber = choice->get_npc_number(); 103 var poisoned = choice->get_item_flag(POISONED); 104 var str = choice->get_npc_prop(STRENGTH); 105 var hps = choice->get_npc_prop(HEALTH); 106 var npcname = choice->get_npc_name(); 107 if (str > hps) 108 { 109 npcnumber->set_npc_prop(HEALTH, str - hps); 110 say("@All right, ", npcname, " healed now!@"); 111 } 112 else 113 { 114 if (!poisoned) 115 { 116 if (npcnumber == AVATAR) 117 say("@Thou not hurt!@"); 118 else 119 say("@", npcname, " not hurt! Thou play trick?@"); 120 } 121 else if (npcnumber == AVATAR) 122 say("@Thou poisoned bad! I fix.@"); 123 else 124 say("@", npcname, " poisoned bad! I fix.@"); 125 } 126 if (poisoned == true) 127 { 128 choice->clear_item_flag(POISONED); 129 say("@Good! Poison gone now.@"); 130 } 131 } 132 133 case "herbs and animals" (remove): 134 say("@Magic corrupts balance of nature. Gwani healers learn things like prepare dried fish and use Ice Dragon blood.@"); 135 add(["balance of nature", "dried fish", "Ice Dragon blood"]); 136 137 case "balance of nature" (remove): 138 say("@To Gwani, best way to live -- only way -- to live in harmony with nature. And so we not do anything that force nature.@"); 139 140 case "dried fish" (remove): 141 say("@Dried fish very good food. It keeps thou from hunger longer than other food.@"); 142 say("@Would thou like some?@"); 143 if (askYesNo()) 144 { 145 say("@Here, have some. It good.@"); 146 giveItemsToPartyMember(AVATAR, 1, SHAPE_FOOD, QUALITY_ANY, FRAME_DRIED_FISH, false, true); 147 } 148 else 149 say("@Too bad. Thou should try some.@"); 150 151 case "Ice Dragon blood" (remove): 152 say("@Special things about blood of Ice Dragon that can cure almost any sickness.@"); 153 say("@But Ice Dragons very rare creatures. Gwani honor all life -- try everything before we hunt them.@"); 154 say("@One did live north of our village. We drove different one east many years ago.@"); 155 156 if (NEYOBI->get_item_flag(SI_ZOMBIE)) 157 { 158 say("@Ice Dragon blood maybe only thing powerful enough to cure Neyobi. But it so rare that it very hard to find. Five of our hunters looking for it.@"); 159 say("@Gwenno said thou help people in need. Thou must find some Ice Dragon blood for Neyobi! It is the last hope!@"); 160 if (!gflags[BAIYANDA_GAVE_BUCKET]) 161 { 162 say("@Here, take bucket of mine. If thou find and slay Ice Dragon, please bring bucket of blood. Take to Yenani, she know what to do with it.@"); 163 giveItemsToPartyMember(AVATAR, 1, SHAPE_BUCKET, 0, 0, false, true); 164 say("@Good luck. Neyobi's life depend on it.@"); 165 gflags[BAIYANDA_GAVE_BUCKET] = true; 166 } 167 else 168 say("@Give Yenani bucket of Ice Dragon blood. She know what to do with it.@"); 169 } 170 else 171 say("@Ice Dragon blood saved Neyobi's life. Great many thanks, Avatar.@"); 172 173 add(["north dragon", "east dragon", "Neyobi"]); 174 175 case "north dragon" (remove): 176 say("@I do not know exactly where. We heard nothing for many years.@"); 177 178 case "east dragon" (remove): 179 say("@Years ago, Gwani attacked by dragon. Myauri and Mwaerno led hunters to fight it. Gwani drove it east beyond mountains. It very old dragon and still unmated. Very rare.@"); 180 181 case "Neyobi" (remove): 182 if (NEYOBI->get_item_flag(SI_ZOMBIE)) 183 say("@Neyobi ill from strange sickness. Baiyanda never seen before. Nothing Baiyanda tried help her. Ice Dragon blood only thing that could save her.@"); 184 else 185 say("@No magic in whole world would have saved Neyobi's life. But when Gwani way of healing with balance of nature done, she better.@"); 186 187 case "bye": 188 UI_remove_npc_face0(); 189 UI_remove_npc_face1(); 190 delayedBark(AVATAR, "@I thank thee.@", 0); 191 delayedBark(BAIYANDA, "@Very good.@", 3); 192 break; 193 194 } 195 } 196} 197