Jump to content
  • 0

WoE Controller, No Treasure Boxes


Question

Posted

Hello,

 

my agit_main.txt doesn't autospawn Treasure Boxes.

I use Euphys WoE Controller v1.5

 

I have commented out the agit_controller.txt and no further changes were made.

The woe_controller.txt and agit_main.txt start with @reloadscript and server restart of course.

 

Can someone help me out please? x_X

7 answers to this question

Recommended Posts

Posted

Hello,

my agit_main.txt doesn't autospawn Treasure Boxes.

I use Euphys WoE Controller v1.5

I have commented out the agit_controller.txt and no further changes were made.

The woe_controller.txt and agit_main.txt start with @reloadscript and server restart of course.

Can someone help me out please? x_X

treasure boxes? u mean castle chest?? l

Posted

I am using the official WoE script now and added a PM option to spawn TBs manually.

What is strange is that the problem obviously is the OnClock0001.

L_GMSpawn:
OnClock0001:
	// Do nothing if this script is the template.
	if (strnpcinfo(1) == "Gld_Trea_Spawn"){
		
		end;
	}
	
	set .@GID, GetCastleData(strnpcinfo(2),1);
	
	// If there is no owner, do nothing.
	if (!.@GID){
		end;
	}

	// Is there Economy in this castle?
	set .@Treasure,GetCastleData(strnpcinfo(2),2)/5+4;

	// Set information
	if (strnpcinfo(2) == "aldeg_cas01") { 
		set .@treasurebox,1324;
		setarray .@treasurex[0],115,122,115,122,116,117,118,119,120,121,121,121,121,121,121,120,119,118,117,116,116,116,116,116;
		setarray .@treasurey[0],226,226,219,219,225,225,225,225,225,225,224,223,222,221,220,220,220,220,220,220,221,222,223,224;
	}
	else if (strnpcinfo(2) == "aldeg_cas02") { 
		set .@treasurebox,1326;
		setarray .@treasurex[0],134,135,135,134,132,133,134,135,136,137,137,137,137,137,137,136,135,134,133,132,132,132,132,132;
		setarray .@treasurey[0],231,231,230,230,233,233,233,233,233,233,232,231,230,229,228,228,228,228,228,228,229,230,231,232;
	}
	else if (strnpcinfo(2) == "aldeg_cas03") { 
		set .@treasurebox,1328;
		setarray .@treasurex[0],224,225,225,224,222,223,224,225,226,227,227,227,227,227,227,226,225,224,223,222,222,222,222,222;
		setarray .@treasurey[0],269,269,268,268,271,271,271,271,271,271,270,269,268,267,266,266,266,266,266,266,267,268,269,270;
	}
	else if (strnpcinfo(2) == "aldeg_cas04") { 
		set .@treasurebox,1330;
		setarray .@treasurex[0],84,85,85,84,82,83,84,85,86,87,87,87,87,87,87,86,85,84,83,82,82,82,82,82;
		setarray .@treasurey[0],13,13,12,12,15,15,15,15,15,15,14,13,12,11,10,10,10,10,10,10,11,12,13,14;
	}
	else if (strnpcinfo(2) == "aldeg_cas05") { 
		set .@treasurebox,1332;
		setarray .@treasurex[0],61,62,62,61,59,60,61,62,63,64,64,64,64,64,64,63,62,61,60,59,59,59,59,59;
		setarray .@treasurey[0],12,12,11,11,14,14,14,14,14,14,13,12,11,10,9,9,9,9,9,9,10,11,12,13;
	}
	else if (strnpcinfo(2) == "gefg_cas01") { 
		set .@treasurebox,1334;
		setarray .@treasurex[0],153,154,154,153,151,152,153,154,155,156,156,156,156,156,156,155,154,153,152,151,151,151,151,151;
		setarray .@treasurey[0],113,113,112,112,115,115,115,115,115,115,114,113,112,111,110,110,110,110,110,110,111,112,113,114;
	}
	else if (strnpcinfo(2) == "gefg_cas02") { 
		set .@treasurebox,1336;
		setarray .@treasurex[0],139,140,140,139,137,138,139,140,141,142,142,142,142,142,142,141,140,139,138,137,137,137,137,137;
		setarray .@treasurey[0],115,115,114,114,117,117,117,117,117,117,116,115,114,113,112,112,112,112,112,112,113,114,115,116;
	}
	else if (strnpcinfo(2) == "gefg_cas03") { 
		set .@treasurebox,1338;
		setarray .@treasurex[0],269,270,270,269,267,268,269,270,271,272,272,272,272,272,272,271,270,269,268,267,267,267,267,267;
		setarray .@treasurey[0],291,291,290,290,293,293,293,293,293,293,292,291,290,289,288,288,288,288,288,288,289,290,291,292;
	}
	else if (strnpcinfo(2) == "gefg_cas04") { 
		set .@treasurebox,1340;
		setarray .@treasurex[0],115,116,116,115,113,114,115,116,117,118,118,118,118,118,118,117,116,115,114,113,113,113,113,113;
		setarray .@treasurey[0],119,119,118,118,121,121,121,121,121,121,120,119,118,117,116,116,116,116,116,116,117,118,119,120;
	}
	else if (strnpcinfo(2) == "gefg_cas05") { 
		set .@treasurebox,1342;
		setarray .@treasurex[0],143,144,144,143,141,142,143,144,145,146,146,146,146,146,146,145,144,143,142,141,141,141,141,141;
		setarray .@treasurey[0],110,110,109,109,112,112,112,112,112,112,111,110,109,108,107,107,107,107,107,107,108,109,110,111;
	}
	else if (strnpcinfo(2) == "payg_cas01") { 
		set .@treasurebox,1344;
		setarray .@treasurex[0],289,292,292,289,288,289,290,291,292,293,293,293,293,293,293,292,291,290,289,288,288,288,288,288;
		setarray .@treasurey[0],10,10,7,7,11,11,11,11,11,11,10,9,8,7,6,6,6,6,6,6,7,8,9,10;
	}
	else if (strnpcinfo(2) == "payg_cas02") { 
		set .@treasurebox,1346;
		setarray .@treasurex[0],143,146,146,143,142,143,144,145,146,147,147,147,147,147,147,146,145,144,143,142,142,142,142,142;
		setarray .@treasurey[0],146,146,143,143,147,147,147,147,147,147,146,145,144,143,142,142,142,142,142,142,143,144,145,146;
	}
	else if (strnpcinfo(2) == "payg_cas03") { 
		set .@treasurebox,1348;
		setarray .@treasurex[0],158,159,159,158,156,157,158,159,160,161,161,161,161,161,161,160,159,158,157,156,156,156,156,156;
		setarray .@treasurey[0],169,169,168,168,171,171,171,171,171,171,170,169,168,167,166,166,166,166,166,166,167,168,169,170;
	}
	else if (strnpcinfo(2) == "payg_cas04") { 
		set .@treasurebox,1350;
		setarray .@treasurex[0],146,147,147,146,144,145,146,147,148,149,149,149,149,149,149,148,147,146,145,144,144,144,144,144;
		setarray .@treasurey[0],48,48,47,47,50,50,50,50,50,50,49,48,47,46,45,45,45,45,45,45,46,47,48,49;
	}
	else if (strnpcinfo(2) == "payg_cas05") { 
		set .@treasurebox,1352;
		setarray .@treasurex[0],155,158,158,155,154,155,156,157,158,159,159,159,159,159,159,158,157,156,155,154,154,154,154,154;
		setarray .@treasurey[0],134,134,131,131,135,135,135,135,135,135,134,133,132,131,130,130,130,130,130,130,131,132,133,134;
	}
	else if (strnpcinfo(2) == "prtg_cas01") { 
		set .@treasurebox,1354;
		setarray .@treasurex[0],10,11,11,10,8,9,10,11,12,13,13,13,13,13,13,12,11,10,9,8,8,8,8,8;
		setarray .@treasurey[0],209,209,208,208,211,211,211,211,211,211,210,209,208,207,206,206,206,206,206,206,207,208,209,210;
	}
	else if (strnpcinfo(2) == "prtg_cas02") { 
		set .@treasurebox,1356;
		setarray .@treasurex[0],201,202,202,201,199,200,201,202,203,204,204,204,204,204,204,203,202,201,200,199,199,199,199,199;
		setarray .@treasurey[0],228,228,227,227,230,230,230,230,230,230,229,228,227,226,225,225,225,225,225,225,226,227,228,229;
	}
	else if (strnpcinfo(2) == "prtg_cas03") { 
		set .@treasurebox,1358;
		setarray .@treasurex[0],187,188,188,187,185,186,187,188,189,190,190,190,190,190,190,189,188,187,186,185,185,185,185,185;
		setarray .@treasurey[0],132,132,131,131,134,134,134,134,134,134,133,132,131,130,129,129,129,129,129,129,130,131,132,133;
	}
	else if (strnpcinfo(2) == "prtg_cas04") { 
		set .@treasurebox,1360;
		setarray .@treasurex[0],269,270,270,269,267,268,269,270,271,272,272,272,272,272,272,271,270,269,268,267,267,267,267,267;
		setarray .@treasurey[0],162,162,161,161,164,164,164,164,164,164,163,162,161,160,159,159,159,159,159,159,160,161,162,163;
	}
	else if (strnpcinfo(2) == "prtg_cas05") { 
		set .@treasurebox,1362;
		setarray .@treasurex[0],275,276,276,275,273,274,275,276,277,278,278,278,278,278,278,277,276,275,274,273,273,273,273,273;
		setarray .@treasurey[0],178,178,177,177,180,180,180,180,180,180,179,178,177,176,175,175,175,175,175,175,176,177,178,179;
	}
	// Add custom Guild Castles here.
	else {
		end;
	}

	// Apply investment to Eco. and Def. Only happens if there were investments made.
	// Permanent Development can only happen once per day.
	if (GetCastleData(strnpcinfo(2),4)) {
		set .@Economy,GetCastleData(strnpcinfo(2),2);
		SetCastleData strnpcinfo(2),2,.@Economy + GetCastleData(strnpcinfo(2),4) + (rand(2) && getgdskilllv(.@GID,10014));
		if (GetCastleData(strnpcinfo(2),2) > 100) SetCastleData strnpcinfo(2),2,100;
	}
	if (GetCastleData(strnpcinfo(2),5)) {
		set .@Defence,GetCastleData(strnpcinfo(2),3);
		SetCastleData strnpcinfo(2),3,.@Defence + GetCastleData(strnpcinfo(2),5);
		if (GetCastleData(strnpcinfo(2),3) > 100) SetCastleData strnpcinfo(2),3,100;
	}
	// Reset daily investment limits.
	setcastledata strnpcinfo(2),4,0;
	setcastledata strnpcinfo(2),5,0;

	// Spawn boxes in proper order.
	for (set .@i,0; .@i < .@Treasure ; set .@i,.@i+1) {
		// set treasure box ID
		set .@boxid, .@treasurebox + (.@i+2) % 2;
		set .@box,1 << .@i;
		
		// Spawn or do not spawn chests if one already exists.
		if ((getd("$@"+strnpcinfo(2)+"_treasure") & .@box) == 0) {
			
			monster strnpcinfo(2),.@treasurex[.@i],.@treasurey[.@i],"Treasure Chest",.@boxid,1,"Treasur#"+strnpcinfo(2)+"::OnTreasureDied"+.@i;
			setd "$@"+strnpcinfo(2)+"_treasure",getd("$@"+strnpcinfo(2)+"_treasure") | .@box;
		}
	}
	end;

When I pm the NPC it will jump to the label L_GMSpawn and it actually spawns the TBs.

But the TBs don't spawn at 00:01 server time. D:


Tonight the TBs did actually spawn, maybe it works now. D:

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