CashShop_Functions.txt 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. //===== eAthena Script =======================================
  2. //= Cash Shop Functions
  3. //===== By: ==================================================
  4. //= L0ne_W0lf
  5. //===== Current Version: =====================================
  6. //= 1.0
  7. //===== Compatible With: =====================================
  8. //= eAthena SVN
  9. //===== Description: =========================================
  10. //= Used explicitly in the Item Database for Cash shop items
  11. //= - Kafra Card
  12. //= - Giant Fly Wing
  13. //= - Neuralizer
  14. //= - Dungeon Teleport Scroll
  15. //===== Additional Comments: =================================
  16. //= 1.0 First version. [L0ne_W0lf]
  17. //= F_CashPartyCall Optimized by Trancid.
  18. //============================================================
  19. // Kafra Card
  20. //============================================================
  21. // - Open player's storage.
  22. // - No arguments.
  23. function script F_CashStore {
  24. cutin "kafra_01",2;
  25. mes "[Kafra Employee]";
  26. mes "Welcome to the Kafra Corporation.";
  27. mes "Here, let me open your Storage for you.";
  28. close2;
  29. openstorage;
  30. cutin "",255;
  31. return;
  32. }
  33. // Giant Fly Wing
  34. //============================================================
  35. // - Warp party leader to random spot on the map.
  36. // - Summon Party members on party leader map to that location.
  37. // - No arguments.
  38. function script F_CashPartyCall {
  39. warp "Random",0,0;
  40. if(getpartyleader(getcharid(1),2) == getcharid(0)) {
  41. getmapxy .@mapl$, .@xl, .@yl, 0;
  42. getpartymember getcharid(1);
  43. set .@partymembercount, $@partymembercount;
  44. copyarray .@partymembername$[0], $@partymembername$[0], .@partymembercount;
  45. for(set .@i, 0; .@i < .@partymembercount; set .@i, .@i + 1)
  46. if(!(getmapxy(.@mapm$, .@xm, .@ym, 0, .@partymembername$[.@i])) && (.@mapm$ == .@mapl$))
  47. warpchar .@mapl$, .@xl, .@yl, getcharid(0, .@partymembername$[.@i]);
  48. }
  49. return;
  50. }
  51. // Neuralizer
  52. //============================================================
  53. // - Reset players skills. Weight must be 0, options must be off.
  54. // - No arguments.
  55. function script F_CashReset {
  56. if (Class != Job_Novice) {
  57. if (Weight < 1) {
  58. if (checkriding() || checkfalcon() || checkcart()) return;
  59. else {
  60. resetskill;
  61. sc_end SC_ALL;
  62. }
  63. }
  64. }
  65. return;
  66. }
  67. // Dungeon Teleport Scroll
  68. //============================================================
  69. // - Warp player to random location of selected dungeon
  70. // due to lack of information.
  71. // - No arguments.
  72. function script F_CashDungeon {
  73. switch(select("Nogg Road:Mjolnir Dead Pit:Umbala Dungeon:Einbroch Mine Dungeon:Payon Dungeon:Toy Dungeon:Glast Heim Underprison:Louyang Dungeon:Hermit's Checkers:Izlude Dungeon:Turtle Island Dungeon:Clock Tower B3f:Clock Tower")) {
  74. case 1: warp "mag_dun01",0,0; end;
  75. case 2: warp "mjolnir_02",0,0; end;
  76. case 3: warp "um_dun01",0,0; end;
  77. case 4: warp "ein_dun01",0,0; end;
  78. case 5: warp "pay_dun00",0,0; end;
  79. case 6: warp "xmas_dun01",0,0; end;
  80. case 7: warp "gl_prison",0,0; end;
  81. case 8: warp "lou_dun01",0,0; end;
  82. case 9: warp "gon_dun02",0,0; end;
  83. case 10: warp "iz_dun00",0,0; end;
  84. case 11: warp "tur_dun02",0,0; end;
  85. case 12: warp "alde_dun03",0,0; end;
  86. case 13: warp "c_tower1",0,0; end;
  87. }
  88. return;
  89. }
  90. // Cities Teleport Scroll
  91. //============================================================
  92. // - Warp player to differents Citys acording to the Scroll
  93. // - Arg(0) = type of scroll.
  94. function script F_CashCity {
  95. switch(getarg(0))
  96. {
  97. // Yellow
  98. case 1: switch(select("Prontera:Geffen:Payon:Morroc:Aldebaran:Alberta")) {
  99. case 1: warp "prontera",0,0; end;
  100. case 2: warp "geffen",0,0; end;
  101. case 3: warp "payon",0,0; end;
  102. case 4: warp "morocc",0,0; end;
  103. case 5: warp "aldebaran",0,0; end;
  104. case 6: warp "alberta",0,0; end;
  105. }
  106. break;
  107. // Green
  108. case 2: switch(select("Juno:Lighthalzen:Einbroch:Hugel")) {
  109. case 1: warp "yuno",0,0; end;
  110. case 2: warp "lighthalzen",0,0; end;
  111. case 3: warp "einbroch",0,0; end;
  112. case 4: warp "hugel",0,0; end;
  113. }
  114. break;
  115. // Red
  116. case 3: switch(select("Rachel:Veins")) {
  117. case 1: warp "rachel",0,0; end;
  118. case 2: warp "veins",0,0; end;
  119. }
  120. break;
  121. // Blue
  122. case 4: switch(select("Ayothaya:Amatsu:Louyang:Gonryun")) {
  123. case 1: warp "ayothaya",0,0; end;
  124. case 2: warp "amatsu",0,0; end;
  125. case 3: warp "louyang",0,0; end;
  126. case 4: warp "gonryun",0,0; end;
  127. }
  128. break;
  129. }
  130. return;
  131. }