Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
@@ -0,0 +1,182 @@
|
||||
/*
|
||||
created by:
|
||||
/\
|
||||
____/_ \____ ### ### ### ### # ### ### # ## ## ###
|
||||
\ ___\ \ / # # # # # # # # # # # # # # # # #
|
||||
\/ / \/ / ### ## ### # # # ### # # # # # ## ##
|
||||
/ /\__/_/\ # # # # # # # # # # # # # # # # #
|
||||
/__\ \_____\ ### ### # # # ### # # # ### ## # # ###
|
||||
\ / http://www.wftpradio.net/
|
||||
\/
|
||||
*/
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BroadswordOfEvolution : Broadsword
|
||||
{
|
||||
|
||||
public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.CrushingBlow; } }
|
||||
public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.ArmorIgnore; } }
|
||||
|
||||
private int mEvolutionPoints = 0;
|
||||
|
||||
private int mBoundToSoul = 0;// Start binding value as zero.
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int EvolutionPoints { get { return mEvolutionPoints; } set { mEvolutionPoints = value; } }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int BoundToSoul { get { return mBoundToSoul; } set { mBoundToSoul = value; } }
|
||||
|
||||
public override int InitMinHits { get { return 255; } }
|
||||
public override int InitMaxHits { get { return 255; } }
|
||||
|
||||
[Constructable]
|
||||
public BroadswordOfEvolution()
|
||||
{
|
||||
Name = "Broadsword Of Evolution";
|
||||
Hue = 0x4F2;
|
||||
WeaponAttributes.UseBestSkill = 1;
|
||||
|
||||
Attributes.Luck = 100;
|
||||
WeaponAttributes.SelfRepair = 100;
|
||||
|
||||
Attributes.WeaponDamage = 1;
|
||||
Attributes.WeaponSpeed = 10;
|
||||
Attributes.SpellChanneling = 1;
|
||||
BoundToSoul = 0;
|
||||
}
|
||||
|
||||
public BroadswordOfEvolution(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
/*public override void OnHit(Mobile attacker, Mobile defender, double Damagebonus)
|
||||
{
|
||||
if (Utility.Random(2) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
|
||||
base.OnHit(attacker, defender,Damagebonus);
|
||||
}*/
|
||||
public override void OnHit(Mobile attacker, IDamageable damageable, double damageBonus)
|
||||
{
|
||||
if (Utility.Random(10) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
base.OnHit(attacker, damageable, damageBonus);
|
||||
}
|
||||
|
||||
public void ApplyGain()
|
||||
{
|
||||
int expr;
|
||||
if (mEvolutionPoints < 2500)
|
||||
{
|
||||
mEvolutionPoints++;
|
||||
//this.Name = "Broadsword Of Evolution (" + mEvolutionPoints.ToString() + ")";
|
||||
|
||||
if ((mEvolutionPoints / 100) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 100;
|
||||
|
||||
this.WeaponAttributes.HitHarm = expr;
|
||||
this.WeaponAttributes.HitMagicArrow = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 200) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 100;
|
||||
|
||||
this.WeaponAttributes.HitLightning = expr;
|
||||
this.WeaponAttributes.HitFireball = expr;
|
||||
this.Attributes.WeaponDamage = expr;
|
||||
}
|
||||
|
||||
if ((25 + (mEvolutionPoints / 200)) > 0) this.Attributes.WeaponSpeed = (25 + (mEvolutionPoints / 200));
|
||||
|
||||
if ((mEvolutionPoints / 2000) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 1000;
|
||||
|
||||
this.Attributes.CastRecovery = expr;
|
||||
this.Attributes.CastSpeed = expr;
|
||||
}
|
||||
InvalidateProperties();
|
||||
|
||||
}
|
||||
}
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "<BASEFONT COLOR=#2E9AFE>" + from.Name.ToString() + "'s Broadsword Of Evolution";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote("*" + from.Name + " feels a weird energy overwhelming their body*");
|
||||
base.OnEquip(from);
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
else if (BoundToSoul == from.Serial) //Check to see if sword is bound to who is equiping it.
|
||||
{
|
||||
base.OnEquip(from);
|
||||
return true; //Allow player who had bound to sword to equip it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Sorry but this armor does not belong to you.");
|
||||
return false; //Disallow any one else from equiping the sword.
|
||||
}
|
||||
}
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperty(list);
|
||||
if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Un-Bound]" + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
else if (BoundToSoul > 0)//Once the sword is bound it will show the Evolution Points.
|
||||
{// \n puts the stuff after it on a new line
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Soulbound]\n" + "<BASEFONT COLOR=#669966>" + "Evolution Points: " + mEvolutionPoints.ToString() + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)1);
|
||||
writer.Write(mBoundToSoul);//Serialize who it is bound to.
|
||||
writer.Write(mEvolutionPoints);
|
||||
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
mBoundToSoul = reader.ReadInt();
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
mEvolutionPoints = reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
http://www.runuo.com/community/threads/basic-item-that-can-only-be-equiped-by-only-one-character.527180/
|
||||
Originally Scripted by Mortis
|
||||
Edited/Changed by JBob (ThatDudeJBob)
|
||||
|
||||
Changes Made By JBob
|
||||
V1.0 --------
|
||||
I added the ability to evolve the weapon.
|
||||
Changed how the name of the item shows.
|
||||
Was "Soul Bow [Bound To Player]"
|
||||
or "Iron Soul Bow [Bound To Player]"
|
||||
Now "Player's Soul Bow"
|
||||
[Soulbound]
|
||||
Evolution Points: 0
|
||||
Added Name Property to have [Un-Bound] on a new line along with the Evolution Points
|
||||
V1.1 --------
|
||||
V1.2 --------
|
||||
V1.3 --------
|
||||
@@ -0,0 +1,179 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute(0x1410, 0x1417)]
|
||||
public class SoulArms: BaseArmor
|
||||
{
|
||||
|
||||
private int mEvolutionPoints;//Sword will only evolve to 50%
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int EvolutionPoints { get { return mEvolutionPoints; } set { mEvolutionPoints = value; } }
|
||||
|
||||
public int BoundToSoul = 0;// Start binding value as zero.
|
||||
|
||||
public override int ArtifactRarity{ get{ return 13; } }
|
||||
public override int BasePhysicalResistance { get { return 10; } }
|
||||
public override int BaseFireResistance { get { return 10; } }
|
||||
public override int BaseColdResistance { get { return 10; } }
|
||||
public override int BasePoisonResistance { get { return 10; } }
|
||||
public override int BaseEnergyResistance { get { return 10; } }
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
private Mobile m_Owner;
|
||||
[Constructable]
|
||||
public SoulArms() : base (0x1410)
|
||||
{
|
||||
Name = "<BASEFONT COLOR=#15D004>Soul Arms";
|
||||
Hue = 1910;
|
||||
|
||||
Resource = CraftResource.None;//Resource None so the Swords name shows correct once Bound.
|
||||
|
||||
BoundToSoul = 0;
|
||||
// Create item with value at zero. Will show in [props as ParentEntity and RootParentEntitty as null.
|
||||
|
||||
Attributes.Luck = 100;
|
||||
ArmorAttributes.SelfRepair = 100;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
Attributes.LowerManaCost = 5;
|
||||
Attributes.LowerRegCost = 15;
|
||||
}
|
||||
|
||||
|
||||
public override bool OnDragLift(Mobile from)
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.Seer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Arms";
|
||||
from.Emote("*" + from.Name + " feels a weird energy overwhelming their body*");
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
return base.OnDragLift(from);
|
||||
}
|
||||
|
||||
public override bool OnEquip( Mobile from )
|
||||
{
|
||||
if(BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Arms";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote( "*" + from.Name + " feels a weird energy overwhelming their body*" );
|
||||
base.OnEquip( from );
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
else if(BoundToSoul == from.Serial) //Check to see if sword is bound to who is equiping it.
|
||||
{
|
||||
base.OnEquip( from );
|
||||
return true; //Allow player who had bound to sword to equip it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "The Armor refuses your soul" );
|
||||
return false; //Disallow any one else from equiping the sword.
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperty( list );
|
||||
if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Un-Bound]" + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
else if (BoundToSoul > 0)//Once the sword is bound it will show the Evolution Points.
|
||||
{// \n puts the stuff after it on a new line
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Soulbound]\n" + "<BASEFONT COLOR=#669966>" + "Evolution Points: " + mEvolutionPoints.ToString() + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
}
|
||||
/*When weapon hits this gives a chance to gain Evolution Points*/
|
||||
public override int OnHit(BaseWeapon weapon, int damageTaken)
|
||||
{
|
||||
if (Utility.Random(5) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
return base.OnHit(weapon, damageTaken);
|
||||
}
|
||||
|
||||
public void ApplyGain()
|
||||
{
|
||||
int expr;
|
||||
if (mEvolutionPoints < 200) // edit this to change how high you wish the Attributes to go 10000 means max attributes will be 100
|
||||
{
|
||||
mEvolutionPoints++;
|
||||
|
||||
if ((mEvolutionPoints / 1) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 2;//100Max
|
||||
|
||||
this.Attributes.BonusHits = expr;
|
||||
this.Attributes.BonusMana = expr;
|
||||
this.Attributes.BonusStam = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 4) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 4;//50Max
|
||||
|
||||
//this.Attributes.Luck = expr;
|
||||
this.Attributes.SpellDamage = expr;
|
||||
this.Attributes.DefendChance = expr;
|
||||
this.Attributes.ReflectPhysical = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 20) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 10;//20Max
|
||||
|
||||
this.Attributes.BonusStr = expr;
|
||||
this.Attributes.BonusDex = expr;
|
||||
this.Attributes.BonusInt = expr;
|
||||
}
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public SoulArms( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override ArmorMaterialType MaterialType
|
||||
{
|
||||
get
|
||||
{
|
||||
return ArmorMaterialType.Plate;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0);
|
||||
writer.Write( (int) mEvolutionPoints );//Serialize(Save) how many points the Sword has.
|
||||
writer.Write( (int) BoundToSoul );//Serialize who it is bound to.
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
mEvolutionPoints = reader.ReadInt();//Read on startup how many points the Sword has.
|
||||
BoundToSoul = reader.ReadInt();//Read on startup who it is bound to.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,217 @@
|
||||
/*----------------*/
|
||||
/*--- Scripted ---*/
|
||||
/*--- By: JBob ---*/
|
||||
/*----------------*/
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13B2, 0x13B1 )]
|
||||
public class SoulBow : BaseRanged
|
||||
{
|
||||
private int mEvolutionPoints;//Bow will only evolve to 50%
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int EvolutionPoints { get { return mEvolutionPoints; } set { mEvolutionPoints = value; } }
|
||||
|
||||
public int BoundToSoul = 0;// Start binding value as zero.
|
||||
|
||||
public override int EffectID{ get{ return 0xF42; } }
|
||||
public override Type AmmoType{ get{ return typeof( Arrow ); } }
|
||||
public override Item Ammo{ get{ return new Arrow(); } }
|
||||
|
||||
public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.ParalyzingBlow; } }
|
||||
public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.MortalStrike; } }
|
||||
|
||||
public override int AosStrengthReq{ get{ return 30; } }
|
||||
public override int AosMinDamage{ get{ return Core.ML ? 15 : 16; } }
|
||||
public override int AosMaxDamage{ get{ return Core.ML ? 19 : 18; } }
|
||||
public override int AosSpeed{ get{ return 25; } }
|
||||
public override float MlSpeed{ get{ return 4.25f; } }
|
||||
|
||||
public override int OldStrengthReq{ get{ return 20; } }
|
||||
public override int OldMinDamage{ get{ return 9; } }
|
||||
public override int OldMaxDamage{ get{ return 41; } }
|
||||
public override int OldSpeed{ get{ return 20; } }
|
||||
|
||||
public override int DefMaxRange{ get{ return 10; } }
|
||||
|
||||
public override WeaponAnimation DefAnimation{ get{ return WeaponAnimation.ShootBow; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 225; } }
|
||||
public override int InitMaxHits{ get{ return 225; } }
|
||||
|
||||
[Constructable]
|
||||
public SoulBow() : base( 0x13B2 )
|
||||
{
|
||||
Weight = 7.0;
|
||||
Name = "<BASEFONT COLOR =#15D004>Soul Bow";
|
||||
Resource = CraftResource.None;//Resource None so the Bows name shows correct once Bound.
|
||||
Layer = Layer.TwoHanded;
|
||||
|
||||
BoundToSoul = 0;
|
||||
// Create item with value at zero. Will show in [props as ParentEntity and RootParentEntitty as null.
|
||||
|
||||
Attributes.Luck = 100;
|
||||
WeaponAttributes.SelfRepair = 100;
|
||||
|
||||
Attributes.WeaponDamage = 1;
|
||||
Attributes.WeaponSpeed = 10;
|
||||
Attributes.SpellChanneling = 1;
|
||||
}
|
||||
|
||||
public override bool OnDragLift(Mobile from)
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.Seer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Bow";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote("*" + from.Name + " feels a weird energy overwhelming their body*");
|
||||
//base.OnEquip(from);
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
return base.OnDragLift(from);
|
||||
}
|
||||
|
||||
public override bool OnEquip( Mobile from )
|
||||
{
|
||||
if(BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Bow";//Change item name and add who it is bound to. "Player's Soul Bow"
|
||||
from.Emote( "*" + from.Name + " feels a weird energy overwhelming their body*" );
|
||||
base.OnEquip( from );
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
else if(BoundToSoul == from.Serial) //Check to see if Bow is bound to who is equiping it.
|
||||
{
|
||||
base.OnEquip( from );
|
||||
return true; //Allow player who had bound to Bow to equip it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "The Bow refuses your soul" );
|
||||
return false; //Disallow any one else from equiping the Bow.
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperty( list );
|
||||
if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Un-Bound]" + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
else if (BoundToSoul > 0)//Once the sword is bound it will show the Evolution Points.
|
||||
{// \n puts the stuff after it on a new line
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Soulbound]\n" + "<BASEFONT COLOR=#669966>" + "Evolution Points: " + mEvolutionPoints.ToString() + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
}
|
||||
/*When weapon hits this gives a chance to gain Evolution Points*/
|
||||
/*public virtual void OnHit(Mobile attacker, Mobile defender)
|
||||
{
|
||||
if (Utility.Random(2) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
base.OnHit(attacker, defender);
|
||||
}*/
|
||||
public override void OnHit(Mobile attacker, IDamageable damageable, double damageBonus)
|
||||
{
|
||||
if (Utility.Random(10) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
base.OnHit(attacker, damageable, damageBonus);
|
||||
}
|
||||
/* Wrong Way
|
||||
public virtual void OnHit(Mobile attacker, Mobile defender, double damageBonus)
|
||||
{
|
||||
if (Utility.Random(5) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
base.OnHit(attacker, defender, damageBonus);
|
||||
}
|
||||
*/
|
||||
|
||||
public void ApplyGain()
|
||||
{
|
||||
int expr;
|
||||
if (mEvolutionPoints < 200) // edit this to change how high you wish the Attributes to go 10000 means max attributes will be 100
|
||||
{
|
||||
mEvolutionPoints++;
|
||||
|
||||
if ((mEvolutionPoints / 1) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 20;
|
||||
// 200 / 10 = 20
|
||||
|
||||
this.Attributes.BonusStr = expr;
|
||||
this.Attributes.BonusDex = expr;
|
||||
this.Attributes.BonusInt = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 2) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 3;
|
||||
|
||||
this.Attributes.AttackChance = expr;
|
||||
this.Attributes.WeaponSpeed = expr;
|
||||
this.Attributes.WeaponDamage = expr;
|
||||
//this.Attributes.Luck = expr;
|
||||
//this.Attributes.SpellDamage = expr;
|
||||
//this.Attributes.DefendChance = expr;
|
||||
//.Attributes.ReflectPhysical = expr;
|
||||
}
|
||||
|
||||
if ((25 + (mEvolutionPoints / 2)) > 0) this.Attributes.WeaponSpeed = (25 + (mEvolutionPoints / 2));
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanEquip( Mobile from )
|
||||
{
|
||||
if ( from.Skills[SkillName.Archery].Base <= 75.0 )
|
||||
{
|
||||
from.SendMessage( "You are not skilled enough to equip that." );
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return base.CanEquip( from );
|
||||
}
|
||||
}
|
||||
|
||||
public SoulBow( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.Write( (int) mEvolutionPoints );//Serialize(Save) how many points the Bow has.
|
||||
writer.Write( (int) BoundToSoul );//Serialize who it is bound to.
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
mEvolutionPoints = reader.ReadInt();//Read on startup how many points the Bow has.
|
||||
BoundToSoul = reader.ReadInt();//Read on startup who it is bound to.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute(0x1415, 0x1416)]
|
||||
public class SoulChest: BaseArmor
|
||||
{
|
||||
|
||||
private int mEvolutionPoints;//Sword will only evolve to 50%
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int EvolutionPoints { get { return mEvolutionPoints; } set { mEvolutionPoints = value; } }
|
||||
|
||||
public int BoundToSoul = 0;// Start binding value as zero.
|
||||
|
||||
public override int ArtifactRarity{ get{ return 13; } }
|
||||
public override int BasePhysicalResistance { get { return 10; } }
|
||||
public override int BaseFireResistance { get { return 10; } }
|
||||
public override int BaseColdResistance { get { return 10; } }
|
||||
public override int BasePoisonResistance { get { return 10; } }
|
||||
public override int BaseEnergyResistance { get { return 10; } }
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
private Mobile m_Owner;
|
||||
[Constructable]
|
||||
public SoulChest() : base (0x1415)
|
||||
{
|
||||
Name = "<BASEFONT COLOR=#15D004>Soul Chest";
|
||||
Hue = 1910;
|
||||
|
||||
Resource = CraftResource.None;//Resource None so the Swords name shows correct once Bound.
|
||||
|
||||
BoundToSoul = 0;
|
||||
// Create item with value at zero. Will show in [props as ParentEntity and RootParentEntitty as null.
|
||||
|
||||
Attributes.Luck = 100;
|
||||
ArmorAttributes.SelfRepair = 100;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
Attributes.LowerManaCost = 5;
|
||||
Attributes.LowerRegCost = 15;
|
||||
}
|
||||
|
||||
public override bool OnDragLift(Mobile from)
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.Seer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Chest";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote("*" + from.Name + " feels a weird energy overwhelming their body*");
|
||||
//base.OnEquip(from);
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
return base.OnDragLift(from);
|
||||
}
|
||||
|
||||
public override bool OnEquip( Mobile from )
|
||||
{
|
||||
if(BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Chest";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote( "*" + from.Name + " feels a weird energy overwhelming their body*" );
|
||||
base.OnEquip( from );
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
else if(BoundToSoul == from.Serial) //Check to see if sword is bound to who is equiping it.
|
||||
{
|
||||
base.OnEquip( from );
|
||||
return true; //Allow player who had bound to sword to equip it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "The Armor refuses your soul" );
|
||||
return false; //Disallow any one else from equiping the sword.
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperty( list );
|
||||
if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Un-Bound]" + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
else if (BoundToSoul > 0)//Once the sword is bound it will show the Evolution Points.
|
||||
{// \n puts the stuff after it on a new line
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Soulbound]\n" + "<BASEFONT COLOR=#669966>" + "Evolution Points: " + mEvolutionPoints.ToString() + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
}
|
||||
/*When weapon hits this gives a chance to gain Evolution Points*/
|
||||
/*public override void OnHit(Mobile attacker, Mobile defender)
|
||||
{
|
||||
if (Utility.Random(2) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
base.OnHit(attacker, defender);
|
||||
}*/
|
||||
public override int OnHit(BaseWeapon weapon, int damageTaken)
|
||||
{
|
||||
if (Utility.Random(5) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
return base.OnHit(weapon, damageTaken);
|
||||
}
|
||||
|
||||
public void ApplyGain()
|
||||
{
|
||||
int expr;
|
||||
if (mEvolutionPoints < 200) // edit this to change how high you wish the Attributes to go 10000 means max attributes will be 100
|
||||
{
|
||||
mEvolutionPoints++;
|
||||
|
||||
if ((mEvolutionPoints / 1) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 2;//100Max
|
||||
|
||||
this.Attributes.BonusHits = expr;
|
||||
this.Attributes.BonusMana = expr;
|
||||
this.Attributes.BonusStam = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 4) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 4;//50Max
|
||||
|
||||
//this.Attributes.Luck = expr;
|
||||
this.Attributes.SpellDamage = expr;
|
||||
this.Attributes.DefendChance = expr;
|
||||
this.Attributes.ReflectPhysical = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 20) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 10;//20Max
|
||||
|
||||
this.Attributes.BonusStr = expr;
|
||||
this.Attributes.BonusDex = expr;
|
||||
this.Attributes.BonusInt = expr;
|
||||
}
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public SoulChest( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override ArmorMaterialType MaterialType
|
||||
{
|
||||
get
|
||||
{
|
||||
return ArmorMaterialType.Plate;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0);
|
||||
writer.Write( (int) mEvolutionPoints );//Serialize(Save) how many points the Sword has.
|
||||
writer.Write( (int) BoundToSoul );//Serialize who it is bound to.
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
mEvolutionPoints = reader.ReadInt();//Read on startup how many points the Sword has.
|
||||
BoundToSoul = reader.ReadInt();//Read on startup who it is bound to.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute(0x1414, 0x1418)]
|
||||
public class SoulGloves : BaseArmor
|
||||
{
|
||||
|
||||
private int mEvolutionPoints;//Sword will only evolve to 50%
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int EvolutionPoints { get { return mEvolutionPoints; } set { mEvolutionPoints = value; } }
|
||||
|
||||
public int BoundToSoul = 0;// Start binding value as zero.
|
||||
|
||||
public override int ArtifactRarity{ get{ return 13; } }
|
||||
public override int BasePhysicalResistance { get { return 10; } }
|
||||
public override int BaseFireResistance { get { return 10; } }
|
||||
public override int BaseColdResistance { get { return 10; } }
|
||||
public override int BasePoisonResistance { get { return 10; } }
|
||||
public override int BaseEnergyResistance { get { return 10; } }
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
private Mobile m_Owner;
|
||||
[Constructable]
|
||||
public SoulGloves() : base (0x1414)
|
||||
{
|
||||
Name = "<BASEFONT COLOR=#2E9AFE>Soul Gloves";
|
||||
Hue = 1910;
|
||||
|
||||
Resource = CraftResource.None;//Resource None so the Swords name shows correct once Bound.
|
||||
|
||||
BoundToSoul = 0;
|
||||
// Create item with value at zero. Will show in [props as ParentEntity and RootParentEntitty as null.
|
||||
|
||||
Attributes.Luck = 100;
|
||||
ArmorAttributes.SelfRepair = 100;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
Attributes.LowerManaCost = 5;
|
||||
Attributes.LowerRegCost = 15;
|
||||
}
|
||||
|
||||
public override bool OnDragLift(Mobile from)
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.Seer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Gloves";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote("*" + from.Name + " feels a weird energy overwhelming their body*");
|
||||
//base.OnEquip(from);
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
return base.OnDragLift(from);
|
||||
}
|
||||
|
||||
public override bool OnEquip( Mobile from )
|
||||
{
|
||||
if(BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Gloves";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote( "*" + from.Name + " feels a weird energy overwhelming their body*" );
|
||||
base.OnEquip( from );
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
else if(BoundToSoul == from.Serial) //Check to see if sword is bound to who is equiping it.
|
||||
{
|
||||
base.OnEquip( from );
|
||||
return true; //Allow player who had bound to sword to equip it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "The Armor refuses your soul" );
|
||||
return false; //Disallow any one else from equiping the sword.
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperty( list );
|
||||
if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Un-Bound]" + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
else if (BoundToSoul > 0)//Once the sword is bound it will show the Evolution Points.
|
||||
{// \n puts the stuff after it on a new line
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Soulbound]\n" + "<BASEFONT COLOR=#669966>" + "Evolution Points: " + mEvolutionPoints.ToString() + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
}
|
||||
/*When weapon hits this gives a chance to gain Evolution Points*/
|
||||
/*public override void OnHit(Mobile attacker, Mobile defender)
|
||||
{
|
||||
if (Utility.Random(2) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
base.OnHit(attacker, defender);
|
||||
}*/
|
||||
public override int OnHit(BaseWeapon weapon, int damageTaken)
|
||||
{
|
||||
if (Utility.Random(5) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
return base.OnHit(weapon, damageTaken);
|
||||
}
|
||||
|
||||
public void ApplyGain()
|
||||
{
|
||||
int expr;
|
||||
if (mEvolutionPoints < 200) // edit this to change how high you wish the Attributes to go 10000 means max attributes will be 100
|
||||
{
|
||||
mEvolutionPoints++;
|
||||
|
||||
if ((mEvolutionPoints / 1) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 2;//100Max
|
||||
|
||||
this.Attributes.BonusHits = expr;
|
||||
this.Attributes.BonusMana = expr;
|
||||
this.Attributes.BonusStam = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 4) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 4;//50Max
|
||||
|
||||
//this.Attributes.Luck = expr;
|
||||
this.Attributes.SpellDamage = expr;
|
||||
this.Attributes.DefendChance = expr;
|
||||
this.Attributes.ReflectPhysical = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 20) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 10;//20Max
|
||||
|
||||
this.Attributes.BonusStr = expr;
|
||||
this.Attributes.BonusDex = expr;
|
||||
this.Attributes.BonusInt = expr;
|
||||
}
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public SoulGloves( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override ArmorMaterialType MaterialType
|
||||
{
|
||||
get
|
||||
{
|
||||
return ArmorMaterialType.Plate;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0);
|
||||
writer.Write( (int) mEvolutionPoints );//Serialize(Save) how many points the Sword has.
|
||||
writer.Write( (int) BoundToSoul );//Serialize who it is bound to.
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
mEvolutionPoints = reader.ReadInt();//Read on startup how many points the Sword has.
|
||||
BoundToSoul = reader.ReadInt();//Read on startup who it is bound to.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SoulGorget: BaseArmor
|
||||
{
|
||||
|
||||
private int mEvolutionPoints;//Sword will only evolve to 50%
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int EvolutionPoints { get { return mEvolutionPoints; } set { mEvolutionPoints = value; } }
|
||||
|
||||
public int BoundToSoul = 0;// Start binding value as zero.
|
||||
|
||||
public override int ArtifactRarity{ get{ return 13; } }
|
||||
public override int BasePhysicalResistance { get { return 10; } }
|
||||
public override int BaseFireResistance { get { return 10; } }
|
||||
public override int BaseColdResistance { get { return 10; } }
|
||||
public override int BasePoisonResistance { get { return 10; } }
|
||||
public override int BaseEnergyResistance { get { return 10; } }
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
private Mobile m_Owner;
|
||||
[Constructable]
|
||||
public SoulGorget() : base (0x1413)
|
||||
{
|
||||
Name = "<BASEFONT COLOR=#15D004>Soul Gorget";
|
||||
Hue = 1910;
|
||||
|
||||
Resource = CraftResource.None;//Resource None so the Swords name shows correct once Bound.
|
||||
|
||||
BoundToSoul = 0;
|
||||
// Create item with value at zero. Will show in [props as ParentEntity and RootParentEntitty as null.
|
||||
|
||||
Attributes.Luck = 100;
|
||||
ArmorAttributes.SelfRepair = 100;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
Attributes.LowerManaCost = 5;
|
||||
Attributes.LowerRegCost = 15;
|
||||
}
|
||||
|
||||
public override bool OnDragLift(Mobile from)
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.Seer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Gorget";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote("*" + from.Name + " feels a weird energy overwhelming their body*");
|
||||
//base.OnEquip(from);
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
return base.OnDragLift(from);
|
||||
}
|
||||
|
||||
public override bool OnEquip( Mobile from )
|
||||
{
|
||||
if(BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Gorget";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote( "*" + from.Name + " feels a weird energy overwhelming their body*" );
|
||||
base.OnEquip( from );
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
else if(BoundToSoul == from.Serial) //Check to see if sword is bound to who is equiping it.
|
||||
{
|
||||
base.OnEquip( from );
|
||||
return true; //Allow player who had bound to sword to equip it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "The Armor refuses your soul" );
|
||||
return false; //Disallow any one else from equiping the sword.
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperty( list );
|
||||
if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Un-Bound]" + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
else if (BoundToSoul > 0)//Once the sword is bound it will show the Evolution Points.
|
||||
{// \n puts the stuff after it on a new line
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Soulbound]\n" + "<BASEFONT COLOR=#669966>" + "Evolution Points: " + mEvolutionPoints.ToString() + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
}
|
||||
/*When weapon hits this gives a chance to gain Evolution Points*/
|
||||
/*public override void OnHit(Mobile attacker, Mobile defender)
|
||||
{
|
||||
if (Utility.Random(2) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
base.OnHit(attacker, defender);
|
||||
}*/
|
||||
public override int OnHit(BaseWeapon weapon, int damageTaken)
|
||||
{
|
||||
if (Utility.Random(5) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
return base.OnHit(weapon, damageTaken);
|
||||
}
|
||||
|
||||
public void ApplyGain()
|
||||
{
|
||||
int expr;
|
||||
if (mEvolutionPoints < 200) // edit this to change how high you wish the Attributes to go 10000 means max attributes will be 100
|
||||
{
|
||||
mEvolutionPoints++;
|
||||
|
||||
if ((mEvolutionPoints / 1) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 2;//100Max
|
||||
|
||||
this.Attributes.BonusHits = expr;
|
||||
this.Attributes.BonusMana = expr;
|
||||
this.Attributes.BonusStam = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 4) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 4;//50Max
|
||||
|
||||
//this.Attributes.Luck = expr;
|
||||
this.Attributes.SpellDamage = expr;
|
||||
this.Attributes.DefendChance = expr;
|
||||
this.Attributes.ReflectPhysical = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 20) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 10;//20Max
|
||||
|
||||
this.Attributes.BonusStr = expr;
|
||||
this.Attributes.BonusDex = expr;
|
||||
this.Attributes.BonusInt = expr;
|
||||
}
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public SoulGorget( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override ArmorMaterialType MaterialType
|
||||
{
|
||||
get
|
||||
{
|
||||
return ArmorMaterialType.Plate;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0);
|
||||
writer.Write( (int) mEvolutionPoints );//Serialize(Save) how many points the Sword has.
|
||||
writer.Write( (int) BoundToSoul );//Serialize who it is bound to.
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
mEvolutionPoints = reader.ReadInt();//Read on startup how many points the Sword has.
|
||||
BoundToSoul = reader.ReadInt();//Read on startup who it is bound to.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "Corpse of the Soul Guardian" )]
|
||||
public class SoulGuardian : BaseCreature
|
||||
{
|
||||
public override bool ShowFameTitle{ get{ return false; } }
|
||||
|
||||
[Constructable]
|
||||
public SoulGuardian() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "Soul Guardian";
|
||||
Body = 311;
|
||||
Hue = 0;
|
||||
BaseSoundID = 1072;
|
||||
|
||||
SetStr( 500, 500 );
|
||||
SetDex( 400, 400 );
|
||||
SetInt( 200, 250 );
|
||||
|
||||
SetHits( 3500, 5000 );
|
||||
|
||||
SetDamage( 15, 25 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 35 );
|
||||
SetDamageType( ResistanceType.Cold, 35 );
|
||||
SetDamageType( ResistanceType.Fire, 35 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 40, 50 );
|
||||
SetResistance( ResistanceType.Energy, 40, 50 );
|
||||
SetResistance( ResistanceType.Poison, 40, 50 );
|
||||
SetResistance( ResistanceType.Cold, 40, 50 );
|
||||
SetResistance( ResistanceType.Fire, 40, 50 );
|
||||
|
||||
SetSkill( SkillName.Wrestling, 95.1, 100.0 );
|
||||
SetSkill( SkillName.Anatomy, 95.1, 100.0 );
|
||||
SetSkill( SkillName.MagicResist, 95.1, 100.0 );
|
||||
SetSkill( SkillName.Swords, 95.1, 100.0 );
|
||||
SetSkill( SkillName.Tactics, 95.1, 100.0 );
|
||||
SetSkill( SkillName.Parry, 95.1, 100.0 );
|
||||
SetSkill( SkillName.Focus, 95.1, 100.0 );
|
||||
|
||||
Fame = 15000;
|
||||
Karma = -20000;
|
||||
|
||||
VirtualArmor = 40;
|
||||
|
||||
//PackGold( 5000, 6000 );
|
||||
|
||||
}
|
||||
|
||||
public override bool AlwaysAttackable{ get{ return true; } }
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Rich, 1 );
|
||||
}
|
||||
public override void OnKilledBy(Mobile mob)
|
||||
{
|
||||
PlayerMobile p = mob as PlayerMobile;
|
||||
if (p == null || p.Map == Map.Internal || p.Map == null || p.Deleted || p.Blessed)
|
||||
return;
|
||||
else if (mob is PlayerMobile)
|
||||
{
|
||||
switch (Utility.Random(30))
|
||||
{
|
||||
case 0: p.AddToBackpack(new SoulChest()); break;
|
||||
case 1: p.AddToBackpack(new SoulLegs()); break;
|
||||
case 2: p.AddToBackpack(new SoulArms()); break;
|
||||
case 3: p.AddToBackpack(new SoulHelmet()); break;
|
||||
case 4: p.AddToBackpack(new SoulGorget()); break;
|
||||
case 5: p.AddToBackpack(new SoulGloves()); break;
|
||||
case 6: p.AddToBackpack(new SoulShield()); break;
|
||||
case 7: p.AddToBackpack(new SoulBow()); break;
|
||||
case 8: p.AddToBackpack(new SoulSword()); break;
|
||||
case 9: p.AddToBackpack(new SoulShroud()); break;
|
||||
}
|
||||
}
|
||||
base.OnKilledBy(mob);
|
||||
}
|
||||
|
||||
public SoulGuardian( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SoulHelmet : BaseArmor
|
||||
{
|
||||
|
||||
private int mEvolutionPoints;//Sword will only evolve to 50%
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int EvolutionPoints { get { return mEvolutionPoints; } set { mEvolutionPoints = value; } }
|
||||
|
||||
public int BoundToSoul = 0;// Start binding value as zero.
|
||||
|
||||
public override int ArtifactRarity{ get{ return 13; } }
|
||||
public override int BasePhysicalResistance { get { return 10; } }
|
||||
public override int BaseFireResistance { get { return 10; } }
|
||||
public override int BaseColdResistance { get { return 10; } }
|
||||
public override int BasePoisonResistance { get { return 10; } }
|
||||
public override int BaseEnergyResistance { get { return 10; } }
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
private Mobile m_Owner;
|
||||
[Constructable]
|
||||
public SoulHelmet() : base (0x1412)
|
||||
{
|
||||
Name = "<BASEFONT COLOR=#15D004>Soul Helmet";
|
||||
Hue = 1910;
|
||||
|
||||
Resource = CraftResource.None;//Resource None so the Swords name shows correct once Bound.
|
||||
|
||||
BoundToSoul = 0;
|
||||
// Create item with value at zero. Will show in [props as ParentEntity and RootParentEntitty as null.
|
||||
|
||||
Attributes.Luck = 100;
|
||||
ArmorAttributes.SelfRepair = 100;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
Attributes.LowerManaCost = 5;
|
||||
Attributes.LowerRegCost = 15;
|
||||
}
|
||||
|
||||
public override bool OnDragLift(Mobile from)
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.Seer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Helmet";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote("*" + from.Name + " feels a weird energy overwhelming their body*");
|
||||
//base.OnEquip(from);
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
return base.OnDragLift(from);
|
||||
}
|
||||
|
||||
public override bool OnEquip( Mobile from )
|
||||
{
|
||||
if(BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Helmet";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote( "*" + from.Name + " feels a weird energy overwhelming their body*" );
|
||||
base.OnEquip( from );
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
else if(BoundToSoul == from.Serial) //Check to see if sword is bound to who is equiping it.
|
||||
{
|
||||
base.OnEquip( from );
|
||||
return true; //Allow player who had bound to sword to equip it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "The Armor refuses your soul" );
|
||||
return false; //Disallow any one else from equiping the sword.
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperty( list );
|
||||
if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Un-Bound]" + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
else if (BoundToSoul > 0)//Once the sword is bound it will show the Evolution Points.
|
||||
{// \n puts the stuff after it on a new line
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Soulbound]\n" + "<BASEFONT COLOR=#669966>" + "Evolution Points: " + mEvolutionPoints.ToString() + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
}
|
||||
/*When weapon hits this gives a chance to gain Evolution Points*/
|
||||
public override int OnHit(BaseWeapon weapon, int damageTaken)
|
||||
{
|
||||
if (Utility.Random(5) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
return base.OnHit(weapon, damageTaken);
|
||||
}
|
||||
|
||||
public void ApplyGain()
|
||||
{
|
||||
int expr;
|
||||
if (mEvolutionPoints < 200) // edit this to change how high you wish the Attributes to go 10000 means max attributes will be 100
|
||||
{
|
||||
mEvolutionPoints++;
|
||||
|
||||
if ((mEvolutionPoints / 1) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 2;//100Max
|
||||
|
||||
this.Attributes.BonusHits = expr;
|
||||
this.Attributes.BonusMana = expr;
|
||||
this.Attributes.BonusStam = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 4) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 4;//50Max
|
||||
|
||||
//this.Attributes.Luck = expr;
|
||||
this.Attributes.SpellDamage = expr;
|
||||
this.Attributes.DefendChance = expr;
|
||||
this.Attributes.ReflectPhysical = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 20) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 10;//20Max
|
||||
|
||||
this.Attributes.BonusStr = expr;
|
||||
this.Attributes.BonusDex = expr;
|
||||
this.Attributes.BonusInt = expr;
|
||||
}
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public SoulHelmet( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override ArmorMaterialType MaterialType
|
||||
{
|
||||
get
|
||||
{
|
||||
return ArmorMaterialType.Plate;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0);
|
||||
writer.Write( (int) mEvolutionPoints );//Serialize(Save) how many points the Sword has.
|
||||
writer.Write( (int) BoundToSoul );//Serialize who it is bound to.
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
mEvolutionPoints = reader.ReadInt();//Read on startup how many points the Sword has.
|
||||
BoundToSoul = reader.ReadInt();//Read on startup who it is bound to.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute(0x1411, 0x141a)]
|
||||
public class SoulLegs: BaseArmor
|
||||
{
|
||||
|
||||
private int mEvolutionPoints;//Sword will only evolve to 50%
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int EvolutionPoints { get { return mEvolutionPoints; } set { mEvolutionPoints = value; } }
|
||||
|
||||
public int BoundToSoul = 0;// Start binding value as zero.
|
||||
|
||||
public override int ArtifactRarity{ get{ return 13; } }
|
||||
public override int BasePhysicalResistance { get { return 10; } }
|
||||
public override int BaseFireResistance { get { return 10; } }
|
||||
public override int BaseColdResistance { get { return 10; } }
|
||||
public override int BasePoisonResistance { get { return 10; } }
|
||||
public override int BaseEnergyResistance { get { return 10; } }
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
private Mobile m_Owner;
|
||||
[Constructable]
|
||||
public SoulLegs() : base (0x1411)
|
||||
{
|
||||
Name = "<BASEFONT COLOR=#15D004>Soul Legs";
|
||||
Hue = 1910;
|
||||
|
||||
Resource = CraftResource.None;//Resource None so the Swords name shows correct once Bound.
|
||||
|
||||
BoundToSoul = 0;
|
||||
// Create item with value at zero. Will show in [props as ParentEntity and RootParentEntitty as null.
|
||||
|
||||
Attributes.Luck = 100;
|
||||
ArmorAttributes.SelfRepair = 100;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
Attributes.LowerManaCost = 5;
|
||||
Attributes.LowerRegCost = 15;
|
||||
}
|
||||
|
||||
public override bool OnDragLift(Mobile from)
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.Seer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Legs";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote("*" + from.Name + " feels a weird energy overwhelming their body*");
|
||||
//base.OnEquip(from);
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
return base.OnDragLift(from);
|
||||
}
|
||||
|
||||
public override bool OnEquip( Mobile from )
|
||||
{
|
||||
if(BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Legs";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote( "*" + from.Name + " feels a weird energy overwhelming their body*" );
|
||||
base.OnEquip( from );
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
else if(BoundToSoul == from.Serial) //Check to see if sword is bound to who is equiping it.
|
||||
{
|
||||
base.OnEquip( from );
|
||||
return true; //Allow player who had bound to sword to equip it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "The Armor refuses your soul" );
|
||||
return false; //Disallow any one else from equiping the sword.
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperty( list );
|
||||
if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Un-Bound]" + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
else if (BoundToSoul > 0)//Once the sword is bound it will show the Evolution Points.
|
||||
{// \n puts the stuff after it on a new line
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Soulbound]\n" + "<BASEFONT COLOR=#669966>" + "Evolution Points: " + mEvolutionPoints.ToString() + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
}
|
||||
/*When weapon hits this gives a chance to gain Evolution Points*/
|
||||
/*public override void OnHit(Mobile attacker, Mobile defender)
|
||||
{
|
||||
if (Utility.Random(2) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
base.OnHit(attacker, defender);
|
||||
}*/
|
||||
public override int OnHit(BaseWeapon weapon, int damageTaken)
|
||||
{
|
||||
if (Utility.Random(5) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
return base.OnHit(weapon, damageTaken);
|
||||
}
|
||||
|
||||
public void ApplyGain()
|
||||
{
|
||||
int expr;
|
||||
if (mEvolutionPoints < 200) // edit this to change how high you wish the Attributes to go 10000 means max attributes will be 100
|
||||
{
|
||||
mEvolutionPoints++;
|
||||
|
||||
if ((mEvolutionPoints / 1) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 2;//100Max
|
||||
|
||||
this.Attributes.BonusHits = expr;
|
||||
this.Attributes.BonusMana = expr;
|
||||
this.Attributes.BonusStam = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 4) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 4;//50Max
|
||||
|
||||
//this.Attributes.Luck = expr;
|
||||
this.Attributes.SpellDamage = expr;
|
||||
this.Attributes.DefendChance = expr;
|
||||
this.Attributes.ReflectPhysical = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 20) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 10;//20Max
|
||||
|
||||
this.Attributes.BonusStr = expr;
|
||||
this.Attributes.BonusDex = expr;
|
||||
this.Attributes.BonusInt = expr;
|
||||
}
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public SoulLegs( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override ArmorMaterialType MaterialType
|
||||
{
|
||||
get
|
||||
{
|
||||
return ArmorMaterialType.Plate;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0);
|
||||
writer.Write( (int) mEvolutionPoints );//Serialize(Save) how many points the Sword has.
|
||||
writer.Write( (int) BoundToSoul );//Serialize who it is bound to.
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
mEvolutionPoints = reader.ReadInt();//Read on startup how many points the Sword has.
|
||||
BoundToSoul = reader.ReadInt();//Read on startup who it is bound to.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SoulShield: BaseShield
|
||||
{
|
||||
|
||||
private int mEvolutionPoints;//Sword will only evolve to 50%
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int EvolutionPoints { get { return mEvolutionPoints; } set { mEvolutionPoints = value; } }
|
||||
|
||||
public int BoundToSoul = 0;// Start binding value as zero.
|
||||
|
||||
public override int ArtifactRarity{ get{ return 13; } }
|
||||
public override int BasePhysicalResistance { get { return 10; } }
|
||||
public override int BaseFireResistance { get { return 10; } }
|
||||
public override int BaseColdResistance { get { return 10; } }
|
||||
public override int BasePoisonResistance { get { return 10; } }
|
||||
public override int BaseEnergyResistance { get { return 10; } }
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
private Mobile m_Owner;
|
||||
[Constructable]
|
||||
public SoulShield() : base (0x1B7B)
|
||||
{
|
||||
Name = "<BASEFONT COLOR=#15D004>Soul Shield";
|
||||
Hue = 1910;
|
||||
|
||||
Resource = CraftResource.None;//Resource None so the Swords name shows correct once Bound.
|
||||
|
||||
BoundToSoul = 0;
|
||||
// Create item with value at zero. Will show in [props as ParentEntity and RootParentEntitty as null.
|
||||
|
||||
Attributes.Luck = 100;
|
||||
ArmorAttributes.SelfRepair = 100;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
Attributes.LowerManaCost = 5;
|
||||
Attributes.LowerRegCost = 15;
|
||||
}
|
||||
|
||||
public override bool OnDragLift(Mobile from)
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.Seer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Shield";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote("*" + from.Name + " feels a weird energy overwhelming their body*");
|
||||
//base.OnEquip(from);
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
return base.OnDragLift(from);
|
||||
}
|
||||
|
||||
public override bool OnEquip( Mobile from )
|
||||
{
|
||||
if(BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Shield";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote( "*" + from.Name + " feels a weird energy overwhelming their body*" );
|
||||
base.OnEquip( from );
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
else if(BoundToSoul == from.Serial) //Check to see if sword is bound to who is equiping it.
|
||||
{
|
||||
base.OnEquip( from );
|
||||
return true; //Allow player who had bound to sword to equip it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "The Armor refuses your soul" );
|
||||
return false; //Disallow any one else from equiping the sword.
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperty( list );
|
||||
if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Un-Bound]" + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
else if (BoundToSoul > 0)//Once the sword is bound it will show the Evolution Points.
|
||||
{// \n puts the stuff after it on a new line
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Soulbound]\n" + "<BASEFONT COLOR=#669966>" + "Evolution Points: " + mEvolutionPoints.ToString() + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
}
|
||||
/*When weapon hits this gives a chance to gain Evolution Points*/
|
||||
public override int OnHit(BaseWeapon weapon, int damageTaken)
|
||||
{
|
||||
if (Utility.Random(5) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
return base.OnHit(weapon, damageTaken);
|
||||
}
|
||||
|
||||
public void ApplyGain()
|
||||
{
|
||||
int expr;
|
||||
if (mEvolutionPoints < 200) // edit this to change how high you wish the Attributes to go 10000 means max attributes will be 100
|
||||
{
|
||||
mEvolutionPoints++;
|
||||
|
||||
if ((mEvolutionPoints / 1) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 2;//100Max
|
||||
|
||||
this.Attributes.BonusHits = expr;
|
||||
this.Attributes.BonusMana = expr;
|
||||
this.Attributes.BonusStam = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 4) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 4;//50Max
|
||||
|
||||
//this.Attributes.Luck = expr;
|
||||
this.Attributes.SpellDamage = expr;
|
||||
this.Attributes.DefendChance = expr;
|
||||
this.Attributes.ReflectPhysical = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 20) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 10;//20Max
|
||||
|
||||
this.Attributes.BonusStr = expr;
|
||||
this.Attributes.BonusDex = expr;
|
||||
this.Attributes.BonusInt = expr;
|
||||
}
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public SoulShield( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override ArmorMaterialType MaterialType
|
||||
{
|
||||
get
|
||||
{
|
||||
return ArmorMaterialType.Plate;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0);
|
||||
writer.Write( (int) mEvolutionPoints );//Serialize(Save) how many points the Sword has.
|
||||
writer.Write( (int) BoundToSoul );//Serialize who it is bound to.
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
mEvolutionPoints = reader.ReadInt();//Read on startup how many points the Sword has.
|
||||
BoundToSoul = reader.ReadInt();//Read on startup who it is bound to.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable(0x2684, 0x2683)]
|
||||
public class SoulShroud : BaseOuterTorso
|
||||
{
|
||||
|
||||
private int mEvolutionPoints;//Sword will only evolve to 50%
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int EvolutionPoints { get { return mEvolutionPoints; } set { mEvolutionPoints = value; } }
|
||||
|
||||
public int BoundToSoul = 0;// Start binding value as zero.
|
||||
|
||||
public override int ArtifactRarity{ get{ return 13; } }
|
||||
public override int BasePhysicalResistance { get { return 10; } }
|
||||
public override int BaseFireResistance { get { return 10; } }
|
||||
public override int BaseColdResistance { get { return 10; } }
|
||||
public override int BasePoisonResistance { get { return 10; } }
|
||||
public override int BaseEnergyResistance { get { return 10; } }
|
||||
private Mobile m_Owner;
|
||||
[Constructable]
|
||||
public SoulShroud() : base (0x2684)
|
||||
{
|
||||
Name = "<BASEFONT COLOR =#15D004>Soul Shroud";
|
||||
Hue = 1910;
|
||||
|
||||
Resource = CraftResource.None;//Resource None so the Swords name shows correct once Bound.
|
||||
|
||||
BoundToSoul = 0;
|
||||
// Create item with value at zero. Will show in [props as ParentEntity and RootParentEntitty as null.
|
||||
|
||||
Attributes.Luck = 100;
|
||||
Attributes.LowerManaCost = 5;
|
||||
Attributes.LowerRegCost = 15;
|
||||
}
|
||||
|
||||
public override bool OnDragLift(Mobile from)
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.Seer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Shroud";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote("*" + from.Name + " feels a weird energy overwhelming their body*");
|
||||
//base.OnEquip(from);
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
return base.OnDragLift(from);
|
||||
}
|
||||
|
||||
public override bool OnEquip( Mobile from )
|
||||
{
|
||||
if(BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Shroud";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote( "*" + from.Name + " feels a weird energy overwhelming their body*" );
|
||||
base.OnEquip( from );
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
else if(BoundToSoul == from.Serial) //Check to see if sword is bound to who is equiping it.
|
||||
{
|
||||
base.OnEquip( from );
|
||||
return true; //Allow player who had bound to sword to equip it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "The Armor refuses your soul" );
|
||||
return false; //Disallow any one else from equiping the sword.
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperty( list );
|
||||
if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Un-Bound]" + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
else if (BoundToSoul > 0)//Once the sword is bound it will show the Evolution Points.
|
||||
{// \n puts the stuff after it on a new line
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Soulbound]\n" + "<BASEFONT COLOR=#669966>" + "Evolution Points: " + mEvolutionPoints.ToString() + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
}
|
||||
/*When weapon hits this gives a chance to gain Evolution Points*/
|
||||
public override int OnHit(BaseWeapon weapon, int damageTaken)
|
||||
{
|
||||
if (Utility.Random(5) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
return base.OnHit(weapon, damageTaken);
|
||||
}
|
||||
|
||||
public void ApplyGain()
|
||||
{
|
||||
int expr;
|
||||
if (mEvolutionPoints < 200) // edit this to change how high you wish the Attributes to go 10000 means max attributes will be 100
|
||||
{
|
||||
mEvolutionPoints++;
|
||||
|
||||
if ((mEvolutionPoints / 1) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 2;//100Max
|
||||
|
||||
this.Attributes.BonusHits = expr;
|
||||
this.Attributes.BonusMana = expr;
|
||||
this.Attributes.BonusStam = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 4) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 4;//50Max
|
||||
|
||||
//this.Attributes.Luck = expr;
|
||||
this.Attributes.SpellDamage = expr;
|
||||
this.Attributes.DefendChance = expr;
|
||||
this.Attributes.ReflectPhysical = expr;
|
||||
this.Attributes.LowerRegCost = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 20) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 10;//20Max
|
||||
|
||||
this.Attributes.BonusStr = expr;
|
||||
this.Attributes.BonusDex = expr;
|
||||
this.Attributes.BonusInt = expr;
|
||||
this.Attributes.LowerManaCost = expr;
|
||||
}
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public SoulShroud( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0);
|
||||
writer.Write( (int) mEvolutionPoints );//Serialize(Save) how many points the Sword has.
|
||||
writer.Write( (int) BoundToSoul );//Serialize who it is bound to.
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
mEvolutionPoints = reader.ReadInt();//Read on startup how many points the Sword has.
|
||||
BoundToSoul = reader.ReadInt();//Read on startup who it is bound to.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
/*----------------*/
|
||||
/*--- Scripted ---*/
|
||||
/*--- By: JBob ---*/
|
||||
/*----------------*/
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0xF61, 0xF60 )]
|
||||
public class SoulSword : BaseSword
|
||||
{
|
||||
private int mEvolutionPoints;//Sword will only evolve to 50%
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int EvolutionPoints { get { return mEvolutionPoints; } set { mEvolutionPoints = value; } }
|
||||
|
||||
public int BoundToSoul = 0;// Start binding value as zero.
|
||||
|
||||
public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.ArmorIgnore; } }
|
||||
public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.ConcussionBlow; } }
|
||||
|
||||
public override int AosStrengthReq{ get{ return 35; } }
|
||||
public override int AosMinDamage{ get{ return 15; } }
|
||||
public override int AosMaxDamage{ get{ return 16; } }
|
||||
public override int AosSpeed{ get{ return 30; } }
|
||||
public override float MlSpeed{ get{ return 2.75f; } }//Added This to fix not being able to attack stuff when the evolution stuff was added.
|
||||
|
||||
public override int OldStrengthReq{ get{ return 25; } }
|
||||
public override int OldMinDamage{ get{ return 5; } }
|
||||
public override int OldMaxDamage{ get{ return 33; } }
|
||||
public override int OldSpeed{ get{ return 35; } }
|
||||
|
||||
public override int DefHitSound{ get{ return 0x237; } }
|
||||
public override int DefMissSound{ get{ return 0x23A; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 225; } }
|
||||
public override int InitMaxHits{ get{ return 225; } }
|
||||
|
||||
[Constructable]
|
||||
public SoulSword() : base( 0xF61 )
|
||||
{
|
||||
Weight = 7.0;
|
||||
Name = "<BASEFONT COLOR =#15D004>Soul Sword";
|
||||
Resource = CraftResource.None;//Resource None so the Swords name shows correct once Bound.
|
||||
|
||||
BoundToSoul = 0;
|
||||
// Create item with value at zero. Will show in [props as ParentEntity and RootParentEntitty as null.
|
||||
|
||||
Attributes.Luck = 100;
|
||||
WeaponAttributes.SelfRepair = 100;
|
||||
|
||||
Attributes.WeaponDamage = 1;
|
||||
Attributes.WeaponSpeed = 10;
|
||||
Attributes.SpellChanneling = 1;
|
||||
}
|
||||
|
||||
public override bool OnDragLift(Mobile from)
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.Seer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Sword";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote("*" + from.Name + " feels a weird energy overwhelming their body*");
|
||||
//base.OnEquip(from);
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
return base.OnDragLift(from);
|
||||
}
|
||||
|
||||
public override bool OnEquip( Mobile from )
|
||||
{
|
||||
if(BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
BoundToSoul = from.Serial; //Bind to a serial on first time equiped.
|
||||
this.Name = "< BASEFONT COLOR =#15D004>" + from.Name.ToString() + "'s Soul Sword";//Change item name and add who it is bound to. "Player's Soul Sword"
|
||||
from.Emote( "*" + from.Name + " feels a weird energy overwhelming their body*" );
|
||||
base.OnEquip( from );
|
||||
return true;//Allow it to bind to the first player to equip it after creation.
|
||||
//Will show in [props as ParentEntity and RootParentEntitty as [m] Serial, "Player Name"
|
||||
}
|
||||
else if(BoundToSoul == from.Serial) //Check to see if sword is bound to who is equiping it.
|
||||
{
|
||||
base.OnEquip( from );
|
||||
return true; //Allow player who had bound to sword to equip it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "The sword refuses your soul" );
|
||||
return false; //Disallow any one else from equiping the sword.
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperty( list );
|
||||
if (BoundToSoul == 0) //Check to see if bound to a serial.
|
||||
{
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Un-Bound]" + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
else if (BoundToSoul > 0)//Once the sword is bound it will show the Evolution Points.
|
||||
{// \n puts the stuff after it on a new line
|
||||
list.Add("<BASEFONT COLOR=#666699>"/*Green*/ + "[Soulbound]\n" + "<BASEFONT COLOR=#669966>" + "Evolution Points: " + mEvolutionPoints.ToString() + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );
|
||||
}
|
||||
}
|
||||
/*When weapon hits this gives a chance to gain Evolution Points*/
|
||||
public override void OnHit(Mobile attacker, IDamageable damageable, double damageBonus)
|
||||
{
|
||||
if (Utility.Random(10) == 1)
|
||||
{
|
||||
ApplyGain();
|
||||
}
|
||||
base.OnHit(attacker, damageable, damageBonus);
|
||||
}
|
||||
|
||||
public void ApplyGain()
|
||||
{
|
||||
int expr;
|
||||
if (mEvolutionPoints < 200) // edit this to change how high you wish the Attributes to go 10000 means max attributes will be 100
|
||||
{
|
||||
mEvolutionPoints++;
|
||||
|
||||
if ((mEvolutionPoints / 1) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 20;
|
||||
// 200 / 10 = 20
|
||||
|
||||
this.Attributes.BonusStr = expr;
|
||||
this.Attributes.BonusDex = expr;
|
||||
this.Attributes.BonusInt = expr;
|
||||
}
|
||||
|
||||
if ((mEvolutionPoints / 2) > 0)
|
||||
{
|
||||
expr = mEvolutionPoints / 3;
|
||||
|
||||
this.Attributes.AttackChance = expr;
|
||||
this.Attributes.WeaponSpeed = expr;
|
||||
this.Attributes.WeaponDamage = expr;
|
||||
//this.Attributes.Luck = expr;
|
||||
//this.Attributes.SpellDamage = expr;
|
||||
//this.Attributes.DefendChance = expr;
|
||||
//this.Attributes.ReflectPhysical = expr;
|
||||
}
|
||||
|
||||
if ((25 + (mEvolutionPoints / 2)) > 0) this.Attributes.WeaponSpeed = (25 + (mEvolutionPoints / 2));
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanEquip( Mobile from )
|
||||
{
|
||||
if ( from.Skills[SkillName.Swords].Base <= 75.0 )
|
||||
{
|
||||
from.SendMessage( "You are not skilled enough to equip that." );
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return base.CanEquip( from );
|
||||
}
|
||||
}
|
||||
|
||||
public SoulSword( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.Write( (int) mEvolutionPoints );//Serialize(Save) how many points the Sword has.
|
||||
writer.Write( (int) BoundToSoul );//Serialize who it is bound to.
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
mEvolutionPoints = reader.ReadInt();//Read on startup how many points the Sword has.
|
||||
BoundToSoul = reader.ReadInt();//Read on startup who it is bound to.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
/*----------------*/
|
||||
/*--- Scripted ---*/
|
||||
/*--- By: JBob ---*/
|
||||
/*----------------*/
|
||||
using System;
|
||||
using Server.Network;
|
||||
using Server.Prompts;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
using Server.Mobiles;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class UnbindingTarget : Target
|
||||
{
|
||||
private Mobile m_Owner;
|
||||
|
||||
private UnbindingDeed m_Deed;
|
||||
|
||||
public UnbindingTarget( UnbindingDeed charge ) : base ( 10, false, TargetFlags.None )
|
||||
{
|
||||
m_Deed=charge;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object target )
|
||||
{
|
||||
if( target == from )
|
||||
from.SendMessage( "You cant do that." );
|
||||
|
||||
else if( target is SoulSword )
|
||||
{
|
||||
SoulSword ss = (SoulSword)target;
|
||||
if( ss.BoundToSoul == 0 )
|
||||
{
|
||||
from.SendMessage( "That is not Soul Bound." );
|
||||
}
|
||||
else if( ss.BoundToSoul != 0 )
|
||||
{
|
||||
ss.Name = "Soul Sword";
|
||||
ss.BoundToSoul = 0;
|
||||
m_Deed.Delete();
|
||||
from.SendMessage( "That Soul Weapon is now Unbound!" );
|
||||
}
|
||||
}
|
||||
else if( target is SoulBow )
|
||||
{
|
||||
SoulBow sb = (SoulBow)target;
|
||||
if( sb.BoundToSoul == 0 )
|
||||
{
|
||||
from.SendMessage( "That is not Soul Bound." );
|
||||
}
|
||||
else if( sb.BoundToSoul != 0 )
|
||||
{
|
||||
sb.Name = "Soul Bow";
|
||||
sb.BoundToSoul = 0;
|
||||
m_Deed.Delete();
|
||||
from.SendMessage( "That Soul Weapon is now Unbound!" );
|
||||
}
|
||||
}
|
||||
else if( target is SoulChest )
|
||||
{
|
||||
SoulChest sc = (SoulChest)target;
|
||||
if( sc.BoundToSoul == 0 )
|
||||
{
|
||||
from.SendMessage( "That is not Soul Bound." );
|
||||
}
|
||||
else if( sc.BoundToSoul != 0 )
|
||||
{
|
||||
sc.Name = "Soul Chest";
|
||||
sc.BoundToSoul = 0;
|
||||
m_Deed.Delete();
|
||||
from.SendMessage( "That Soul Armor is now Unbound!" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class UnbindingDeed : Item
|
||||
{
|
||||
[Constructable]
|
||||
public UnbindingDeed() : base( 0x14F0 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
Name = "Unbinding Deed";
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public UnbindingDeed( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
LootType = LootType.Blessed;
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override bool DisplayLootType{ get{ return false; } }
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Which Soul Item would you like to Unbind?" );
|
||||
from.Target = new UnbindingTarget( this );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user