Jump to content
  • 0

Castle owner check to warp dungeon


iraciz

Question


  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   107
  • Joined:  10/05/12
  • Last Seen:  

Good day, I added a shortcut in the warper to go guild dungeons, I want limit this only to the respective casttle owners.
But my script is ignoring the castle owner condition, and everyone can warp too, I want to avoid this,
could you lendme a hand to fix this?

Rachgd:
if (getcharid(2) != 0 && getcharid(2) == getcastledata("arug_cas01",1))	goto chek2;
Go("arug_dun01",200,36);

chek2:
if (getcharid(2) != 0 && getcharid(2) == getcastledata("arug_cas02",1))	goto chek3;
Go("arug_dun01",200,36);

chek3:
if (getcharid(2) != 0 && getcharid(2) == getcastledata("arug_cas03",1))	goto chek4;
Go("arug_dun01",200,36);

chek4:
if (getcharid(2) != 0 && getcharid(2) == getcastledata("arug_cas04",1))	goto chek5;
Go("arug_dun01",200,36);

chek5:
if (getcharid(2) != 0 && getcharid(2) == getcastledata("arug_cas05",1))	goto Falta;
Go("arug_dun01",200,36);

Falta:
mes "^0000FFAgente Warp^000000";
cutin "jpn_mid03",2;
mes "You are not an owner of any Arunafeltz Rachel Casttle, or member of any guild who owns one.";
next;
mes "^0000FFAgente Warp^000000";
mes "Conquest an Arunafeltz casttle in Rachel, or join a guild who owns one in order to access!";
close3;

 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

maybe you can check native script form guild dungeon on npc/guild/agit_main.txt

and search "Guild Dungeon Entrances"

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   107
  • Joined:  10/05/12
  • Last Seen:  

not working

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:  

another simpler approach that you can try.

function Go {
	set lastwarp$, getarg(0);
	set lastwarpx, getarg(1,0);
	set lastwarpy, getarg(2,0);
	warp getarg(0),getarg(1,0),getarg(2,0);
	end;
}

change into

function Go {
	if (getmapflag(getarg(0), mf_gvg_castle) && (getcharid(2) == 0 || getcharid(2) != getcastledata(getarg(0), 1))) {
		mes "^0000FFAgente Warp^000000";
		cutin "jpn_mid03",2;
		mes "You are not an owner of any this Casttle, or member of any guild who owns one.";
		next;
		mes "^0000FFAgente Warp^000000";
		mes "Conquest the castle, or join a guild who owns one in order to access!";
		close3;
	}
	else {
		set lastwarp$, getarg(0);
		set lastwarpx, getarg(1,0);
		set lastwarpy, getarg(2,0);
		warp getarg(0),getarg(1,0),getarg(2,0);
	}
	end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   107
  • Joined:  10/05/12
  • Last Seen:  

Nice script Emistry! But the edited lines are not blocking the access to the guild dungeons, they are blocking the casttle maps instead.

@Emistry Can I attach my script, so you can note what I want exactly? I will be totally grateful and indebted to you, if you help me with this part

 I need to PREVENT non castle owners access
to the second edition guild dungeon warper in my warper script but I can't do it, I tried copying the flower script but it's difficult to know their arrays.

Line 3653 and line 3654 block that users for going into Guild dungeons

 

 

//-NEED RACHEL CASTTLE OWNER FILTER	Go("arug_dun01",0,0);
//-NEED YUNO CASTTLE ONWER FILTER	Go("schg_dun01",0,0);

 

warper.txt

Edited by iraciz
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:  

function Go {
	if ((getmapflag(getarg(0), mf_gvg_castle) || getmapflag(getarg(0), mf_gvg_dungeon))
		&& (getcharid(2) == 0 || getcharid(2) != getcastledata(getarg(0), 1))
	) {
		mes "^0000FFAgente Warp^000000";
		cutin "jpn_mid03",2;
		mes "You are not an owner of any this Casttle, or member of any guild who owns one.";
		next;
		mes "^0000FFAgente Warp^000000";
		mes "Conquest the castle, or join a guild who owns one in order to access!";
		close3;
	}
	else {
		set lastwarp$, getarg(0);
		set lastwarpx, getarg(1,0);
		set lastwarpy, getarg(2,0);
		warp getarg(0),getarg(1,0),getarg(2,0);
	}
	end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   107
  • Joined:  10/05/12
  • Last Seen:  

On 6/12/2020 at 9:29 PM, Emistry said:

function Go {
	if ((getmapflag(getarg(0), mf_gvg_castle) || getmapflag(getarg(0), mf_gvg_dungeon))
		&& (getcharid(2) == 0 || getcharid(2) != getcastledata(getarg(0), 1))
	) {
		mes "^0000FFAgente Warp^000000";
		cutin "jpn_mid03",2;
		mes "You are not an owner of any this Casttle, or member of any guild who owns one.";
		next;
		mes "^0000FFAgente Warp^000000";
		mes "Conquest the castle, or join a guild who owns one in order to access!";
		close3;
	}
	else {
		set lastwarp$, getarg(0);
		set lastwarpx, getarg(1,0);
		set lastwarpy, getarg(2,0);
		warp getarg(0),getarg(1,0),getarg(2,0);
	}
	end;
}

 

Dont know how or where to apply this, sorry for taking your time.

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:  

On 6/17/2020 at 10:41 PM, iraciz said:

Dont know how or where to apply this, sorry for taking your time.

find the Go function and replace it.

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