te_merchant.txt 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. //===== rAthena Script =======================================
  2. //= Merchant WoE TE
  3. //===== Description: =========================================
  4. //= [Official Conversion]
  5. //= Merchants and Rental merchant template for WoE TE
  6. // (duplicates in re/woe_te/<castle file>).
  7. //===== Changelogs: ==========================================
  8. //= 1.0 First Version. [Capuche]
  9. //============================================================
  10. te_prt_gld,114,153,4 shop TE Potion Merchant#prt 4_M_TELEPORTER,11557:-1,11558:-1
  11. te_alde_gld,215,184,4 duplicate(TE Potion Merchant#prt) TE Potion Merchant#alde 4_M_TELEPORTER
  12. // Rental Items manager
  13. //=======================================
  14. - script rental_woe_TE -1,{
  15. mes "[Rental Items Manager]";
  16. if (jobcanentermap("te_prtcas01") == 1) {
  17. .@list01$ = "[Shield] [Armor] [Garment]";
  18. .@list02$ = "[Helmet] [Accessory] [Shoes]";
  19. .@list03$ = "[Sword] [Spear] [Axe] [Katar]";
  20. .@list04$ = "[Mace] [Staff] [Fist] [Book]";
  21. .@list05$ = "[Bow] [Gun] [Musical Instrument] [Whip]";
  22. mes "^4d4dffWe offer various battlegears that you can use in the regions of Gloria and Kafragarten based on the rules of Siege Battle TE.^000000";
  23. next;
  24. mes "[Rental Items Manager]";
  25. mes "^4d4dffWe provide 1-day rental periods for free.^000000";
  26. mes "However, the provided rental items ^4d4dffwill not be effective outside the Siege Battle TE area.^000000";
  27. next;
  28. mes "[Rental Items Manager]";
  29. mes "^4d4dffYou have to be Lv 40 or higher in order to rent an item.^000000";
  30. mes "Select the desired equipment.";
  31. next;
  32. while(1) {
  33. switch( select( "View rental equipments", .@list01$, .@list02$, .@list03$, .@list04$, .@list05$, "Leave" ) ) {
  34. case 1:
  35. mes "[Rental Items Manager]";
  36. mes "Here is a list of rental items and descriptions.";
  37. close2;
  38. readbook 11059,1;// WoE_TE_Rental_List
  39. end;
  40. case 2:
  41. callsub( S_Rent, "shields, armors, and garments",
  42. 2178,"TE Siege Buckler", // TE_Woe_Buckler
  43. 2179,"TE Siege Shield", // TE_Woe_Shield
  44. 2180,"TE Siege Magic Guard", // TE_Woe_Magic_Guard
  45. 15062,"TE Siege Long Coat", // TE_Woe_Coat
  46. 15063,"TE Siege Mail", // TE_Woe_Chain_Mail
  47. 15064,"TE Siege Magic Coat", // TE_Woe_Mage_Coat
  48. 20702,"TE Siege Muffler", // TE_Woe_Muffler
  49. 20703,"TE Siege Cape", // TE_Woe_Manteau
  50. 20704,"TE Siege Magic Cape" ); // TE_Woe_Magic_Manteau
  51. break;
  52. case 3:
  53. callsub( S_Rent, "helmets, accessories, and shoes",
  54. 2496,"TE Siege Shoes", // TE_Woe_Shoes
  55. 2497,"TE Siege Boots", // TE_Woe_Boots
  56. 2498,"TE Siege Magic Sandals", // TE_Woe_Magic_Sandal
  57. 2944,"TE Guardian Ring", // TE_Ring_Of_Protection
  58. 2945,"TE Ring of Wrath", // TE_Ring_Of_Rage
  59. 2946,"TE Ring of Rebellion", // TE_Ring_Of_Defiance
  60. 18732,"TE Siege Cap", // TE_Woe_Cap
  61. 18733,"TE Siege Bone Helm", // TE_Woe_Bone_Helm
  62. 18734,"TE Siege Magic Eyes" ); // TE_Woe_Magic_Eyes
  63. break;
  64. case 4:
  65. callsub( S_Rent, "swords, spears, axes, and katars",
  66. 1299,"TE Siege Katar", // TE_Woe_Katar
  67. 1399,"TE Siege Two-Handed Axe", // TE_Woe_Two_Handed_Axe
  68. 1495,"TE Siege Lance", // TE_Woe_Lance
  69. 13317,"TE Siege Magic Shuriken", // TE_Woe_Huuma
  70. 21006,"TE Siege Two-Handed Sword", // TE_Woe_Two_Hand_Sword
  71. 1319,"TE Siege Axe", // TE_Woe_Axe
  72. 1437,"TE Siege Pike", // TE_Woe_Pike
  73. 13083,"TE Siege Knife", // TE_Woe_Knife
  74. 13439,"TE Siege Sword" ); // TE_Woe_Sword
  75. break;
  76. case 5:
  77. callsub( S_Rent, "staves, maces, books, and fists",
  78. 2019,"TE Siege Two-Handed Staff",// TE_Woe_Two_Hand_Staff
  79. 1591,"TE Siege Book", // TE_Woe_Book
  80. 1667,"TE Siege Staff", // TE_Woe_Staff
  81. 1834,"TE Siege Fist", // TE_Woe_Fist
  82. 16025,"TE Siege Mace" ); // TE_Woe_Mace
  83. break;
  84. case 6:
  85. callsub( S_Rent, "bows, guns, musical instruments, and whips",
  86. 18118,"TE Siege Bow", // TE_Woe_Bow
  87. 13117,"TE Siege Pistol", // TE_Woe_Pistol
  88. 13184,"TE Siege Rifle", // TE_Woe_Rifle
  89. 13185,"TE Siege Gatling Gun", // TE_Woe_Gatling
  90. 13186,"TE Siege Shotgun", // TE_Woe_Shotgun
  91. 13187,"TE Siege Grenade Gun", // TE_Woe_Grenade
  92. 1932,"TE Siege Guitar", // TE_Woe_Guitar
  93. 1987,"TE Siege Rope" ); // TE_Woe_Rope
  94. break;
  95. case 7:
  96. mes "[Rental Items Manager]";
  97. mes "Come back anytime then.";
  98. close;
  99. }
  100. }
  101. }
  102. mes "We offer various battlegears that you can use in the regions of Gloria and Kafragarten based on the rules of Siege Battle TE.";
  103. next;
  104. mes "[Rental Items Manager]";
  105. mes "I'm sorry but your job class is not allowed to participate in Siege Battles TE.";
  106. mes "I'm afraid I can't offer any items to you.";
  107. close;
  108. S_Rent:
  109. mes "[Rental Items Manager]";
  110. if (checkweight(1304,3) == 0) {
  111. mes "You already have too many items to receive a new rental equipment.";
  112. mes "Please organize your items and try again.";
  113. close;
  114. }
  115. mes "We have "+ getarg(0) +" ready for you.";
  116. mes "Select the desired item.";
  117. next;
  118. for ( .@i = 1; .@i < getargcount(); .@i += 2 ) {
  119. if (rentalcountitem(getarg(.@i)) > isequippedcnt(getarg(.@i)))// don't count item equipped
  120. .@menu$ = .@menu$ + "^4d4dff"+ getarg(.@i+1) +" - Checked out^000000:";
  121. else
  122. .@menu$ = .@menu$ + getarg(.@i+1) + ":";
  123. }
  124. .@total_item = (getargcount() -1) /2;
  125. .@s = select( .@menu$ + ":View other items" ) -1;
  126. if (.@s <= .@total_item) {
  127. .@index = .@s *2 +1;
  128. mes "[Rental Items Manager]";
  129. if (rentalcountitem(getarg(.@index)) > isequippedcnt(getarg(.@index)))
  130. mes "You already have "+ getarg(.@index+1) +".";
  131. else {
  132. mes "Here is "+ getarg(.@index+1) +".";
  133. mes "^4d4dffThis item is effective for the next 24 hours^000000 and after that it expires.";
  134. rentitem getarg(.@index),86400;
  135. }
  136. mes "Do you need anything else?";
  137. next;
  138. }
  139. return;
  140. }