kvm_item_pay.txt 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. //===== rAthena Script =======================================
  2. //= BattleGround System - KvM Item Dealer
  3. //===== Description: =========================================
  4. //= [Official Conversion]
  5. //= Kreiger Von Midgard Battleground Point redemption NPC
  6. //= * NOTE *
  7. //= KvM Does NOT use items, but a character variable to
  8. //= keep track of points. This NPC when talked to will
  9. //= convert already-given tokens and convert them to points.
  10. //= under the player variable kvm_point.
  11. //===== Changelogs: ==========================================
  12. //= 1.0 First Version. [L0ne_W0lf]
  13. //============================================================
  14. bat_room,151,144,3 script KVM Logistic Officer#a 734,{
  15. if (countitem(6376)) {// KVM_Badge
  16. set .@pointstoadd,countitem(6376);
  17. delitem 6376,.@pointstoadd;
  18. set kvm_point,kvm_point+.@pointstoadd;
  19. mes "[Logistics]";
  20. mes "Are those "+getitemname(6376)+"s I see?";
  21. mes "We no longer accept that currency,";
  22. mes "but I can exchange those for you,";
  23. mes "So you have "+.@pointstoadd+" "+getitemname(6376)+"s?";
  24. mes "Alright, all set, you now have ^580080"+ kvm_point +"^000000 KVM Points.";
  25. next;
  26. }
  27. if (checkweight(1201,1) == 0) {
  28. mes "- Wait a minute !! -";
  29. mes "- Currently you're carrying -";
  30. mes "- too many items with you. -";
  31. mes "- Please try again -";
  32. mes "- after you loose some weight. -";
  33. close;
  34. }
  35. mes "[Logistics]";
  36. mes "Hello?";
  37. mes "I am in charge of distributing";
  38. mes "reward items for KVM points. Any";
  39. mes "wrong selection of items will not";
  40. mes "be reversed. Please be carefull.";
  41. mes "Select the next step please.";
  42. next;
  43. set .@name$,strcharinfo(0);
  44. switch(select("Read the KVM Catalogue.:Purchase KVM Items.:Confirm KVM Points.:Explanation of KVM Rewards.:Explanation of KVM Points.")) {
  45. case 1:
  46. mes "[Logistics]";
  47. mes "Here is the catalogue of KVM items.";
  48. mes "Each weapon requires 2,000 points";
  49. mes "and each armor from 10 to 1,200";
  50. mes "points. So, be carefull when";
  51. mes "selecting a reward.";
  52. close2;
  53. readbook 11017,1;
  54. end;
  55. case 2:
  56. mes "[Logistics]";
  57. mes "Wich items do you want to see? As";
  58. mes "for the detailed specification of";
  59. mes "the items, please refer to the";
  60. mes "^3131FFCatalogue^000000.";
  61. next;
  62. switch(select("Weapon:Armor/Accessory:Mass-Production Armor/Accessory:Popularized Armor/Accessory")) {
  63. case 1:
  64. mes "[Logistics]";
  65. mes "You have selected the Weapon Category.";
  66. mes "Please select a sub-category.";
  67. next;
  68. switch(select("Dagger/Sword/Spear:Staff/Mace/Axe/Shuriken:Bow/Katar/Instrument/Whip:Book/Knuckle:Revolver/Rifle/Gun/Grenade Launcher")) {
  69. case 1:
  70. mes "[Logistics]";
  71. mes "You have selected the Dagger/Sword/Spear category.";
  72. mes "Please select a sub-category.";
  73. next;
  74. switch(select("Dagger:One-handed Sword:Two-handed Sword:One-handed Spear:Two-handed Spear")) {
  75. case 1: callsub PurchaseItem,13042,0,1; //Krieger_Dagger1
  76. case 2:
  77. mes "[Logistics]";
  78. mes "You have selected the 'One-handed Sword' category.";
  79. mes "There are 3 One-handed Swords: Glorious Flamberge, Glorious Rapier and Glorious Holy Avenger.";
  80. mes "If you want their details, please refer to the KVM Catalogue.";
  81. mes "Please select one of them.";
  82. next;
  83. switch(select("Glorious Flamberge:Glorious Rapier:Glorious Holy Avenger")) {
  84. case 1: callsub PurchaseItem,13416,0,0; //Krieger_Onehand_Sword1
  85. case 2: callsub PurchaseItem,13417,0,0; //Krieger_Onehand_Sword2
  86. case 3: callsub PurchaseItem,13418,0,0; //Krieger_Onehand_Sword3
  87. }
  88. case 3: callsub PurchaseItem,1187,0,1; //Krieger_Twohand_Sword1
  89. case 4: callsub PurchaseItem,1426,0,1; //Krieger_Onehand_Spear1
  90. case 5: callsub PurchaseItem,1486,0,1; //Krieger_Twohand_Spear1
  91. }
  92. case 2:
  93. mes "[Logistics]";
  94. mes "You have selected the 'Staff/Mace/Axe/Shuriken' category.";
  95. mes "Please select a sub-category.";
  96. next;
  97. switch(select("Staff:Mace:One-handed Axe:Two-handed Axe:Shuriken")) {
  98. case 1:
  99. mes "[Logistics]";
  100. mes "You have selected the 'Staff' category.";
  101. mes "There are 3 Staffs: a Two-handed Weapon Glorious Destruction Staff, a One-handed Glorious Arc Wand and a Glorious Healing Staff.";
  102. mes "If you want their details, please refer to the KVM Catalogue.";
  103. mes "Please select one of them.";
  104. next;
  105. switch(select("Glorious Destruction Staff:Glorious Arc Wand:Glorious Healing Staff")) {
  106. case 1: callsub PurchaseItem,2002,0,0; //Krieger_Twohand_Staff1
  107. case 2: callsub PurchaseItem,1640,0,0; //Krieger_Onehand_Staff1
  108. case 3: callsub PurchaseItem,1641,0,0; //Krieger_Onehand_Staff2
  109. }
  110. case 2: callsub PurchaseItem,1546,0,1; //Krieger_Onehand_Mace1
  111. case 3: callsub PurchaseItem,1310,0,1; //Krieger_Onehand_Axe1
  112. case 4: callsub PurchaseItem,1382,0,1; //Krieger_Twohand_Axe1
  113. case 5: callsub PurchaseItem,13307,0,1; //Krieger_Huuma_Shuriken1
  114. }
  115. case 3:
  116. mes "[Logistics]";
  117. mes "You have selected the Bow/Katar/Instrument/Whip category.";
  118. mes "Please select a sub-category.";
  119. next;
  120. switch(select("Bow:Katar:Instrument:Whip")) {
  121. case 1: callsub PurchaseItem,1743,0,1; //Krieger_Bow1
  122. case 2:
  123. mes "[Logistics]";
  124. mes "You have selected the 'Katar' category.";
  125. mes "There are 2 Katars: Glorious Bloody Roar and Glorious Jamadhar.";
  126. mes "If you want their details, please refer to the KVM Catalogue.";
  127. mes "Please select one of them.";
  128. next;
  129. switch(select("Glorious Bloody Roar:Glorious Jamadhar")) {
  130. case 1: callsub PurchaseItem,1281,0,0; //Krieger_Katar1
  131. case 2: callsub PurchaseItem,1282,0,0; //Krieger_Katar2
  132. }
  133. case 3: callsub PurchaseItem,1927,0,1; //Krieger_Instrument1
  134. case 4: callsub PurchaseItem,1981,0,1; //Krieger_Whip1
  135. }
  136. case 4:
  137. mes "[Logistics]";
  138. mes "You have selected the Book/Knuckle category.";
  139. mes "Please select a sub-category.";
  140. next;
  141. switch(select("Book:Knuckle")) {
  142. case 1:
  143. mes "[Logistics]";
  144. mes "You have selected 'Book'.";
  145. mes "There are 2 Books: Glorious Tablet and Glorious Apocalypse.";
  146. mes "If you want their details, please refer to the KVM Catalogue.";
  147. mes "Please select one of them.";
  148. next;
  149. switch(select("Glorious Tablet:Glorious Apocalypse")) {
  150. case 1: callsub PurchaseItem,1576,0,0; //Krieger_Book1
  151. case 2: callsub PurchaseItem,1577,0,0; //Krieger_Book2
  152. }
  153. case 2:
  154. mes "[Logistics]";
  155. mes "You have selected the 'Knuckle' category.";
  156. mes "There are 2 Knuckles: Glorious Claw and Glorious Fist.";
  157. mes "If you want their details, please refer to the KVM Catalogue.";
  158. mes "Please select one of them.";
  159. next;
  160. switch(select("Glorious Claw:Glorious Fist")) {
  161. case 1: callsub PurchaseItem,1826,0,0; //Krieger_Knuckle1
  162. case 2: callsub PurchaseItem,1827,0,0; //Krieger_Knuckle2
  163. }
  164. }
  165. case 5:
  166. mes "[Logistics]";
  167. mes "You have selected the 'Revolver/Rifle/Gun/Grenade Launcher' category.";
  168. mes "Please select a sub-category.";
  169. next;
  170. switch(select("Revolver:Rifle:Gatling Gun:Shotgun:Grenade Launcher")) {
  171. case 1: callsub PurchaseItem,13110,0,1; //Krieger_Pistol1
  172. case 2: callsub PurchaseItem,13176,0,1; //Krieger_Rifle1
  173. case 3: callsub PurchaseItem,13177,0,1; //Krieger_Gatling1
  174. case 4: callsub PurchaseItem,13178,0,1; //Krieger_Shotgun1
  175. case 5: callsub PurchaseItem,13179,0,1; //Krieger_Launcher1
  176. }
  177. }
  178. case 2:
  179. mes "[Logistics]";
  180. mes "You have selected the 'Armor/Accessory' category.";
  181. mes "Please select a sub-category.";
  182. next;
  183. switch(select("Armor:Cloak:Shoes:Accessory")) {
  184. case 1: callsub PurchaseItem,2394,1,2; //Krieger_Suit1
  185. case 2: callsub PurchaseItem,2549,2,2; //Krieger_Muffler1
  186. case 3: callsub PurchaseItem,2444,3,2; //Krieger_Shoes1
  187. case 4: callsub PurchaseItem,2772,4,2; //Krieger_Ring1
  188. }
  189. case 3:
  190. mes "[Logistics]";
  191. mes "You have selected the 'Mass-Production Armor/Accessory' category.";
  192. mes "Please select a sub-category.";
  193. next;
  194. switch(select("Mass-Production Armor:Mass-Production Shoes:Mass-Production Accessory")) {
  195. case 1: callsub PurchaseItem,2395,5,3; //Krieger_Suit2
  196. case 2: callsub PurchaseItem,2445,6,3; //Krieger_Shoes2
  197. case 3: callsub PurchaseItem,2773,7,3; //Krieger_Ring2
  198. }
  199. case 4:
  200. mes "[Logistics]";
  201. mes "You have selected the 'Popularized Armor/Accessory' category.";
  202. mes "Please select a sub-category.";
  203. next;
  204. switch(select("Popularized Armor:Popularized Shoes:Popularized Accessory")) {
  205. case 1: callsub PurchaseItem,2396,8,4; //Krieger_Suit3
  206. case 2: callsub PurchaseItem,2446,9,4; //Krieger_Shoes3
  207. case 3: callsub PurchaseItem,2774,10,4; //Krieger_Ring3
  208. }
  209. }
  210. case 3:
  211. mes "[Logistics]";
  212. mes ""+ .@name$ +", your current points are ^580080"+ kvm_point +"^000000 KVM Points.";
  213. close;
  214. case 4:
  215. mes "[Logistics]";
  216. mes "There are 3 categories in KVM Rewards: Weapon/Armor.Accessory.";
  217. next;
  218. mes "[Logistics]";
  219. mes "Weapon rewards require 2,000 KVM points for each.";
  220. mes "There are 3 types of Armor rewards and they require 840/630/580 KVM points fo each.";
  221. mes "Accessory rewards require 1,200 KVM points for each.";
  222. next;
  223. mes "[Logistics]";
  224. mes "Kreiger Weapons are LV 4 Weapons, they can be upgraded and will have special effects: Slaughter, Destruction and Blessing.";
  225. next;
  226. mes "[Logistics]";
  227. mes "When you can wear all 3 armors, you can have a special set of options.";
  228. mes "Also, when Kreiger Accessory rewards are worn with medalsm it will bring you special set rewards.";
  229. next;
  230. mes "[Logistics]";
  231. mes "Finally, there are Mass-Production Armor and Accessory rewards.";
  232. mes "Players whose Lvl is higher than 60 can equip Mass-Production Armors and there is a Lvl limit for Popularized Armor as well.";
  233. close;
  234. case 5:
  235. mes "[Logistics]";
  236. mes "KVM Points are rewarded when you win, lose or draw in Kreiger Von Midgard (KVM).";
  237. mes "You can have special Rewards by using these points.";
  238. close;
  239. }
  240. PurchaseItem:
  241. // Pricing for Weapon, Suit1, Muffler1, Shoes1, Ring1m Suit2, Shoes2, Ring2, Suit3, Shoes3, Ring3
  242. setarray .@prices[0],2000,840,630,580,1200,120,70,200,15,10,30;
  243. .@item_id = getarg(0);
  244. .@req_setting = getarg(1);
  245. .@item_type = getarg(2);
  246. mes "[Logistics]";
  247. if (!.@item_type)
  248. mes "You have selected ^ff0000"+ getitemname(.@item_id) +"^000000.";
  249. else if (.@item_type == 1)
  250. mes "There is only one "+ callfunc("F_GetWeaponType",.@item_id) +": "+ getitemname(.@item_id) +".";
  251. else if (.@item_type == 2) {
  252. mes "You have selected '"+ callfunc("F_GetArmorType",.@item_id) +"'.";
  253. mes "The armor for one whose Lvl is more than 80 is: ^ff0000"+ getitemname(.@item_id) +"^000000.";
  254. }
  255. else if (.@item_type == 3) {
  256. mes "You have selected 'Mass-Production "+ callfunc("F_GetArmorType",.@item_id) +"'.";
  257. mes "There is only one Mass-Production "+ callfunc("F_GetArmorType",.@item_id) +": ^ff0000"+ getitemname(.@item_id) +"^000000.";
  258. }
  259. else if (.@item_type == 4) {
  260. mes "You have selected 'Popularized "+ callfunc("F_GetArmorType",.@item_id) +"'.";
  261. mes "There is only one Popularized "+ callfunc("F_GetArmorType",.@item_id) +": ^ff0000"+ getitemname(.@item_id) +"^000000.";
  262. }
  263. if (!.@req_setting)
  264. mes "It requires ^0000ff2,000^000000 KVM Points, and "+ .@name$ +", your points are: ^580080"+ kvm_point +"^000000.";
  265. else if (.@req_setting == 4)
  266. mes "It requires ^0000ff1,200^000000 KVM Points, and "+ .@name$ +", your points are: ^580080"+ kvm_point +"^000000.";
  267. else
  268. mes "It requires ^0000ff"+ .@prices[.@req_setting] +"^000000 KVM Points, and "+ .@name$ +", your points are: ^580080"+ kvm_point +"^000000.";
  269. mes "Are you sure you want this item?";
  270. next;
  271. switch(select("No, I won't purchase it.:Yes, I will purchase it.")) {
  272. case 1:
  273. mes "[Logistics]";
  274. mes "You have selected 'I won't purchase it'.";
  275. mes "When purchasing an item, please be careful there are no refunds.";
  276. break;
  277. case 2:
  278. if (kvm_point >= .@prices[.@req_setting]) {
  279. kvm_point = kvm_point -.@prices[.@req_setting];
  280. getitem .@item_id,1;
  281. mes "[Logistics]";
  282. mes "You have purchased a "+ getitemname(.@item_id) +".";
  283. if (!.@req_setting)
  284. mes "Your KVM Points are reduced by ^0000ff"+ .@req_setting +"^000000 points, your KVM Points are now ^580080"+kvm_point+"^000000.";
  285. if (.@req_setting == 4)
  286. mes "Your KVM Points are reduced by ^0000ff1,200^000000 points, your KVM Points are now ^580080"+kvm_point+"^000000.";
  287. else
  288. mes "Your KVM Points are reduced by ^0000ff"+ .@prices[.@req_setting] +"^000000 points, your KVM Points are now ^580080"+kvm_point+"^000000.";
  289. }
  290. else {
  291. mes "[Logistics]";
  292. if (!.@req_setting)
  293. mes "You need ^0000ff2,000^000000 KVM Points to purchase this item.";
  294. else if (.@req_setting == 4)
  295. mes "You need ^0000ff1,200^000000 KVM Points to purchase this item.";
  296. else
  297. mes "You need ^0000ff"+ .@prices[.@req_setting] +"^000000 KVM Points to purchase this item.";
  298. mes "However, your KVM Points are now ^580080"+ kvm_point +"^000000.";
  299. mes "Which are not enough to buy it.";
  300. mes "When you get enough points, please come back again.";
  301. }
  302. }
  303. close;
  304. }