Jump to content
  • 0
powkda

block enemy clan in castle

Question

How to block enemy guilds from entering the castle already conquered by other guilds outside of war time?

Can someone help me? thank you so much

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
-	script	Sample	-1,{
	
	OnInit:
		.map$ = "prtg_cas01";
		
		setmapflag(.map$, MF_LOADEVENT);
		end;
		
	OnPCLoadMapEvent:
		if (.map$ == strcharinfo(3) && !(agitcheck() || agitcheck2() || agitcheck3()) {
			[email protected]_guild_id = getcastledata(.map$, CD_GUILD_ID);
			if ([email protected]_guild_id && getcharid(2) != [email protected]_guild_id) {
				mes "You aren't allow to enter this area.";
				close2;
				warp "SavePoint", 0, 0;
			}
		}
		end;
}

 

Edited by Emistry
  • Upvote 1
Link to comment
Share on other sites

  • 0
1 hour ago, Emistry said:
-	script	Sample	-1,{
	
	OnInit:
		.map$ = "prtg_cas01";
		
		setmapflag(.map$, MF_LOADEVENT);
		end;
		
	OnPCLoadMapEvent:
		if (.map$ == strcharinfo(3) && !(agitcheck() || agitcheck2() || agitcheck3)) {
			[email protected]_guild_id = getcastledata(.map$, CD_GUILD_ID);
			if ([email protected]_guild_id && getcharid(2) != [email protected]_guild_id) {
				mes "You aren't allow to enter this area.";
				close2;
				warp "SavePoint", 0, 0;
			}
		}
		end;
}

 

 

Thank you so much for helping me I got this error here

 

    need '('
   639 : 
   640 :                setmapflag(.map$, MF_LOADEVENT);
   641 :                end;
   642 : 
   643 :        OnPCLoadMapEvent:
*  644 :                if (.map$ == strcharinfo(3) && !(agitcheck() || agitcheck2() || agitcheck3')') {
   645 :                        .@castle_guild_id = getcastledata(.map$, CD_GUILD_ID);
   646 :                        if (.@castle_guild_id && getcharid(2) != .@castle_guild_id) {
   647 :                                mes "You aren't allow to enter this area.";
   648 :                                close2;
   649 :                                warp "SavePoint", 0, 0;

 

Link to comment
Share on other sites

  • 0
On 1/11/2022 at 3:40 PM, Emistry said:
if (.map$ == strcharinfo(3) && !(agitcheck() || agitcheck2() || agitcheck3()) {

 

@EmistryU missed a ) to close the if statement 🙂

if (.map$ == strcharinfo(3) && !(agitcheck() || agitcheck2() || agitcheck3())) {

 

Rynbef~

  • Upvote 1
Link to comment
Share on other sites

  • 0
On 1/11/2022 at 10:40 PM, Emistry said:
if (.map$ == strcharinfo(3) && !(agitcheck() || agitcheck2() || agitcheck3()) {

 

 

On 1/14/2022 at 6:08 AM, Rynbef said:

@EmistryU missed a ) to close the if statement 🙂

if (.map$ == strcharinfo(3) && !(agitcheck() || agitcheck2() || agitcheck3())) {

 

Rynbef~

 

There was no more error when loading, but it is not preventing the player of the enemy guild from staying inside the castle outside of war time, when this message enters the log:

bug.png.ed70c702c5a700562afad1c6a5af731f.png

Can you help me with this error I got?

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

Important Information

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