Jump to content
  • 0
Sign in to follow this  
ThyroDree

WoE Castle auto Assign on Guild

Question

is this possible to make?

 

a script that

will only Put the All Castle Own by GM Guild 

 

Example:

Admin have a guild [ Ragnarok Staffs ] and you will just talk to npc to be the All WoE Castle Own my [ Ragnarok Staffs ] Guild

this npc will only talk for lvl 99 GM's.

 

 

Reason why i request this script?

because i am tired warping and warping just to break all the Castle Emperiums. x.x

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

this is the correct script

http://upaste.me/8f1311087bf401916

 

 

lol, I also found a bug by writing this script

http://herc.ws/oldboard/index.php?app=tracker&showissue=8077

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0
prontera,155,188,5	script	reset castles	100,{
	if(getgmlevel()!=99) {
		mes "you are not admin!";
		close;
	}
	mes "Are you sure reset all castles ?";
	if(select("no:yes") == 2 ) {
		set .@gid,getcharid(2);
		if(!.@gid) {
			mes "you haven't joined a guild!";
			close;
		}
		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( set .@i, 0; .@i <= 19; set .@i, .@i+1 )
			SetCastleData .@maps$[.@i],1,.@gid;
		mes "All castles have been set to"+getguildname(.@gid)+"!";
		}
	close;
}

 

Share this post


Link to post
Share on other sites
  • 0

there's a reason that I haven't made this script like above did because there is a bug

if setcastledata when the agit is on, the emperium is not change immediately

( its not like *bg_monster_set_team command where the monster allegiance can be change immediately )

and nobody bother to fix this because not many people knows how to write a custom woe castle script (well ... I know though )

99,prontera,Prontera Test Castle,test flag,1
prontera,155,188,5	script	reset castles	100,{
	if(getgmlevel()!=99) {
		mes "you are not admin!";
		close;
	}
	mes "Are you sure reset all castles ?";
	if(select("no:yes") == 2 ) {
		set .@gid,getcharid(2);
		if(!.@gid) {
			mes "you haven't joined a guild!";
			close;
		}
		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";
		setarray .@maps$[20],"prontera";
		for( set .@i, 0; .@i <= 20; set .@i, .@i+1 )
			setcastledata .@maps$[.@i],1,.@gid;
		mes "All castles have been set to"+getguildname(.@gid)+"!";
	}
	close;
}
prontera,152,185,4	script	test flag	722,{
	dispbottom "=========================";
	set .@gid, getcastledata( "prontera", 1 );
	dispbottom "owner of the castle : "+( ( .@gid )? "["+ getguildname(.@gid) +"]" : "<none>" );
	dispbottom "agit check : "+( ( agitcheck() )?"on":"off" );
	dispbottom "gvg_castle mapflag : "+( ( getmapflag( strcharinfo(3), mf_gvg_castle )?"on":"off" ) );
	dispbottom "=========================";
	end;
OnInit:
	if ( !agitcheck() )
		agitstart;
	else
		donpcevent strnpcinfo(0)+"::OnAgitStart";
	setmapflag "prontera", mf_gvg_castle;
	flagemblem getcastledata("prontera",1);
	end;
OnAgitStart:
	monster "prontera",151,181,"EMPERIUM",1288,1,strnpcinfo(0)+"::OnEmpBreak";
	end;
OnAgitEnd:
	killmonster strnpcinfo(4), strnpcinfo(0)+"::OnEmpBreak";
	end;
OnEmpBreak:
	announce "The Emperium has fallen", bc_map;
	setcastledata "prontera", 1, getcharid(2);
	donpcevent "::OnRecvCastle123";
	sleep getbattleflag("gvg_eliminate_time");
	monster "prontera",151,181,"EMPERIUM",1288,1,strnpcinfo(0)+"::OnEmpBreak";
	end;
OnAgitInit:
	requestguildinfo getcastledata("prontera", 1);
OnRecvCastle123:
	flagemblem getcastledata("prontera",1);
	end;
OnGuildBreak:
	setcastledata "prontera", 1, 0;
	donpcevent "::OnRecvCastle123";
	end;
}

after using the castle reset npc, the castle's emperium will still belongs to the original guild,

which even yourself still can hit the emperium

 

to fix this, the emperium has to be removed and respawn again

the correct script has to donpcevent on the official castle script ...

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...
Sign in to follow this  

×
×
  • Create New...

Important Information

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