Jump to content
  • 0

Clarification on Mapflag Restricted items on PVP maps


AinsLord

Question


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

im trying to disable all healing items on certain may specially for LMS

here is the mapflag used on script so i add the restricted "2" for pvp on this particular map

-	script	Event_LMS	-1,{
OnInit:	
	// Mapflags
	setarray .@mapflag,
		mf_nowarp,
		mf_nowarpto,
		mf_noskill,
		mf_noteleport,
		mf_nomemo,
		mf_nosave,
		mf_pvp_noguild,
		mf_pvp_noparty,
		mf_noicewall,
		mf_nobranch,
		mf_restricted, 2, //- added
		mf_noreturn;

this is may item_noequip.txt

501,64 // Red Potion
502,64 // Orange Potion
503,64 // Yellow Potion
504,64 // White Potion
507,64 // Red Herb
508,64 // Yellow Herb
509,64 // White Herb

i made it 64 so it only reads the zone 2

so with this mf_restricted, 2, on script above it wont work

but if i put the map here

restricted.txt

//Jail
sec_pri	mapflag	restricted	2
06guild_01	mapflag	restricted	2

the restricted mapflag works

why is that isnt the "mf_restricted, 2," works the same or they dont?

or i did wrong on mf_restricted, 2,

 

thanks in advance

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

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

On 5/18/2021 at 9:49 PM, AinsLord said:

so with this mf_restricted, 2, on script above it wont work

your Event_LMS script only assign mapflag, doesn't support assigning extra parameter for mapflag. Hence it wont work with the way you doing it.

setmapflag "sec_pri", MF_RESTRICTED, 2;
setmapflag "06guild_01", MF_RESTRICTED, 2;

or

sec_pri	mapflag	restricted	2
06guild_01	mapflag	restricted	2

these would work.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1511
  • Reputation:   227
  • Joined:  08/03/12
  • Last Seen:  

2 hours ago, AinsLord said:

im trying to disable all healing items on certain may specially for LMS

here is the mapflag used on script so i add the restricted "2" for pvp on this particular map


-	script	Event_LMS	-1,{
OnInit:	
	// Mapflags
	setarray .@mapflag,
		mf_nowarp,
		mf_nowarpto,
		mf_noskill,
		mf_noteleport,
		mf_nomemo,
		mf_nosave,
		mf_pvp_noguild,
		mf_pvp_noparty,
		mf_noicewall,
		mf_nobranch,
		mf_restricted, 2, //- added
		mf_noreturn;

this is may item_noequip.txt


501,64 // Red Potion
502,64 // Orange Potion
503,64 // Yellow Potion
504,64 // White Potion
507,64 // Red Herb
508,64 // Yellow Herb
509,64 // White Herb

i made it 64 so it only reads the zone 2

so with this mf_restricted, 2, on script above it wont work

but if i put the map here

restricted.txt


//Jail
sec_pri	mapflag	restricted	2
06guild_01	mapflag	restricted	2

the restricted mapflag works

why is that isnt the "mf_restricted, 2," works the same or they dont?

or i did wrong on mf_restricted, 2,

 

thanks in advance

Have u tried remove your mapflag restricted in your script ?

its already added in restricted.txt right ?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

2 hours ago, Chaos92 said:

Have u tried remove your mapflag restricted in your script ?

its already added in restricted.txt right ?

yes i removed the mf_restricted on the script it works

and put it on restricted.txt

but when i tried to commend the one on the restricted.txt

and try the one on the script doesnt work

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1511
  • Reputation:   227
  • Joined:  08/03/12
  • Last Seen:  

13 hours ago, AinsLord said:

yes i removed the mf_restricted on the script it works

and put it on restricted.txt

but when i tried to commend the one on the restricted.txt

and try the one on the script doesnt work

because of that setarray in your script.

its reading between coma ',' for each mapflag. For sure it cant read your mf_restricted, 2,

Link to comment
Share on other sites

  • 0

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

why not use this script command

setpcblock PCBLOCK_USEITEM, true;

 

and the end event 

setpcblock PCBLOCK_USEITEM, false;

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