kvm_item_pay.txt 13 KB

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