CashShop_Functions.txt 8.2 KB

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