Help me WoE Controller Oficial

BrOgBr

New member
Messages
34
Points
0
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.

Code:
-	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. :'(

 
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()

 
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:

Code:
-	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.  :(

 
Last edited by a moderator:
Now I tried so:

Code:
-	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

Code:
// - 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

 
Last edited by a moderator:
ok I'll have a look later when I get some time

 
Back
Top