CashShop_Functions.txt 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. //===== rAthena Script =======================================
  2. //= Cash Shop Functions
  3. //===== By: ==================================================
  4. //= L0ne_W0lf
  5. //===== Current Version: =====================================
  6. //= 1.6
  7. //===== Compatible With: =====================================
  8. //= rAthena 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. //= 1.3 Implemented Aozi Giant Flywing Fix. (bugreport:4242) [L0ne_w0lf]
  23. //= 1.4 Simplified Giant Flywing function using warpparty. [L0ne_w0lf]
  24. //= 1.5 Neuralizer is no longer consumed upon failure. [Euphy]
  25. //= 1.6 Updated Teleport functions and added Curious_Snowball. [Euphy]
  26. //============================================================
  27. // Kafra Card
  28. //============================================================
  29. // - Open player's storage.
  30. // - No arguments.
  31. function script F_CashStore {
  32. cutin "kafra_01",2;
  33. mes "[Kafra Employee]";
  34. mes "Welcome to the Kafra Corporation.";
  35. mes "Here, let me open your Storage for you.";
  36. close2;
  37. openstorage;
  38. cutin "",255;
  39. return;
  40. }
  41. // Giant Fly Wing
  42. //============================================================
  43. // - Warp party leader to random spot on the map.
  44. // - Summon Party members on party leader map to that location.
  45. // - No arguments.
  46. function script F_CashPartyCall {
  47. warp "Random",0,0;
  48. if(getpartyleader(getcharid(1),2) == getcharid(0)) {
  49. getmapxy .@mapl$, .@xl, .@yl, 0;
  50. warpparty .@mapl$, .@xl, .@yl, getcharid(1), .@mapl$;
  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 && Weight == 0 && !checkriding() && !checkfalcon() && !checkcart() && !ismounting()) {
  60. resetskill;
  61. sc_end SC_ALL;
  62. if (countitem(12213)) delitem 12213,1;
  63. }
  64. return;
  65. }
  66. // Dungeon Teleport Scroll
  67. //============================================================
  68. // - Warp player to the selected dungeon.
  69. // - Arg(0) = type of scroll.
  70. function script F_CashDungeon {
  71. switch(getarg(0)) {
  72. case 1:
  73. case 2:
  74. switch(select("Nogg Road:Mjolnir Dead Pit:"+((checkre(0))?"":"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")) {
  75. case 1: warp "mag_dun01",125,71; end; // Nogg Road
  76. case 2: warp "mjo_dun02",80,297; end; // Mjolnir Dead Pit
  77. case 3: warp "um_dun02",125,122; end; // Umbala Dungeon (Pre-Renewal only)
  78. case 4: warp "ein_dun01",261,262; end; // Einbroch Dungeon
  79. case 5: warp "pay_dun03",155,150; end; // Payon Caves
  80. case 6: warp "xmas_dun01",133,130; end; // Toy Factory
  81. case 7: warp "gl_prison",140,15; end; // Glast Heim Prison
  82. case 8: warp "lou_dun03",165,38; end; // Louyang Dungeon
  83. case 9: warp "gon_dun02",251,263; end; // Kunlun Dungeon
  84. case 10: warp "iz_dun02",350,335; end; // Izlude Undersea Tunnel
  85. case 11: warp "tur_dun02",165,30; end; // Turtle Island
  86. case 12: warp "alde_dun03",275,180; end; // Clocktower 3F
  87. case 13: warp "c_tower3",34,42; end; // Clocktower B3F
  88. case 14: warp "gl_sew02",292,295; end; // Glast Heim Sewers 2F
  89. case 15: warp "in_sphinx4",120,120; end; // Sphinx Dungeon 4F
  90. case 16: warp "moc_pryd04",195,4; end; // Pyramid Dungeon 4F
  91. case 17: warp "prt_sewb3",20,175; end; // Prontera Culverts 3F
  92. case 18: warp "ama_dun01",222,144; end; // Amatsu Dungeon 1F
  93. case 19: warp "lhz_dun01",19,153; end; // Somatology Laboratory 1F
  94. case 20: warp "ayo_dun02",70,240; end; // Ayotaya Dungeon 2F
  95. }
  96. case 3:
  97. switch(select("Bio Lab (2nd Floor):Ice Dungeon (3rd Floor):Odin Temple (3rd Floor):Thor Volcano (3rd Floor):Abyss Lake (3rd Floor):Juperos Ruins (2nd Floor)")) {
  98. case 1: warp "lhz_dun02",145,149; end; // Somatology Laboratory 2F
  99. case 2: warp "ice_dun03",150,176; end; // Ice Dungeon 3F
  100. case 3: warp "odin_tem03",278,235; end; // Odin Temple 3F
  101. case 4: warp "thor_v03",144,170; end; // Thor Volcano 3F
  102. case 5: warp "abyss_03",97,104; end; // Abyss Lakes 3F
  103. case 6: warp "juperos_02",130,159; end; // Juperos Dungeon 2F
  104. }
  105. }
  106. return;
  107. }
  108. // Coloured Butterly Wings
  109. //============================================================
  110. // - Warp player to different cities acording to the scroll.
  111. // - Arg(0) = type of scroll.
  112. function script F_CashCity {
  113. switch(getarg(0)) {
  114. case 1: // Yellow - Rune-Midgart
  115. switch(select("Prontera:Izlude:Geffen:Payon:Morroc:Alberta:Al de Baran")) {
  116. case 1: warp "prontera",122,87; end;
  117. case 2: if (checkre(0)) warp "izlude",130,90; else warp "izlude",91,105; end;
  118. case 3: warp "geffen",128,48; end;
  119. case 4: warp "payon",164,123; end;
  120. case 5: warp "morocc",160,100; end;
  121. case 6: warp "alberta",117,50; end;
  122. case 7: warp "aldebaran",140,110; end;
  123. }
  124. case 2: // Green - Schwartzvalt
  125. switch(select("Juno:Lighthalzen:Einbroch:Einbech:Hugel")) {
  126. case 1: warp "yuno",160,170; end;
  127. case 2: warp "lighthalzen",190,310; end;
  128. case 3: warp "einbroch",230,190; end;
  129. case 4: warp "einbech",187,120; end;
  130. case 5: warp "hugel",92,165; end;
  131. }
  132. case 3: // Red - Arunafeltz
  133. switch(select("Rachel:Veins")) {
  134. case 1: warp "rachel",120,125; end;
  135. case 2: warp "veins",215,105; end;
  136. }
  137. case 4: // Blue - Islands
  138. switch(select("Amatsu:Kunlun:Ayotaya:Louyang")) {
  139. case 1: warp "amatsu",110,140; end;
  140. case 2: warp "gonryun",160,115; end;
  141. case 3: warp "ayothaya",220,170; end;
  142. case 4: warp "louyang",217,95; end;
  143. }
  144. case 5: // Blue - Islands (Renewal)
  145. switch(select("Amatsu:Kunlun:Ayotaya:Louyang:Moscovia:Dewata:Brasilis")) {
  146. case 1: warp "amatsu",110,140; end;
  147. case 2: warp "gonryun",160,115; end;
  148. case 3: warp "ayothaya",220,170; end;
  149. case 4: warp "louyang",217,95; end;
  150. case 5: warp "moscovia",224,195; end;
  151. case 6: warp "dewata",200,107; end;
  152. case 7: warp "brasilis",196,181; end;
  153. }
  154. }
  155. return;
  156. }
  157. // Teleport Scrolls
  158. //============================================================
  159. // - Warp player to save point or city acording to the scroll.
  160. // - Arg(0) = type of scroll.
  161. function script F_CashTele {
  162. switch(getarg(0)) {
  163. case 1:
  164. switch(select("Prontera:Geffen:Al de Baran:Izlude:Savepoint")) {
  165. case 1: warp "prontera",119,77; end;
  166. case 2: warp "geffen",119,39; end;
  167. case 3: warp "aldebaran",165,107; end;
  168. case 4: if (checkre(0)) warp "izlude",128,105; else warp "izlude",91,105; end;
  169. case 5: warp "SavePoint",0,0; end;
  170. }
  171. case 2:
  172. switch(select("Payon:Alberta:Morroc:Comodo:Savepoint")) {
  173. case 1: warp "payon",158,55; end;
  174. case 2: warp "alberta",115,57; end;
  175. case 3: warp "morocc",158,48; end;
  176. case 4: warp "comodo",217,148; end;
  177. case 5: warp "SavePoint",0,0; end;
  178. }
  179. case 3:
  180. switch(select("Louyang:Amatsu:Kunlun Field:Ayothaya:Savepoint")) {
  181. case 1: warp "louyang",214,101; end;
  182. case 2: warp "amatsu",112,145; end;
  183. case 3: warp "gonryun",160,118; end;
  184. case 4: warp "ayothaya",216,175; end;
  185. case 5: warp "SavePoint",0,0; end;
  186. }
  187. case 4:
  188. switch(select("Lutie Field:Umbala:Niflheim:Savepoint")) {
  189. case 1: warp "xmas",148,131; end;
  190. case 2: warp "umbala",93,154; end;
  191. case 3: warp "niflheim",187,189; end;
  192. case 4: warp "SavePoint",0,0; end;
  193. }
  194. case 5:
  195. switch(select("Juno:Einbroch:Lighthalzen:Hugel:Savepoint")) {
  196. case 1: warp "yuno",157,124; end;
  197. case 2: warp "einbroch",230,192; end;
  198. case 3: warp "lighthalzen",158,94; end;
  199. case 4: warp "hugel",93,159; end;
  200. case 5: warp "SavePoint",0,0; end;
  201. }
  202. case 6:
  203. switch(select("Rachel:Veins:Savepoint")) {
  204. case 1: warp "rachel",118,132; end;
  205. case 2: warp "veins",214,125; end;
  206. case 3: warp "SavePoint",0,0; end;
  207. }
  208. }
  209. return;
  210. }
  211. // Siege Teleport Scroll
  212. //============================================================
  213. // - Warp player to selected guild castle.
  214. // - No arguments.
  215. function script F_CashSeigeTele {
  216. 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)")) {
  217. case 1: warp "alde_gld",48,91; end;
  218. case 2: warp "alde_gld",103,245; end;
  219. case 3: warp "alde_gld",142,87; end;
  220. case 4: warp "alde_gld",236,243; end;
  221. case 5: warp "alde_gld",269,90; end;
  222. case 6: warp "gef_fild13",217,75; end;
  223. case 7: warp "gef_fild13",307,237; end;
  224. case 8: warp "gef_fild13",77,297; end;
  225. case 9: warp "gef_fild13",190,276; end;
  226. case 10: warp "gef_fild13",312,91; end;
  227. case 11: warp "pay_gld",121,232; end;
  228. case 12: warp "pay_gld",297,116; end;
  229. case 13: warp "pay_gld",318,293; end;
  230. case 14: warp "pay_gld",140,164; end;
  231. case 15: warp "pay_gld",202,264; end;
  232. case 16: warp "prt_gld",141,64; end;
  233. case 17: warp "prt_gld",240,131; end;
  234. case 18: warp "prt_gld",153,133; end;
  235. case 19: warp "prt_gld",126,240; end;
  236. case 20: warp "prt_gld",195,240; end;
  237. }
  238. return;
  239. }
  240. // Curious Snowball
  241. //============================================================
  242. // - You can get an effect of Restore, Endure, or Wing of Butterfly.
  243. // - No arguments.
  244. function script F_Snowball {
  245. cutin "rutie_snownow03",2;
  246. mes "[Snowman]";
  247. mes "Merry Christmas!";
  248. switch(select("Restore Some HP/SP:Strengthen My Body!:Restore My SP Fully.:Return to Savepoint")) {
  249. case 1:
  250. mes "Aha!";
  251. mes "Quiet night~";
  252. percentheal 70,70;
  253. close2;
  254. cutin "",255;
  255. break;
  256. case 2:
  257. mes "Blessings.";
  258. mes "Holy night~";
  259. unitskilluseid getcharid(3),"SM_ENDURE",10;
  260. close2;
  261. cutin "",255;
  262. break;
  263. case 3:
  264. mes "Hey!";
  265. mes "White Christmas~";
  266. percentheal 0,100;
  267. close2;
  268. cutin "",255;
  269. break;
  270. case 4:
  271. mes "Jingle Bells~";
  272. mes "Jingle Bells~ Jingle Bells!";
  273. close2;
  274. cutin "",255;
  275. warp "SavePoint",0,0;
  276. break;
  277. }
  278. end;
  279. }