Jump to content
  • 0
Sign in to follow this  
meruem

KOE add schedule

Question

4 answers to this question

Recommended Posts

  • 1
1 hour ago, meruem said:

How to add schedule on this koe script. Example I want it to be 2x a day. 1 morning and 1 evening. Can anyone help?

 

 

I think you should have read Annie's post in that topic

 

Quote

How to configure the time:

L_start: <-- the label to start the event
change OnClock2000: into OnSat2000: to start this event on Saturday 8pm

L_end: <-- the label to end the event
change OnClock2030: into OnSat2030: to end this event on Saturday 8:30pm,
effectively makes this event runs 30 minutes

 

Just add OnClock label on both L_start and L_end to add another time

 

L_start:
--Add another Starting time here
OnClock2000: // everyday 8pm starts


L_end:
--Add another Ending time here
OnClock2030: // everyday 8:30pm ends

 

Just make sure that starting time will not overlap with ending time as well

Share this post


Link to post
Share on other sites
  • 0
3 hours ago, Samuel said:

I think you should have read Annie's post in that topic

 

 

Just add OnClock label on both L_start and L_end to add another time

 

L_start: --Add another Starting time here OnClock2000: // everyday 8pm starts L_end: --Add another Ending time here OnClock2030: // everyday 8:30pm ends


L_start:
--Add another Starting time here
OnClock2000: // everyday 8pm starts


L_end:
--Add another Ending time here
OnClock2030: // everyday 8:30pm ends

 

Just make sure that starting time will not overlap with ending time as well

I add another line of l_start and l_end so my script looks like this

 

L_start:
OnClock1850: // everyday 8pm starts
	if ( .start ) end;
	gvgon "guild_vs1";
	announce "The King of Emperium Hill has begun!", bc_all;
	.start = true;
	enablenpc "The King#KoE";
	disablenpc "Exit#KoE";
	$koegid = 0;
	donpcevent "::OnRevKoE";
	maprespawnguildid "guild_vs1", $koegid, 3;
	killmonster "guild_vs1", "KoE::OnEmpDead";
	monster "guild_vs1",49,49, "EMPERIUM", 1288, 1, "KoE::OnEmpDead";
	end;
L_End:
OnClock1851: // everyday 8:30pm ends
	gvgoff "guild_vs1";
	announce "The King of Emperium Hill is over!", bc_all;
	.start = 0;
	enablenpc "Exit#KoE";
	disablenpc "The King#KoE";
	killmonster "guild_vs1", "KoE::OnEmpDead";
	maprespawnguildid "guild_vs1", $koegid, 2; // uncomment this line to kick non-owner off the map when event ends
	end;
L_start:
OnClock1855: // everyday 8pm starts
	if ( .start ) end;
	gvgon "guild_vs1";
	announce "The King of Emperium Hill has begun!", bc_all;
	.start = true;
	enablenpc "The King#KoE";
	disablenpc "Exit#KoE";
	$koegid = 0;
	donpcevent "::OnRevKoE";
	maprespawnguildid "guild_vs1", $koegid, 3;
	killmonster "guild_vs1", "KoE::OnEmpDead";
	monster "guild_vs1",49,49, "EMPERIUM", 1288, 1, "KoE::OnEmpDead";
	end;
L_End:
OnClock1856: // everyday 8:30pm ends
	gvgoff "guild_vs1";
	announce "The King of Emperium Hill is over!", bc_all;
	.start = 0;
	enablenpc "Exit#KoE";
	disablenpc "The King#KoE";
	killmonster "guild_vs1", "KoE::OnEmpDead";
	maprespawnguildid "guild_vs1", $koegid, 2; // uncomment this line to kick non-owner off the map when event ends
	end;
OnEmpDead:
	$koegid = getcharid(2);
	announce "The current King of Emperium Hill is the ["+ strcharinfo(2) +"] guild.", bc_all;
	donpcevent "::OnRevKoE";
	maprespawnguildid "guild_vs1", $koegid, 2;
	killmonster "guild_vs1", "KoE::OnEmpDead";
	sleep 500;
	if ( .start )
		monster "guild_vs1",49,49, "EMPERIUM", 1288, 1, "KoE::OnEmpDead";
	end;

The npc appears but I cant go inside the koe map.
And theres an error on my server. Here

 

[Error]: script error in file 'npc/custom/koescript.txt' line 55 column 1
    set_label: dup label
    52:         killmonster "guild_vs1", "KoE::OnEmpDead";
    53:         maprespawnguildid "guild_vs1", $koegid, 2; // uncomment this lin                                                                                       e to kick non-owner off the map when event ends
    54:         end;
*   55: L_start:
        ^
    56: OnClock1855: // everyday 8pm starts
    57:         if ( .start ) end;
    58:         gvgon "guild_vs1";
[Warning]: script error in file 'npc/custom/koescript.txt' line 125 column 52
    This command is deprecated and it will be removed in a future update. Please                                                                                        see the script documentation for an alternative.

   122: {
   123:         if ( !$koegid ) end;
   124:         mes "[King of Emperium Hill]";
*  125:         mes "The Current King of Emperium Hill is the ["+ getguildname($                                                                                       koegid) +"] guild.";
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
   126:         close;
   127: //OnInit: // Uncomment this line to make the emblem stay after @reloadsc                                                                                       ript
   128: OnRevKoE:

 

Share this post


Link to post
Share on other sites
  • 0

@meruem you just need to add

+

OnClock0800 for example, not the whole L_start and L_end label

 

And don't do 1855 start then 1856 end, 1 min event?

Share this post


Link to post
Share on other sites
  • 0
4 minutes ago, Samuel said:

@meruem you just need to add

+

OnClock0800 for example, not the whole L_start and L_end label

 

And don't do 1855 start then 1856 end, 1 min event?

Im trying it on my server so I set it up just for 1 minute to know that the script is working. 

 

I think its working now. This is what I did. I will put it here for future ref. 
 

L_start:
OnClock1925:
OnClock1935: // everyday 8pm starts
	if ( .start ) end;
	gvgon "guild_vs1";
	announce "The King of Emperium Hill has begun!", bc_all;
	.start = true;
	enablenpc "The King#KoE";
	disablenpc "Exit#KoE";
	$koegid = 0;
	donpcevent "::OnRevKoE";
	maprespawnguildid "guild_vs1", $koegid, 3;
	killmonster "guild_vs1", "KoE::OnEmpDead";
	monster "guild_vs1",49,49, "EMPERIUM", 1288, 1, "KoE::OnEmpDead";
	end;
L_End:
OnClock1930:
OnClock1940: // everyday 8:30pm ends
	gvgoff "guild_vs1";
	announce "The King of Emperium Hill is over!", bc_all;
	.start = 0;
	enablenpc "Exit#KoE";
	disablenpc "The King#KoE";
	killmonster "guild_vs1", "KoE::OnEmpDead";
	maprespawnguildid "guild_vs1", $koegid, 2; // uncomment this line to kick non-owner off the map when event ends
	end;

Thank you so much sir Samuel. 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.