CashShop_Functions.txt 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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:Payon Caves:Toy Factory:Glast Heim Prison:Louyang Dungeon:Kunlun Dungeon:Izlude Undersea Tunnel:Turtle Island:Clocktower 3F:Clocktower B3F:Glast Heim Sewers 2F:Sphinx Dungeon 4F:Pyramid Dungeon 4F:Prontera Culverts 3F:Amatsu Dungeon 1F:Somatology Laboratory 1F:Ayotaya Dungeon 2F"))
  74. {
  75. case 1: warp "mag_dun01",0,0; end; // Nogg Road
  76. case 2: warp "mjo_dun01",0,0; end; // Mjolnir Dead Pit
  77. case 3: warp "um_dun01",0,0; end; // Umbala Dungeon
  78. case 4: warp "pay_dun00",0,0; end; // Payon Caves
  79. case 5: warp "xmas_dun01",0,0; end; // Toy Factory
  80. case 6: warp "gl_prison",0,0; end; // Glast Heim Prison
  81. case 7: warp "lou_dun01",0,0; end; // Louyang Dungeon
  82. case 8: warp "gon_dun01",0,0; end; // Kunlun Dungeon
  83. case 9: warp "iz_dun00",0,0; end; // Izlude Undersea Tunnel
  84. case 10: warp "tur_dun01",0,0; end; // Turtle Island
  85. case 11: warp "c_tower3",0,0; end; // Clocktower 3F
  86. case 12: warp "alde_dun03",0,0; end; // Clocktower B3F
  87. case 13: warp "gl_sew02",0,0; end; // Glast Heim Sewers 2F
  88. case 14: warp "in_sphinx4",0,0; end; // Sphinx Dungeon 4F
  89. case 15: warp "moc_pryd04",0,0; end; // Pyramid Dungeon 4F
  90. case 16: warp "prt_sewb3",0,0; end; // Prontera Culverts 3F
  91. case 17: warp "ama_dun01",0,0; end; // Amatsu Dungeon 1F
  92. case 18: warp "lhz_dun01",0,0; end; // Somatology Laboratory 1F
  93. case 19: warp "ayo_dun02",0,0; end; // Ayotaya Dungeon 2F
  94. }
  95. return;
  96. }
  97. // Cities Teleport Scroll
  98. //============================================================
  99. // - Warp player to differents Citys acording to the Scroll
  100. // - Arg(0) = type of scroll.
  101. function script F_CashCity {
  102. switch(getarg(0))
  103. {
  104. // Yellow
  105. case 1: switch(select("Prontera:Geffen:Payon:Morroc:Aldebaran:Alberta")) {
  106. case 1: warp "prontera",0,0; end;
  107. case 2: warp "geffen",0,0; end;
  108. case 3: warp "payon",0,0; end;
  109. case 4: warp "morocc",0,0; end;
  110. case 5: warp "aldebaran",0,0; end;
  111. case 6: warp "alberta",0,0; end;
  112. }
  113. break;
  114. // Green
  115. case 2: switch(select("Juno:Lighthalzen:Einbroch:Hugel")) {
  116. case 1: warp "yuno",0,0; end;
  117. case 2: warp "lighthalzen",0,0; end;
  118. case 3: warp "einbroch",0,0; end;
  119. case 4: warp "hugel",0,0; end;
  120. }
  121. break;
  122. // Red
  123. case 3: switch(select("Rachel:Veins")) {
  124. case 1: warp "rachel",0,0; end;
  125. case 2: warp "veins",0,0; end;
  126. }
  127. break;
  128. // Blue
  129. case 4: switch(select("Ayothaya:Amatsu:Louyang:Gonryun")) {
  130. case 1: warp "ayothaya",0,0; end;
  131. case 2: warp "amatsu",0,0; end;
  132. case 3: warp "louyang",0,0; end;
  133. case 4: warp "gonryun",0,0; end;
  134. }
  135. break;
  136. }
  137. return;
  138. }