Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.63 KB | None | 0 0
  1.  
  2. // Nurse
  3.  
  4. // heals player below level 10 for free and tells players about the doctor on the 3rd floor.
  5. // gives the resist-poison skill, used var QUEST_Forestbow_state, nibble 7
  6. 009-2.gat,147,65,0 script Nurse 119,{
  7. set @GSNAKET_AMOUNT, 5;
  8. set @BSCORPIONST_AMOUNT, 10;
  9. set @QUEST1_EXP, 5000;
  10. set @ACORNS_AMOUNT, 10;
  11. set @GREENAPPLE_AMOUNT, 5;
  12. set @REDAPPLE_AMOUNT, 5;
  13. set @ORANGE_AMOUNT, 5;
  14. set @HEALING_AMOUNT, 3;
  15. set @QUEST2_EXP, 10000;
  16.  
  17. set @Q_poison_MASK, NIBBLE_7_MASK;
  18. set @Q_poison_SHIFT, NIBBLE_7_SHIFT;
  19.  
  20. set @Q_poison, (QUEST_Forestbow_state & @Q_poison_MASK) >> @Q_poison_SHIFT;
  21. // TODO: put not needed states away
  22. if (@Q_poison == 6) goto state6;
  23. if (@Q_poison == 5) goto state5;
  24. if (@Q_poison == 4) goto state4;
  25. if (@Q_poison == 3) goto state3;
  26. if (@Q_poison == 2) goto state2;
  27. if (@Q_poison == 1) goto state1;
  28. // if (skill enabled) goto L_Help;
  29.  
  30. L_Usual:
  31. mes "[Nurse]";
  32. mes "\"How can I help you?\"";
  33. next;
  34.  
  35. if (Inspector == 1)
  36. menu
  37. "Oooh, these wounds! They hurts so much!", L_Heal,
  38. "I don't feel so well, I might be sick.", L_Doctor,
  39. "Have you seen anything out of the ordinary?", L_NohMask,
  40. "No, I'm fine.", -;
  41. if (Inspector != 1)
  42. menu
  43. "Oooh, these wounds! They hurts so much!", L_Heal,
  44. "I don't feel so well, I might be sick.", L_Doctor,
  45. "No, I'm fine.", -;
  46. mes "[Nurse]";
  47. mes "\"Then I would ask you to leave. There are people who really need our help.\"";
  48. close;
  49.  
  50. L_Doctor:
  51. mes "[Nurse]";
  52. mes "\"Then you should better see the doctor. He is usually in his office on the 3rd floor.\"";
  53. close;
  54.  
  55. L_Heal:
  56. if (baselevel > 10) goto L_NoHeal;
  57. mes "[Nurse]";
  58. mes "\"Here, let me heal you.\"";
  59. next;
  60. heal 10000, 10000;
  61. close;
  62.  
  63. L_NoHeal:
  64. mes "[Nurse]";
  65. mes "\"I'm sorry but I'm here only to help young people.";
  66. mes "Your level is already higher than 10.";
  67. mes "You can get some rest in the inn near here.\"";
  68. close;
  69.  
  70. L_NohMask:
  71. mes "[Nurse]";
  72. mes "\"I'm to busy here to observe the town.\"";
  73. close;
  74.  
  75. L_Help:
  76. mes "[Nurse]";
  77. mes "\"Welcome! You really look like a competent person. Maybe you can help to deal with a problem we have.\"";
  78. next;
  79. mes "\"We recently had some accidents in the mines. It seems, that the creatures in the mines become more aggressive.\"";
  80. next;
  81. mes "\"Unfortunaly, some of them are poisonous and it is very difficult for us to help the miners.\"";
  82. next;
  83. mes "\"For this reason, I want to do some research on this subject, to create an anitdote. But I need help to get some ingredients, someone who is able to deal with the dangerous creatures in the mines.\"";
  84. next;
  85. menu
  86. "I will do what I can. What do you need?", L_,
  87. "I'm really sorry, but I don't think, I can help you.", -;
  88.  
  89. mes "\"That is disagreeable to hear. Maybe i can find another person to take this task.\"";
  90. next;
  91. goto L_Usual;
  92.  
  93. set @Q_poison, 1;
  94. callsub S_Update_Var;
  95.  
  96. mes "\"That's great! First, I need some parts of the creatures, that cause the poison.\"";
  97. next;
  98. L_ExplainAgain1:
  99. mes "\"Please bring me five tounges of grass snakes and ten stingers of black scorpions.\"";
  100. close;
  101.  
  102. state1:
  103. mes "[Nurse]";
  104. mes "\"You are back, wonderful! Did you get, what we need for the antidote?\"";
  105. next;
  106. menu
  107. "Actually, I have another question.", L_Usual,
  108. "Sorry, I forgot. What shall I bring you?", L_ExplainAgain1,
  109. "I have what you asked for.", -,
  110. "I'm still working on that.", quit;
  111.  
  112. if (countitem("GrassSnakeTongue") < @GSNAKET_AMOUNT || countitem("BlackScorpionStinger") < @BSCORPIONST_AMOUNT) goto L_NotEnough;
  113. delitem "GrassSnakeTongue", @GSNAKET_AMOUNT;
  114. delitem "BlackScorpionStinger", @BSCORPIONST_AMOUNT;
  115. getexp @QUEST1_EXP, 0;
  116.  
  117. set @Q_poison, 2;
  118. callsub S_Update_Var;
  119.  
  120. mes "[Nurse]";
  121. mes "\"Very good. Now I have to extract the poison from this, it will take some time.\"";
  122. next;
  123. mes "\"But there are some other things we will need in any case. It would be courteous, if you could get them meanwhile.\"";
  124. next;
  125. L_ExplainAgain2:
  126. mes "\"Please bring me ten acorns, five red apples and five green apples, also five oranges. And we need some small healing potions. They will be useful to hold off the baneful effects. I guess, three of them will be enough.\"";
  127. close;
  128.  
  129. state2:
  130. mes "You look at the nurse, who seems to be really tired with shadows under her eyes. When she regocnize you, she smiles.";
  131. mes "[Nurse]";
  132. mes "\"I managed to extract the poisonous components. We should be able to create an anitidote, if you have anything else we need.\"";
  133. next;
  134. menu
  135. "Actually, I have another question.", L_Usual,
  136. "I have a bad memory. Can you tell me again, what we need?", L_ExplainAgain2,
  137. "I managed to get everything we need.", -,
  138. "I will go and get it.", quit;
  139.  
  140. if (countitem("Acorn") < @ACORNS_AMOUNT || countitem("GreenApple") < @GREENAPPLE_AMOUNT || countitem("RedApple") < @REDAPPLE_AMOUNT || countitem("Orange") < @ORANGE_AMOUNT || countitem("SmallHealingPotion") < @HEALING_AMOUNT) goto L_NotEnough;
  141. delitem "Acorn", @ACORNS_AMOUNT;
  142. delitem "GreenApple", @GREENAPPLE_AMOUNT;
  143. delitem "RedApple", @REDAPPLE_AMOUNT;
  144. delitem "Orange", @ORANGE_AMOUNT;
  145. delitem "SmallHealingPotion", @HEALING_AMOUNT;
  146. getexp @QUEST2_EXP, 0;
  147.  
  148. set @Q_poison, 3;
  149. callsub S_Update_Var;
  150.  
  151. L_Chemistry:
  152. mes "The nurse takes the ingredients you brought and starts to squeeze the fruits and to crush the acorns. Then she put the fruit juices in some complicated looking chemical device.";
  153. next;
  154. mes "After some minutes, it is blubbering and steaming and some liquidity is dropping in a pot under the device.";
  155. next;
  156. mes "Then she takes the acorn flour and the liquidity and goes to a place back in the room, where she does something you don't see.";
  157. next;
  158. mes "After just a few moments, she comes back with a smiling face, holding two different bottles in her hand.";
  159. next;
  160. mes "[Nurse]";
  161. mes "\"That was easy compared to the things to be done with the stingers and snake tounges.\"";
  162. next;
  163. mes "Then her facial expression gets more serious.";
  164. next;
  165. mes "\"When we try to find the right mixture for the antidote, we need to test it.\"";
  166. next;
  167. mes "\"For that purpose, I will poison you. Then you drink the antidote to see, if it works.\"";
  168. next;
  169. mes "\"If we make a mistake, this might be exhausting and painful, so you should rest a while and prepare yourself.\"";
  170. next;
  171. mes "\"Come back, when you feel ready for that task.\"";
  172. close;
  173.  
  174. state3:
  175. mes "[Nurse]";
  176. mes "\"Hello my friend. You feel prepared to make and test the antidote?\"";
  177. next;
  178. menu
  179. "Actually, I have another question.", L_Usual,
  180. "Yes, let us begin.",-;
  181.  
  182. set @Q_poison, 4;
  183. callsub S_Update_Var;
  184.  
  185. L_Exp_Game:
  186. mes "[Nurse]";
  187. mes "\"Listen carefully! I will explain, what you need to do.\"";
  188. next;
  189. mes "\"I have here two different distillate. One is the venom extract, the other one a stabilizer.\"";
  190. next;
  191. mes "\"We also have the healing potion.\"";
  192. next;
  193. mes "\"The problem is, that i can only guess the concentration of the venom and the stabilizer. My equipment isn't good enough to determine it precise.\"";
  194. next;
  195. mes "\"You need to find the right amount of each ingredient. I will tell you, what I can know with my analysis methods.\"";
  196. next;
  197. mes "\"Shall we start? \"";
  198. next;
  199. menu
  200. "Please explain it again.", L_Exp_Game,
  201. "Allright", -;
  202.  
  203. L_Game:
  204. // healing, venom, stabilizer
  205. set @count, 24;
  206. set @offset, 1;
  207. set @hlNeed, @offset + rand(@count);
  208. set @vnNeed, @offset + rand(@count);
  209. set @stNeed, @offset + rand(@count);
  210. //descriptions
  211. set @desc_length, 6;
  212. setarray @desc$,"very little","only a little", "little","much", "a lot", "very much", "a huge amount";
  213.  
  214. set @divisor, @count / @desc_length;
  215. set @hlIndex, (@hl_need-@offset) /@divisor;
  216. set @vnIndex, (@hl_need-@offset) /@divisor;
  217. set @stIndex, (@hl_need-@offset) /@divisor;
  218.  
  219. mes i guess you need @desc$[@hlIndex] of the healing potion.
  220. mes i guess you need @desc$[@vnIndex] of the venom extracts.
  221. mes i guess you need @desc$[@stIndex] of the stabilizer.
  222.  
  223. if(hlNeed/vnNeed > 1 ) mes "\"I see that the healing potions are needed at least "+hlNeed/vnNeed "times as much as the venom potion \"";
  224. if(vnNeed/hlNeed > 1 )
  225. mes "\"I see that the venom extracts are needed at least "+hlNeed/vnNeed "times as much as the healing potion\""
  226.  
  227. //the same for vn<->st
  228.  
  229. //the same for vn<->hl
  230. set @max, @count+@offset-1;
  231. set @min, @offset;
  232. mes "\"My scale goes up to" + @max + ". I suggest to put at least " + @min +" drops on the scale.\""
  233. mes "\"How many drops of the healing potion should we use?\"";
  234. input @hlPut;
  235. mes "\"How many drops of the venom extract units should we use? \"";
  236. input @vnPut;
  237. mes "\"How many drops of the stabilizer units should we use? \"";
  238. input @stPut;
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254. state5:
  255. mes "The nurse has a worried look in her face.";
  256. mes "[Nurse]";
  257. mes "\"Hello. I hope you recovered well?\"";
  258. next;
  259. mes "\"There is enough of the distillates left to have another try.\"";
  260. next;
  261. mes "\"Oh no, with all that trouble, I forgot to label your distillate.\"";
  262. next;
  263. mes "She holds up two ampullas.";
  264. next;
  265. //TODO: make clear, that there are distillate from other players, concentration could be different
  266. mes "\"I hope, this one are yours. I'm sorry.\"";
  267. next;
  268. mes "\"If you feel ok, we could try it again.\"";
  269. next;
  270.  
  271. menu
  272. "I still feel a bit dizzy, so I don't want to do it now.", L_Usual,
  273. "I'm ok. We can try, but please explain again.", L_Exp_Game,
  274. "Let's start right now.", L_Game;
  275.  
  276. state6:
  277. mes "The nurse looks at you pitiful.";
  278. mes "[Nurse]";
  279. mes "\"Hello. I'm really sorry for causing you so much pain.\"";
  280. next;
  281. mes "\"But if we can suceed, you are a hero! I will be able to help a lot of people.\"";
  282. next;
  283. //TODO: not sure, if it is the stuff from this player
  284. mes "\"There is enough stuff left for one last try.\"";
  285. next;
  286. mes "\"If we don't get it this time, you will have to get new ingredients.\"";
  287. next;
  288. mes "\"Do you want to have another try?\"";
  289. next;
  290.  
  291. menu
  292. "I still feel a bit dizzy, so I don't want to do it now.", L_Usual,
  293. "I'm ok. We can try, but please explain again.", L_Exp_Game,
  294. "Let's start right now.", L_Game;
  295.  
  296. state7: // geschafft
  297.  
  298. L_NotEnough:
  299. mes "[Nurse]";
  300. mes "\"This must be a missunderstanding. You don't have all the things I asked you for.\"";
  301. if (@Q_poison == 1) goto L_ExplainAgain1;
  302. if (@Q_poison == 2) goto L_ExplainAgain2;
  303.  
  304. quit:
  305. close;
  306.  
  307. S_Update_Var:
  308. set QUEST_Forestbow_state,
  309. (QUEST_Forestbow_state & ~(@Q_poison_MASK)
  310. | (@Q_poison << @Q_poison_SHIFT));
  311. return;
  312.  
  313.  
  314. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement