Jump to content
  • 0

Automated TimerStart on NPC.


Question

Posted

I wanted to start my event every Wednesday 11:00 ends at 11:30 and 20:00 ends  20:30.

 

Here's what I put. Looks like every wednesday 11:00 it is not starting:

 

-	script	KoE	-1,{
OnInit:
	disablenpc "The King#KoE";
	disablenpc "Get Your Prize Here#KoE";
	bindatcmd "koe", strnpcinfo(0)+"::Oncommand", 99,99;
	end;
Oncommand:
	if ( compare( .@atcmd_parameters$, "on" ) ) goto L_start;
	else if ( compare( .@atcmd_parameters$, "off" ) ) goto L_end;
	else {
		dispbottom "type - '@koe on' to start the event";
		dispbottom "type - '@koe off' to end the event";
	}
	end;
L_start:
OnWed2000:
OnWed1100:
	gvgon "guild_vs1";
	announce "The King of Emperium Hill has begun!", bc_all;
	.start = 1;
	enablenpc "The King#KoE";
	disablenpc "Get Your Prize Here#KoE";
	$koegid = 0;
	donpcevent "::OnRevKoE";
	maprespawnguildid "guild_vs1", $koegid, 7;
	monster "guild_vs1",49,49,"EMPERIUM",1288,1,"KoE::OnEmpDead";
	end;		
L_end:
OnWed2030:
OnWed1130:
	gvgoff "guild_vs1";
	announce "The King of Emperium Hill is over!", bc_all;

 

3 answers to this question

Recommended Posts

  • 0
Posted (edited)
50 minutes ago, realRO said:

I wanted to start my event every Wednesday 11:00 ends at 11:30 and 20:00 ends  20:30.

 

Here's what I put. Looks like every wednesday 11:00 it is not starting:

 


-	script	KoE	-1,{
OnInit:
	disablenpc "The King#KoE";
	disablenpc "Get Your Prize Here#KoE";
	bindatcmd "koe", strnpcinfo(0)+"::Oncommand", 99,99;
	end;
Oncommand:
	if ( compare( .@atcmd_parameters$, "on" ) ) goto L_start;
	else if ( compare( .@atcmd_parameters$, "off" ) ) goto L_end;
	else {
		dispbottom "type - '@koe on' to start the event";
		dispbottom "type - '@koe off' to end the event";
	}
	end;
L_start:
OnWed2000:
OnWed1100:
	gvgon "guild_vs1";
	announce "The King of Emperium Hill has begun!", bc_all;
	.start = 1;
	enablenpc "The King#KoE";
	disablenpc "Get Your Prize Here#KoE";
	$koegid = 0;
	donpcevent "::OnRevKoE";
	maprespawnguildid "guild_vs1", $koegid, 7;
	monster "guild_vs1",49,49,"EMPERIUM",1288,1,"KoE::OnEmpDead";
	end;		
L_end:
OnWed2030:
OnWed1130:
	gvgoff "guild_vs1";
	announce "The King of Emperium Hill is over!", bc_all;

 

Try these..

 

OnClock1100:
OnClock2000:
	if(gettime(4) == 3){ // 3 = Wed
		gvgon "guild_vs1";
		announce "The King of Emperium Hill has begun!", bc_all;
		.start = 1;
		enablenpc "The King#KoE";
		disablenpc "Get Your Prize Here#KoE";
		$koegid = 0;
		donpcevent "::OnRevKoE";
		maprespawnguildid "guild_vs1", $koegid, 7;
		monster "guild_vs1",49,49,"EMPERIUM",1288,1,"KoE::OnEmpDead";
	}
	end;
			
L_end:
OnClock1130:
OnClock2030:
	if(gettime(4) == 3){ // 3 = Wed
		gvgoff "guild_vs1";
		announce "The King of Emperium Hill is over!", bc_all;
	}
	end;

 

Edited by Sryx
  • 0
Posted
1 minute ago, Sryx said:

Try these..

 


OnClock1100:
OnClock2000:
	if(gettime(4) == 3){ // 3 = Wed
		gvgon "guild_vs1";
		announce "The King of Emperium Hill has begun!", bc_all;
		.start = 1;
		enablenpc "The King#KoE";
		disablenpc "Get Your Prize Here#KoE";
		$koegid = 0;
		donpcevent "::OnRevKoE";
		maprespawnguildid "guild_vs1", $koegid, 7;
		monster "guild_vs1",49,49,"EMPERIUM",1288,1,"KoE::OnEmpDead";
		end;
	}
			
L_end:
OnClock1130:
OnClock2030:
	if(gettime(4) == 3){ // 3 = Wed
		gvgoff "guild_vs1";
		announce "The King of Emperium Hill is over!", bc_all;
	}

 

Hi thank you for your reply, would you mind sharing me on how to check this fast without waiting the Wednesday date or changing my current Timezone?

  • 0
Posted (edited)
3 minutes ago, realRO said:

Hi thank you for your reply, would you mind sharing me on how to check this fast without waiting the Wednesday date or changing my current Timezone?


 

1. Change the 3 to the current day of your server ( 0 = Sun to 6 = Sat )

2. Advance the OnClock to your server time ( 10 mins or more )

Edited by Sryx

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