Jump to content
  • 0
powkda

check if the player is from the guild that has the castle

Question

good night friends, i want the npc to check if the player on the map is from the guild with the card, if it isn’t expelled from the map, i tried it in some ways here but without success

 

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

I tried as follows, the problem is that in the castle at the time of the war the other guilds cannot enter

-	script	Guarda	-1,{

OnPCLoadMapEvent:

set .@GID, GetCastleData("prtg_cas01",1);

if (getcharid(2) == .@GID) {
	
	dispbottom "[Sala do Clã]: Seja bem vindo a Sala do Clã";
	end;

	}

else {

	dispbottom "[Sala do Clã]: Apenas os Guerreiros que conquistaram o Castelo de Kriemhild podem estar neste lugar!";
	warp "kalindor",146,169;
	end;
	}


}

gp	mapflag	loadevent

 

Link to comment
Share on other sites

  • 0
-	script	Guarda	-1,{
OnPCLoadMapEvent:
	if (!agitcheck() && !agitcheck2() && !agitcheck3()) {
		[email protected] = GetCastleData("prtg_cas01",1);
		if (getcharid(2) == [email protected]) {
			dispbottom "[Sala do Clã]: Seja bem vindo a Sala do Clã";
		}
		else {
			dispbottom "[Sala do Clã]: Apenas os Guerreiros que conquistaram o Castelo de Kriemhild podem estar neste lugar!";
			warp "kalindor",146,169;
		}
	}
	end;
}

gp	mapflag	loadevent

 

  • Upvote 1
Link to comment
Share on other sites

  • 0
On 6/13/2020 at 10:54 AM, Emistry said:
-	script	Guarda	-1,{
OnPCLoadMapEvent:
	if (!agitcheck() && !agitcheck2() && !agitcheck3()) {
		[email protected] = GetCastleData("prtg_cas01",1);
		if (getcharid(2) == [email protected]) {
			dispbottom "[Sala do Clã]: Seja bem vindo a Sala do Clã";
		}
		else {
			dispbottom "[Sala do Clã]: Apenas os Guerreiros que conquistaram o Castelo de Kriemhild podem estar neste lugar!";
			warp "kalindor",146,169;
		}
	}
	end;
}

gp	mapflag	loadevent

 

Good night, thanks for the help friend, but it is not working, member of another guild is entering the gp map, which should block

from what I saw you put it in order not to check during the war, but then players from another guild will enter the map that they cannot, only those with the castle can enter, regardless of whether they are having the war or not

Can you help me friend? let only guild players in the castle can enter the map?

Edited by powkda
Link to comment
Share on other sites

  • 0
1 hour ago, powkda said:

Can you help me friend? let only guild players in the castle can enter the map?

Wait to be answered, do not double post.
Test my script: verif_guild_point.txt. I haven't tested it, but I believe it works.

Link to comment
Share on other sites

  • 0
11 hours ago, Gladius said:

Wait to be answered, do not double post.
Test my script: verif_guild_point.txt. I haven't tested it, but I believe it works.

Thanks, but it's giving the same problem, when the war is active, the members of the other guilds are unable to enter the castle, they are teleported

Link to comment
Share on other sites

  • 0
5 hours ago, powkda said:

Thanks, but it's giving the same problem, when the war is active, the members of the other guilds are unable to enter the castle, they are teleported

Explain better...

During the Emperium War can everyone access the GP?

I saw that you are Brazilian, if you want you can send me pm to explain me better.
Unfortunately if we speak in Portuguese here in the topic we take warn.

Link to comment
Share on other sites

  • 0
-	script	Guarda	-1,{
	OnInit:
		.map$ = "prtg_cas01";
		.enable_if_woe_on = 1;
		setmapflag .map$, mf_loadevent;
		end;
			
	OnPCLoadMapEvent:
		if (strcharinfo(3) == .map$) {
			[email protected]_gid = getcastledata(.map$, 1);
			[email protected] = getcharid(2);
			if ([email protected]_gid && [email protected] == [email protected]_gid) {
				dispbottom "[Sala do Clã]: Seja bem vindo a Sala do Clã";
			}
			else {
				dispbottom "[Sala do Clã]: Apenas os Guerreiros que conquistaram o Castelo de Kriemhild podem estar neste lugar!";
					
				if (.enable_if_woe_on && (agitcheck() || agitcheck2() agitcheck3())) {
					// allow during woe if enabled.
				}
				else {
					warp "kalindor",146,169;
				}
			}
		}
		end;
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0
On 6/20/2020 at 6:44 AM, Emistry said:
-	script	Guarda	-1,{
	OnInit:
		.map$ = "prtg_cas01";
		.enable_if_woe_on = 1;
		setmapflag .map$, mf_loadevent;
		end;
			
	OnPCLoadMapEvent:
		if (strcharinfo(3) == .map$) {
			[email protected]_gid = getcastledata(.map$, 1);
			[email protected] = getcharid(2);
			if ([email protected]_gid && [email protected] == [email protected]_gid) {
				dispbottom "[Sala do Clã]: Seja bem vindo a Sala do Clã";
			}
			else {
				dispbottom "[Sala do Clã]: Apenas os Guerreiros que conquistaram o Castelo de Kriemhild podem estar neste lugar!";
					
				if (.enable_if_woe_on && (agitcheck() || agitcheck2() agitcheck3())) {
					// allow during woe if enabled.
				}
				else {
					warp "kalindor",146,169;
				}
			}
		}
		end;
}

 

gave error on line 18

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.