CashShop_Functions.txt 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. }