Aetherius Shadowblade
Member
ok, I know this has to be a simple fix, but I got it this far and I cannot see where to fix this.
I am attempting to make this bodysash go either way. If you are a male, you get changed into a female. If you are female, you get changed into a male.
Help me out please.
I am attempting to make this bodysash go either way. If you are a male, you get changed into a female. If you are female, you get changed into a male.
Help me out please.
Code:
/*
Body Sash of Ettin Strength
Scripted by John Burns on 12-18-17
Zak, Zaksmeer
Credits go out to:
Thank you to MondainsTriumph for creating the "Referral Sash", for which I "borrowed" & modified.
Also, thank you for whoever made the "Halloween Costumes" for which I started this project with.
THANK YOU goes out to Punkte, who discovered why my one major problem was only a minor problem, and how to fix it.
I made this after a friend of mine told me about his adventure in a previous D&D Campaign, from way back
when, that involved his character finding a Girdle of Giant Strength. The Girdle was cursed. He put it on
and it gave him the strength of a giant, but transformed him into a woman.
So I thought it would be kind of neat to bring that into the game, but as a "Body Sash of Ettin Strength".
Just to let you know that doesn't mean it needs to stay a BodySash, you can make it anything you want.
*/
using Server;
using System;
namespace Server.Items
{
public class BodySashofEttinStrength20 : BodySash
{
[Constructable]
public BodySashofEttinStrength20() : base()
{
Name = "Body Sash of Ettin Strength";
Hue = 39;
Layer = Layer.MiddleTorso;
ItemID = 0x1541;
Weight = 2.0;
Attributes.BonusStr = 10; // -- You may adjust this number to your liking
}
public BodySashofEttinStrength20(Serial serial) : base(serial)
{
}
public override bool OnEquip( Mobile from )
{
if ( Mobile = Male ) //(base.OnEquip(from))
{
// -- When they put the sash on - Male
from.SendMessage("You put on the bodysash and have been transformed into a Beautiful Female Warrior!");
from.BodyMod = 401;
from.NameHue = 39;
from.FacialHairItemID = 0;
from.DisplayGuildTitle = true;
}
else
{
// -- When they put the sash on - Female
from.SendMessage("You put on the bodysash and have been transformed into a Mighty Male Warrior!");
from.BodyMod = 400;
from.NameHue = 39;
from.FacialHairItemID = 0;
from.DisplayGuildTitle = true;
}
return false;
}
public override void OnRemoved( object parent )
{
if ( parent is Mobile )
{
// -- When they take the sash off - Male
Mobile from = (Mobile)parent;
from.SendMessage( "You take off the bodysash and return to your normal self." );
from.BodyMod = 0;
from.NameHue = -1;
from.HueMod = -1;
from.DisplayGuildTitle = true;
}
else
{
// -- When they take the sash off - Female
Mobile from = (Mobile)parent;
from.SendMessage("You take off the bodysash and return to your normal self.");
from.BodyMod = 1;
from.NameHue = -1;
from.HueMod = -1;
from.DisplayGuildTitle = true;
}
if ( parent is Mobile && ((Mobile)parent).Kills >= 5)
{
( (Mobile)parent).Criminal = true;
}
if( parent is Mobile && ((Mobile)parent).GuildTitle != null )
{
( (Mobile)parent).DisplayGuildTitle = true;
}
base.OnRemoved( parent );
}
public override void Serialize(GenericWriter writer)
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}