Jump to content
  • 0

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


powkda

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   1
  • Joined:  11/11/17
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   1
  • Joined:  11/11/17
  • Last Seen:  

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

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

-	script	Guarda	-1,{
OnPCLoadMapEvent:
	if (!agitcheck() && !agitcheck2() && !agitcheck3()) {
		.@gid = GetCastleData("prtg_cas01",1);
		if (getcharid(2) == .@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!";
			warp "kalindor",146,169;
		}
	}
	end;
}

gp	mapflag	loadevent

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   1
  • Joined:  11/11/17
  • Last Seen:  

On 6/13/2020 at 10:54 AM, Emistry said:

-	script	Guarda	-1,{
OnPCLoadMapEvent:
	if (!agitcheck() && !agitcheck2() && !agitcheck3()) {
		.@gid = GetCastleData("prtg_cas01",1);
		if (getcharid(2) == .@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!";
			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

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   1
  • Joined:  11/11/17
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

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

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

-	script	Guarda	-1,{
	OnInit:
		.map$ = "prtg_cas01";
		.enable_if_woe_on = 1;
		setmapflag .map$, mf_loadevent;
		end;
			
	OnPCLoadMapEvent:
		if (strcharinfo(3) == .map$) {
			.@castle_gid = getcastledata(.map$, 1);
			.@gid = getcharid(2);
			if (.@castle_gid && .@gid == .@castle_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

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   1
  • Joined:  11/11/17
  • Last Seen:  

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$) {
			.@castle_gid = getcastledata(.map$, 1);
			.@gid = getcharid(2);
			if (.@castle_gid && .@gid == .@castle_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...