Jump to content
  • 0

WoE Random Castle


M a p l e

Question


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  271
  • Reputation:   62
  • Joined:  02/04/19
  • Last Seen:  

I would like to know if anyone has the npc WoE Random Castle?

Example: Wednesday and Saturday, 1 WoE Castle 1.0 (randomly) and on Sundays 1 Castle WoE 2.0 (randomly)

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

while I was in the middle of writing this, the previous post shows up
ok there are 4 topics, which I can only recommend 1st one (which was done by me)

2nd and 3rd topic, the link is dead, eathena forum down

4th topic, uses OnPCLoadMapEvent
actually since Euphy rewrite the WoE system, we don't have to use that trick anymore
just don't run the OnAgitStart: label for that particular castle is enough


// https://rathena.org/board/topic/118185-woe-random-castle/

//	remember to disable these links
//== npc\guild\agit_controller.txt
//== npc\guild2\agit_start_se.txt
//== npc\re\guild3\agit_start_te.txt

-	script	castle_randomize	FAKE_NPC,{
OnInit:
	setarray .castle$[0],
		"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05",
		"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
		"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
		"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05",
		"arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05",
		"schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";
//	bindatcmd "cas", strnpcinfo(0)+"::OnDebug", 99, 100;
	end;
OnWed2000:
OnSat2000:
OnAgitInit:
	if ( ( gettime(DT_DAYOFWEEK) == WEDNESDAY && gettime(DT_HOUR) >= 20 && gettime(DT_HOUR) < 22 ) || ( gettime(DT_DAYOFWEEK) == SATURDAY && gettime(DT_HOUR) >= 20 && gettime(DT_HOUR) < 22 ) )
		agitstart;
	end;
OnWed2200:
OnSat2200:
	agitend;
	end;
OnAgitStart:
	.@r = rand(0,19);
	sleep 100;
	announce "The Castles open today is "+ getcastlename( .castle$[.@r] ) +" !!", bc_woe;
	for ( .@i = 0; .@i < 20; ++.@i ) {
		if ( .castle$[.@i] != .castle$[.@r] ) {
			removemapflag .castle$[.@i], mf_gvg_castle;
			killmonster .castle$[.@i], "Agit#"+ .castle$[.@i] +"::OnAgitBreak";	
			gvgoff .castle$[.@i];
		}
	}
	end;
OnAgitEnd:
	for ( .@i = 0; .@i < 20; ++.@i )
		if ( !getmapflag( .castle$[.@i], mf_gvg_castle ) )
			setmapflag .castle$[.@i], mf_gvg_castle;
	end;

OnSun2000:
OnAgitInit2:
	if ( ( gettime(DT_DAYOFWEEK) == SUNDAY && gettime(DT_HOUR) >= 20 && gettime(DT_HOUR) < 22 ) )
		agitstart2;
	end;
OnSun2200:
	agitend2;
	end;
OnAgitStart2:
	.@r = rand(20,29);
	sleep 100;
	announce "The Castles open today is "+ getcastlename( .castle$[.@r] ) +" !!", bc_woe;
	for ( .@i = 20; .@i < 30; ++.@i ) {
		if ( .castle$[.@i] != .castle$[.@r] ) {
			.@str$ = substr( .castle$[.@i], 0, 1 ) + substr( .castle$[.@i], 8, 9 );
			removemapflag .castle$[.@i], mf_gvg_castle;
			killmonster .castle$[.@i], "Steward#"+ .@str$ +"::OnStartArena";
			gvgoff .castle$[.@i];
		}
	}
	end;
OnAgitEnd2:
	for ( .@i = 20; .@i < 30; ++.@i )
		if ( !getmapflag( .castle$[.@i], mf_gvg_castle ) )
			setmapflag .castle$[.@i], mf_gvg_castle;
	end;

//OnDebug:
	switch ( atoi( .@atcmd_parameters$ ) ) {
	case 0: warp "aldeg_cas01",216,23; end;
	case 1: warp "aldeg_cas02",213,23; end;
	case 2: warp "aldeg_cas03",205,31; end;
	case 3: warp "aldeg_cas04",36,217; end;
	case 4: warp "aldeg_cas05",27,101; end;
	case 5: warp "gefg_cas01",197,181; end;
	case 6: warp "gefg_cas02",176,178; end;
	case 7: warp "gefg_cas03",244,166; end;
	case 8: warp "gefg_cas04",174,177; end;
	case 9: warp "gefg_cas05",194,184; end;
	case 10: warp "payg_cas01",139,139; end;
	case 11: warp "payg_cas02",38,25;   end;
	case 12: warp "payg_cas03",269,265; end;
	case 13: warp "payg_cas04",270,28;  end;
	case 14: warp "payg_cas05",30,30;   end;
	case 15: warp "prtg_cas01",197,197; end;
	case 16: warp "prtg_cas02",157,174; end;
	case 17: warp "prtg_cas03",16,220;  end;
	case 18: warp "prtg_cas04",291,14;  end;
	case 19: warp "prtg_cas05",266,266; end;
	case 20: warp "arug_cas01",87,219; end;
	case 21: warp "arug_cas02",89,256; end;
	case 22: warp "arug_cas03",141,293; end;
	case 23: warp "arug_cas04",141,293; end;
	case 24: warp "arug_cas05",141,293; end;
	case 25: warp "schg_cas01",120,272; end;
	case 26: warp "schg_cas02",162,193; end;
	case 27: warp "schg_cas03",338,202; end;
	case 28: warp "schg_cas04",120,272; end;
	case 29: warp "schg_cas05",120,272; end;
	default:
	}
	end;
}

 

  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  228
  • Reputation:   19
  • Joined:  10/27/12
  • Last Seen:  

19 minutes ago, AnnieRuru said:

 


// https://rathena.org/board/topic/118185-woe-random-castle/

//	remember to disable these links
//== npc\guild\agit_controller.txt
//== npc\guild2\agit_start_se.txt
//== npc\re\guild3\agit_start_te.txt

-	script	castle_randomize	FAKE_NPC,{
OnInit:
	setarray .castle$[0],
		"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05",
		"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
		"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
		"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05",
		"arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05",
		"schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";
//	bindatcmd "cas", strnpcinfo(0)+"::OnDebug", 99, 100;
	end;
OnWed2000:
OnSat2000:
OnAgitInit:
	if ( ( gettime(DT_DAYOFWEEK) == WEDNESDAY && gettime(DT_HOUR) >= 20 && gettime(DT_HOUR) < 22 ) || ( gettime(DT_DAYOFWEEK) == SATURDAY && gettime(DT_HOUR) >= 20 && gettime(DT_HOUR) < 22 ) )
		agitstart;
	end;
OnWed2200:
OnSat2200:
	agitend;
	end;
OnAgitStart:
	.@r = rand(0,19);
	sleep 100;
	announce "The Castles open today is "+ getcastlename( .castle$[.@r] ) +" !!", bc_woe;
	for ( .@i = 0; .@i < 20; ++.@i ) {
		if ( .castle$[.@i] != .castle$[.@r] ) {
			removemapflag .castle$[.@i], mf_gvg_castle;
			killmonster .castle$[.@i], "Agit#"+ .castle$[.@i] +"::OnAgitBreak";	
			gvgoff .castle$[.@i];
		}
	}
	end;
OnAgitEnd:
	for ( .@i = 0; .@i < 20; ++.@i )
		if ( !getmapflag( .castle$[.@i], mf_gvg_castle ) )
			setmapflag .castle$[.@i], mf_gvg_castle;
	end;

OnSun2000:
OnAgitInit2:
	if ( ( gettime(DT_DAYOFWEEK) == SUNDAY && gettime(DT_HOUR) >= 20 && gettime(DT_HOUR) < 22 ) )
		agitstart2;
	end;
OnSun2200:
	agitend2;
	end;
OnAgitStart2:
	.@r = rand(20,29);
	sleep 100;
	announce "The Castles open today is "+ getcastlename( .castle$[.@r] ) +" !!", bc_woe;
	for ( .@i = 20; .@i < 30; ++.@i ) {
		if ( .castle$[.@i] != .castle$[.@r] ) {
			.@str$ = substr( .castle$[.@i], 0, 1 ) + substr( .castle$[.@i], 8, 9 );
			removemapflag .castle$[.@i], mf_gvg_castle;
			killmonster .castle$[.@i], "Steward#"+ .@str$ +"::OnStartArena";
			gvgoff .castle$[.@i];
		}
	}
	end;
OnAgitEnd2:
	for ( .@i = 20; .@i < 30; ++.@i )
		if ( !getmapflag( .castle$[.@i], mf_gvg_castle ) )
			setmapflag .castle$[.@i], mf_gvg_castle;
	end;

//OnDebug:
	switch ( atoi( .@atcmd_parameters$ ) ) {
	case 0: warp "aldeg_cas01",216,23; end;
	case 1: warp "aldeg_cas02",213,23; end;
	case 2: warp "aldeg_cas03",205,31; end;
	case 3: warp "aldeg_cas04",36,217; end;
	case 4: warp "aldeg_cas05",27,101; end;
	case 5: warp "gefg_cas01",197,181; end;
	case 6: warp "gefg_cas02",176,178; end;
	case 7: warp "gefg_cas03",244,166; end;
	case 8: warp "gefg_cas04",174,177; end;
	case 9: warp "gefg_cas05",194,184; end;
	case 10: warp "payg_cas01",139,139; end;
	case 11: warp "payg_cas02",38,25;   end;
	case 12: warp "payg_cas03",269,265; end;
	case 13: warp "payg_cas04",270,28;  end;
	case 14: warp "payg_cas05",30,30;   end;
	case 15: warp "prtg_cas01",197,197; end;
	case 16: warp "prtg_cas02",157,174; end;
	case 17: warp "prtg_cas03",16,220;  end;
	case 18: warp "prtg_cas04",291,14;  end;
	case 19: warp "prtg_cas05",266,266; end;
	case 20: warp "arug_cas01",87,219; end;
	case 21: warp "arug_cas02",89,256; end;
	case 22: warp "arug_cas03",141,293; end;
	case 23: warp "arug_cas04",141,293; end;
	case 24: warp "arug_cas05",141,293; end;
	case 25: warp "schg_cas01",120,272; end;
	case 26: warp "schg_cas02",162,193; end;
	case 27: warp "schg_cas03",338,202; end;
	case 28: warp "schg_cas04",120,272; end;
	case 29: warp "schg_cas05",120,272; end;
	default:
	}
	end;
}

 

So in essence using this means no woe_setter from npc/custom/woe_controller.txt (no sure it's controller or setter)?

and disable this files too?

//	remember to disable these links
//== npc\guild\agit_controller.txt
//== npc\guild2\agit_start_se.txt
//== npc\re\guild3\agit_start_te.txt

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

that is correct
https://github.com/rathena/rathena/blob/fdc48770aa1aa459b0c12fb297e9b684502fb988/npc/custom/woe_controller.txt#L15-L17
I use same method as Euphy, since woe script was rewrite by him

oh, that script doesn't support woe:te because it was implement much later, and by that time Euphy already inactive

Link to comment
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.   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.

×
×
  • Create New...