📄 ke_warp_dungeon.txt
字号:
//===== eAthena Script =======================================
//= Kafra Express - Dungeon Warps Module
//===== By: ==================================================
//= Skotlex
//===== Current Version: =====================================
//= 4.2
//===== Compatible With: =====================================
//= eAthena SVN R3424+, RO Episode 8+ (Hugel)
//===== Description: =========================================
//= Part of the Kafra Express Script Package.
//= Offers warping to dungeons.
//===== Additional Comments: =================================
//= See config.txt for configuration.
//= Flag values used for dungeons:
//= 0x00000001 Abyss Lake
//= 0x00000002 Amatsu
//= 0x00000004 AntHell
//= 0x00000008 Ayothaya
//= 0x00000010 Byalan
//= 0x00000020 Comodo
//= 0x00000040 Clock tower
//= 0x00000080 Coal Mines
//= 0x00000100 Culvert
//= 0x00000200 Einbech
//= 0x00000400 Kiehl
//= 0x00000800 Geffen
//= 0x00001000 GlastHeim
//= 0x00002000 Gon Ryun
//= 0x00004000 Hidden Temple
//= 0x00008000 Juperos
//= 0x00010000 Lighthalzen
//= 0x00020000 Lou Yang
//= 0x00040000 Magma Caves
//= 0x00080000 Orcs
//= 0x00100000 Payon
//= 0x00200000 Pyramid
//= 0x00400000 Sphinx
//= 0x00800000 Sunken Ship
//= 0x01000000 Thanatos
//= 0x02000000 Toy Factory
//= 0x04000000 Turtle Island
//= 0x08000000 Umbala
//= 0x10000000 Odin Temple
//= 0x20000000 Ice Cave
//= 0x40000000 Rachel Temple
//============================================================
- script keInit_warpDungeon -1,{
OnInit: //Load Config
donpcevent "keConfig::OnLoadWarpDungeon";
end;
}
function script F_keDungeonWarps {
function SF_abyssLake;
function SF_amatsu;
function SF_antHell;
function SF_ayothaya;
function SF_byalan;
function SF_comodo;
function SF_clockTower;
function SF_coalMine;
function SF_culvert;
function SF_einbech;
function SF_gefenia;
function SF_geffen;
function SF_glastHeim;
function SF_gonRyun;
function SF_hiddenTemple;
function SF_juperos;
function SF_kiehl;
function SF_iceCave;
function SF_lightHalzen;
function SF_louYang;
function SF_magma;
function SF_odin;
function SF_orcs;
function SF_payon;
function SF_pyramid;
function SF_rachel;
function SF_sphinx;
function SF_sunkenShip;
function SF_thanatosTower;
function SF_toyFactory;
function SF_turtleIsland;
function SF_umbala;
//Store player map, will be needed in any of the submenus.
set @map$, getarg(0);
do {
set @discount,callfunc("F_keCost",100,$@kewd_discount);
if ($@kewd_showOnline) {
set @kmenu, select (
"- Cancel",
"- Abyss Lake ("+$@kewd_abyssLake*@discount/100+"z/"+(getmapusers("abyss_01")
+getmapusers("abyss_02")+getmapusers("abyss_03"))+" "+$@ked_users$+")",
"- Amatsu Dungeon ("+$@kewd_amatsu*@discount/100+"z/"+(getmapusers("ama_dun01")
+getmapusers("ama_dun02")+getmapusers("ama_dun03"))+" "+$@ked_users$+")",
"- Ant Hell ("+$@kewd_antHell*@discount/100+"z/"+(getmapusers("anthell01")
+getmapusers("anthell02"))+" "+$@ked_users$+")",
"- Ayothaya Ancient Shrine ("+$@kewd_ayothaya*@discount/100+"z/"+(getmapusers("ayo_dun01")
+getmapusers("ayo_dun02"))+" "+$@ked_users$+")",
"- Byalan Dungeon ("+$@kewd_byalan*@discount/100+"z/"+(getmapusers("iz_dun00")
+getmapusers("iz_dun01")+getmapusers("iz_dun02")+getmapusers("iz_dun03")
+getmapusers("iz_dun04"))+" "+$@ked_users$+")",
"- Comodo Caves ("+$@kewd_comodo*@discount/100+"z/"+(getmapusers("beach_dun")
+getmapusers("beach_dun2")+getmapusers("beach_dun3"))+" "+$@ked_users$+")",
"- Clock Tower ("+$@kewd_clockTower*@discount/100+"z/"+(getmapusers("c_tower1")
+getmapusers("c_tower2")+getmapusers("c_tower3")+getmapusers("c_tower4")
+getmapusers("alde_dun01")+getmapusers("alde_dun02")+getmapusers("alde_dun03")
+getmapusers("alde_dun04"))+" "+$@ked_users$+")",
"- Coal Mine ("+$@kewd_coalMines*@discount/100+"z/"+(getmapusers("mjo_dun01")
+getmapusers("mjo_dun02")+getmapusers("mjo_dun03"))+" "+$@ked_users$+")",
"- Culvert ("+$@kewd_culvert*@discount/100+"z/"+(getmapusers("prt_sewb1")+getmapusers("prt_sewb2")
+getmapusers("prt_sewb3")+getmapusers("prt_sewb4"))+" "+$@ked_users$+")",
"- Einbroch Station ("+$@kewd_einbech*@discount/100+"z/"+(getmapusers("ein_dun01")
+getmapusers("ein_dun02"))+" "+$@ked_users$+")",
"- Gefenia ("+$@kewd_gefenia*@discount/100+"z/"+(getmapusers("gefenia01")+getmapusers("gefenia02")
+getmapusers("gefenia03")+getmapusers("gefenia04"))+" "+$@ked_users$+")",
"- Geffen Dungeon ("+$@kewd_geffen*@discount/100+"z/"+(getmapusers("gef_dun00")
+getmapusers("gef_dun01")+getmapusers("gef_dun02")+getmapusers("gef_dun03"))+" "+$@ked_users$+")",
"- Glast Heim ("+$@kewd_glastHeim*@discount/100+"z/"+(getmapusers("gl_cas02")+getmapusers("gl_church")
+getmapusers("gl_chyard")+getmapusers("gl_dun01")+getmapusers("gl_dun02")
+getmapusers("gl_in01")+getmapusers("gl_knt01")+getmapusers("gl_knt02")
+getmapusers("gl_prison")+getmapusers("gl_prison1")+getmapusers("gl_sew01")
+getmapusers("gl_sew02")+getmapusers("gl_sew03")+getmapusers("gl_sew04")
+getmapusers("gl_step")+getmapusers("glast_01"))+" "+$@ked_users$+")",
"- Gon Ryun Dungeon ("+$@kewd_gonRyun*@discount/100+"z/"+(getmapusers("gon_dun01")
+getmapusers("gon_dun02")+getmapusers("gon_dun03"))+" "+$@ked_users$+")",
"- Hidden Temple ("+$@kewd_hiddenTemple*@discount/100+"z/"+(getmapusers("prt_maze01")
+getmapusers("prt_maze02")+getmapusers("prt_maze03"))+" "+$@ked_users$+")",
"- Juperos ("+$@kewd_juperos*@discount/100+"z/"+(getmapusers("juperos_01")+getmapusers("juperos_02")
+getmapusers("jupe_area1")+getmapusers("jupe_area2")+getmapusers("jupe_core")
+getmapusers("jupe_gate")+getmapusers("jupe_area1"))+" "+$@ked_users$+")",
"- Kiehl Doll Factory ("+$@kewd_kiehl*@discount/100+"z/"+(getmapusers("kh_dun01")
+getmapusers("kh_dun02"))+" "+$@ked_users$+")",
"- Ice Cave("+$@kewd_iceCave*@discount/100+"z/"+(getmapusers("ice_dun01")
+getmapusers("ice_dun02")+getmapusers("ice_dun03"))+" "+$@ked_users$+")",
"- LightHalzen Rekkenber ("+$@kewd_lightHalzen*@discount/100+"z/"+(getmapusers("lhz_dun01")
+getmapusers("lhz_dun02")+getmapusers("lhz_dun03"))+" "+$@ked_users$+")",
"- Lou Yang Royal Tomb ("+$@kewd_louYang*@discount/100+"z/"+(getmapusers("lou_dun01")
+getmapusers("lou_dun02")+getmapusers("lou_dun03"))+" "+$@ked_users$+")",
"- Magma Dungeon ("+$@kewd_magma*@discount/100+"z/"+(getmapusers("mag_dun01")
+getmapusers("mag_dun02"))+" "+$@ked_users$+")",
"- Odin Temple ("+$@kewd_odin*@discount/100+"z/"+(getmapusers("odin_tem01")
+getmapusers("odin_tem02")+getmapusers("odin_tem03"))+" "+$@ked_users$+")",
"- Orc Dungeon ("+$@kewd_orc*@discount/100+"z/"+(getmapusers("orcsdun01")
+getmapusers("orcsdun02"))+" "+$@ked_users$+")",
"- Payon Dungeon ("+$@kewd_payon*@discount/100+"z/"+(getmapusers("pay_dun00")
+getmapusers("pay_dun01")+getmapusers("pay_dun02")+getmapusers("pay_dun03")
+getmapusers("pay_dun04"))+" "+$@ked_users$+")",
"- Pyramid ("+$@kewd_pyramid*@discount/100+"z/"+(getmapusers("moc_pryd01")+getmapusers("moc_pryd02")
+getmapusers("moc_pryd03")+getmapusers("moc_pryd04")+getmapusers("moc_pryd05")
+getmapusers("moc_pryd06")+getmapusers("moc_prydb1"))+" "+$@ked_users$+")",
"- Rachel Temple ("+$@kewd_rachel*@discount/100+"z/"+(getmapusers("ra_san01")
+getmapusers("ra_san02")+getmapusers("ra_san03")+getmapusers("ra_san04")
+getmapusers("ra_san05"))+" "+$@ked_users$+")",
"- Sphinx ("+$@kewd_sphinx*@discount/100+"z/"+(getmapusers("in_sphinx1")
+getmapusers("in_sphinx2")+getmapusers("in_sphinx3")+getmapusers("in_sphinx4")
+getmapusers("in_sphinx5"))+" "+$@ked_users$+")",
"- Sunken Ship ("+$@kewd_sunkenShip*@discount/100+"z/"+(getmapusers("treasure01")
+getmapusers("treasure02"))+" "+$@ked_users$+")",
"- Thanatos Tower ("+$@kewd_thanatosTower*@discount/100+"z/"+(getmapusers("tha_t01")
+getmapusers("tha_t02")+getmapusers("tha_t03")+getmapusers("tha_t04")
+getmapusers("tha_t05")+getmapusers("tha_t06")+getmapusers("tha_t07")
+getmapusers("tha_t08")+getmapusers("tha_t09")+getmapusers("tha_t10")
+getmapusers("tha_t11")+getmapusers("tha_t12")+getmapusers("thana_step")
+getmapusers("thana_boss"))+" "+$@ked_users$+")",
"- Toy Factory ("+$@kewd_toyFactory*@discount/100+"z/"+(getmapusers("xmas_dun01")
+getmapusers("xmas_dun02"))+" "+$@ked_users$+")",
"- Turtle Island ("+$@kewd_turtleIsland*@discount/100+"z/"+(getmapusers("tur_dun01")
+getmapusers("tur_dun02")+getmapusers("tur_dun03")+getmapusers("tur_dun04")
+getmapusers("tur_dun05")+getmapusers("tur_dun06"))+" "+$@ked_users$+")",
"- Umbala Dungeon ("+$@kewd_umbala*@discount/100+"z/"+(getmapusers("um_dun01")
+getmapusers("um_dun02"))+" "+$@ked_users$+")"
);
} else {
set @kmenu, select(
"- Cancel",
"- Abyss Lake ("+$@kewd_abyssLake*@discount/100+"z)",
"- Amatsu Dungeon ("+$@kewd_amatsu*@discount/100+"z)",
"- Ant Hell ("+$@kewd_antHell*@discount/100+"z)",
"- Ayothaya Ancient Shrine ("+$@kewd_ayothaya*@discount/100+"z)",
"- Byalan Dungeon ("+$@kewd_byalan*@discount/100+"z)",
"- Comodo Caves ("+$@kewd_comodo*@discount/100+"z)",
"- Clock Tower ("+$@kewd_clockTower*@discount/100+"z)",
"- Coal Mine ("+$@kewd_coalMines*@discount/100+"z)",
"- Culvert ("+$@kewd_culvert*@discount/100+"z)",
"- Einbroch Mine ("+$@kewd_einbech*@discount/100+"z)",
"- Gefenia ("+$@kewd_gefenia*@discount/100+"z)",
"- Geffen Dungeon ("+$@kewd_geffen*@discount/100+"z)",
"- Glast Heim ("+$@kewd_glastHeim*@discount/100+"z)",
"- Gon Ryun Dungeon ("+$@kewd_gonRyun*@discount/100+"z)",
"- Hidden Temple ("+$@kewd_hiddenTemple*@discount/100+"z)",
"- Juperos ("+$@kewd_juperos*@discount/100+"z)",
"- Kiehl Doll Factory ("+$@kewd_kiehl*@discount/100+"z)",
"- Ice Cave ("+$@kewd_iceCave*@discount/100+"z)",
"- LightHalzen Rekkenber ("+$@kewd_lightHalzen*@discount/100+"z)",
"- Lou Yang Royal Tomb ("+$@kewd_louYang*@discount/100+"z)",
"- Magma Dungeon ("+$@kewd_magma*@discount/100+"z)",
"- Odin Temple ("+$@kewd_odin*@discount/100+"z)",
"- Orcs Dungeon ("+$@kewd_orc*@discount/100+"z)",
"- Payon Dungeon ("+$@kewd_payon*@discount/100+"z)",
"- Pyramid ("+$@kewd_pyramid*@discount/100+"z)",
"- Rachel Temple ("+$@kewd_rachel*@discount/100+"z)",
"- Sphinx ("+$@kewd_sphinx*@discount/100+"z)",
"- Sunken Ship ("+$@kewd_sunkenShip*@discount/100+"z)",
"- Thanatos Tower ("+$@kewd_thanatosTower*@discount/100+"z)",
"- Toy Factory ("+$@kewd_toyFactory*@discount/100+"z)",
"- Turtle Island ("+$@kewd_turtleIsland*@discount/100+"z)",
"- Umbala Dungeon ("+$@kewd_umbala*@discount/100+"z)"
);
}
switch (@kmenu) {
case 2:
SF_abyssLake();
break;
case 3:
SF_amatsu();
break;
case 4:
SF_antHell();
break;
case 5:
SF_ayothaya();
break;
case 6:
SF_byalan();
break;
case 7:
SF_comodo();
break;
case 8:
SF_clockTower();
break;
case 9:
SF_coalMine();
break;
case 10:
SF_culvert();
break;
case 11:
SF_einbech();
break;
case 12:
SF_gefenia();
break;
case 13:
SF_geffen();
break;
case 14:
SF_glastHeim();
break;
case 15:
SF_gonRyun();
break;
case 16:
SF_hiddenTemple();
break;
case 17:
SF_juperos();
break;
case 18:
SF_kiehl();
break;
case 19:
SF_iceCave();
break;
case 20:
SF_lightHalzen();
break;
case 21:
SF_louYang();
break;
case 22:
SF_magma();
break;
case 23:
SF_odin();
break;
case 24:
SF_orcs();
break;
case 25:
SF_payon();
break;
case 26:
SF_pyramid();
break;
case 27:
SF_rachel();
break;
case 28:
SF_sphinx();
break;
case 29:
SF_sunkenShip();
break;
case 30:
SF_thanatosTower();
break;
case 31:
SF_toyFactory();
break;
case 32:
SF_turtleIsland();
break;
case 33:
SF_umbala();
break;
default:
return;
}
} while (@kmenu > 1);
return;
//Subfunction SF_check(flag, cost, floor-count, player-map, dungeon-map#, map#1, map#2, ...)
//If kewd_travel is set, the flag needs to match to be to warp there.
//Floor count is the amount of levels the dungeon needs a price for,
//dungeon-map# is the number of maps passed that need to be checked against
//the player's map to see if they are warping from within the entrance.
function SF_check {
if ($@kewd_travel && !((kewd_travel|#kewd_travel)&getarg(0))) {
callfunc "F_keIntro", e_sry, "Sorry, but we can only warp you to dungeons you have saved in before.";
return 0;
}
set @cost, getarg(1);
set @discount,100;
set @map$, getarg(3);
set @mapI, getarg(4);
while (@mapI > 0)
{
if (@map$ == getarg(4+@mapI)) {
set @discount,100-$@kewd_entryDiscount;
break;
}
set @mapI, @mapI-1;
}
set @discountKP, callfunc("F_keCost",100,$@kewd_discount);
set @discount,@discount*@discountKP/100;
set @cost,@cost*@discount/100;
//@discountKP is used to reverse the price to before the KP discount takes place
if (@discountKP == 0)
set @discountKP,1;
if ($@kewd_deep == 0)
return 1;
//Reuse temp variable to set floor costs.
set @mapI, getarg(2);
set @inc,@cost*$@kewd_levelCost/100;
while (@mapI > 1) {
setd "@cost"+@mapI, @cost+(@mapI-1)*@inc;
set @mapI, @mapI-1;
}
return 1;
}
function SF_abyssLake {
if (!(SF_check(0x1, $@kewd_abyssLake, 3, @map$, 1, "hu_fild05")))
return;
if ($@kewd_deep == 0)
set @submenu, 2;
else if ($@kewd_showOnline) {
set @submenu, select(
"- Cancel warp to Abyss Lake",
"- Entrance ("+@cost+"z/"+getmapusers("abyss_01")+" "+$@ked_users$+")",
"- Level 2 ("+@cost2+"z/"+getmapusers("abyss_02")+" "+$@ked_users$+")",
"- Level 3 ("+@cost3+"z/"+getmapusers("abyss_03")+" "+$@ked_users$+")"
);
} else {
set @submenu, select(
"- Cancel warp to Abyss Lake",
"- Entrance ("+@cost+"z)",
"- Level 2 ("+@cost2+"z)",
"- Level 3 ("+@cost3+"z)"
);
}
switch (@submenu) {
case 2:
callfunc "F_keWarp",@cost*100/@discountKP,$@kewd_discount,e_hmm,"hu_fild05",173,308;
break;
case 3:
callfunc "F_keWarp",@cost2*100/@discountKP,$@kewd_discount,e_hmm,"abyss_02",272,270;
break;
case 4:
callfunc "F_keWarp",@cost3*100/@discountKP,$@kewd_discount,e_hmm,"abyss_03",116,29;
break;
}
}
function SF_amatsu {
if (!(SF_check(0x2, $@kewd_amatsu, 3, @map$, 1, "ama_in02")))
return;
if ($@kewd_deep == 0)
set @submenu, 2;
else if ($@kewd_showOnline) {
set @submenu, select(
"- Cancel warp to Amatsu Dungeon",
"- Entrance ("+@cost+"z/"+getmapusers("ama_dun01")+" "+$@ked_users$+")",
"- Level 2 ("+@cost2+"z/"+getmapusers("ama_dun02")+" "+$@ked_users$+")",
"- Level 3 ("+@cost3+"z/"+getmapusers("ama_dun03")+" "+$@ked_users$+")"
);
} else {
set @submenu, select(
"- Cancel warp to Amatsu Dungeon",
"- Entrance ("+@cost+"z)",
"- Level 2 ("+@cost2+"z)",
"- Level 3 ("+@cost3+"z)"
);
}
switch (@submenu) {
case 2:
callfunc "F_keWarp",@cost*100/@discountKP,$@kewd_discount,e_hmm,"ama_in02",120,181;
break;
case 3:
callfunc "F_keWarp",@cost2*100/@discountKP,$@kewd_discount,e_hmm,"ama_dun02",34,41;
break;
case 4:
callfunc "F_keWarp",@cost3*100/@discountKP,$@kewd_discount,e_hmm,"ama_dun03",119,14;
break;
}
}
function SF_antHell {
if (!(SF_check(0x4, $@kewd_antHell, 1, @map$, 2, "moc_fild04","moc_fild15")))
return;
if ($@kewd_showOnline) {
set @submenu, select(
"- Cancel warp to Ant Hell",
"- Northern Entrance ("+@cost+"z/"+getmapusers("anthell01")+" "+$@ked_users$+")",
"- Southern Entrance ("+@cost+"z/"+getmapusers("anthell02")+" "+$@ked_users$+")"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -