Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.89 KB | None | 0 0
  1. uint dlg_SayBuyJet(Critter& player, Critter@ npc, string@ text)
  2. {
  3. if(!IS_DIALOG_SAY_MODE(text))
  4. return DIALOG_END;
  5.  
  6. uint price = 500;
  7. uint cnt = 0;
  8. if(!StrToInt(text, cnt))
  9. return DIALOG_END;
  10.  
  11. if(cnt > 0)
  12. {
  13. if(_CritCountItem(player, PID_BOTTLE_CAPS) >= price*cnt)
  14. {
  15. _CritDeleteItem(player, PID_BOTTLE_CAPS, (price*cnt));
  16. player.AddItem(PID_JET, cnt);
  17. npc.Say(SAY_NORM_ON_HEAD, "Pleasure doing business with you.");
  18. }
  19. else
  20. {
  21. npc.Say(SAY_NORM_ON_HEAD, "Come back with money!");
  22. return DIALOG_END;
  23. }
  24. }
  25. return DIALOG_END;
  26. }
  27.  
  28. uint dlg_SayBuyNuka(Critter& player, Critter@ npc, string@ text)
  29. {
  30. if(!IS_DIALOG_SAY_MODE(text))
  31. return DIALOG_END;
  32.  
  33. uint price = 100;
  34. uint cnt = 0;
  35. if(!StrToInt(text, cnt))
  36. return DIALOG_END;
  37.  
  38. if(cnt > 0)
  39. {
  40. if(_CritCountItem(player, PID_BOTTLE_CAPS) >= price*cnt)
  41. {
  42. _CritDeleteItem(player, PID_BOTTLE_CAPS, (price*cnt));
  43. player.AddItem(PID_NUKA_COLA, cnt);
  44. npc.Say(SAY_NORM_ON_HEAD, "Pleasure doing business with you.");
  45. }
  46. else
  47. {
  48. npc.Say(SAY_NORM_ON_HEAD, "Come back with money!");
  49. return DIALOG_END;
  50. }
  51. }
  52. return DIALOG_END;
  53. }
  54.  
  55. uint dlg_SayBuyBeer(Critter& player, Critter@ npc, string@ text)
  56. {
  57. if(!IS_DIALOG_SAY_MODE(text))
  58. return DIALOG_END;
  59.  
  60. uint price = 10;
  61. uint cnt = 0;
  62. if(!StrToInt(text, cnt))
  63. return DIALOG_END;
  64.  
  65. if(cnt > 0)
  66. {
  67. if(_CritCountItem(player, PID_BOTTLE_CAPS) >= price*cnt)
  68. {
  69. _CritDeleteItem(player, PID_BOTTLE_CAPS, (price*cnt));
  70. player.AddItem(PID_BEER, cnt);
  71. npc.Say(SAY_NORM_ON_HEAD, "Pleasure doing business with you.");
  72. }
  73. else
  74. {
  75. npc.Say(SAY_NORM_ON_HEAD, "Come back with money!");
  76. return DIALOG_END;
  77. }
  78. }
  79. return DIALOG_END;
  80. }
  81.  
  82. uint dlg_SayBuyBooze(Critter& player, Critter@ npc, string@ text)
  83. {
  84. if(!IS_DIALOG_SAY_MODE(text))
  85. return DIALOG_END;
  86.  
  87. uint price = 10;
  88. uint cnt = 0;
  89. if(!StrToInt(text, cnt))
  90. return DIALOG_END;
  91.  
  92. if(cnt > 0)
  93. {
  94. if(_CritCountItem(player, PID_BOTTLE_CAPS) >= price*cnt)
  95. {
  96. _CritDeleteItem(player, PID_BOTTLE_CAPS, (price*cnt));
  97. player.AddItem(PID_BOOZE, cnt);
  98. npc.Say(SAY_NORM_ON_HEAD, "Pleasure doing business with you.");
  99. }
  100. else
  101. {
  102. npc.Say(SAY_NORM_ON_HEAD, "Come back with money!");
  103. return DIALOG_END;
  104. }
  105. }
  106. return DIALOG_END;
  107. }
  108.  
  109. uint dlg_SayBuyCigarettes(Critter& player, Critter@ npc, string@ text)
  110. {
  111. if(!IS_DIALOG_SAY_MODE(text))
  112. return DIALOG_END;
  113.  
  114. uint price = 100;
  115. uint cnt = 0;
  116. if(!StrToInt(text, cnt))
  117. return DIALOG_END;
  118.  
  119. if(cnt > 0)
  120. {
  121. if(_CritCountItem(player, PID_BOTTLE_CAPS) >= price*cnt)
  122. {
  123. _CritDeleteItem(player, PID_BOTTLE_CAPS, (price*cnt));
  124. player.AddItem(PID_CIGARETTES, cnt);
  125. npc.Say(SAY_NORM_ON_HEAD, "Pleasure doing business with you.");
  126. }
  127. else
  128. {
  129. npc.Say(SAY_NORM_ON_HEAD, "Come back with money!");
  130. return DIALOG_END;
  131. }
  132. }
  133. return DIALOG_END;
  134. }
  135.  
  136. uint dlg_SayBuyLighter(Critter& player, Critter@ npc, string@ text)
  137. {
  138. if(!IS_DIALOG_SAY_MODE(text))
  139. return DIALOG_END;
  140.  
  141. uint price = 100;
  142. uint cnt = 0;
  143. if(!StrToInt(text, cnt))
  144. return DIALOG_END;
  145.  
  146. if(cnt > 0)
  147. {
  148. if(_CritCountItem(player, PID_BOTTLE_CAPS) >= price*cnt)
  149. {
  150. _CritDeleteItem(player, PID_BOTTLE_CAPS, (price*cnt));
  151. player.AddItem(PID_LIGHTER, cnt);
  152. npc.Say(SAY_NORM_ON_HEAD, "Pleasure doing business with you.");
  153. }
  154. else
  155. {
  156. npc.Say(SAY_NORM_ON_HEAD, "Come back with money!");
  157. return DIALOG_END;
  158. }
  159. }
  160. return DIALOG_END;
  161. }
  162.  
  163. uint dlg_SayBuyMedGel(Critter& player, Critter@ npc, string@ text)
  164. {
  165. if(!IS_DIALOG_SAY_MODE(text))
  166. return DIALOG_END;
  167.  
  168. uint price = 25;
  169. uint cnt = 0;
  170. if(!StrToInt(text, cnt))
  171. return DIALOG_END;
  172.  
  173. if(cnt > 0)
  174. {
  175. if(_CritCountItem(player, PID_BOTTLE_CAPS) >= price*cnt)
  176. {
  177. _CritDeleteItem(player, PID_BOTTLE_CAPS, (price*cnt));
  178. player.AddItem(PID_BIO_GEL, cnt);
  179. npc.Say(SAY_NORM_ON_HEAD, "Pleasure doing business with you.");
  180. }
  181. else
  182. {
  183. npc.Say(SAY_NORM_ON_HEAD, "Come back with money!");
  184. return DIALOG_END;
  185. }
  186. }
  187. return DIALOG_END;
  188. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement