root/npc/other/CashShop_Functions.txt @ 7

Revision 1, 5.0 kB (checked in by jinshiro, 17 years ago)
Line 
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
20// Kafra Card
21//============================================================
22// - Open player's storage.
23// - No arguments.
24function        script  F_CashStore     {
25        cutin "kafra_01",2;
26        mes "[Kafra Employee]";
27        mes "Welcome to the Kafra Corporation.";
28        mes "Here, let me open your Storage for you.";
29        close2;
30        openstorage;
31        cutin "",255;
32        return;
33}
34
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.
41function        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
55// Neuralizer
56//============================================================
57// - Reset players skills. Weight must be 0, options must be off.
58// - No arguments.
59function        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
72// Dungeon Teleport Scroll
73//============================================================
74// - Warp player to random location of selected dungeon
75//   due to lack of information.
76// - No arguments.
77function        script  F_CashDungeon   {
78        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"))
79        {
80        case 1: warp "mag_dun01",0,0; end; // Nogg Road
81        case 2: warp "mjo_dun01",0,0; end; // Mjolnir Dead Pit
82        case 3: warp "um_dun01",0,0; end; // Umbala Dungeon
83        case 4: warp "pay_dun00",0,0; end; // Payon Caves
84        case 5: warp "xmas_dun01",0,0; end; // Toy Factory
85        case 6: warp "gl_prison",0,0; end; // Glast Heim Prison
86        case 7: warp "lou_dun01",0,0; end; // Louyang Dungeon
87        case 8: warp "gon_dun01",0,0; end; // Kunlun Dungeon
88        case 9: warp "iz_dun00",0,0; end; // Izlude Undersea Tunnel
89        case 10: warp "tur_dun01",0,0; end; // Turtle Island
90        case 11: warp "c_tower3",0,0; end; // Clocktower 3F
91        case 12: warp "alde_dun03",0,0; end; // Clocktower B3F
92        case 13: warp "gl_sew02",0,0; end; // Glast Heim Sewers 2F
93        case 14: warp "in_sphinx4",0,0; end; // Sphinx Dungeon 4F
94        case 15: warp "moc_pryd04",0,0; end; // Pyramid Dungeon 4F
95        case 16: warp "prt_sewb3",0,0; end; // Prontera Culverts 3F
96        case 17: warp "ama_dun01",0,0; end; // Amatsu Dungeon 1F
97        case 18: warp "lhz_dun01",0,0; end; // Somatology Laboratory 1F
98        case 19: warp "ayo_dun02",0,0; end; // Ayotaya Dungeon 2F
99        }
100        return;
101}
102
103// Cities Teleport Scroll
104//============================================================
105// - Warp player to differents Citys acording to the Scroll
106// - Arg(0) = type of scroll.
107function        script  F_CashCity      {
108        switch(getarg(0))
109        {
110                // Yellow
111                case 1: switch(select("Prontera:Geffen:Payon:Morroc:Aldebaran:Alberta")) {
112                        case 1: warp "prontera",0,0; end;
113                        case 2: warp "geffen",0,0; end;
114                        case 3: warp "payon",0,0; end;
115                        case 4: warp "morocc",0,0; end;
116                        case 5: warp "aldebaran",0,0; end;
117                        case 6: warp "alberta",0,0; end;
118                        }
119                break;
120                // Green
121                case 2: switch(select("Juno:Lighthalzen:Einbroch:Hugel")) {
122                        case 1: warp "yuno",0,0; end;
123                        case 2: warp "lighthalzen",0,0; end;
124                        case 3: warp "einbroch",0,0; end;
125                        case 4: warp "hugel",0,0; end;
126                        }
127                break;
128                // Red
129                case 3: switch(select("Rachel:Veins")) {
130                        case 1: warp "rachel",0,0; end;
131                        case 2: warp "veins",0,0; end;
132                        }
133                break;
134                // Blue
135                case 4: switch(select("Ayothaya:Amatsu:Louyang:Gonryun")) {
136                        case 1: warp "ayothaya",0,0; end;
137                        case 2: warp "amatsu",0,0; end;
138                        case 3: warp "louyang",0,0; end;
139                        case 4: warp "gonryun",0,0; end;
140                        }
141                break;
142        }
143        return;
144}
Note: See TracBrowser for help on using the browser.