Jump to content
  • 0

King Of emperium Script


Question

Posted (edited)

http://www.eathena.ws/board/index.php?showtopic=174222

does this script work at rathena? and how do i make it every monday, wednesday, friday and sunday held?? and the prize is Poring Hat and 50m zeny

-	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 "guild_vs1";
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 "guild_vs1", $koegid, 6;
monster "guild_vs1",49,49,"EMPERIUM",1288,1,"KoE::OnEmpDead";
end;

OnEmpDead:
set $koegid, getcharid(2);
announce "The current King of Emperium Hill is the [" + strcharinfo(2) + "] guild.", 0;
donpcevent "::OnRevKoE";
maprespawnguildid "guild_vs1", $koegid, 6;
sleep 500;
if ( .koe_start )
	monster "guild_vs1",49,49,"EMPERIUM",1288,1,"KoE::OnEmpDead";
end;
}

// KoE Entrance
prontera,155,191,4	script	The King#KoE	58,{
   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 "guild_vs1", 50, 88; end;
       case 2:	warp "guild_vs1", 88, 50; end;
       case 3:	warp "guild_vs1", 50, 11; end;
       case 4:	warp "guild_vs1", 11, 50; end;
}
}

// KoE Exit
guild_vs1,49,56,5	script	Exit#KoE	51,{
mes "[Exit]";
mes "See ya.";
if ( getcharid(2) == $koegid )
	getitem 501, 1; // configure prize here
next;
warp "Save",0,0;
close;
}

// Flags
guild_vs1,49,38,4	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;
}
guild_vs1,61,49,6	duplicate(koe_flag)	King of Emperium Hill#2	722
guild_vs1,38,49,2	duplicate(koe_flag)	King of Emperium Hill#3	722
guild_vs1,49,61,0	duplicate(koe_flag)	King of Emperium Hill#4	722

guild_vs1	mapflag	gvg
guild_vs1	mapflag	nobranch
guild_vs1	mapflag	nomemo
guild_vs1	mapflag	nopenalty
guild_vs1	mapflag	noreturn
guild_vs1	mapflag	nosave	SavePoint
guild_vs1	mapflag	noteleport
guild_vs1	mapflag	gvg_noparty
guild_vs1	mapflag	nowarp
guild_vs1	mapflag	nowarpto

Edited by donkeyg

8 answers to this question

Recommended Posts

Posted

OnClock0000:
OnClock0200:
//etc
if( gettime(4) != 1 && gettime(4) != 3 && gettime(4) != 5 && gettime(4) != 0 ) end;
L_start:
......
.....

getitem 501, 1; // configure prize here
set Zeny,Zeny + 50000000;

  • 0
Posted
On 8/19/2012 at 10:03 PM, donkeyg said:

http://www.eathena.ws/board/index.php?showtopic=174222

does this script work at rathena? and how do i make it every monday, wednesday, friday and sunday held?? and the prize is Poring Hat and 50m zeny

 


-	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 "guild_vs1";
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 "guild_vs1", $koegid, 6;
monster "guild_vs1",49,49,"EMPERIUM",1288,1,"KoE::OnEmpDead";
end;

OnEmpDead:
set $koegid, getcharid(2);
announce "The current King of Emperium Hill is the [" + strcharinfo(2) + "] guild.", 0;
donpcevent "::OnRevKoE";
maprespawnguildid "guild_vs1", $koegid, 6;
sleep 500;
if ( .koe_start )
	monster "guild_vs1",49,49,"EMPERIUM",1288,1,"KoE::OnEmpDead";
end;
}

// KoE Entrance
prontera,155,191,4	script	The King#KoE	58,{
   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 "guild_vs1", 50, 88; end;
       case 2:	warp "guild_vs1", 88, 50; end;
       case 3:	warp "guild_vs1", 50, 11; end;
       case 4:	warp "guild_vs1", 11, 50; end;
}
}

// KoE Exit
guild_vs1,49,56,5	script	Exit#KoE	51,{
mes "[Exit]";
mes "See ya.";
if ( getcharid(2) == $koegid )
	getitem 501, 1; // configure prize here
next;
warp "Save",0,0;
close;
}

// Flags
guild_vs1,49,38,4	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;
}
guild_vs1,61,49,6	duplicate(koe_flag)	King of Emperium Hill#2	722
guild_vs1,38,49,2	duplicate(koe_flag)	King of Emperium Hill#3	722
guild_vs1,49,61,0	duplicate(koe_flag)	King of Emperium Hill#4	722

guild_vs1	mapflag	gvg
guild_vs1	mapflag	nobranch
guild_vs1	mapflag	nomemo
guild_vs1	mapflag	nopenalty
guild_vs1	mapflag	noreturn
guild_vs1	mapflag	nosave	SavePoint
guild_vs1	mapflag	noteleport
guild_vs1	mapflag	gvg_noparty
guild_vs1	mapflag	nowarp
guild_vs1	mapflag	nowarpto
 

 

is this script only 2 guild can join the KOE per event?

  • 0
Posted
On 1/28/2018 at 9:25 AM, skymia said:

is this script only 2 guild can join the KOE per event?

 

On 8/23/2012 at 1:47 AM, Emistry said:

 


OnClock0000:
OnClock0200:
//etc
if( gettime(4) != 1 && gettime(4) != 3 && gettime(4) != 5 && gettime(4) != 0 ) end;
L_start:
......
.....
 

 

 


getitem 501, 1; // configure prize here
set Zeny,Zeny + 50000000;
 

 

how to run this manually?

 

Posted (edited)

I dont know you have to try to the emulator?

edit: i dont know what is sort of event is... another game of emperium.

Edited by fredou81
Posted (edited)
OnClock0000:
OnClock0200:
//etc
if( gettime(4) != 1 && gettime(4) != 3 && gettime(4) != 5 && gettime(4) != 0 ) end;
L_start:
......
.....



getitem 501, 1; // configure prize here
set Zeny,Zeny + 50000000;



how about here?


 
//Made Goddameit
//Web http://goo.gl/q9sej
//Vsersion 2012/01/08 - 01:50 AM
prontera,150,180,4 script KOTH#RRnpc 100,{
if(.pid[1]||!getcharid(1))end;
set .pid[.pid[0]?1:0],getcharid(1);
if(.pid[1])
warpparty "koth01",23,7,getcharid(1);
else
warpparty "koth01",23,88,getcharid(1);
if(.pid[1])
{
stopnpctimer;
sleep2 2000;
mapannounce "koth01","[KOTH]:Game Start!!",0;
initnpctimer "KOTH_CheckArea";
initnpctimer "#Kothwaitroom";
initnpctimer "KOTH#AreaT";
}else
initnpctimer;
end;
OnTimer1:
announce "[KOTH]: Party ["+getpartyname(.pid[0])+"] start the koth!!",0;
end;
OnTimer30000:
donpcevent "KOTH#RRnpc::OnEndd";
end;
OnPCDieEvent:
if(getcharid(1)==.pid[1])
{
warp "koth01",23,7;
sleep2 1000;
unitskilluseid set(@z,bg_monster(0,"koth01",23,7,"",1002,"")),54,1,getcharid(3);
}else if(getcharid(1)==.pid[0])
{
warp "koth01",23,88;
sleep2 1000;
unitskilluseid set(@z,bg_monster(0,"koth01",23,88,"",1002,"")),54,1,getcharid(3);
}else
end;
sleep2 7000;
OnPCLogoutEvent:
if(@z)
unitkill @z;
end;
OnInit:
setwall "koth01",47,29,2,4,0,"kothwall11";
setwall "koth01",47,71,2,4,0,"kothwall22";
OnEndd:
stopnpctimer;
stopnpctimer "KOTH_CheckArea";
stopnpctimer "#Kothwaitroom";
stopnpctimer "KOTH#AreaT";
setarray .pid[0],0,0;
set getvariableofnpc(.defhp,"KOTH#AreaT"),25;
set getvariableofnpc(.defghp,"KOTH#AreaT"),180;
set getvariableofnpc(.hp,"KOTH#AreaT"),getvariableofnpc(.defhp,"KOTH#AreaT");
set getvariableofnpc(.rhp,"KOTH#AreaT"),getvariableofnpc(.defghp,"KOTH#AreaT");
set getvariableofnpc(.bhp,"KOTH#AreaT"),getvariableofnpc(.defghp,"KOTH#AreaT");
set getvariableofnpc(.loca,"KOTH#AreaT"),0;
set getvariableofnpc(.area,"KOTH#AreaT"),0;
set getvariableofnpc(.spee,"KOTH#AreaT"),0;
mapwarp "koth01","prontera",150,180;
end;
}
- script KOTH_CheckArea -1,{
function InArea {
getmapxy(.@m$,.@x,.@y,0,getarg(0));
if(.@m$=="koth01"&&.@x>=46&&.@x<=53&&.@y>=46&&.@y<=53)
return 1;
else
return 0;
}
OnTimer1:
setarray .@bo,0,0;
for(set .@i,0;.@i<=1;set .@i,.@i+1)
{
deletearray $@partymemberaid[0],128;
getpartymember getvariableofnpc(.pid[.@i],"KOTH#RRnpc"),2;
copyarray .@paid[0],$@partymemberaid[0],set(.@pnum,$@partymembercount);
for(set .@j,0;.@j<.@pnum;set .@j,.@j+1)
if(isloggedin(.@paid[.@j]))
if(InArea(rid2name(.@paid[.@j])))
set .@bo[.@i],.@bo[.@i]+1;
}
if(!.@bo[0]&&!.@bo[1])
{
set getvariableofnpc(.area,"KOTH#AreaT"),0;
set getvariableofnpc(.spee,"KOTH#AreaT"),0;
}
else if(!.@bo[0]&&.@bo[1])||(.@bo[0]&&!.@bo[1])
{
set getvariableofnpc(.area,"KOTH#AreaT"),.@bo[0]?1:2; //½Ö¥¿¦b¦û»â
set getvariableofnpc(.spee,"KOTH#AreaT"),.@bo[0]?.@bo[0]:.@bo[1]; //¦û»â³t«×
}else
set getvariableofnpc(.area,"KOTH#AreaT"),3;
initnpctimer;
end;
}
koth01,50,50,4 script #Kothwaitroom 1083,{
end;
OnInit:
waitingroom " ",0;
end;
OnTimer500:
delwaitingroom;
waitingroom "["+getvariableofnpc(.hp,"KOTH#AreaT")+"][B"+getvariableofnpc(.bhp,"KOTH#AreaT")+"][R"+getvariableofnpc(.rhp,"KOTH#AreaT")+"]",0;
initnpctimer;
end;
}
- script KOTH#AreaT -1,{
OnFlagD:
if(getarg(0)==2)
set .bhp,(.bhp<=0?0:.bhp-1);
else if(getarg(0)==3)
set .rhp,(.rhp<=0?0:.rhp-1);
else
return;
return;
OnTimer1000:
if(!.loca&&!.area)
{
if(.hp<.defhp)
set .hp,.hp+1;
set .area,0;
set .spee,0;
initnpctimer;
end;
}else if(.loca&&(.loca==.area||!.area))
{
if(.hp<.defhp)
set .hp,.hp+(.spee?.spee:1);
}else if(.area&&.spee&&.area!=3&&.area!=.loca)
{
set .hp,.hp-.spee;
if(.hp<=0)
{
set .loca,.area;
set .hp,.defhp;
set .rhp,(.rhp?.rhp:1);
set .bhp,(.bhp?.bhp:1);
}
}else
{
sleep 1;
}
callsub OnFlagD,.loca+1;
if(.rhp<=0||.bhp<=0)&&(.area==.loca||.area==0)&&(.hp==.defhp)
{
sleep 1000;
announce "["+(.rhp?"Blue":"Red")+".Team Win!!]",0;
donpcevent "KOTH#RRnpc::OnEndd";
end;
}
initnpctimer;
end;
}
koth01,44,26,4 script #koth01_warp_1-1 45,2,2,{
warp "koth01",53,28;
end;
}
koth01,34,72,4 script #koth01_warp_1-2 45,2,2,{
warp "koth01",27,65;
end;
}
koth01,44,80,4 script #koth01_warp_1-3 45,2,2,{
warp "koth01",72,65;
end;
}
koth01,44,73,4 script #koth01_warp_2-1 45,2,2,{
warp "koth01",53,71;
end;
}
koth01,34,26,4 script #koth01_warp_2-2 45,2,2,{
warp "koth01",27,34;
end;
}
koth01,44,17,4 script #koth01_warp_2-3 45,2,2,{
warp "koth01",72,34;
end;
}
koth01,23,7,4 script NPC#koth01 100,{
if(select("Heal","Storage")==1)
percentheal 100,100;
else
openstorage;
close;
}
koth01,23,88,4 duplicate(NPC#koth01) NPC#koth02 100
koth01 mapflag pvp

 



bum\p

bump TT

bu,pppp

bumoooooppp

Edited by Capuche
[Quote] to [Code]
Posted

/swt .. the KOTH script you post is not an auto event...

the script will run whenever there is 2 group of members joined.

the only way to make it look like a "Auto Event"

you can just set a time when it will enable the NPC so other can join ..and disable it when the time limit reach..

Posted
On 8/26/2012 at 7:22 PM, Emistry said:

/swt .. the KOTH script you post is not an auto event...

the script will run whenever there is 2 group of members joined.

the only way to make it look like a "Auto Event"

you can just set a time when it will enable the NPC so other can join ..and disable it when the time limit reach..

yeah!! this is what i wan to say lol!!! but i totaly don know which 1 should i remove and add in the script there :(

 

The KOE script got bugged, magic can hit the emperium!!

http://rathena.org/board/topic/70567-peopleperson49s-scripts/page-6

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...