Jump to content
  • 0
Sign in to follow this  
Lelantos

Prevent equipping of certain item on certain map

Question

is this possible? for example, I will disable wearing or any weapon on certain map. I've tried to use the map_zone_db.conf but i can still wear the weapon.

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0
-	script	Sample	-1,{	OnPCLoadMapEvent:		getmapxy( .@map$, .@x, .@y, 0 );		while ( .@map$ == "prontera" ) {			if ( getequipid( 2 ) != -1 )				unequip 2;			sleep2 100;		}		end;}prontera	mapflag	loadevent

 

@EDIT : Refer to getequipid and unequip for you desires. In my sample it unequips your armor 

Edited by Patskie

Share this post


Link to post
Share on other sites
  • 0

I think player still can equip  again, myabe  this is  a bug  of  map zone system

 

 

I did a custom fix  123.patch

 

err.. I find Annie's fix was better than me ,She has considered about card slot

Edited by Angelmelody

Share this post


Link to post
Share on other sites
  • 0

yeah I wrote that modification just same like you did because of this topic

however,

I will disable wearing or any weapon on certain map.

which, map_zone_db.conf can't restrict an item type

so I guess ... have to port my noitem mapflag over from rathena until developer can make this

Share this post


Link to post
Share on other sites
  • 0

 

-	script	Sample	-1,{	OnPCLoadMapEvent:		getmapxy( .@map$, .@x, .@y, 0 );		while ( .@map$ == "prontera" ) {			if ( getequipid( 2 ) != -1 )				unequip 2;			sleep2 100;		}		end;}prontera	mapflag	loadevent

 

@EDIT : Refer to getequipid and unequip for you desires. In my sample it unequips your armor 

 

hi i have a question about this..

 

 

i wanna disable a custom suit on woe.. however i tried to put it already in map_zone_db.conf but still not solving my problem..

 

this costume suit is in location of 65536 = Shadow Armor... i was wondering how that script work

Share this post


Link to post
Share on other sites
  • 0

@jaiko The 2 means which slot the item takes and getequipid returns the id so to check for a certain item it has to be:

 

if ( getequipid( SLOTID ) == ITEMDID ) unequip SLOTID;

That will unequip the the item ITEMID if it is in slot SLOTID

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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