Prevent equipping of certain item on certain map

Lelantos

New member
Messages
31
Points
0
Location
Payon
Emulator
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.

 
- 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 

 
Last edited by a moderator:
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

 

Attachments

Last edited by a moderator:
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 typeso I guess ... have to port my noitem mapflag over from rathena until developer can make this

 
- 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

 
@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

 
Back
Top