Jump to content
  • 0
BrOgBr

Help me WoE Controller Oficial

Question

Hello guys, someone can help, the WoE don't starts and I haven't idea why...
It's the Oficial NPC, I just changed some things, the start time I put 1745 to start just for test, but it's not working.

-	script	Agit_Event	-1,{
	end;

OnClock1745:	//start time for Tues(2), Thurs(4)
OnClock1750:	//end time for Tues(2), Thurs(4)

OnAgitInit:
	// starting time checks
	if(gettime(4)==5) && (gettime(3)>=1745) {
		if (!agitcheck()) {
			agitstart;
			callsub S_DisplayOwners;
		}
		end;
	}

	// end time checks
	if (gettime(4)==5) && (gettime(3)==1750) {
		if (agitcheck()) {
			agitend;
			callsub S_DisplayOwners;
		}
		end;
	}
	end;

S_DisplayOwners:
//	setarray .@maps$[0],"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05";
//	setarray .@maps$[5],"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05";
//	setarray .@maps$[10],"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05";
	setarray .@maps$[15],"prtg_cas01";	//"prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05";
	for (.@i = 0; .@i <= 19; ++.@i) {
		if (getcastledata(.@maps$[.@i],1))
			announce "O Castelo [" + getcastlename(.@maps$[.@i]) + "] está em posse do Clã [" + getguildname(getcastledata(.@maps$[.@i],1)) + "].",bc_all|bc_woe;
		else
			announce "O Castelo [" + getcastlename(.@maps$[.@i]) + "] está totalmente desocupado.",bc_all|bc_woe;
	}
	end;
}

Please help. :'(

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

you have a syntax error in your if statements: the condition(s) must be enclosed within parentheses.

 

if (gettime(4) == 5) && (gettime(3) >= 1745)

should be:

if ((gettime(4) == 5) && (gettime(3) >= 1745))

 

also, you should use constants instead of passing 3 or 4 to gettime()

Share this post


Link to post
Share on other sites
  • 0
26 minutes ago, meko said:

you have a syntax error in your if statements: the condition(s) must be enclosed within parentheses.

 

if (gettime(4) == 5) && (gettime(3) >= 1745)

should be:

if ((gettime(4) == 5) && (gettime(3) >= 1745))

 

also, you should use constants instead of passing 3 or 4 to gettime()

Hello meko, thank you for help.

I tried so:

-	script	Agit_Event	-1,{
	end;

OnClock0018:	//start time for Tues(2), Thurs(4)
OnClock0025:	//end time for Tues(2), Thurs(4)

OnAgitInit:
	// starting time checks
	if((gettime(4)==6) && (gettime(3)>=0018 && gettime(3)<0025)) {
		if (!agitcheck()) {
			agitstart;
			callsub S_DisplayOwners;
		}
		end;
	}

	// end time checks
	if ((gettime(4)==6) && (gettime(3)==0025)) {
		if (agitcheck()) {
			agitend;
			callsub S_DisplayOwners;
		}
		end;
	}
	end;

I didn't have a map-server error, but the WoE didn't start. :(

Edited by BrOgBr

Share this post


Link to post
Share on other sites
  • 0

Now I tried so:

-	script	Agit_Event	-1,{
	end;

OnClock0028:	//start time for Tues(2), Thurs(4)
OnClock0030:	//end time for Tues(2), Thurs(4)

OnAgitInit:
	// starting time checks
	if((gettime(4)==6) && (gettime(3)>=28 && gettime(3)<30)) {
		if (!agitcheck()) {
			agitstart;
			callsub S_DisplayOwners;
		}
		end;
	}

	// end time checks
	if ((gettime(4)==6) && (gettime(3)==30)) {
		if (agitcheck()) {
			agitend;
			callsub S_DisplayOwners;
		}
		end;
	}
	end;

Server time was 00:28.
Without sucess.

@AgitStart and @AgitEnd working perfectly.

I did it in my script.guild.conf:
I don't know if this might be the problem

// - Al De Baran
//npc: npc/gde/1ed/aldeg_cas01.txt
//npc: npc/gde/1ed/aldeg_cas02.txt
//npc: npc/gde/1ed/aldeg_cas03.txt
//npc: npc/gde/1ed/aldeg_cas04.txt
//npc: npc/gde/1ed/aldeg_cas05.txt
// - Geffen
//npc: npc/gde/1ed/gefg_cas01.txt
//npc: npc/gde/1ed/gefg_cas02.txt
//npc: npc/gde/1ed/gefg_cas03.txt
//npc: npc/gde/1ed/gefg_cas04.txt
//npc: npc/gde/1ed/gefg_cas05.txt
// - Payon
//npc: npc/gde/1ed/payg_cas01.txt
//npc: npc/gde/1ed/payg_cas02.txt
//npc: npc/gde/1ed/payg_cas03.txt
//npc: npc/gde/1ed/payg_cas04.txt
//npc: npc/gde/1ed/payg_cas05.txt
// - Prontera
npc: npc/gde/1ed/prtg_cas01.txt
//npc: npc/gde/1ed/prtg_cas02.txt
//npc: npc/gde/1ed/prtg_cas03.txt
//npc: npc/gde/1ed/prtg_cas04.txt
//npc: npc/gde/1ed/prtg_cas05.txt

 

Edited by BrOgBr

Share this post


Link to post
Share on other sites

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

  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.

Loading...

×
×
  • Create New...

Important Information

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