Opywang
Member
Hi there I've been looking for ways to make artifacts rare throughout the game, and I found something from some where then I edit, and transform it into Heart of the Lion, and I am happy with the work I did, but I want to make it more stronger, but it is not rare enough for it to be stronger.
I was hoping somebody can help me fix this to make it give mods like in chance 1 in some number would be great, or if anybody can think of an idea how to make it super rare for a very good pieces?
Here is a video this will give you an idea what this script does, and I am pleased with how it does, but I want to make it more stronger due to rarity, and at the moment it is not rare enough to make it any stronger than what it have.
https://gyazo.com/7d93d02b048078374765e62fd1ad69cb
I was hoping somebody can help me fix this to make it give mods like in chance 1 in some number would be great, or if anybody can think of an idea how to make it super rare for a very good pieces?
Here is a video this will give you an idea what this script does, and I am pleased with how it does, but I want to make it more stronger due to rarity, and at the moment it is not rare enough to make it any stronger than what it have.
https://gyazo.com/7d93d02b048078374765e62fd1ad69cb
Code:
// Scripted by Thor86
using System;
using Server;
namespace Server.Items
{
public class HeartOfTheLion : PlateChest
{
//public override int ArtifactRarity{ get{ return 6; } }
//public override int ArtifactRarity { get { return Utility.RandomMinMax(1, 10); } }
public override int BasePhysicalResistance{ get{ return 0; } }
public override int BaseFireResistance{ get{ return 0; } }
public override int BaseColdResistance{ get{ return 0; } }
public override int BasePoisonResistance{ get{ return 0; } }
public override int BaseEnergyResistance{ get{ return 0; } }
public override bool AllowMaleWearer { get { return true; } }
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
private static string[] m_Names = new string[]
{
// names based off past expanions
"Heart of the Lion",
};
[Constructable]
public HeartOfTheLion()
{
Name = m_Names[Utility.Random(m_Names.Length)];
//Hue = Utility.RandomMinMax(5, 3000);
// Name = "Artifact Arms";
// random chance to get diffent resist %
PhysicalBonus = Utility.RandomMinMax(15, 25);
FireBonus = Utility.RandomMinMax( 10, 20);
ColdBonus = Utility.RandomMinMax(10, 20);
PoisonBonus = Utility.RandomMinMax(10, 20);
EnergyBonus = Utility.RandomMinMax(10, 20);
Hue = 0x501;
Attributes.Luck = 95;
Attributes.DefendChance = 15;
ArmorAttributes.LowerStatReq = 100;
ArmorAttributes.MageArmor = 1;
// id it shows item as
switch (Utility.Random(1))
{
//case 0: ItemID = 5141; break; //
//case 1: ItemID = 5141; break;//ringmail
//case 2: ItemID = 5141; break;//virute
case 0: ItemID = 5141; break;//platemail
//case 4: ItemID = 5141; break;//leather
}
// random chance to get these stats added to item ,chance of one stat per switch
switch (Utility.Random(5))
{
case 0: Attributes.RegenHits = Utility.RandomMinMax(1, 4); break;
case 1: Attributes.RegenStam = Utility.RandomMinMax(1, 4); break;
case 2: Attributes.RegenStam = Utility.RandomMinMax(1, 4); break;
case 3: Attributes.DefendChance = Utility.RandomMinMax(15, 45); break;
case 4: Attributes.AttackChance = Utility.RandomMinMax(1, 20); break;
}
switch (Utility.Random(6))
{
case 0: Attributes.BonusStr = Utility.RandomMinMax(1, 5); break;
case 1: Attributes.BonusDex = Utility.RandomMinMax(1, 5); break;
case 2: Attributes.BonusInt = Utility.RandomMinMax(1, 5); break;
case 3: Attributes.BonusHits = Utility.RandomMinMax(1, 20); break;
case 4: Attributes.BonusStam = Utility.RandomMinMax(1, 20); break;
case 5: Attributes.BonusMana = Utility.RandomMinMax(1, 20); break;
}
switch (Utility.Random(8))
{
case 0: Attributes.WeaponDamage = Utility.RandomMinMax(1, 25); break;
case 1: Attributes.WeaponSpeed = Utility.RandomMinMax(1, 10); break;
case 2: Attributes.SpellDamage = Utility.RandomMinMax(1, 25); break;
case 3: Attributes.CastRecovery = Utility.RandomMinMax(1, 2); break;
case 4: Attributes.CastSpeed = Utility.RandomMinMax(1, 2); break;
}
switch (Utility.Random(6))
{
case 0: Attributes.LowerManaCost = Utility.RandomMinMax(1, 10); break;
case 1: Attributes.LowerRegCost = Utility.RandomMinMax(1, 20); break;
case 2: Attributes.ReflectPhysical = Utility.RandomMinMax(1, 20); break;
case 3: Attributes.EnhancePotions = Utility.RandomMinMax(1, 20); break;
case 4: Attributes.Luck = Utility.RandomMinMax(95, 475); break;
case 5: Attributes.NightSight = 1; break;
}
switch (Utility.Random(8))
{
case 0: Attributes.WeaponDamage = Utility.RandomMinMax(1, 50); break;
case 1: Attributes.WeaponSpeed = Utility.RandomMinMax(1, 20); break;
case 2: Attributes.SpellDamage = Utility.RandomMinMax(1, 50); break;
case 3: Attributes.CastRecovery = Utility.RandomMinMax(1, 6); break;
case 4: Attributes.CastSpeed = Utility.RandomMinMax(1, 4); break;
}
//Disadvantages
// can be brittle
switch (Utility.Random(2))
{
case 0: Attributes.Brittle = 1; break;
}
// can be cursed
switch (Utility.Random(2)) { case 0: LootType = LootType.Cursed; break; }
// can be unlucky
switch (Utility.Random(2))
{
case 0: Attributes.Luck = 95; break;
}
}
public HeartOfTheLion(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();
}
}
}
Last edited: