CashShop_Functions.txt 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. //===== eAthena Script =======================================
  2. //= Cash Shop Functions
  3. //===== By: ==================================================
  4. //= L0ne_W0lf
  5. //===== Current Version: =====================================
  6. //= 1.2
  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. //= 1.1 Updated Dungeon Teleport Scroll. [L0ne_W0lf]
  19. //= Added Town Teleport Scroll Function
  20. //= Added Seige Teleport Scroll Function
  21. //= 1.2 Updated the dungeon teleport scroll menu. [L0ne_w0lf]
  22. //============================================================
  23. // Kafra Card
  24. //============================================================
  25. // - Open player's storage.
  26. // - No arguments.
  27. function script F_CashStore {
  28. cutin "kafra_01",2;
  29. mes "[Kafra Employee]";
  30. mes "Welcome to the Kafra Corporation.";
  31. mes "Here, let me open your Storage for you.";
  32. close2;
  33. openstorage;
  34. cutin "",255;
  35. return;
  36. }
  37. // Giant Fly Wing
  38. //============================================================
  39. // - Warp party leader to random spot on the map.
  40. // - Summon Party members on party leader map to that location.
  41. // - No arguments.
  42. function script F_CashPartyCall {
  43. warp "Random",0,0;
  44. if(getpartyleader(getcharid(1),2) == getcharid(0)) {
  45. getmapxy .@mapl$, .@xl, .@yl, 0;
  46. getpartymember getcharid(1);
  47. set .@partymembercount, $@partymembercount;
  48. copyarray .@partymembername$[0], $@partymembername$[0], .@partymembercount;
  49. for(set .@i, 0; .@i < .@partymembercount; set .@i, .@i + 1)
  50. if(!(getmapxy(.@mapm$, .@xm, .@ym, 0, .@partymembername$[.@i])) && (.@mapm$ == .@mapl$))
  51. warpchar .@mapl$, .@xl, .@yl, getcharid(0, .@partymembername$[.@i]);
  52. }
  53. return;
  54. }
  55. // Neuralizer
  56. //============================================================
  57. // - Reset players skills. Weight must be 0, options must be off.
  58. // - No arguments.
  59. function script F_CashReset {
  60. if (Class != Job_Novice) {
  61. if (Weight < 1) {
  62. if (checkriding() || checkfalcon() || checkcart()) return;
  63. else {
  64. resetskill;
  65. sc_end SC_ALL;
  66. }
  67. }
  68. }
  69. return;
  70. }
  71. // Dungeon Teleport Scroll
  72. //============================================================
  73. // - Warp player to random location of selected dungeon
  74. // due to lack of information.
  75. // - No arguments.
  76. function script F_CashDungeon {
  77. 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 3f:Glast Heim Culvert 2f:Sphinx Dungeon 4f:Inside Pyramid 4f:Prontera Culvert 3f:Amatsu Dungeon 1f (Tatami Maze):Somatology Laboratory 1st floor:Ayothya Ancient Shrine 2nd floor"))
  78. {
  79. case 1: warp "mag_dun01",125,71; end; // Nogg Road
  80. case 2: warp "mjo_dun02",80,297; end; // Mjolnir Dead Pit
  81. case 3: warp "um_dun02",125,122; end; // Umbala Dungeon
  82. case 4: warp "ein_dun01",261,262; end; // Einbroch Dungeon
  83. case 5: warp "pay_dun03",155,150; end; // Payon Caves
  84. case 6: warp "xmas_dun01",133,130; end; // Toy Factory
  85. case 7: warp "gl_prison",140,15;end; // Glast Heim Prison
  86. case 8: warp "lou_dun03",165,38; end; // Louyang Dungeon
  87. case 9: warp "gon_dun02",251,263; end; // Kunlun Dungeon
  88. case 10: warp "iz_dun02",350,335; end; // Izlude Undersea Tunnel
  89. case 11: warp "tur_dun02",165,30; end; // Turtle Island
  90. case 12: warp "alde_dun03",275,180; end; // Clocktower 3F
  91. case 13: warp "c_tower3",34,42; end; // Clocktower B3F
  92. case 14: warp "gl_sew02",292,295; end; // Glast Heim Sewers 2F
  93. case 15: warp "in_sphinx4",120,120; end; // Sphinx Dungeon 4F
  94. case 16: warp "moc_pryd04",195,4; end; // Pyramid Dungeon 4F
  95. case 17: warp "prt_sewb3",20,175; end; // Prontera Culverts 3F
  96. case 18: warp "ama_dun01",222,144; end; // Amatsu Dungeon 1F
  97. case 19: warp "lhz_dun01",19,153; end; // Somatology Laboratory 1F
  98. case 20: warp "ayo_dun02",70,240; end; // Ayotaya Dungeon 2F
  99. }
  100. return;
  101. }
  102. // Coloured Butterly Wings
  103. //============================================================
  104. // - Warp player to differents Citys acording to the Scroll
  105. // - Arg(0) = type of scroll.
  106. function script F_CashCity {
  107. switch(getarg(0))
  108. {
  109. // Yellow
  110. case 1: switch(select("Prontera:Geffen:Payon:Morroc:Aldebaran:Alberta")) {
  111. case 1: warp "prontera",0,0; end;
  112. case 2: warp "geffen",0,0; end;
  113. case 3: warp "payon",0,0; end;
  114. case 4: warp "morocc",0,0; end;
  115. case 5: warp "aldebaran",0,0; end;
  116. case 6: warp "alberta",0,0; end;
  117. }
  118. break;
  119. // Green
  120. case 2: switch(select("Juno:Lighthalzen:Einbroch:Hugel")) {
  121. case 1: warp "yuno",0,0; end;
  122. case 2: warp "lighthalzen",0,0; end;
  123. case 3: warp "einbroch",0,0; end;
  124. case 4: warp "hugel",0,0; end;
  125. }
  126. break;
  127. // Red
  128. case 3: switch(select("Rachel:Veins")) {
  129. case 1: warp "rachel",0,0; end;
  130. case 2: warp "veins",0,0; end;
  131. }
  132. break;
  133. // Blue
  134. case 4: switch(select("Ayothaya:Amatsu:Louyang:Gonryun")) {
  135. case 1: warp "ayothaya",0,0; end;
  136. case 2: warp "amatsu",0,0; end;
  137. case 3: warp "louyang",0,0; end;
  138. case 4: warp "gonryun",0,0; end;
  139. }
  140. break;
  141. }
  142. return;
  143. }
  144. // Teleport Scrolls
  145. //============================================================
  146. // - Warp player to save point or City acording to the Scroll
  147. // - Arg(0) = type of scroll.
  148. function script F_CashTele {
  149. switch(getarg(0)) {
  150. case 1:
  151. switch(select("Savepoint:Prontera:Geffen:Al de Baran:Izlude")) {
  152. case 1: warp "SavePoint",0,0; end;
  153. case 2: warp "prontera",167,68; end;
  154. case 3: warp "geffen",121,147; end;
  155. case 4: warp "aldebaran",168,112; end;
  156. case 5: warp "izlude",128,105; end;
  157. }
  158. case 2:
  159. switch(select("Savepoint:Payon:Alberta:Morroc:Comodo")) {
  160. case 1: warp "SavePoint",0,0; end;
  161. case 2: warp "payon",172,101; end;
  162. case 3: warp "alberta",117,56; end;
  163. case 4: warp "morocc",165,255; end;
  164. case 5: warp "comodo",193,148; end;
  165. }
  166. case 3:
  167. switch(select("Savepoint:Louyang:Amatsu:Kunlun Field:Ayothaya")) {
  168. case 1: warp "SavePoint",0,0; end;
  169. case 2: warp "louyang",216,40; end;
  170. case 3: warp "amatsu",197,83; end;
  171. case 4: warp "gon_fild01",258,82; end;
  172. case 5:warp "ayothaya",149,71; end;
  173. }
  174. case 4:
  175. switch(select("Savepoint:Lutie Field:Umbala:Niflheim")) {
  176. case 1: warp "SavePoint",0,0; end;
  177. case 2: warp "xmas_fild01",78,68; end;
  178. case 3: warp "umbala",100,154; end;
  179. case 4: warp "niflheim",49,146; end;
  180. }
  181. case 5:
  182. switch(select("Savepoint:Juno:Einbroch:Lighthalzen:Hugel")) {
  183. case 1: warp "SavePoint",0,0; end;
  184. case 2: warp "yuno",158,39; end;
  185. case 3: warp "einbroch",240,200; end;
  186. case 4: warp "lighthalzen",214,311; end;
  187. case 5: warp "hugel",95,43; end;
  188. }
  189. case 6:
  190. switch(select("Savepoint:Rachel:Veins")) {
  191. case 1: warp "SavePoint",0,0; end;
  192. case 2: warp "rachel",115,125; end;
  193. case 3: warp "veins",205,102; end;
  194. }
  195. }
  196. return;
  197. }
  198. function script F_CashSeigeTele {
  199. switch(select("Neuschwanstein (aldeg_cas01):Hohenschwangau (aldeg_cas02):Nuernberg (aldeg_cas03):Wuerzburg (aldeg_cas04):Rothenburg (aldeg_cas05):Repherion (gefg_cas01):Eeyorbriggar (gefg_cas02):Yesnelph (gefg_cas03):Bergel (gefg_cas04):Mersetzdeitz (gefg_cas05):Bright Arbor (payg_cas01):Sacred Altar (payg_cas02):Holy Shadow (payg_cas03):Scarlet Palace (payg_cas04):Bamboo Grove Hill (payg_cas05):Kriemhild (prtg_cas01):Swanhild (prtg_cas02):Fadhgridh (prtg_cas03):Skoegul (prtg_cas04):Gondul (prtg_cas05)")) {
  200. case 1: warp "alde_gld",48,91; end;
  201. case 2: warp "alde_gld",103,245; end;
  202. case 3: warp "alde_gld",142,87; end;
  203. case 4: warp "alde_gld",236,243; end;
  204. case 5: warp "alde_gld",269,90; end;
  205. case 6: warp "gef_fild13",217,75; end;
  206. case 7: warp "gef_fild13",307,237; end;
  207. case 8: warp "gef_fild13",77,297; end;
  208. case 9: warp "gef_fild13",190,276; end;
  209. case 10: warp "gef_fild13",312,91; end;
  210. case 11: warp "pay_gld",121,232; end;
  211. case 12: warp "pay_gld",297,116; end;
  212. case 13: warp "pay_gld",318,293; end;
  213. case 14: warp "pay_gld",140,164; end;
  214. case 15: warp "pay_gld",202,264; end;
  215. case 16: warp "prt_gld",141,64; end;
  216. case 17: warp "prt_gld",240,131; end;
  217. case 18: warp "prt_gld",153,133; end;
  218. case 19: warp "prt_gld",126,240; end;
  219. case 20: warp "prt_gld",195,240; end;
  220. }
  221. return;
  222. }