summaryrefslogtreecommitdiff
path: root/npc/custom/eAAC_Scripts/kafraExpress/ke_warp_woe.txt
blob: 2adce07a04baa2e3d990e074ab3d83a6eebb2fc8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
//===== eAthena Script ======================================= 
//= Kafra Express - WoE Warping Module
//===== By: ================================================== 
//= Skotlex 
//===== Current Version: ===================================== 
//= 1.7
//===== Compatible With: ===================================== 
//= eAthena SVN R3424+, RO Episode 4.1+ (War of Emperium)
//===== Description: ========================================= 
//= Part of the Kafra Express Script Package.
//= Offers warping to the War of Emperium grounds.
//===== Additional Comments: ================================= 
//= See config.txt for configuration.
//= Remove the comment on lines 52,53 and 63 to enable direct G. Dungeon warping
//============================================================ 

-	script	keInit_warpWoe	-1,{
OnInit:	//Load Config
	donpcevent "keConfig::OnLoadWarpWoe";
	end;
}

function	script	F_keWarpWOE	{
	if ($@kewg_check && getcharid(2) <= 0) {
		callfunc "F_keIntro", e_srt, "Sorry, these warps are only available to people who belong to a Guild.";
		return;
	}
	if ($@kewg_checkAgit && agitcheck(0) == 0) {
		callfunc "F_keIntro", e_srt, "Sorry, these warps are only enabled during the Guild Wars.";
		return;
	}

	function SF_dungeons;
	set @cost, callfunc("F_keCost",100,$@kewg_discount);

	do {
		if ($@kewg_showOnline) {
			set @kmenu, select(
				"- Cancel",
				"- Al De Baran Guild ("+($@kewg_alDeBaran*@cost/100)+"z/"+(getmapusers("alde_gld.gat")
					+getmapusers("aldeg_cas01.gat")+getmapusers("aldeg_cas02.gat")+getmapusers("aldeg_cas03.gat")
					+getmapusers("aldeg_cas04.gat")+getmapusers("aldeg_cas05.gat"))+" "+$@ked_users$+")",
				"- Geffen Guild ("+($@kewg_geffen*@cost/100)+"z/"+(getmapusers("gef_fild13.gat")
					+getmapusers("gefg_cas01.gat")+getmapusers("gefg_cas02.gat")+getmapusers("gefg_cas03.gat")
					+getmapusers("gefg_cas04.gat")+getmapusers("gefg_cas05.gat"))+" "+$@ked_users$+")",
				"- Payon Guild ("+($@kewg_payon*@cost/100)+"z/"+(getmapusers("pay_gld.gat")
					+getmapusers("payg_cas01.gat")+getmapusers("payg_cas02.gat")+getmapusers("payg_cas03.gat")
					+getmapusers("payg_cas04.gat")+getmapusers("payg_cas05.gat"))+" "+$@ked_users$+")",
				"- Prontera Guild ("+($@kewg_prontera*@cost/100)+"z/"+(getmapusers("prt_gld.gat")
					+getmapusers("prtg_cas01.gat")+getmapusers("prtg_cas02.gat")+getmapusers("prtg_cas03.gat")
					+getmapusers("prtg_cas04.gat")+getmapusers("prtg_cas05.gat"))+" "+$@ked_users$+")",
//				"- Guild Dungeons ("+(getmapusers("gld_dun01.gat")+getmapusers("gld_dun02.gat")
//					+getmapusers("gld_dun03.gat")+getmapusers("gld_dun04.gat"))+" "+$@ked_users$+")",
				"- See "+$@ked_users$+" distribution"
			);
		} else {
			set @kmenu, select(
				"- Cancel",
				"- Al De Baran Guild ("+($@kewg_alDeBaran*@cost/100)+"z)",
				"- Geffen Guild ("+($@kewg_geffen*@cost/100)+"z)",
				"- Payon Guild ("+($@kewg_payon*@cost/100)+"z)",
				"- Prontera Guild ("+($@kewg_prontera*@cost/100)+"z)"
//				,"- Guild Dungeons"
			);
		}
		switch (@kmenu) {
		case 2: //Al De Baran
			callfunc "F_keWarp",$@kewg_alDeBaran,$@kewg_discount,44,"alde_gld.gat",153,160;
			break;
		case 3: //Geffen
			callfunc "F_keWarp",$@kewg_geffen,$@kewg_discount,44,"gef_fild13.gat",243,180;
			break;
		case 4: //Payon
			callfunc "F_keWarp",$@kewg_payon,$@kewg_discount,44,"pay_gld.gat",249,177;
			break;
		case 5: //Prontera
			callfunc "F_keWarp",$@kewg_prontera,$@kewg_discount,44,"prt_gld.gat",119,160;
			break;
		case 6: //Guild Dungeons
			SF_dungeons();
			break;
		case 7: //Info
			mes "The current distribution of "+$@ked_users$+" is as follows:";
			next;
			mes "[Al De Baran]";
			mes "- Guild Grounds: "+getmapusers("alde_gld.gat");
			mes "- Castle 1 - Noisyubantian: "+getmapusers("aldeg_cas01.gat");
			mes "- Castle 2 - Hohensyubangawoo: "+getmapusers("aldeg_cas02.gat");
			mes "- Castle 3 - Nyirenverk: "+getmapusers("aldeg_cas03.gat");
			mes "- Castle 4 - Byirtsburi: "+getmapusers("aldeg_cas04.gat");
			mes "- Castle 5 - Rotenburk: "+getmapusers("aldeg_cas05.gat");
			next;
			mes "[Geffen]";
			mes "- Guild Grounds: "+getmapusers("gef_fild13.gat");
			mes "- Castle 1 - Reprion: "+getmapusers("gefg_cas01.gat");
			mes "- Castle 2 - Yolbriger: "+getmapusers("gefg_cas02.gat");
			mes "- Castle 3 - Isinlife: "+getmapusers("gefg_cas03.gat");
			mes "- Castle 4 - Berigel: "+getmapusers("gefg_cas04.gat");
			mes "- Castle 5 - Melsedetsu: "+getmapusers("gefg_cas05.gat");
			next;
			mes "[Payon]";
			mes "- Guild Grounds: "+getmapusers("pay_gld.gat");
			mes "- Castle 1 - Mingting: "+getmapusers("payg_cas01.gat");
			mes "- Castle 2 - Tiantan: "+getmapusers("payg_cas02.gat");
			mes "- Castle 3 - Fuying: "+getmapusers("payg_cas03.gat");
			mes "- Castle 4 - Honglou: "+getmapusers("payg_cas04.gat");
			mes "- Castle 5 - Zhulinxian: "+getmapusers("payg_cas05.gat");
			next;
			mes "[Prontera]";
			mes "- Guild Grounds: "+getmapusers("prt_gld.gat");
			mes "- Castle 1 - Creamhilt: "+getmapusers("prtg_cas01.gat");
			mes "- Castle 2 - Sbanhealt: "+getmapusers("prtg_cas02.gat");
			mes "- Castle 3 - Lazrigees: "+getmapusers("prtg_cas03.gat");
			mes "- Castle 4 - Squagul: "+getmapusers("prtg_cas04.gat");
			mes "- Castle 5 - Guindull: "+getmapusers("prtg_cas05.gat");
			next;
			callfunc "F_keIntro", -1, "";
			break;
		}
	} while (@kmenu > 1);
	return;

function SF_dungeons {
	do {
		if ($@kewg_showOnline) {
			set @submenu, select(
				"- Cancel",
				"- Baldur Dungeon ("+($@kewg_baldur*@cost/100)+"z/"+getmapusers("gld_dun01.gat")+" "+$@ked_users$+")",
				"- Luina Dungeon ("+($@kewg_luina*@cost/100)+"z/"+getmapusers("gld_dun02.gat")+" "+$@ked_users$+")",
				"- Valkyrie Dungeon ("+($@kewg_valkyrie*@cost/100)+"z/"+getmapusers("gld_dun03.gat")+" "+$@ked_users$+")",
				"- Britoniah Dungeon ("+($@kewg_britoniah*@cost/100)+"z/"+getmapusers("gld_dun04.gat")+" "+$@ked_users$+")"
			);
		} else {
			set @submenu, select(
				"- Cancel",
				"- Baldur Dungeon ("+($@kewg_baldur*@cost/100)+"z)",
				"- Luina Dungeon ("+($@kewg_luina*@cost/100)+"z)",
				"- Valkyrie Dungeon ("+($@kewg_valkyrie*@cost/100)+"z)",
				"- Britoniah Dungeon ("+($@kewg_britoniah*@cost/100)+"z)"
			);
	}
	switch (@submenu) {
		case 2: //Baldur
			callfunc "F_keWarp",$@kewg_baldur,$@kewg_discount,44,"gld_dun01.gat",119,18;
			break;
		case 3: //Luina
			callfunc "F_keWarp",$@kewg_luina,$@kewg_discount,44,"gld_dun02.gat",174,113;
			break;
		case 4: //Valkyrie
			callfunc "F_keWarp",$@kewg_valkyrie,$@kewg_discount,44,"gld_dun03.gat",37,34;
			break;
		case 5: //Britoniah
			callfunc "F_keWarp",$@kewg_britoniah,$@kewg_discount,44,"gld_dun04.gat",42,230;
			break;
		}
	} while (@submenu > 1);
}

}