Jump to content
  • 0
Sign in to follow this  
karazu

Gender Restriction (BUG)

Question

I know this is an OLD bug, but is there any other way to implement this system even just via script?

Like the script of the item will check the gender of the wearer, if the Character is MALE (cannot equip) while if its female u can equip.



=======================================================
Question 2.
How about if you wear this item it will automatically removed the PECO or CART.

-Because I am planning to make an item that if you will wear this item, u are not allowed to have a CART or a PECO? 

 

 

=======================================================
Question 3.
How about (via script)
Is it also possible to check that if the wearer is MALE it has different effect if the wearer is FEMALE?


SAMPLE
MALE:   chance to cast heal
FEMALE:   chance to cast blessing





 

Edited by karazu

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Answer 1:

On the OnEquip Section:

if (Sex) { unequip(<equip_slot>); }

For equip_slots look here.

 

Answer 2:

On the Script Section:

if (checkmount()) { setmount "MOUNT_NONE" };

 

Answer 3:

On the Script Section:

if (Sex) { //Healing Bonus for Males } else { //Cast blessing for females }

 

All possible to do.

 

Also, for #1, you can just set the item to only be equipable for females or males:

item_db: (//  Items Database///****************************************************************************** ************* Entry structure ************************************************ ******************************************************************************{	// =================== Mandatory fields ===============================	Id: ID                        (int)	AegisName: "Aegis_Name"       (string)	Name: "Item Name"             (string)	// =================== Optional fields ================================	Type: Item Type               (int, defaults to 3 = etc item)	Buy: Buy Price                (int, defaults to Sell * 2)	Sell: Sell Price              (int, defaults to Buy / 2)	Weight: Item Weight           (int, defaults to 0)	Atk: Attack                   (int, defaults to 0)	Matk: Magical Attack          (int, defaults to 0, ignored in pre-re)	Def: Defense                  (int, defaults to 0)	Range: Attack Range           (int, defaults to 0)	Slots: Slots                  (int, defaults to 0)	Job: Job mask                 (int, defaults to all jobs = 0xFFFFFFFF)	Upper: Upper mask             (int, defaults to any = 0x3f)	Gender: Gender                (int, defaults to both = 2)	Loc: Equip location           (int, required value for equipment)	WeaponLv: Weapon Level        (int, defaults to 0)	EquipLv: Equip required level (int, defaults to 0)	EquipLv: [min, max]           (alternative syntax with min / max level)	Refine: Refineable            (boolean, defaults to true)	View: View ID                 (int, defaults to 0)	BindOnEquip: true/false       (boolean, defaults to false)	BuyingStore: true/false       (boolean, defaults to false)	Delay: Delay to use item      (int, defaults to 0)	Trade: {                      (defaults to no restrictions)		override: GroupID             (int, defaults to 100)		nodrop: true/false            (boolean, defaults to false)		notrade: true/false           (boolean, defaults to false)		partneroverride: true/false   (boolean, defaults to false)		noselltonpc: true/false       (boolean, defaults to false)		nocart: true/false            (boolean, defaults to false)		nostorage: true/false         (boolean, defaults to false)		nogstorage: true/false        (boolean, defaults to false)		nomail: true/false            (boolean, defaults to false)		noauction: true/false         (boolean, defaults to false)	}	Nouse: {                      (defaults to no restrictions)		override: GroupID             (int, defaults to 100)		sitting: true/false           (boolean, defaults to false)	}	Stack: [amount, type]         (int, defaults to 0)	Sprite: SpriteID              (int, defaults to 0)	Script: <"		Script		(it can be multi-line)	">	OnEquipScript: <" OnEquip Script (can also be multi-line) ">	OnUnequipScript: <" OnUnequip Script (can also be multi-line) ">},******************************************************************************/

 

If you do it at the actual item, then you wouldn't need to check if the wearer is female or not, since they'd be the only ones able to use it.

Edited by GmOcean

Share this post


Link to post
Share on other sites
  • 0

Also if you'll be setting equip to gender-specific, as GmOcean mentioned, don't forget to change this option in conf files:

// Can any player equip any item regardless of the gender restrictions// NOTE: Wedding Rings and Whips/Musical Instruments will check gender regardless of setting.ignore_items_gender: yes
Edited by Garr

Share this post


Link to post
Share on other sites
  • 0

Omg! 

 

 

Also if you'll be setting equip to gender-specific, as GmOcean mentioned, don't forget to change this option in conf files:

// Can any player equip any item regardless of the gender restrictions// NOTE: Wedding Rings and Whips/Musical Instruments will check gender regardless of setting.ignore_items_gender: yes

I did not notice this one.
 

 

 

Answer 1:

On the OnEquip Section:

if (Sex) { unequip(<equip_slot>); }

For equip_slots look here.

 

Answer 2:

On the Script Section:

if (checkmount()) { setmount "MOUNT_NONE" };

 

Answer 3:

On the Script Section:

if (Sex) { //Healing Bonus for Males } else { //Cast blessing for females }

Thank you very much for this one.

+1 for both of you

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.