Here
- script KoE -1,{
OnInit:
disablenpc "The King#KoE";
disablenpc "Exit#KoE";
end;
OnWhisperGlobal:
if ( getgmlevel() < 99 ) end;
else if ( compare ( @whispervar0$, "on" ) ) goto L_start;
else if ( compare ( @whispervar0$, "off" ) ) goto L_end;
else
end;
OnClock1200:
OnClock0000:
L_start:
announce "The King of Emperium Hill has begun!", 0;
set .koe_start, 1;
enablenpc "The King#KoE";
disablenpc "Exit#KoE";
set $koegid, 0;
donpcevent "::OnRevKoE";
maprespawnguildid "koe", $koegid, 6;
monster "koe",49,49,"EMPERIUM",1288,1,"KoE::OnEmpDead";
end;
OnClock1230:
OnClock0030:
L_end:
announce "The King of Emperium Hill is over!", 0;
set .koe_start, 0;
enablenpc "Exit#KoE";
disablenpc "The King#KoE";
killmonsterall "koe";
end;
OnEmpDead:
set $koegid, getcharid(2);
announce "The current King of Emperium Hill is [ " + strcharinfo(0) + " ] from the [ " + strcharinfo(2) + " ] guild.", 0;
donpcevent "::OnRevKoE";
maprespawnguildid "koe", $koegid, 6;
sleep 500;
if ( .koe_start )
monster "koe",49,49,"EMPERIUM",1288,1,"KoE::OnEmpDead";
end;
}// KoE Entrance
phtownall,191,173,5 script The King#KoE1 469,{
mes "[The King]";
if ( getcharid(2) == 0 ) {
mes "You must have a guild to participate in the ^FF0000King of Emperium Hill Tournament^000000.";
close;
}
mes "Hello.";
mes "Would you like to participate in the ^FF0000King of Emperium Hill Tournament^000000?";
if ( select ( "Yes", "No" ) == 2 ) close;
switch( rand(1,4) ){
case 1: warp "koe", 13, 15; end;
case 2: warp "koe", 11, 85; end;
case 3: warp "koe", 88, 86; end;
case 4: warp "koe", 86, 14; end;
}
}
// KoE Exit
// koe,52,51,4 script Exit#KoE 470,{
// KoE Exit
koe,52,51,4 script Exit#KoE 51,{
mes "[Exit]";
mes "See ya.";
close2;
warp "Save",0,0;
if ( getcharid(2) == $koegid )
getitem 12493, 1; // configure prize here
end;
}
}
// Flags
koe,90,10,1 script King of Emperium Hill#1::koe_flag 722,{
set .@gid, $koegid;
if ( .@gid == 0 ) end;
mes "[King of Emperium Hill]";
mes "The Current King of Emperium Hill is the ["+ getguildname(.@gid) +"] guild.";
close;
OnRevKoE:
flagemblem $koegid;
end;
}
koe,49,77,4 duplicate(koe_flag) King of Emperium Hill#a 722
koe,50,22,0 duplicate(koe_flag) King of Emperium Hill#b 722
koe,60,59,3 duplicate(koe_flag) King of Emperium Hill#c 722
koe,39,59,5 duplicate(koe_flag) King of Emperium Hill#d 722
koe,39,40,7 duplicate(koe_flag) King of Emperium Hill#e 722
koe,60,40,1 duplicate(koe_flag) King of Emperium Hill#f 722
koe,22,50,6 duplicate(koe_flag) King of Emperium Hill#g 722
koe,8,89,5 duplicate(koe_flag) King of Emperium Hill#h 722
koe,91,89,3 duplicate(koe_flag) King of Emperium Hill#i 722
koe,8,11,7 duplicate(koe_flag) King of Emperium Hill#k 722
phtownall,187,173,4 duplicate(koe_flag) King of Emperium#5 722
koe mapflag gvg
koe mapflag nobranch
koe mapflag nomemo
koe mapflag nopenalty
koe mapflag noreturn
koe mapflag nosave
koe mapflag noteleport
//guild_vs1 mapflag gvg_noparty
koe mapflag nowarp
koe mapflag nowarpto