Gender Restriction (BUG)

karazu

New member
Messages
1,115
Points
0
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





 

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

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

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

 
Back
Top