Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PetColdDamageBonusPotion : Item
|
||||
{
|
||||
[Constructable]
|
||||
public PetColdDamageBonusPotion() : base(0x0F04)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Name = "Pet Cold Damage Bonus Potion";
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 2629;
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from) // Override double click of the deed to call our target
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Target the pet you with to upgrate");
|
||||
from.Target = new ColdDamage(this);
|
||||
}
|
||||
}
|
||||
public PetColdDamageBonusPotion(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);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class ColdDamage : Target
|
||||
{
|
||||
private PetColdDamageBonusPotion m_Potion;
|
||||
public ColdDamage(PetColdDamageBonusPotion potion) : base(1, false, TargetFlags.None)
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
protected override void OnTarget(Mobile from, object target)
|
||||
{
|
||||
if (m_Potion == null || m_Potion.Deleted || !m_Potion.IsChildOf(from.Backpack))
|
||||
return;
|
||||
|
||||
if (target is BaseCreature)
|
||||
{
|
||||
BaseCreature t = (BaseCreature)target;
|
||||
if (t.ControlMaster != from)
|
||||
{
|
||||
from.SendLocalizedMessage(1114368); // This is not your pet!
|
||||
}
|
||||
else
|
||||
{
|
||||
if (t.ColdDamage < 95)
|
||||
{
|
||||
t.ColdDamage += 1;
|
||||
from.SendMessage("You have reinforced your pet by 1 point of cold damage. Total: [{0}]", t.ColdDamage);
|
||||
m_Potion.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Your pet have a maximum cold damage.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1152924); // That is not a valid pet.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PetColdlResistanceBonusPotion : Item
|
||||
{
|
||||
[Constructable]
|
||||
public PetColdlResistanceBonusPotion() : base(0x0F04)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Name = "Pet Cold Resistance Bonus Potion";
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 2629;
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from) // Override double click of the deed to call our target
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Target the pet you with to upgrate");
|
||||
from.Target = new ColdResistSeed(this);
|
||||
}
|
||||
}
|
||||
public PetColdlResistanceBonusPotion(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);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class ColdResistSeed : Target
|
||||
{
|
||||
private PetColdlResistanceBonusPotion m_Potion;
|
||||
public ColdResistSeed(PetColdlResistanceBonusPotion potion) : base(1, false, TargetFlags.None)
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
protected override void OnTarget(Mobile from, object target)
|
||||
{
|
||||
if (m_Potion == null || m_Potion.Deleted || !m_Potion.IsChildOf(from.Backpack))
|
||||
return;
|
||||
|
||||
if (target is BaseCreature)
|
||||
{
|
||||
BaseCreature t = (BaseCreature)target;
|
||||
if (t.ControlMaster != from)
|
||||
{
|
||||
from.SendLocalizedMessage(1114368); // This is not your pet!
|
||||
}
|
||||
else
|
||||
{
|
||||
if (t.ColdResistSeed < 95)
|
||||
{
|
||||
t.ColdResistSeed += 1;
|
||||
from.SendMessage("You have reinforced your pet by 1 point of cold resistance. Total: [{0}]", t.ColdResistSeed);
|
||||
m_Potion.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Your pet have a maximum cold resistance.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1152924); // That is not a valid pet.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PetControlSlotsBonusPotion : Item
|
||||
{
|
||||
[Constructable]
|
||||
public PetControlSlotsBonusPotion() : base(0x0F04)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Name = "Pet Control Slots Reduce Potion";
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 2629;
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from) // Override double click of the deed to call our target
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Target the pet you with to upgrate");
|
||||
from.Target = new ControlSlots(this);
|
||||
}
|
||||
}
|
||||
public PetControlSlotsBonusPotion(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);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class ControlSlots : Target
|
||||
{
|
||||
private PetControlSlotsBonusPotion m_Potion;
|
||||
public ControlSlots(PetControlSlotsBonusPotion potion) : base(1, false, TargetFlags.None)
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
protected override void OnTarget(Mobile from, object target)
|
||||
{
|
||||
if (m_Potion == null || m_Potion.Deleted || !m_Potion.IsChildOf(from.Backpack))
|
||||
return;
|
||||
|
||||
if (target is BaseCreature)
|
||||
{
|
||||
BaseCreature t = (BaseCreature)target;
|
||||
if (t.ControlMaster != from)
|
||||
{
|
||||
from.SendLocalizedMessage(1114368); // This is not your pet!
|
||||
}
|
||||
else
|
||||
{
|
||||
if (t.ControlSlots > 10)
|
||||
{
|
||||
t.ControlSlots -= 1;
|
||||
from.SendMessage("You have reduce your pet by 1 point of Control Slots . Total: [{0}]", t.ControlSlots);
|
||||
m_Potion.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Your pet slots can't get any lower.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1152924); // That is not a valid pet.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PetDamageMaxBonusPotion : Item
|
||||
{
|
||||
[Constructable]
|
||||
public PetDamageMaxBonusPotion() : base(0x0F04)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Name = "Pet Damage Max Point Bonus Potion";
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 2629;
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from) // Override double click of the deed to call our target
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Target the pet you with to upgrate");
|
||||
from.Target = new DamageMax(this);
|
||||
}
|
||||
}
|
||||
public PetDamageMaxBonusPotion(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);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class DamageMax : Target
|
||||
{
|
||||
private PetDamageMaxBonusPotion m_Potion;
|
||||
public DamageMax(PetDamageMaxBonusPotion potion) : base(1, false, TargetFlags.None)
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
protected override void OnTarget(Mobile from, object target)
|
||||
{
|
||||
if (m_Potion == null || m_Potion.Deleted || !m_Potion.IsChildOf(from.Backpack))
|
||||
return;
|
||||
|
||||
if (target is BaseCreature)
|
||||
{
|
||||
BaseCreature t = (BaseCreature)target;
|
||||
if (t.ControlMaster != from)
|
||||
{
|
||||
from.SendLocalizedMessage(1114368); // This is not your pet!
|
||||
}
|
||||
else
|
||||
{
|
||||
if(t.DamageMax < t.DamageMin && t.DamageMax < 95)
|
||||
{
|
||||
t.DamageMax += 1;
|
||||
from.SendMessage("You have reinforced your pet by 1 point of Damage Max. Total: [{0}]", t.DamageMax);
|
||||
m_Potion.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Your pet have a maximum Damage Max.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1152924); // That is not a valid pet.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PetDamageMinBonusPotion : Item
|
||||
{
|
||||
[Constructable]
|
||||
public PetDamageMinBonusPotion() : base(0x0F04)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Name = "Pet Damage Min Point Bonus Potion";
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 2629;
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from) // Override double click of the deed to call our target
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Target the pet you with to upgrate");
|
||||
from.Target = new DamageMin(this);
|
||||
}
|
||||
}
|
||||
public PetDamageMinBonusPotion(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);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class DamageMin : Target
|
||||
{
|
||||
private PetDamageMinBonusPotion m_Potion;
|
||||
public DamageMin(PetDamageMinBonusPotion potion) : base(1, false, TargetFlags.None)
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
protected override void OnTarget(Mobile from, object target)
|
||||
{
|
||||
if (m_Potion == null || m_Potion.Deleted || !m_Potion.IsChildOf(from.Backpack))
|
||||
return;
|
||||
|
||||
if (target is BaseCreature)
|
||||
{
|
||||
BaseCreature t = (BaseCreature)target;
|
||||
if (t.ControlMaster != from)
|
||||
{
|
||||
from.SendLocalizedMessage(1114368); // This is not your pet!
|
||||
}
|
||||
else
|
||||
{
|
||||
if(t.DamageMin < t.DamageMax && t.DamageMin < 95)
|
||||
{
|
||||
t.DamageMin += 1;
|
||||
from.SendMessage("You have reinforced your pet by 1 point of DamageMin. Total: [{0}]", t.DamageMin);
|
||||
m_Potion.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Your pet have a maximum DamageMin.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1152924); // That is not a valid pet.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PetEnergyDamageBonusPotion : Item
|
||||
{
|
||||
[Constructable]
|
||||
public PetEnergyDamageBonusPotion() : base(0x0F04)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Name = "Pet Energy Damage Bonus Potion";
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 2629;
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from) // Override double click of the deed to call our target
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Target the pet you with to upgrate");
|
||||
from.Target = new EnergyDamage(this);
|
||||
}
|
||||
}
|
||||
public PetEnergyDamageBonusPotion(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);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class EnergyDamage : Target
|
||||
{
|
||||
private PetEnergyDamageBonusPotion m_Potion;
|
||||
public EnergyDamage(PetEnergyDamageBonusPotion potion) : base(1, false, TargetFlags.None)
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
protected override void OnTarget(Mobile from, object target)
|
||||
{
|
||||
if (m_Potion == null || m_Potion.Deleted || !m_Potion.IsChildOf(from.Backpack))
|
||||
return;
|
||||
|
||||
if (target is BaseCreature)
|
||||
{
|
||||
BaseCreature t = (BaseCreature)target;
|
||||
if (t.ControlMaster != from)
|
||||
{
|
||||
from.SendLocalizedMessage(1114368); // This is not your pet!
|
||||
}
|
||||
else
|
||||
{
|
||||
if (t.EnergyDamage < 95)
|
||||
{
|
||||
t.EnergyDamage += 1;
|
||||
from.SendMessage("You have reinforced your pet by 1 point of energy damage. Total: [{0}]", t.EnergyDamage);
|
||||
m_Potion.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Your pet have a maximum energy damage.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1152924); // That is not a valid pet.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PetEnergyResistanceBonusPotion : Item
|
||||
{
|
||||
[Constructable]
|
||||
public PetEnergyResistanceBonusPotion() : base(0x0F04)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Name = "Pet Energy Resistance Bonus Potion";
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 2629;
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from) // Override double click of the deed to call our target
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Target the pet you with to upgrate");
|
||||
from.Target = new EnergyResistSeed(this);
|
||||
}
|
||||
}
|
||||
public PetEnergyResistanceBonusPotion(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);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class EnergyResistSeed : Target
|
||||
{
|
||||
private PetEnergyResistanceBonusPotion m_Potion;
|
||||
public EnergyResistSeed(PetEnergyResistanceBonusPotion potion) : base(1, false, TargetFlags.None)
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
protected override void OnTarget(Mobile from, object target)
|
||||
{
|
||||
if (m_Potion == null || m_Potion.Deleted || !m_Potion.IsChildOf(from.Backpack))
|
||||
return;
|
||||
|
||||
if (target is BaseCreature)
|
||||
{
|
||||
BaseCreature t = (BaseCreature)target;
|
||||
if (t.ControlMaster != from)
|
||||
{
|
||||
from.SendLocalizedMessage(1114368); // This is not your pet!
|
||||
}
|
||||
else
|
||||
{
|
||||
if (t.EnergyResistSeed < 95)
|
||||
{
|
||||
t.EnergyResistSeed += 1;
|
||||
from.SendMessage("You have reinforced your pet by 1 point of energy resistance. Total: [{0}]", t.EnergyResistSeed);
|
||||
m_Potion.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Your pet have a maximum energy resistance.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1152924); // That is not a valid pet.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PetFireDamageBonusPotion : Item
|
||||
{
|
||||
[Constructable]
|
||||
public PetFireDamageBonusPotion() : base(0x0F04)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Name = "Pet Fire Damage Bonus Potion";
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 2629;
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from) // Override double click of the deed to call our target
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Target the pet you with to upgrate");
|
||||
from.Target = new FireDamage(this);
|
||||
}
|
||||
}
|
||||
public PetFireDamageBonusPotion(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);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class FireDamage : Target
|
||||
{
|
||||
private PetFireDamageBonusPotion m_Potion;
|
||||
public FireDamage(PetFireDamageBonusPotion potion) : base(1, false, TargetFlags.None)
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
protected override void OnTarget(Mobile from, object target)
|
||||
{
|
||||
if (m_Potion == null || m_Potion.Deleted || !m_Potion.IsChildOf(from.Backpack))
|
||||
return;
|
||||
|
||||
if (target is BaseCreature)
|
||||
{
|
||||
BaseCreature t = (BaseCreature)target;
|
||||
if (t.ControlMaster != from)
|
||||
{
|
||||
from.SendLocalizedMessage(1114368); // This is not your pet!
|
||||
}
|
||||
else
|
||||
{
|
||||
if (t.FireDamage < 95)
|
||||
{
|
||||
t.FireDamage += 1;
|
||||
from.SendMessage("You have reinforced your pet by 1 point of fire damage. Total: [{0}]", t.FireDamage);
|
||||
m_Potion.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Your pet have a maximum fire damage.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1152924); // That is not a valid pet.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PetFireResistanceBonusPotion : Item
|
||||
{
|
||||
[Constructable]
|
||||
public PetFireResistanceBonusPotion() : base(0x0F04)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Name = "Pet Physical Resistance Bonus Potion";
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 2629;
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from) // Override double click of the deed to call our target
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Target the pet you with to upgrate");
|
||||
from.Target = new FireResistSeed(this);
|
||||
}
|
||||
}
|
||||
public PetFireResistanceBonusPotion(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);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class FireResistSeed : Target
|
||||
{
|
||||
private PetFireResistanceBonusPotion m_Potion;
|
||||
public FireResistSeed(PetFireResistanceBonusPotion potion) : base(1, false, TargetFlags.None)
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
protected override void OnTarget(Mobile from, object target)
|
||||
{
|
||||
if (m_Potion == null || m_Potion.Deleted || !m_Potion.IsChildOf(from.Backpack))
|
||||
return;
|
||||
|
||||
if (target is BaseCreature)
|
||||
{
|
||||
BaseCreature t = (BaseCreature)target;
|
||||
if (t.ControlMaster != from)
|
||||
{
|
||||
from.SendLocalizedMessage(1114368); // This is not your pet!
|
||||
}
|
||||
else
|
||||
{
|
||||
if (t.FireResistSeed < 95)
|
||||
{
|
||||
t.FireResistSeed += 1;
|
||||
from.SendMessage("You have reinforced your pet by 1 point of fire resistance. Total: [{0}]", t.FireResistSeed);
|
||||
m_Potion.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Your pet have a maximum fire resistance.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1152924); // That is not a valid pet.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PetHitsPointBonusPotion : Item
|
||||
{
|
||||
[Constructable]
|
||||
public PetHitsPointBonusPotion() : base(0x0F04)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Name = "Pet Hits Point Bonus Potion";
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 2629;
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from) // Override double click of the deed to call our target
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Target the pet you with to upgrate");
|
||||
from.Target = new HitsMaxSeed(this);
|
||||
}
|
||||
}
|
||||
public PetHitsPointBonusPotion(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);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class HitsMaxSeed : Target
|
||||
{
|
||||
private PetHitsPointBonusPotion m_Potion;
|
||||
public HitsMaxSeed(PetHitsPointBonusPotion potion) : base(1, false, TargetFlags.None)
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
protected override void OnTarget(Mobile from, object target)
|
||||
{
|
||||
if (m_Potion == null || m_Potion.Deleted || !m_Potion.IsChildOf(from.Backpack))
|
||||
return;
|
||||
|
||||
if (target is BaseCreature)
|
||||
{
|
||||
BaseCreature t = (BaseCreature)target;
|
||||
if (t.ControlMaster != from)
|
||||
{
|
||||
from.SendLocalizedMessage(1114368); // This is not your pet!
|
||||
}
|
||||
else
|
||||
{
|
||||
if (t.HitsMaxSeed < 5000)
|
||||
{
|
||||
t.HitsMaxSeed += 1;
|
||||
from.SendMessage("You have reinforced your pet by 1 point of hits point. Total: [{0}]", t.HitsMaxSeed);
|
||||
m_Potion.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Your pet have a maximum hits point.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1152924); // That is not a valid pet.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PetManaPointBonusPotion : Item
|
||||
{
|
||||
[Constructable]
|
||||
public PetManaPointBonusPotion() : base(0x0F04)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Name = "Pet Mana Point Bonus Potion";
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 2629;
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from) // Override double click of the deed to call our target
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Target the pet you with to upgrate");
|
||||
from.Target = new ManaMaxSeed(this);
|
||||
}
|
||||
}
|
||||
public PetManaPointBonusPotion(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);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class ManaMaxSeed : Target
|
||||
{
|
||||
private PetManaPointBonusPotion m_Potion;
|
||||
public ManaMaxSeed(PetManaPointBonusPotion potion) : base(1, false, TargetFlags.None)
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
protected override void OnTarget(Mobile from, object target)
|
||||
{
|
||||
if (m_Potion == null || m_Potion.Deleted || !m_Potion.IsChildOf(from.Backpack))
|
||||
return;
|
||||
|
||||
if (target is BaseCreature)
|
||||
{
|
||||
BaseCreature t = (BaseCreature)target;
|
||||
if (t.ControlMaster != from)
|
||||
{
|
||||
from.SendLocalizedMessage(1114368); // This is not your pet!
|
||||
}
|
||||
else
|
||||
{
|
||||
if (t.ManaMaxSeed < 95)
|
||||
{
|
||||
t.ManaMaxSeed += 1;
|
||||
from.SendMessage("You have reinforced your pet by 1 point of mana point. Total: [{0}]", t.ManaMaxSeed);
|
||||
m_Potion.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Your pet have a maximum mana point.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1152924); // That is not a valid pet.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PetPhysicalDamageBonusPotion : Item
|
||||
{
|
||||
[Constructable]
|
||||
public PetPhysicalDamageBonusPotion() : base(0x0F04)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Name = "Pet Physical Damage Bonus Potion";
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 2629;
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from) // Override double click of the deed to call our target
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Target the pet you with to upgrate");
|
||||
from.Target = new PhysicalDamage(this);
|
||||
}
|
||||
}
|
||||
public PetPhysicalDamageBonusPotion(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);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class PhysicalDamage : Target
|
||||
{
|
||||
private PetPhysicalDamageBonusPotion m_Potion;
|
||||
public PhysicalDamage(PetPhysicalDamageBonusPotion potion) : base(1, false, TargetFlags.None)
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
protected override void OnTarget(Mobile from, object target)
|
||||
{
|
||||
if (m_Potion == null || m_Potion.Deleted || !m_Potion.IsChildOf(from.Backpack))
|
||||
return;
|
||||
|
||||
if (target is BaseCreature)
|
||||
{
|
||||
BaseCreature t = (BaseCreature)target;
|
||||
if (t.ControlMaster != from)
|
||||
{
|
||||
from.SendLocalizedMessage(1114368); // This is not your pet!
|
||||
}
|
||||
else
|
||||
{
|
||||
if (t.PhysicalDamage < 95)
|
||||
{
|
||||
t.PhysicalDamage += 1;
|
||||
from.SendMessage("You have reinforced your pet by 1 point of physical damage. Total: [{0}]", t.PhysicalDamage);
|
||||
m_Potion.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Your pet have a maximum physical damage.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1152924); // That is not a valid pet.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PetPhysicalResistanceBonusPotion : Item
|
||||
{
|
||||
[Constructable]
|
||||
public PetPhysicalResistanceBonusPotion() : base(0x0F04)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Name = "Pet Physical Resistance Bonus Potion";
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 2629;
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from) // Override double click of the deed to call our target
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Target the pet you with to upgrate");
|
||||
from.Target = new PhysicalResistanceSeed(this);
|
||||
}
|
||||
}
|
||||
public PetPhysicalResistanceBonusPotion(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);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class PhysicalResistanceSeed : Target
|
||||
{
|
||||
private PetPhysicalResistanceBonusPotion m_Potion;
|
||||
public PhysicalResistanceSeed(PetPhysicalResistanceBonusPotion potion) : base(1, false, TargetFlags.None)
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
protected override void OnTarget(Mobile from, object target)
|
||||
{
|
||||
if (m_Potion == null || m_Potion.Deleted || !m_Potion.IsChildOf(from.Backpack))
|
||||
return;
|
||||
|
||||
if (target is BaseCreature)
|
||||
{
|
||||
BaseCreature t = (BaseCreature)target;
|
||||
if (t.ControlMaster != from)
|
||||
{
|
||||
from.SendLocalizedMessage(1114368); // This is not your pet!
|
||||
}
|
||||
else
|
||||
{
|
||||
if (t.PhysicalResistanceSeed < 95)
|
||||
{
|
||||
t.PhysicalResistanceSeed += 1;
|
||||
from.SendMessage("You have reinforced your pet by 1 point of physical resistance. Total: [{0}]", t.PhysicalResistanceSeed);
|
||||
m_Potion.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Your pet have a maximum physical resistance.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1152924); // That is not a valid pet.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PetPoisonDamagBonusPotion : Item
|
||||
{
|
||||
[Constructable]
|
||||
public PetPoisonDamagBonusPotion() : base(0x0F04)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Name = "Pet Poison Damage Bonus Potion";
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 2629;
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from) // Override double click of the deed to call our target
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Target the pet you with to upgrate");
|
||||
from.Target = new PoisonDamage(this);
|
||||
}
|
||||
}
|
||||
public PetPoisonDamagBonusPotion(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);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class PoisonDamage : Target
|
||||
{
|
||||
private PetPoisonDamagBonusPotion m_Potion;
|
||||
public PoisonDamage(PetPoisonDamagBonusPotion potion) : base(1, false, TargetFlags.None)
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
protected override void OnTarget(Mobile from, object target)
|
||||
{
|
||||
if (m_Potion == null || m_Potion.Deleted || !m_Potion.IsChildOf(from.Backpack))
|
||||
return;
|
||||
|
||||
if (target is BaseCreature)
|
||||
{
|
||||
BaseCreature t = (BaseCreature)target;
|
||||
if (t.ControlMaster != from)
|
||||
{
|
||||
from.SendLocalizedMessage(1114368); // This is not your pet!
|
||||
}
|
||||
else
|
||||
{
|
||||
if (t.PoisonDamage < 95)
|
||||
{
|
||||
t.PoisonDamage += 1;
|
||||
from.SendMessage("You have reinforced your pet by 1 point of poison damage. Total: [{0}]", t.PoisonDamage);
|
||||
m_Potion.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Your pet have a maximum poison damage.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1152924); // That is not a valid pet.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PetPoisonResistanceBonusPotion : Item
|
||||
{
|
||||
[Constructable]
|
||||
public PetPoisonResistanceBonusPotion() : base(0x0F04)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Name = "Pet Poison Resistance Bonus Potion";
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 2629;
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from) // Override double click of the deed to call our target
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Target the pet you with to upgrate");
|
||||
from.Target = new PoisonResistSeed(this);
|
||||
}
|
||||
}
|
||||
public PetPoisonResistanceBonusPotion(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);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class PoisonResistSeed : Target
|
||||
{
|
||||
private PetPoisonResistanceBonusPotion m_Potion;
|
||||
public PoisonResistSeed(PetPoisonResistanceBonusPotion potion) : base(1, false, TargetFlags.None)
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
protected override void OnTarget(Mobile from, object target)
|
||||
{
|
||||
if (m_Potion == null || m_Potion.Deleted || !m_Potion.IsChildOf(from.Backpack))
|
||||
return;
|
||||
|
||||
if (target is BaseCreature)
|
||||
{
|
||||
BaseCreature t = (BaseCreature)target;
|
||||
if (t.ControlMaster != from)
|
||||
{
|
||||
from.SendLocalizedMessage(1114368); // This is not your pet!
|
||||
}
|
||||
else
|
||||
{
|
||||
if (t.PoisonResistSeed < 95)
|
||||
{
|
||||
t.PoisonResistSeed += 1;
|
||||
from.SendMessage("You have reinforced your pet by 1 point of fire resistance. Total: [{0}]", t.PoisonResistSeed);
|
||||
m_Potion.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Your pet have a maximum fire resistance.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1152924); // That is not a valid pet.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PetStamPointBonusPotion : Item
|
||||
{
|
||||
[Constructable]
|
||||
public PetStamPointBonusPotion() : base(0x0F04)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Name = "Pet Stam Point Bonus Potion";
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 2629;
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from) // Override double click of the deed to call our target
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Target the pet you with to upgrate");
|
||||
from.Target = new StamMaxSeed(this);
|
||||
}
|
||||
}
|
||||
public PetStamPointBonusPotion(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);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class StamMaxSeed : Target
|
||||
{
|
||||
private PetStamPointBonusPotion m_Potion;
|
||||
public StamMaxSeed(PetStamPointBonusPotion potion) : base(1, false, TargetFlags.None)
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
protected override void OnTarget(Mobile from, object target)
|
||||
{
|
||||
if (m_Potion == null || m_Potion.Deleted || !m_Potion.IsChildOf(from.Backpack))
|
||||
return;
|
||||
|
||||
if (target is BaseCreature)
|
||||
{
|
||||
BaseCreature t = (BaseCreature)target;
|
||||
if (t.ControlMaster != from)
|
||||
{
|
||||
from.SendLocalizedMessage(1114368); // This is not your pet!
|
||||
}
|
||||
else
|
||||
{
|
||||
if (t.StamMaxSeed < 1000)
|
||||
{
|
||||
t.StamMaxSeed = t.Stam + 1;
|
||||
from.SendMessage("You have reinforced your pet by 1 point of stamina point. Total: [{0}]", t.StamMaxSeed);
|
||||
m_Potion.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Your pet have a maximum stamina point.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1152924); // That is not a valid pet.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user