The Success % isn't 'Exactly' the same formula as OSI, I have used the same base difficulty (49.9% at 0 skill for 1 intensity weight).. but the increase in difficulty isn't spot on, but is as close as I could be bothered with. - So.. yeah, quite close.- Is the value of % success Chance real and same OSI or Not ??
This is to exact OSI specifications (Maybe slight differences due to the way they are calculated - I used (IngredientsMax / 100 ) * Prop weight ) But other than that it needs the same as OSI.- Is the value of Ingredient same OSI ??
Any intended further updates to the system? Particularly for the Brittle property and the Soul Reinforcement.
I've managed to get the Brittle property to add just fine, simple stuff really. But for the life of me, TimesImbued cannot be called in PowderOfTemperament. As you know, I'm sure, Brittle items cannot be fortified.
if( item is BaseArmor )
{
BaseArmor Ti = (BaseArmor)item as BaseArmor;
if( Ti.TimesImbued > 0)
{
from.SendLocalizedMessage( 1049083 ); // You cannot use the powder on that item.
return;
}
}
else if( item is BaseJewel )
{
BaseJewel Ti = (BaseJewel)item as BaseJewel;
if( Ti.TimesImbued > 0)
{
from.SendLocalizedMessage( 1049083 ); // You cannot use the powder on that item.
return;
}
}
else if( item is BaseHat )
{
BaseHat Ti = (BaseHat)item as BaseHat;
if( Ti.TimesImbued > 0)
{
from.SendLocalizedMessage( 1049083 ); // You cannot use the powder on that item.
return;
}
}
else if( item is BaseWeapon )
{
BaseWeapon Ti = (BaseWeapon)item as BaseWeapon;
if( Ti.TimesImbued > 0)
{
from.SendLocalizedMessage( 1049083 ); // You cannot use the powder on that item.
return;
}
}
if ( !wearable.CanFortify )
{
from.SendLocalizedMessage( 1049083 ); // You cannot use the powder on that item.
return;
}
What %success chance issues are there?Great work, thanks alot friend! And yes is there any fixes on the %success chance issues?
It has like a huge percentage of creating the item, im only new to the imbuing theme, so any info on this package would be great! Standing near soulforge in termur i can unravel and all works well, though in the imbue gump when i goto craft it has a 200+% success chance to add 100 properties, as i said im new to imbuing and have read little bits here and there on how it works, same issues are mentioned on page 2.What %success chance issues are there?
It's "BaseHat Ti", I had wrote "BaseHatTi" (no space) by mistake, my post has been fixed. BaseClothing works though too.Thanks! BaseHat didn't work though, but changing it to BaseClothing Ti did the trick.
Here try this:Item Id skill is nice. Im having trouble scripting an Item Id wand or staff [equipable item] so players can get around the skill requirement. Dont want it to be a basewand but want it to have charges. Any ideas on how to script such an item. It needs to act as 100% skill bonus on D-click not equip and consume charges.
using System;
using Server;
using Server.Mobiles;
using Server.Items;
using Server.Targeting;
namespace Server.Items;
{
public class IDItem : GnarledStaff //BaseWand
{
[CommandProperty( AccessLevel.GameMaster )]
public int Charges{ get{ return m_Charges; } set{ m_Charges = value; InvalidateProperties(); if( m_DeleteOnEmptyUses && m_Charges <= 0 ){ this.Delete(); } } }
[CommandProperty( AccessLevel.GameMaster )]
public bool DeleteOnEmptyUses{ get{ return m_DeleteOnEmptyUses; } set{ m_DeleteOnEmptyUses = value; InvalidateProperties(); } }
private int m_Charges;
private bool m_DeleteOnEmptyUses = true;
[Constructable]
public IDItem() : this( 50, true )
{
}
[Constructable]
public IDItem( int charges ) : this( charges, true )
{
m_Charges = charges;
}
[Constructable]
public IDItem( int charges, bool deleteonemptyuses )
{
m_DeleteOnEmptyUses = deleteonemptyuses;
m_Charges = charges;
}
public IDItem( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( (int)m_Charges );
writer.Write( (bool)m_DeleteOnEmptyUses );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch( version )
{
case 0:
{
m_Charges = reader.ReadInt();
m_DeleteOnEmptyUses = reader.ReadBool();
break;
}
}
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
if (m_Charges > 0)
list.Add("Charges: {0}", m_Charges.ToString());
else if( m_Charges == 0 )
list.Add("No Charges");
}
public override void OnDoubleClick(Mobile from)
{
PlayerMobile pm = from as PlayerMobile;
if (!IsChildOf(from.Backpack) && ( RootParent != null && (Mobile)RootParent != from ) )
{
from.SendMessage("This item must be equipped or in your pack before you are able to use it");
}
else
{
if ( m_Charges <= 0 )
{
from.SendMessage("Out of charges!");
}
else
{
from.SendMessage("Which item do you wish to unravel?");
from.Target = new InternalTarget( this );
}
}
}
private class InternalTarget : Target
{
private IDItem m_IDItem;
public InternalTarget( IDItem iditem )
: base(8, false, TargetFlags.None)
{
AllowNonlocal = true;
m_IDItem = iditem;
}
protected override void OnTarget(Mobile from, object o)
{
int oInt = 0;
double oDo = 0;
int oMods = 0;
if( m_IDItem == null || m_IDItem.Deleted )
return;
if( o == null )
return;
Item targ = o as Item;
if (!m_IDItem.IsChildOf(from.Backpack) || m_IDItem.RootParent == null || !( m_IDItem.RootParent != null && (Mobile)m_IDItem.RootParent == from ) )
{
from.SendMessage("The staff must be equipped or in your pack before you are able to use it.");
return;
}
else if( targ != null && !Utility.InRange( targ.GetWorldLocation(), from.Location, 4 ) )
{
from.SendMessage( "That is too far away!" );
return;
}
else if( m_IDItem.Charges <= 0 )
{
from.SendMessage( "The staff is out of charges." );
return;
}
if (o is BaseWeapon || o is BaseArmor || o is BaseJewel || o is BaseHat)
{
if (o is BaseWeapon)
{
BaseWeapon w = o as BaseWeapon;
if (o is BaseRanged)
{
BaseRanged r = o as BaseRanged;
if (r.Velocity > 0) { oDo += (130 / 50) * r.Velocity; oMods += 1; }
if (r.Balanced == true) { oDo += 150; oMods += 1; }
if (w.Attributes.DefendChance > 0) { oDo += (130 / 25) * w.Attributes.DefendChance; oMods += 1; }
if (w.Attributes.AttackChance > 0) { oDo += (130 / 25) * w.Attributes.AttackChance; oMods += 1; }
if (w.Attributes.Luck > 0) { oDo += (100 / 120) * w.Attributes.Luck; oMods += 1; }
if (w.WeaponAttributes.ResistPhysicalBonus > 0) { oDo += (100 / 18) * w.WeaponAttributes.ResistPhysicalBonus; oMods += 1; }
if (w.WeaponAttributes.ResistFireBonus > 0) { oDo += (100 / 18) * w.WeaponAttributes.ResistFireBonus; oMods += 1; }
if (w.WeaponAttributes.ResistColdBonus > 0) { oDo += (100 / 18) * w.WeaponAttributes.ResistColdBonus; oMods += 1; }
if (w.WeaponAttributes.ResistPoisonBonus > 0) { oDo += (100 / 18) * w.WeaponAttributes.ResistPoisonBonus; oMods += 1; }
if (w.WeaponAttributes.ResistEnergyBonus > 0) { oDo += (100 / 18) * w.WeaponAttributes.ResistEnergyBonus; oMods += 1; }
}
else if(o is BaseMeleeWeapon)
{
if (w.Attributes.DefendChance > 0) { oDo += (130 / 15) * w.Attributes.DefendChance; oMods += 1; }
if (w.Attributes.AttackChance > 0) { oDo += (130 / 15) * w.Attributes.AttackChance; oMods += 1; }
if (w.Attributes.Luck > 0) { oDo += w.Attributes.Luck; oMods += 1; }
if (w.WeaponAttributes.ResistPhysicalBonus > 0) { oDo += (100 / 15) * w.WeaponAttributes.ResistPhysicalBonus; oMods += 1; }
if (w.WeaponAttributes.ResistFireBonus > 0) { oDo += (100 / 15) * w.WeaponAttributes.ResistFireBonus; oMods += 1; }
if (w.WeaponAttributes.ResistColdBonus > 0) { oDo += (100 / 15) * w.WeaponAttributes.ResistColdBonus; oMods += 1; }
if (w.WeaponAttributes.ResistPoisonBonus > 0) { oDo += (100 / 15) * w.WeaponAttributes.ResistPoisonBonus; oMods += 1; }
if (w.WeaponAttributes.ResistEnergyBonus > 0) { oDo += (100 / 15) * w.WeaponAttributes.ResistEnergyBonus; oMods += 1; }
}
if (w.Attributes.RegenHits > 0) { oDo += (50 * w.Attributes.RegenHits); oMods += 1; }
if (w.Attributes.RegenStam > 0) { oDo += (33.33 * w.Attributes.RegenStam); oMods += 1; }
if (w.Attributes.RegenMana > 0) { oDo += (50 * w.Attributes.RegenMana); oMods += 1; }
if (w.Attributes.BonusStr > 0) { oDo += (110 / 8) * w.Attributes.BonusStr; oMods += 1; }
if (w.Attributes.BonusDex > 0) { oDo += (110 / 8) * w.Attributes.BonusDex; oMods += 1; }
if (w.Attributes.BonusInt > 0) { oDo += (110 / 8) * w.Attributes.BonusInt; oMods += 1; }
if (w.Attributes.BonusHits > 0) { oDo += 22 * w.Attributes.BonusHits; oMods += 1; }
if (w.Attributes.BonusStam > 0) { oDo += (100 / 8) * w.Attributes.BonusStam; oMods += 1; }
if (w.Attributes.BonusMana > 0) { oDo += (110 / 8) * w.Attributes.BonusMana; oMods += 1; }
if (w.Attributes.WeaponDamage > 0) { oDo += (2 * w.Attributes.WeaponDamage); oMods += 1; }
if (w.Attributes.WeaponSpeed > 0) { oDo += (110 / 30) * w.Attributes.WeaponSpeed; oMods += 1; }
if (w.Attributes.SpellDamage > 0) { oDo += (100 / 12) * w.Attributes.SpellDamage; oMods += 1; }
if (w.Attributes.CastRecovery > 0) { oDo += (40 * w.Attributes.CastRecovery); oMods += 1; }
if (w.Attributes.LowerManaCost > 0) { oDo += (110 / 8) * w.Attributes.LowerManaCost; oMods += 1; }
if (w.Attributes.LowerRegCost > 0) { oDo += (5 * w.Attributes.LowerRegCost); oMods += 1; }
if (w.Attributes.ReflectPhysical > 0) { oDo += (100 / 15) * w.Attributes.ReflectPhysical; oMods += 1; }
if (w.Attributes.EnhancePotions > 0) { oDo += (4 * w.Attributes.EnhancePotions); oMods += 1; }
if (w.Attributes.SpellChanneling > 0)
{
oDo += 100; oMods += 1;
if (w.Attributes.CastSpeed == 0) { oDo += 140; oMods += 1; }
if (w.Attributes.CastSpeed == 1) { oDo += 280; oMods += 1; }
}
else if (w.Attributes.CastSpeed > 0) { oDo += (140 * w.Attributes.CastSpeed); oMods += 1; }
if (w.Attributes.NightSight > 0) { oDo += 50; oMods += 1; }
if (w.WeaponAttributes.LowerStatReq > 0) { oDo += w.WeaponAttributes.LowerStatReq; oMods += 1; }
if (w.WeaponAttributes.HitLeechHits > 0) { oDo += (110 / 50) * w.WeaponAttributes.HitLeechHits; oMods += 1; }
if (w.WeaponAttributes.HitLeechStam > 0) { oDo += 2 * w.WeaponAttributes.HitLeechStam; oMods += 1; }
if (w.WeaponAttributes.HitLeechMana > 0) { oDo += (110 / 50) * w.WeaponAttributes.HitLeechMana; oMods += 1; }
if (w.WeaponAttributes.HitLowerAttack > 0) { oDo += (110 / 50) * w.WeaponAttributes.HitLowerAttack; oMods += 1; }
if (w.WeaponAttributes.HitLowerDefend > 0) { oDo += (130 / 50) * w.WeaponAttributes.HitLowerDefend; oMods += 1; }
if (w.WeaponAttributes.HitColdArea > 0) { oDo += (2 * w.WeaponAttributes.HitColdArea); oMods += 1; }
if (w.WeaponAttributes.HitFireArea > 0) { oDo += (2 * w.WeaponAttributes.HitFireArea); oMods += 1; }
if (w.WeaponAttributes.HitPoisonArea > 0) { oDo += (2 * w.WeaponAttributes.HitPoisonArea); oMods += 1; }
if (w.WeaponAttributes.HitEnergyArea > 0) { oDo += (2 * w.WeaponAttributes.HitEnergyArea); oMods += 1; }
if (w.WeaponAttributes.HitPhysicalArea > 0) { oDo += (2 * w.WeaponAttributes.HitPhysicalArea); oMods += 1; }
if (w.WeaponAttributes.HitMagicArrow > 0) { oDo += 2.4 * w.WeaponAttributes.HitMagicArrow; oMods += 1; }
if (w.WeaponAttributes.HitHarm > 0) { oDo += (110 / 50) * w.WeaponAttributes.HitHarm; oMods += 1; }
if (w.WeaponAttributes.HitFireball > 0) { oDo += 2.4 * w.WeaponAttributes.HitFireball; oMods += 1; }
if (w.WeaponAttributes.HitLightning > 0) { oDo += 2.4 * w.WeaponAttributes.HitLightning; oMods += 1; }
if (w.WeaponAttributes.HitDispel > 0) { oDo += (2 * w.WeaponAttributes.HitDispel); oMods += 1; }
if (w.WeaponAttributes.UseBestSkill > 0) { oDo += 150; oMods += 1; }
if (w.WeaponAttributes.MageWeapon > 0) { oDo += (20 * w.WeaponAttributes.MageWeapon); oMods += 1; }
if (w.WeaponAttributes.DurabilityBonus > 0) { oDo += w.WeaponAttributes.DurabilityBonus; oMods += 1; }
if (w.Slayer == SlayerName.Silver || w.Slayer == SlayerName.Repond || w.Slayer == SlayerName.ReptilianDeath || w.Slayer == SlayerName.Exorcism || w.Slayer == SlayerName.ArachnidDoom || w.Slayer == SlayerName.ElementalBan || w.Slayer == SlayerName.Fey) { oDo += 130; oMods += 1; }
else if (w.Slayer != SlayerName.None) { oDo += 110; oMods += 1; }
if (w.Slayer2 == SlayerName.Silver || w.Slayer2 == SlayerName.Repond || w.Slayer2 == SlayerName.ReptilianDeath || w.Slayer2 == SlayerName.Exorcism || w.Slayer2 == SlayerName.ArachnidDoom || w.Slayer2 == SlayerName.ElementalBan || w.Slayer2 == SlayerName.Fey) { oDo += 130; oMods += 1; }
else if (w.Slayer2 != SlayerName.None) { oDo += 110; oMods += 1; }
if (w.SkillBonuses.GetBonus(0) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(0); oMods += 1; }
if (w.SkillBonuses.GetBonus(1) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(1); oMods += 1; }
if (w.SkillBonuses.GetBonus(2) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(2); oMods += 1; }
if (w.SkillBonuses.GetBonus(3) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(3); oMods += 1; }
if (w.SkillBonuses.GetBonus(4) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(4); oMods += 1; }
oDo = Math.Round(oDo, 1);
oInt += Convert.ToInt32(oDo);
}
if (o is BaseArmor)
{
BaseArmor w = o as BaseArmor;
if (w.Attributes.DefendChance > 0) { oDo += (130 / 15) * w.Attributes.DefendChance; oMods += 1; }
if (w.Attributes.AttackChance > 0) { oDo += (130 / 15) * w.Attributes.AttackChance; oMods += 1; }
if (w.Attributes.Luck > 0) { oDo += w.Attributes.Luck; oMods += 1; }
if (w.Attributes.RegenHits > 0) { oDo += (50 * w.Attributes.RegenHits); oMods += 1; }
if (w.Attributes.RegenStam > 0) { oDo += (33.33 * w.Attributes.RegenStam); oMods += 1; }
if (w.Attributes.RegenMana > 0) { oDo += (50 * w.Attributes.RegenMana); oMods += 1; }
if (w.Attributes.BonusStr > 0) { oDo += (110 / 8) * w.Attributes.BonusStr; oMods += 1; }
if (w.Attributes.BonusDex > 0) { oDo += (110 / 8) * w.Attributes.BonusDex; oMods += 1; }
if (w.Attributes.BonusInt > 0) { oDo += (110 / 8) * w.Attributes.BonusInt; oMods += 1; }
if (w.Attributes.BonusHits > 0) { oDo += 22 * w.Attributes.BonusHits; oMods += 1; }
if (w.Attributes.BonusStam > 0) { oDo += (100 / 8) * w.Attributes.BonusStam; oMods += 1; }
if (w.Attributes.BonusMana > 0) { oDo += (110 / 8) * w.Attributes.BonusMana; oMods += 1; }
if (w.Attributes.WeaponDamage > 0) { oDo += (2 * w.Attributes.WeaponDamage); oMods += 1; }
if (w.Attributes.WeaponSpeed > 0) { oDo += (110 / 30) * w.Attributes.WeaponSpeed; oMods += 1; }
if (w.Attributes.SpellDamage > 0) { oDo += (100 / 12) * w.Attributes.SpellDamage; oMods += 1; }
if (w.Attributes.CastRecovery > 0) { oDo += (40 * w.Attributes.CastRecovery); oMods += 1; }
if (w.Attributes.LowerManaCost > 0) { oDo += (110 / 8) * w.Attributes.LowerManaCost; oMods += 1; }
if (w.Attributes.LowerRegCost > 0) { oDo += (5 * w.Attributes.LowerRegCost); oMods += 1; }
if (w.Attributes.ReflectPhysical > 0) { oDo += (100 / 15) * w.Attributes.ReflectPhysical; oMods += 1; }
if (w.Attributes.EnhancePotions > 0) { oDo += (4 * w.Attributes.EnhancePotions); oMods += 1; }
if (w.Attributes.SpellChanneling > 0)
{
oDo += 100; oMods += 1;
if (w.Attributes.CastSpeed == 0) { oDo += 140; oMods += 1; }
if (w.Attributes.CastSpeed == 1) { oDo += 280; oMods += 1; }
}
else if (w.Attributes.CastSpeed > 0) { oDo += (140 * w.Attributes.CastSpeed); oMods += 1; }
if (w.Attributes.NightSight > 0) { oDo += 50; oMods += 1; }
if (w.ArmorAttributes.LowerStatReq > 0) { oDo += w.ArmorAttributes.LowerStatReq; oMods += 1; }
if (w.ArmorAttributes.MageArmor > 0) { oDo += 140; oMods += 1; }
if (w.ArmorAttributes.DurabilityBonus > 0) { oDo += w.ArmorAttributes.DurabilityBonus; oMods += 1; }
if (w.Quality != ArmorQuality.Exceptional)
{
if (w.PhysicalBonus > 0) { oDo += (100 / 15) * w.PhysicalBonus; oMods += 1; }
if (w.FireBonus > 0) { oDo += (100 / 15) * w.FireBonus; oMods += 1; }
if (w.ColdBonus > 0) { oDo += (100 / 15) * w.ColdBonus; oMods += 1; }
if (w.PoisonBonus > 0) { oDo += (100 / 15) * w.PoisonBonus; oMods += 1; }
if (w.EnergyBonus > 0) { oDo += (100 / 15) * w.EnergyBonus; oMods += 1; }
}
if (w.SkillBonuses.GetBonus(0) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(0); oMods += 1; }
if (w.SkillBonuses.GetBonus(1) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(1); oMods += 1; }
if (w.SkillBonuses.GetBonus(2) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(2); oMods += 1; }
if (w.SkillBonuses.GetBonus(3) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(3); oMods += 1; }
if (w.SkillBonuses.GetBonus(4) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(4); oMods += 1; }
oDo = Math.Round(oDo, 1);
oInt += Convert.ToInt32(oDo);
}
if (o is BaseJewel)
{
BaseJewel w = o as BaseJewel;
if (w.Attributes.DefendChance > 0) { oDo += (130 / 15) * w.Attributes.DefendChance; oMods += 1; }
if (w.Attributes.AttackChance > 0) { oDo += (130 / 15) * w.Attributes.AttackChance; oMods += 1; }
if (w.Attributes.Luck > 0) { oDo += w.Attributes.Luck; oMods += 1; }
if (w.Attributes.RegenHits > 0) { oDo += (50 * w.Attributes.RegenHits); oMods += 1; }
if (w.Attributes.RegenStam > 0) { oDo += (33.33 * w.Attributes.RegenStam); oMods += 1; }
if (w.Attributes.RegenMana > 0) { oDo += (50 * w.Attributes.RegenMana); oMods += 1; }
if (w.Attributes.BonusStr > 0) { oDo += (110 / 8) * w.Attributes.BonusStr; oMods += 1; }
if (w.Attributes.BonusDex > 0) { oDo += (110 / 8) * w.Attributes.BonusDex; oMods += 1; }
if (w.Attributes.BonusInt > 0) { oDo += (110 / 8) * w.Attributes.BonusInt; oMods += 1; }
if (w.Attributes.BonusHits > 0) { oDo += 22 * w.Attributes.BonusHits; oMods += 1; }
if (w.Attributes.BonusStam > 0) { oDo += (100 / 8) * w.Attributes.BonusStam; oMods += 1; }
if (w.Attributes.BonusMana > 0) { oDo += (110 / 8) * w.Attributes.BonusMana; oMods += 1; }
if (w.Attributes.WeaponDamage > 0) { oDo += (2 * w.Attributes.WeaponDamage); oMods += 1; }
if (w.Attributes.WeaponSpeed > 0) { oDo += (110 / 30) * w.Attributes.WeaponSpeed; oMods += 1; }
if (w.Attributes.SpellDamage > 0) { oDo += (100 / 12) * w.Attributes.SpellDamage; oMods += 1; }
if (w.Attributes.CastRecovery > 0) { oDo += (40 * w.Attributes.CastRecovery); oMods += 1; }
if (w.Attributes.LowerManaCost > 0) { oDo += (110 / 8) * w.Attributes.LowerManaCost; oMods += 1; }
if (w.Attributes.LowerRegCost > 0) { oDo += (5 * w.Attributes.LowerRegCost); oMods += 1; }
if (w.Attributes.ReflectPhysical > 0) { oDo += (100 / 15) * w.Attributes.ReflectPhysical; oMods += 1; }
if (w.Attributes.EnhancePotions > 0) { oDo += (4 * w.Attributes.EnhancePotions); oMods += 1; }
if (w.Attributes.SpellChanneling > 0)
{
oDo += 100; oMods += 1;
if (w.Attributes.CastSpeed == 0) { oDo += 140; oMods += 1; }
if (w.Attributes.CastSpeed == 1) { oDo += 280; oMods += 1; }
}
else if (w.Attributes.CastSpeed > 0) { oDo += (140 * w.Attributes.CastSpeed); oMods += 1; }
if (w.Attributes.NightSight > 0) { oDo += 50; oMods += 1; }
if (w.Resistances.Physical > 0) { oDo += (100 / 15) * w.Resistances.Physical; oMods += 1; }
if (w.Resistances.Fire > 0) { oDo += (100 / 15) * w.Resistances.Fire; oMods += 1; }
if (w.Resistances.Cold > 0) { oDo += (100 / 15) * w.Resistances.Cold; oMods += 1; }
if (w.Resistances.Poison > 0) { oDo += (100 / 15) * w.Resistances.Poison; oMods += 1; }
if (w.Resistances.Energy > 0) { oDo += (100 / 15) * w.Resistances.Energy; oMods += 1; }
if (w.SkillBonuses.GetBonus(0) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(0); oMods += 1; }
if (w.SkillBonuses.GetBonus(1) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(1); oMods += 1; }
if (w.SkillBonuses.GetBonus(2) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(2); oMods += 1; }
if (w.SkillBonuses.GetBonus(3) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(3); oMods += 1; }
if (w.SkillBonuses.GetBonus(4) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(4); oMods += 1; }
oDo = Math.Round(oDo, 1);
oInt += Convert.ToInt32(oDo);
}
if (o is BaseHat)
{
BaseHat w = o as BaseHat;
if (w.Attributes.DefendChance > 0) { oDo += (130 / 15) * w.Attributes.DefendChance; oMods += 1; }
if (w.Attributes.AttackChance > 0) { oDo += (130 / 15) * w.Attributes.AttackChance; oMods += 1; }
if (w.Attributes.Luck > 0) { oDo += w.Attributes.Luck; oMods += 1; }
if (w.Attributes.RegenHits > 0) { oDo += (50 * w.Attributes.RegenHits); oMods += 1; }
if (w.Attributes.RegenStam > 0) { oDo += (33.33 * w.Attributes.RegenStam); oMods += 1; }
if (w.Attributes.RegenMana > 0) { oDo += (50 * w.Attributes.RegenMana); oMods += 1; }
if (w.Attributes.BonusStr > 0) { oDo += (110 / 8) * w.Attributes.BonusStr; oMods += 1; }
if (w.Attributes.BonusDex > 0) { oDo += (110 / 8) * w.Attributes.BonusDex; oMods += 1; }
if (w.Attributes.BonusInt > 0) { oDo += (110 / 8) * w.Attributes.BonusInt; oMods += 1; }
if (w.Attributes.BonusHits > 0) { oDo += 22 * w.Attributes.BonusHits; oMods += 1; }
if (w.Attributes.BonusStam > 0) { oDo += (100 / 8) * w.Attributes.BonusStam; oMods += 1; }
if (w.Attributes.BonusMana > 0) { oDo += (110 / 8) * w.Attributes.BonusMana; oMods += 1; }
if (w.Attributes.WeaponDamage > 0) { oDo += (2 * w.Attributes.WeaponDamage); oMods += 1; }
if (w.Attributes.WeaponSpeed > 0) { oDo += (110 / 30) * w.Attributes.WeaponSpeed; oMods += 1; }
if (w.Attributes.SpellDamage > 0) { oDo += (100 / 12) * w.Attributes.SpellDamage; oMods += 1; }
if (w.Attributes.CastRecovery > 0) { oDo += (40 * w.Attributes.CastRecovery); oMods += 1; }
if (w.Attributes.LowerManaCost > 0) { oDo += (110 / 8) * w.Attributes.LowerManaCost; oMods += 1; }
if (w.Attributes.LowerRegCost > 0) { oDo += (5 * w.Attributes.LowerRegCost); oMods += 1; }
if (w.Attributes.ReflectPhysical > 0) { oDo += (100 / 15) * w.Attributes.ReflectPhysical; oMods += 1; }
if (w.Attributes.EnhancePotions > 0) { oDo += (4 * w.Attributes.EnhancePotions); oMods += 1; }
if (w.Attributes.SpellChanneling > 0)
{
oDo += 100; oMods += 1;
if (w.Attributes.CastSpeed == 0) { oDo += 140; oMods += 1; }
if (w.Attributes.CastSpeed == 1) { oDo += 280; oMods += 1; }
}
else if (w.Attributes.CastSpeed > 0) { oDo += (140 * w.Attributes.CastSpeed); oMods += 1; }
if (w.Attributes.NightSight > 0) { oDo += 50; oMods += 1; }
if (w.Resistances.Physical > 0) { oDo += (100 / 15) * w.Resistances.Physical; oMods += 1; }
if (w.Resistances.Fire > 0) { oDo += (100 / 15) * w.Resistances.Fire; oMods += 1; }
if (w.Resistances.Cold > 0) { oDo += (100 / 15) * w.Resistances.Cold; oMods += 1; }
if (w.Resistances.Poison > 0) { oDo += (100 / 15) * w.Resistances.Poison; oMods += 1; }
if (w.Resistances.Energy > 0) { oDo += (100 / 15) * w.Resistances.Energy; oMods += 1; }
if (w.SkillBonuses.GetBonus(0) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(0); oMods += 1; }
if (w.SkillBonuses.GetBonus(1) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(1); oMods += 1; }
if (w.SkillBonuses.GetBonus(2) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(2); oMods += 1; }
if (w.SkillBonuses.GetBonus(3) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(3); oMods += 1; }
if (w.SkillBonuses.GetBonus(4) > 0) { oDo += (140 / 15) * w.SkillBonuses.GetBonus(4); oMods += 1; }
oDo = Math.Round(oDo, 1);
oInt += Convert.ToInt32(oDo);
}
if (oInt > 0 && oInt <= 200)
{
from.LocalOverheadMessage(MessageType.Regular, 2499, true, "You conclude that item will magically unravel into: Magical Residue");
if (from.Skills[SkillName.Imbuing].Base >= 100.0)
from.LocalOverheadMessage(MessageType.Regular, 2499, true, String.Format("Item Intensity: {0}", oInt));
m_IDItem.Charges--;
}
else if (oInt > 200 && oInt < 480)
{
if (from.Skills[SkillName.Imbuing].Base >= 45.0)
{
from.LocalOverheadMessage(MessageType.Regular, 2499, true, "You conclude that item will magically unravel into: Enchanted Essence");
if (from.Skills[SkillName.Imbuing].Base >= 100.0)
from.LocalOverheadMessage(MessageType.Regular, 2499, true, String.Format("Item Intensity: {0}", oInt));
m_IDItem.Charges--;
}
else
{
from.LocalOverheadMessage(MessageType.Regular, 2499, true, "Your Imbuing skill is not high enough to identify the imbuing ingredient.");
}
}
else if (oInt >= 480)
{
if (from.Skills[SkillName.Imbuing].Base >= 95.0)
{
from.LocalOverheadMessage(MessageType.Regular, 2499, true, "You conclude that item will magically unravel into: Relic Fragment");
if (from.Skills[SkillName.Imbuing].Base >= 100.0)
from.LocalOverheadMessage(MessageType.Regular, 2499, true, String.Format("Item Intensity: {0}", oInt));
m_IDItem.Charges--;
}
else
{
from.LocalOverheadMessage(MessageType.Regular, 2499, true, "Your Imbuing skill is not high enough to identify the imbuing ingredient.");
}
}
else
{
from.LocalOverheadMessage(MessageType.Regular, 2499, true, "You conclude that item cannot be magically unraveled. It appears to possess little to no magic.");
}
}
else if (o is Mobile)
{
((Mobile)o).OnSingleClick(from);
}
else
{
from.LocalOverheadMessage(MessageType.Regular, 2499, true, "You conclude that item cannot be magically unraveled.");
}
}
}
}
}
RunUO - [www.runuo.com] Version 2.2, Build 4543.30170
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 64-bit processors
Scripts: Compiling C# scripts...failed (1 errors, 26 warnings)
Errors:
+ Expansions/Stygian Abyss/SFImbuing/IDItem.cs:
CS0103: Line 111: The name 'm_IDItem' does not exist in the current context
CS0103: Line 120: The name 'm_IDItem' does not exist in the current context
CS0103: Line 120: The name 'm_IDItem' does not exist in the current context
CS0103: Line 128: The name 'm_IDItem' does not exist in the current context
CS0103: Line 128: The name 'm_IDItem' does not exist in the current context
CS0103: Line 128: The name 'm_IDItem' does not exist in the current context
CS0103: Line 128: The name 'm_IDItem' does not exist in the current context
CS0103: Line 138: The name 'm_IDItem' does not exist in the current context
CS0103: Line 386: The name 'MessageType' does not exist in the current conte
xt
CS0103: Line 388: The name 'MessageType' does not exist in the current conte
xt
CS0103: Line 390: The name 'm_IDItem' does not exist in the current context
CS0103: Line 396: The name 'MessageType' does not exist in the current conte
xt
CS0103: Line 398: The name 'MessageType' does not exist in the current conte
xt
CS0103: Line 400: The name 'm_IDItem' does not exist in the current context
CS0103: Line 404: The name 'MessageType' does not exist in the current conte
xt
CS0103: Line 411: The name 'MessageType' does not exist in the current conte
xt
CS0103: Line 413: The name 'MessageType' does not exist in the current conte
xt
CS0103: Line 415: The name 'm_IDItem' does not exist in the current context
CS0103: Line 419: The name 'MessageType' does not exist in the current conte
xt
CS0103: Line 424: The name 'MessageType' does not exist in the current conte
xt
CS0103: Line 433: The name 'MessageType' does not exist in the current conte
xt
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
This works but you cant equip and use it must be in the pack. How can I make it so you must equip to use only.
... [equipable item] ... on D-click not equip....
if (!IsChildOf(from.Backpack) && ( RootParent != null && (Mobile)RootParent != from ) )
{
from.SendMessage("This item must be equipped or in your pack before you are able to use it");
}
!IsChildOf(from.Backpack)
( RootParent != null && (Mobile)RootParent != from )
if( from.Weapon == null || from.Weapon.Deleted || from.Weapon != m_IDItem ) // note that m_IDItem is for use within the InternalTarget private class, when called from the OnDoubleClick method you would use "this" to refer to the current class (the object of type IDItem that the Mobile "from" is clicking)
{
from.SendMessage( "You must equip the staff in order to use it." );
return;
}
Any chance the ingredients will be updated? I noticed that some of the required ingredients are off by quite a bit. For example:
Hit Physical Area on OSI requires a Diamond, a Blue Diamond, and Magical Residue.
Is it possible to edit the recipes to use two of ONE particular resource, instead of needing to use one of each type?
Yup you've got itAh okay.. so to use two different gems in the same recipe, just list any gems I'd like to use under m_B as well (keeping their original listing under m_Gem intact), correct?