Jump to content
  • 0

Question

Posted

Halo rathena, can anyone remake this script? I want to make this King of the Hill to be automated. 

  • The King of the Hill will starts during 12pm and 12am ( server time )
  • Event last for only 30 minutes
  • Winning guild can get 1pcs Event Ticket (12493)

For those who can help me, i'll thank you forever. Ciao.  /no1

-	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;
 
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;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;
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,{
next;
warp "Save",0,0;
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

1 answer to this question

Recommended Posts

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...