#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.
This commit is contained in:
parent
b51c58f514
commit
3045c83799
3512 changed files with 627673 additions and 0 deletions
690
Scripts/Items/Skill Items/Tools/BaseRunicTool.cs
Normal file
690
Scripts/Items/Skill Items/Tools/BaseRunicTool.cs
Normal file
|
|
@ -0,0 +1,690 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseRunicTool : BaseTool
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get{ return m_Resource; }
|
||||
set{ m_Resource = value; Hue = CraftResources.GetHue( m_Resource ); InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public BaseRunicTool( CraftResource resource, int itemID ) : base( itemID )
|
||||
{
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseRunicTool( CraftResource resource, int uses, int itemID ) : base( uses, itemID )
|
||||
{
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseRunicTool( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.Write( (int) m_Resource );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static bool m_IsRunicTool;
|
||||
private static int m_LuckChance;
|
||||
|
||||
private static int Scale( int min, int max, int low, int high )
|
||||
{
|
||||
int percent;
|
||||
|
||||
if ( m_IsRunicTool )
|
||||
{
|
||||
percent = Utility.RandomMinMax( min, max );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Behold, the worst system ever!
|
||||
int v = Utility.RandomMinMax( 0, 10000 );
|
||||
|
||||
v = (int) Math.Sqrt( v );
|
||||
v = 100 - v;
|
||||
|
||||
if ( LootPack.CheckLuck( m_LuckChance ) )
|
||||
v += 10;
|
||||
|
||||
if ( v < min )
|
||||
v = min;
|
||||
else if ( v > max )
|
||||
v = max;
|
||||
|
||||
percent = v;
|
||||
}
|
||||
|
||||
int scaledBy = Math.Abs( high - low ) + 1;
|
||||
|
||||
if ( scaledBy != 0 )
|
||||
scaledBy = 10000 / scaledBy;
|
||||
|
||||
percent *= (10000 + scaledBy);
|
||||
|
||||
return low + (((high - low) * percent) / 1000001);
|
||||
}
|
||||
|
||||
private static void ApplyAttribute( AosAttributes attrs, int min, int max, AosAttribute attr, int low, int high )
|
||||
{
|
||||
ApplyAttribute( attrs, min, max, attr, low, high, 1 );
|
||||
}
|
||||
|
||||
private static void ApplyAttribute( AosAttributes attrs, int min, int max, AosAttribute attr, int low, int high, int scale )
|
||||
{
|
||||
if ( attr == AosAttribute.CastSpeed )
|
||||
attrs[attr] += Scale( min, max, low / scale, high / scale ) * scale;
|
||||
else
|
||||
attrs[attr] = Scale( min, max, low / scale, high / scale ) * scale;
|
||||
|
||||
if ( attr == AosAttribute.SpellChanneling )
|
||||
attrs[AosAttribute.CastSpeed] -= 1;
|
||||
}
|
||||
|
||||
private static void ApplyAttribute( AosArmorAttributes attrs, int min, int max, AosArmorAttribute attr, int low, int high )
|
||||
{
|
||||
attrs[attr] = Scale( min, max, low, high );
|
||||
}
|
||||
|
||||
private static void ApplyAttribute( AosArmorAttributes attrs, int min, int max, AosArmorAttribute attr, int low, int high, int scale )
|
||||
{
|
||||
attrs[attr] = Scale( min, max, low / scale, high / scale ) * scale;
|
||||
}
|
||||
|
||||
private static void ApplyAttribute( AosWeaponAttributes attrs, int min, int max, AosWeaponAttribute attr, int low, int high )
|
||||
{
|
||||
attrs[attr] = Scale( min, max, low, high );
|
||||
}
|
||||
|
||||
private static void ApplyAttribute( AosWeaponAttributes attrs, int min, int max, AosWeaponAttribute attr, int low, int high, int scale )
|
||||
{
|
||||
attrs[attr] = Scale( min, max, low / scale, high / scale ) * scale;
|
||||
}
|
||||
|
||||
private static void ApplyAttribute( AosElementAttributes attrs, int min, int max, AosElementAttribute attr, int low, int high )
|
||||
{
|
||||
attrs[attr] = Scale( min, max, low, high );
|
||||
}
|
||||
|
||||
private static void ApplyAttribute( AosElementAttributes attrs, int min, int max, AosElementAttribute attr, int low, int high, int scale )
|
||||
{
|
||||
attrs[attr] = Scale( min, max, low / scale, high / scale ) * scale;
|
||||
}
|
||||
|
||||
private static SkillName[] m_PossibleBonusSkills = new SkillName[]
|
||||
{
|
||||
SkillName.Swords,
|
||||
SkillName.Fencing,
|
||||
SkillName.Macing,
|
||||
SkillName.Archery,
|
||||
SkillName.Wrestling,
|
||||
SkillName.Parry,
|
||||
SkillName.Tactics,
|
||||
SkillName.Anatomy,
|
||||
SkillName.Healing,
|
||||
SkillName.Magery,
|
||||
SkillName.Meditation,
|
||||
SkillName.EvalInt,
|
||||
SkillName.MagicResist,
|
||||
SkillName.AnimalTaming,
|
||||
SkillName.AnimalLore,
|
||||
SkillName.Veterinary,
|
||||
SkillName.Musicianship,
|
||||
SkillName.Provocation,
|
||||
SkillName.Discordance,
|
||||
SkillName.Peacemaking,
|
||||
SkillName.Chivalry,
|
||||
SkillName.Focus,
|
||||
SkillName.Necromancy,
|
||||
SkillName.Stealing,
|
||||
SkillName.Stealth,
|
||||
SkillName.SpiritSpeak,
|
||||
SkillName.Bushido,
|
||||
SkillName.Ninjitsu
|
||||
};
|
||||
|
||||
private static SkillName[] m_PossibleSpellbookSkills = new SkillName[]
|
||||
{
|
||||
SkillName.Magery,
|
||||
SkillName.Meditation,
|
||||
SkillName.EvalInt,
|
||||
SkillName.MagicResist
|
||||
};
|
||||
|
||||
private static void ApplySkillBonus( AosSkillBonuses attrs, int min, int max, int index, int low, int high )
|
||||
{
|
||||
List<SkillName> possibleSkills = new List<SkillName>( attrs.Owner is Spellbook ? m_PossibleSpellbookSkills : m_PossibleBonusSkills );
|
||||
int count = ( Core.SE ? possibleSkills.Count : possibleSkills.Count - 2 );
|
||||
|
||||
SkillName sk, check;
|
||||
double bonus;
|
||||
bool found;
|
||||
|
||||
do
|
||||
{
|
||||
found = false;
|
||||
sk = possibleSkills[Utility.Random( count-- )];
|
||||
possibleSkills.Remove(sk);
|
||||
|
||||
for ( int i = 0; !found && i < 5; ++i )
|
||||
found = ( attrs.GetValues( i, out check, out bonus ) && check == sk );
|
||||
} while ( found && count > 0 );
|
||||
|
||||
attrs.SetValues( index, sk, Scale( min, max, low, high ) );
|
||||
}
|
||||
|
||||
private static void ApplyResistance( BaseArmor ar, int min, int max, ResistanceType res, int low, int high )
|
||||
{
|
||||
switch ( res )
|
||||
{
|
||||
case ResistanceType.Physical: ar.PhysicalBonus += Scale( min, max, low, high ); break;
|
||||
case ResistanceType.Fire: ar.FireBonus += Scale( min, max, low, high ); break;
|
||||
case ResistanceType.Cold: ar.ColdBonus += Scale( min, max, low, high ); break;
|
||||
case ResistanceType.Poison: ar.PoisonBonus += Scale( min, max, low, high ); break;
|
||||
case ResistanceType.Energy: ar.EnergyBonus += Scale( min, max, low, high ); break;
|
||||
}
|
||||
}
|
||||
|
||||
private const int MaxProperties = 32;
|
||||
private static BitArray m_Props = new BitArray( MaxProperties );
|
||||
private static int[] m_Possible = new int[MaxProperties];
|
||||
|
||||
public static int GetUniqueRandom( int count )
|
||||
{
|
||||
int avail = 0;
|
||||
|
||||
for ( int i = 0; i < count; ++i )
|
||||
{
|
||||
if ( !m_Props[i] )
|
||||
m_Possible[avail++] = i;
|
||||
}
|
||||
|
||||
if ( avail == 0 )
|
||||
return -1;
|
||||
|
||||
int v = m_Possible[Utility.Random( avail )];
|
||||
|
||||
m_Props.Set( v, true );
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
public void ApplyAttributesTo( BaseWeapon weapon )
|
||||
{
|
||||
CraftResourceInfo resInfo = CraftResources.GetInfo( m_Resource );
|
||||
|
||||
if ( resInfo == null )
|
||||
return;
|
||||
|
||||
CraftAttributeInfo attrs = resInfo.AttributeInfo;
|
||||
|
||||
if ( attrs == null )
|
||||
return;
|
||||
|
||||
int attributeCount = Utility.RandomMinMax( attrs.RunicMinAttributes, attrs.RunicMaxAttributes );
|
||||
int min = attrs.RunicMinIntensity;
|
||||
int max = attrs.RunicMaxIntensity;
|
||||
|
||||
ApplyAttributesTo( weapon, true, 0, attributeCount, min, max );
|
||||
}
|
||||
|
||||
public static void ApplyAttributesTo( BaseWeapon weapon, int attributeCount, int min, int max )
|
||||
{
|
||||
ApplyAttributesTo( weapon, false, 0, attributeCount, min, max );
|
||||
}
|
||||
|
||||
public static void ApplyAttributesTo( BaseWeapon weapon, bool isRunicTool, int luckChance, int attributeCount, int min, int max )
|
||||
{
|
||||
m_IsRunicTool = isRunicTool;
|
||||
m_LuckChance = luckChance;
|
||||
|
||||
AosAttributes primary = weapon.Attributes;
|
||||
AosWeaponAttributes secondary = weapon.WeaponAttributes;
|
||||
|
||||
m_Props.SetAll( false );
|
||||
|
||||
if ( weapon is BaseRanged )
|
||||
m_Props.Set( 2, true ); // ranged weapons cannot be ubws or mageweapon
|
||||
|
||||
for ( int i = 0; i < attributeCount; ++i )
|
||||
{
|
||||
int random = GetUniqueRandom( 25 );
|
||||
|
||||
if ( random == -1 )
|
||||
break;
|
||||
|
||||
switch ( random )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
switch ( Utility.Random( 5 ) )
|
||||
{
|
||||
case 0: ApplyAttribute( secondary, min, max, AosWeaponAttribute.HitPhysicalArea,2, 50, 2 ); break;
|
||||
case 1: ApplyAttribute( secondary, min, max, AosWeaponAttribute.HitFireArea, 2, 50, 2 ); break;
|
||||
case 2: ApplyAttribute( secondary, min, max, AosWeaponAttribute.HitColdArea, 2, 50, 2 ); break;
|
||||
case 3: ApplyAttribute( secondary, min, max, AosWeaponAttribute.HitPoisonArea, 2, 50, 2 ); break;
|
||||
case 4: ApplyAttribute( secondary, min, max, AosWeaponAttribute.HitEnergyArea, 2, 50, 2 ); break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
switch ( Utility.Random( 4 ) )
|
||||
{
|
||||
case 0: ApplyAttribute( secondary, min, max, AosWeaponAttribute.HitMagicArrow, 2, 50, 2 ); break;
|
||||
case 1: ApplyAttribute( secondary, min, max, AosWeaponAttribute.HitHarm, 2, 50, 2 ); break;
|
||||
case 2: ApplyAttribute( secondary, min, max, AosWeaponAttribute.HitFireball, 2, 50, 2 ); break;
|
||||
case 3: ApplyAttribute( secondary, min, max, AosWeaponAttribute.HitLightning, 2, 50, 2 ); break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
switch ( Utility.Random( 2 ) )
|
||||
{
|
||||
case 0: ApplyAttribute( secondary, min, max, AosWeaponAttribute.UseBestSkill, 1, 1 ); break;
|
||||
case 1: ApplyAttribute( secondary, min, max, AosWeaponAttribute.MageWeapon, 1, 10 ); break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 3: ApplyAttribute( primary, min, max, AosAttribute.WeaponDamage, 1, 50 ); break;
|
||||
case 4: ApplyAttribute( primary, min, max, AosAttribute.DefendChance, 1, 15 ); break;
|
||||
case 5: ApplyAttribute( primary, min, max, AosAttribute.CastSpeed, 1, 1 ); break;
|
||||
case 6: ApplyAttribute( primary, min, max, AosAttribute.AttackChance, 1, 15 ); break;
|
||||
case 7: ApplyAttribute( primary, min, max, AosAttribute.Luck, 1, 100 ); break;
|
||||
case 8: ApplyAttribute( primary, min, max, AosAttribute.WeaponSpeed, 5, 30, 5 ); break;
|
||||
case 9: ApplyAttribute( primary, min, max, AosAttribute.SpellChanneling, 1, 1 ); break;
|
||||
case 10: ApplyAttribute( secondary, min, max, AosWeaponAttribute.HitDispel, 2, 50, 2 ); break;
|
||||
case 11: ApplyAttribute( secondary, min, max, AosWeaponAttribute.HitLeechHits, 2, 50, 2 ); break;
|
||||
case 12: ApplyAttribute( secondary, min, max, AosWeaponAttribute.HitLowerAttack, 2, 50, 2 ); break;
|
||||
case 13: ApplyAttribute( secondary, min, max, AosWeaponAttribute.HitLowerDefend, 2, 50, 2 ); break;
|
||||
case 14: ApplyAttribute( secondary, min, max, AosWeaponAttribute.HitLeechMana, 2, 50, 2 ); break;
|
||||
case 15: ApplyAttribute( secondary, min, max, AosWeaponAttribute.HitLeechStam, 2, 50, 2 ); break;
|
||||
case 16: ApplyAttribute( secondary, min, max, AosWeaponAttribute.LowerStatReq, 10, 100, 10 ); break;
|
||||
case 17: ApplyAttribute( secondary, min, max, AosWeaponAttribute.ResistPhysicalBonus, 1, 15 ); break;
|
||||
case 18: ApplyAttribute( secondary, min, max, AosWeaponAttribute.ResistFireBonus, 1, 15 ); break;
|
||||
case 19: ApplyAttribute( secondary, min, max, AosWeaponAttribute.ResistColdBonus, 1, 15 ); break;
|
||||
case 20: ApplyAttribute( secondary, min, max, AosWeaponAttribute.ResistPoisonBonus, 1, 15 ); break;
|
||||
case 21: ApplyAttribute( secondary, min, max, AosWeaponAttribute.ResistEnergyBonus, 1, 15 ); break;
|
||||
case 22: ApplyAttribute( secondary, min, max, AosWeaponAttribute.DurabilityBonus, 10, 100, 10 ); break;
|
||||
case 23: weapon.Slayer = GetRandomSlayer(); break;
|
||||
case 24: GetElementalDamages( weapon ); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void GetElementalDamages( BaseWeapon weapon )
|
||||
{
|
||||
GetElementalDamages( weapon, true );
|
||||
}
|
||||
|
||||
public static void GetElementalDamages( BaseWeapon weapon, bool randomizeOrder )
|
||||
{
|
||||
int fire, phys, cold, nrgy, pois, chaos, direct;
|
||||
|
||||
weapon.GetDamageTypes( null, out phys, out fire, out cold, out pois, out nrgy, out chaos, out direct );
|
||||
|
||||
int totalDamage = phys;
|
||||
|
||||
AosElementAttribute[] attrs = new AosElementAttribute[]
|
||||
{
|
||||
AosElementAttribute.Cold,
|
||||
AosElementAttribute.Energy,
|
||||
AosElementAttribute.Fire,
|
||||
AosElementAttribute.Poison
|
||||
};
|
||||
|
||||
if( randomizeOrder )
|
||||
{
|
||||
for( int i = 0; i < attrs.Length; i++ )
|
||||
{
|
||||
int rand = Utility.Random( attrs.Length );
|
||||
AosElementAttribute temp = attrs[i];
|
||||
|
||||
attrs[i] = attrs[rand];
|
||||
attrs[rand] = temp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
totalDamage = AssignElementalDamage( weapon, AosElementAttribute.Cold, totalDamage );
|
||||
totalDamage = AssignElementalDamage( weapon, AosElementAttribute.Energy, totalDamage );
|
||||
totalDamage = AssignElementalDamage( weapon, AosElementAttribute.Fire, totalDamage );
|
||||
totalDamage = AssignElementalDamage( weapon, AosElementAttribute.Poison, totalDamage );
|
||||
|
||||
weapon.AosElementDamages[AosElementAttribute.Physical] = 100 - totalDamage;
|
||||
* */
|
||||
|
||||
for( int i = 0; i < attrs.Length; i++ )
|
||||
totalDamage = AssignElementalDamage( weapon, attrs[i], totalDamage );
|
||||
|
||||
|
||||
//Order is Cold, Energy, Fire, Poison -> Physical left
|
||||
//Cannot be looped, AoselementAttribute is 'out of order'
|
||||
|
||||
weapon.Hue = weapon.GetElementalDamageHue();
|
||||
}
|
||||
|
||||
private static int AssignElementalDamage( BaseWeapon weapon, AosElementAttribute attr, int totalDamage )
|
||||
{
|
||||
if( totalDamage <= 0 )
|
||||
return 0;
|
||||
|
||||
int random = Utility.Random( (int)(totalDamage/10) + 1 ) * 10;
|
||||
weapon.AosElementDamages[attr] = random;
|
||||
|
||||
return (totalDamage - random);
|
||||
}
|
||||
|
||||
public static SlayerName GetRandomSlayer()
|
||||
{
|
||||
// TODO: Check random algorithm on OSI
|
||||
|
||||
SlayerGroup[] groups = SlayerGroup.Groups;
|
||||
|
||||
if ( groups.Length == 0 )
|
||||
return SlayerName.None;
|
||||
|
||||
SlayerGroup group = groups[Utility.Random( groups.Length -1 )]; //-1 To Exclude the Fey Slayer which appears ONLY on a certain artifact.
|
||||
SlayerEntry entry;
|
||||
|
||||
if ( 10 > Utility.Random( 100 ) ) // 10% chance to do super slayer
|
||||
{
|
||||
entry = group.Super;
|
||||
}
|
||||
else
|
||||
{
|
||||
SlayerEntry[] entries = group.Entries;
|
||||
|
||||
if ( entries.Length == 0 )
|
||||
return SlayerName.None;
|
||||
|
||||
entry = entries[Utility.Random( entries.Length )];
|
||||
}
|
||||
|
||||
return entry.Name;
|
||||
}
|
||||
|
||||
public void ApplyAttributesTo( BaseArmor armor )
|
||||
{
|
||||
CraftResourceInfo resInfo = CraftResources.GetInfo( m_Resource );
|
||||
|
||||
if ( resInfo == null )
|
||||
return;
|
||||
|
||||
CraftAttributeInfo attrs = resInfo.AttributeInfo;
|
||||
|
||||
if ( attrs == null )
|
||||
return;
|
||||
|
||||
int attributeCount = Utility.RandomMinMax( attrs.RunicMinAttributes, attrs.RunicMaxAttributes );
|
||||
int min = attrs.RunicMinIntensity;
|
||||
int max = attrs.RunicMaxIntensity;
|
||||
|
||||
ApplyAttributesTo( armor, true, 0, attributeCount, min, max );
|
||||
}
|
||||
|
||||
public static void ApplyAttributesTo( BaseArmor armor, int attributeCount, int min, int max )
|
||||
{
|
||||
ApplyAttributesTo( armor, false, 0, attributeCount, min, max );
|
||||
}
|
||||
|
||||
public static void ApplyAttributesTo( BaseArmor armor, bool isRunicTool, int luckChance, int attributeCount, int min, int max )
|
||||
{
|
||||
m_IsRunicTool = isRunicTool;
|
||||
m_LuckChance = luckChance;
|
||||
|
||||
AosAttributes primary = armor.Attributes;
|
||||
AosArmorAttributes secondary = armor.ArmorAttributes;
|
||||
|
||||
m_Props.SetAll( false );
|
||||
|
||||
bool isShield = ( armor is BaseShield );
|
||||
int baseCount = ( isShield ? 7 : 20 );
|
||||
int baseOffset = ( isShield ? 0 : 4 );
|
||||
|
||||
if ( !isShield && armor.MeditationAllowance == ArmorMeditationAllowance.All )
|
||||
m_Props.Set( 3, true ); // remove mage armor from possible properties
|
||||
if ( armor.Resource >= CraftResource.RegularLeather && armor.Resource <= CraftResource.BarbedLeather )
|
||||
{
|
||||
m_Props.Set( 0, true ); // remove lower requirements from possible properties for leather armor
|
||||
m_Props.Set( 2, true ); // remove durability bonus from possible properties
|
||||
}
|
||||
if ( armor.RequiredRace == Race.Elf )
|
||||
m_Props.Set( 7, true ); // elves inherently have night sight and elf only armor doesn't get night sight as a mod
|
||||
|
||||
for ( int i = 0; i < attributeCount; ++i )
|
||||
{
|
||||
int random = GetUniqueRandom( baseCount );
|
||||
|
||||
if ( random == -1 )
|
||||
break;
|
||||
|
||||
random += baseOffset;
|
||||
|
||||
switch ( random )
|
||||
{
|
||||
/* Begin Sheilds */
|
||||
case 0: ApplyAttribute( primary, min, max, AosAttribute.SpellChanneling, 1, 1 ); break;
|
||||
case 1: ApplyAttribute( primary, min, max, AosAttribute.DefendChance, 1, 15 ); break;
|
||||
case 2:
|
||||
if (Core.ML) {
|
||||
ApplyAttribute( primary, min, max, AosAttribute.ReflectPhysical, 1, 15 );
|
||||
} else {
|
||||
ApplyAttribute( primary, min, max, AosAttribute.AttackChance, 1, 15 );
|
||||
}
|
||||
break;
|
||||
case 3: ApplyAttribute( primary, min, max, AosAttribute.CastSpeed, 1, 1 ); break;
|
||||
/* Begin Armor */
|
||||
case 4: ApplyAttribute( secondary, min, max, AosArmorAttribute.LowerStatReq, 10, 100, 10 ); break;
|
||||
case 5: ApplyAttribute( secondary, min, max, AosArmorAttribute.SelfRepair, 1, 5 ); break;
|
||||
case 6: ApplyAttribute( secondary, min, max, AosArmorAttribute.DurabilityBonus, 10, 100, 10 ); break;
|
||||
/* End Shields */
|
||||
case 7: ApplyAttribute( secondary, min, max, AosArmorAttribute.MageArmor, 1, 1 ); break;
|
||||
case 8: ApplyAttribute( primary, min, max, AosAttribute.RegenHits, 1, 2 ); break;
|
||||
case 9: ApplyAttribute( primary, min, max, AosAttribute.RegenStam, 1, 3 ); break;
|
||||
case 10: ApplyAttribute( primary, min, max, AosAttribute.RegenMana, 1, 2 ); break;
|
||||
case 11: ApplyAttribute( primary, min, max, AosAttribute.NightSight, 1, 1 ); break;
|
||||
case 12: ApplyAttribute( primary, min, max, AosAttribute.BonusHits, 1, 5 ); break;
|
||||
case 13: ApplyAttribute( primary, min, max, AosAttribute.BonusStam, 1, 8 ); break;
|
||||
case 14: ApplyAttribute( primary, min, max, AosAttribute.BonusMana, 1, 8 ); break;
|
||||
case 15: ApplyAttribute( primary, min, max, AosAttribute.LowerManaCost, 1, 8 ); break;
|
||||
case 16: ApplyAttribute( primary, min, max, AosAttribute.LowerRegCost, 1, 20 ); break;
|
||||
case 17: ApplyAttribute( primary, min, max, AosAttribute.Luck, 1, 100 ); break;
|
||||
case 18: ApplyAttribute( primary, min, max, AosAttribute.ReflectPhysical, 1, 15 ); break;
|
||||
case 19: ApplyResistance( armor, min, max, ResistanceType.Physical, 1, 15 ); break;
|
||||
case 20: ApplyResistance( armor, min, max, ResistanceType.Fire, 1, 15 ); break;
|
||||
case 21: ApplyResistance( armor, min, max, ResistanceType.Cold, 1, 15 ); break;
|
||||
case 22: ApplyResistance( armor, min, max, ResistanceType.Poison, 1, 15 ); break;
|
||||
case 23: ApplyResistance( armor, min, max, ResistanceType.Energy, 1, 15 ); break;
|
||||
/* End Armor */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ApplyAttributesTo( BaseHat hat, int attributeCount, int min, int max )
|
||||
{
|
||||
ApplyAttributesTo( hat, false, 0, attributeCount, min, max );
|
||||
}
|
||||
|
||||
public static void ApplyAttributesTo( BaseHat hat, bool isRunicTool, int luckChance, int attributeCount, int min, int max )
|
||||
{
|
||||
m_IsRunicTool = isRunicTool;
|
||||
m_LuckChance = luckChance;
|
||||
|
||||
AosAttributes primary = hat.Attributes;
|
||||
AosArmorAttributes secondary = hat.ClothingAttributes;
|
||||
AosElementAttributes resists = hat.Resistances;
|
||||
|
||||
m_Props.SetAll( false );
|
||||
|
||||
for ( int i = 0; i < attributeCount; ++i )
|
||||
{
|
||||
int random = GetUniqueRandom( 19 );
|
||||
|
||||
if ( random == -1 )
|
||||
break;
|
||||
|
||||
switch ( random )
|
||||
{
|
||||
case 0: ApplyAttribute( primary, min, max, AosAttribute.ReflectPhysical, 1, 15 ); break;
|
||||
case 1: ApplyAttribute( primary, min, max, AosAttribute.RegenHits, 1, 2 ); break;
|
||||
case 2: ApplyAttribute( primary, min, max, AosAttribute.RegenStam, 1, 3 ); break;
|
||||
case 3: ApplyAttribute( primary, min, max, AosAttribute.RegenMana, 1, 2 ); break;
|
||||
case 4: ApplyAttribute( primary, min, max, AosAttribute.NightSight, 1, 1 ); break;
|
||||
case 5: ApplyAttribute( primary, min, max, AosAttribute.BonusHits, 1, 5 ); break;
|
||||
case 6: ApplyAttribute( primary, min, max, AosAttribute.BonusStam, 1, 8 ); break;
|
||||
case 7: ApplyAttribute( primary, min, max, AosAttribute.BonusMana, 1, 8 ); break;
|
||||
case 8: ApplyAttribute( primary, min, max, AosAttribute.LowerManaCost, 1, 8 ); break;
|
||||
case 9: ApplyAttribute( primary, min, max, AosAttribute.LowerRegCost, 1, 20 ); break;
|
||||
case 10: ApplyAttribute( primary, min, max, AosAttribute.Luck, 1, 100 ); break;
|
||||
case 11: ApplyAttribute( secondary, min, max, AosArmorAttribute.LowerStatReq, 10, 100, 10 ); break;
|
||||
case 12: ApplyAttribute( secondary, min, max, AosArmorAttribute.SelfRepair, 1, 5 ); break;
|
||||
case 13: ApplyAttribute( secondary, min, max, AosArmorAttribute.DurabilityBonus, 10, 100, 10 ); break;
|
||||
case 14: ApplyAttribute( resists, min, max, AosElementAttribute.Physical, 1, 15 ); break;
|
||||
case 15: ApplyAttribute( resists, min, max, AosElementAttribute.Fire, 1, 15 ); break;
|
||||
case 16: ApplyAttribute( resists, min, max, AosElementAttribute.Cold, 1, 15 ); break;
|
||||
case 17: ApplyAttribute( resists, min, max, AosElementAttribute.Poison, 1, 15 ); break;
|
||||
case 18: ApplyAttribute( resists, min, max, AosElementAttribute.Energy, 1, 15 ); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ApplyAttributesTo( BaseJewel jewelry, int attributeCount, int min, int max )
|
||||
{
|
||||
ApplyAttributesTo( jewelry, false, 0, attributeCount, min, max );
|
||||
}
|
||||
|
||||
public static void ApplyAttributesTo( BaseJewel jewelry, bool isRunicTool, int luckChance, int attributeCount, int min, int max )
|
||||
{
|
||||
m_IsRunicTool = isRunicTool;
|
||||
m_LuckChance = luckChance;
|
||||
|
||||
AosAttributes primary = jewelry.Attributes;
|
||||
AosElementAttributes resists = jewelry.Resistances;
|
||||
AosSkillBonuses skills = jewelry.SkillBonuses;
|
||||
|
||||
m_Props.SetAll( false );
|
||||
|
||||
for ( int i = 0; i < attributeCount; ++i )
|
||||
{
|
||||
int random = GetUniqueRandom( 24 );
|
||||
|
||||
if ( random == -1 )
|
||||
break;
|
||||
|
||||
switch ( random )
|
||||
{
|
||||
case 0: ApplyAttribute( resists, min, max, AosElementAttribute.Physical, 1, 15 ); break;
|
||||
case 1: ApplyAttribute( resists, min, max, AosElementAttribute.Fire, 1, 15 ); break;
|
||||
case 2: ApplyAttribute( resists, min, max, AosElementAttribute.Cold, 1, 15 ); break;
|
||||
case 3: ApplyAttribute( resists, min, max, AosElementAttribute.Poison, 1, 15 ); break;
|
||||
case 4: ApplyAttribute( resists, min, max, AosElementAttribute.Energy, 1, 15 ); break;
|
||||
case 5: ApplyAttribute( primary, min, max, AosAttribute.WeaponDamage, 1, 25 ); break;
|
||||
case 6: ApplyAttribute( primary, min, max, AosAttribute.DefendChance, 1, 15 ); break;
|
||||
case 7: ApplyAttribute( primary, min, max, AosAttribute.AttackChance, 1, 15 ); break;
|
||||
case 8: ApplyAttribute( primary, min, max, AosAttribute.BonusStr, 1, 8 ); break;
|
||||
case 9: ApplyAttribute( primary, min, max, AosAttribute.BonusDex, 1, 8 ); break;
|
||||
case 10: ApplyAttribute( primary, min, max, AosAttribute.BonusInt, 1, 8 ); break;
|
||||
case 11: ApplyAttribute( primary, min, max, AosAttribute.EnhancePotions, 5, 25, 5 ); break;
|
||||
case 12: ApplyAttribute( primary, min, max, AosAttribute.CastSpeed, 1, 1 ); break;
|
||||
case 13: ApplyAttribute( primary, min, max, AosAttribute.CastRecovery, 1, 3 ); break;
|
||||
case 14: ApplyAttribute( primary, min, max, AosAttribute.LowerManaCost, 1, 8 ); break;
|
||||
case 15: ApplyAttribute( primary, min, max, AosAttribute.LowerRegCost, 1, 20 ); break;
|
||||
case 16: ApplyAttribute( primary, min, max, AosAttribute.Luck, 1, 100 ); break;
|
||||
case 17: ApplyAttribute( primary, min, max, AosAttribute.SpellDamage, 1, 12 ); break;
|
||||
case 18: ApplyAttribute( primary, min, max, AosAttribute.NightSight, 1, 1 ); break;
|
||||
case 19: ApplySkillBonus( skills, min, max, 0, 1, 15 ); break;
|
||||
case 20: ApplySkillBonus( skills, min, max, 1, 1, 15 ); break;
|
||||
case 21: ApplySkillBonus( skills, min, max, 2, 1, 15 ); break;
|
||||
case 22: ApplySkillBonus( skills, min, max, 3, 1, 15 ); break;
|
||||
case 23: ApplySkillBonus( skills, min, max, 4, 1, 15 ); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ApplyAttributesTo( Spellbook spellbook, int attributeCount, int min, int max )
|
||||
{
|
||||
ApplyAttributesTo( spellbook, false, 0, attributeCount, min, max );
|
||||
}
|
||||
|
||||
public static void ApplyAttributesTo( Spellbook spellbook, bool isRunicTool, int luckChance, int attributeCount, int min, int max )
|
||||
{
|
||||
m_IsRunicTool = isRunicTool;
|
||||
m_LuckChance = luckChance;
|
||||
|
||||
AosAttributes primary = spellbook.Attributes;
|
||||
AosSkillBonuses skills = spellbook.SkillBonuses;
|
||||
|
||||
m_Props.SetAll( false );
|
||||
|
||||
for ( int i = 0; i < attributeCount; ++i )
|
||||
{
|
||||
int random = GetUniqueRandom( 16 );
|
||||
|
||||
if ( random == -1 )
|
||||
break;
|
||||
|
||||
switch ( random )
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
{
|
||||
ApplyAttribute( primary, min, max, AosAttribute.BonusInt, 1, 8 );
|
||||
|
||||
for ( int j = 0; j < 4; ++j )
|
||||
m_Props.Set( j, true );
|
||||
|
||||
break;
|
||||
}
|
||||
case 4: ApplyAttribute( primary, min, max, AosAttribute.BonusMana, 1, 8 ); break;
|
||||
case 5: ApplyAttribute( primary, min, max, AosAttribute.CastSpeed, 1, 1 ); break;
|
||||
case 6: ApplyAttribute( primary, min, max, AosAttribute.CastRecovery, 1, 3 ); break;
|
||||
case 7: ApplyAttribute( primary, min, max, AosAttribute.SpellDamage, 1, 12 ); break;
|
||||
case 8: ApplySkillBonus( skills, min, max, 0, 1, 15 ); break;
|
||||
case 9: ApplySkillBonus( skills, min, max, 1, 1, 15 ); break;
|
||||
case 10: ApplySkillBonus( skills, min, max, 2, 1, 15 ); break;
|
||||
case 11: ApplySkillBonus( skills, min, max, 3, 1, 15 ); break;
|
||||
case 12: ApplyAttribute( primary, min, max, AosAttribute.LowerRegCost, 1, 20 ); break;
|
||||
case 13: ApplyAttribute( primary, min, max, AosAttribute.LowerManaCost, 1, 8 ); break;
|
||||
case 14: ApplyAttribute( primary, min, max, AosAttribute.RegenMana, 1, 2 ); break;
|
||||
case 15: spellbook.Slayer = GetRandomSlayer(); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
199
Scripts/Items/Skill Items/Tools/BaseTool.cs
Normal file
199
Scripts/Items/Skill Items/Tools/BaseTool.cs
Normal file
|
|
@ -0,0 +1,199 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public enum ToolQuality
|
||||
{
|
||||
Low,
|
||||
Regular,
|
||||
Exceptional
|
||||
}
|
||||
|
||||
public abstract class BaseTool : Item, IUsesRemaining, ICraftable
|
||||
{
|
||||
private Mobile m_Crafter;
|
||||
private ToolQuality m_Quality;
|
||||
private int m_UsesRemaining;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Crafter
|
||||
{
|
||||
get{ return m_Crafter; }
|
||||
set{ m_Crafter = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public ToolQuality Quality
|
||||
{
|
||||
get{ return m_Quality; }
|
||||
set{ UnscaleUses(); m_Quality = value; InvalidateProperties(); ScaleUses(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int UsesRemaining
|
||||
{
|
||||
get { return m_UsesRemaining; }
|
||||
set { m_UsesRemaining = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public virtual bool BreakOnDepletion { get { return true; } }
|
||||
|
||||
public void ScaleUses()
|
||||
{
|
||||
m_UsesRemaining = (m_UsesRemaining * GetUsesScalar()) / 100;
|
||||
InvalidateProperties();
|
||||
}
|
||||
|
||||
public void UnscaleUses()
|
||||
{
|
||||
m_UsesRemaining = (m_UsesRemaining * 100) / GetUsesScalar();
|
||||
}
|
||||
|
||||
public int GetUsesScalar()
|
||||
{
|
||||
if ( m_Quality == ToolQuality.Exceptional )
|
||||
return 200;
|
||||
|
||||
return 100;
|
||||
}
|
||||
|
||||
public bool ShowUsesRemaining{ get{ return true; } set{} }
|
||||
|
||||
public abstract CraftSystem CraftSystem{ get; }
|
||||
|
||||
public BaseTool( int itemID ) : this( Utility.RandomMinMax( 25, 75 ), itemID )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseTool( int uses, int itemID ) : base( itemID )
|
||||
{
|
||||
m_UsesRemaining = uses;
|
||||
m_Quality = ToolQuality.Regular;
|
||||
}
|
||||
|
||||
public BaseTool( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
// Makers mark not displayed on OSI
|
||||
//if ( m_Crafter != null )
|
||||
// list.Add( 1050043, m_Crafter.Name ); // crafted by ~1_NAME~
|
||||
|
||||
if ( m_Quality == ToolQuality.Exceptional )
|
||||
list.Add( 1060636 ); // exceptional
|
||||
|
||||
list.Add( 1060584, m_UsesRemaining.ToString() ); // uses remaining: ~1_val~
|
||||
}
|
||||
|
||||
public virtual void DisplayDurabilityTo( Mobile m )
|
||||
{
|
||||
LabelToAffix( m, 1017323, AffixType.Append, ": " + m_UsesRemaining.ToString() ); // Durability
|
||||
}
|
||||
|
||||
public static bool CheckAccessible( Item tool, Mobile m )
|
||||
{
|
||||
return ( tool.IsChildOf( m ) || tool.Parent == m );
|
||||
}
|
||||
|
||||
public static bool CheckTool( Item tool, Mobile m )
|
||||
{
|
||||
Item check = m.FindItemOnLayer( Layer.OneHanded );
|
||||
|
||||
if ( check is BaseTool && check != tool && !(check is AncientSmithyHammer) )
|
||||
return false;
|
||||
|
||||
check = m.FindItemOnLayer( Layer.TwoHanded );
|
||||
|
||||
if ( check is BaseTool && check != tool && !(check is AncientSmithyHammer) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
DisplayDurabilityTo( from );
|
||||
|
||||
base.OnSingleClick( from );
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) || Parent == from )
|
||||
{
|
||||
CraftSystem system = this.CraftSystem;
|
||||
|
||||
int num = system.CanCraft( from, this, null );
|
||||
|
||||
if ( num > 0 && ( num != 1044267 || !Core.SE ) ) // Blacksmithing shows the gump regardless of proximity of an anvil and forge after SE
|
||||
{
|
||||
from.SendLocalizedMessage( num );
|
||||
}
|
||||
else
|
||||
{
|
||||
CraftContext context = system.GetContext( from );
|
||||
|
||||
from.SendGump( new CraftGump( from, system, this, null ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (Mobile) m_Crafter );
|
||||
writer.Write( (int) m_Quality );
|
||||
|
||||
writer.Write( (int) m_UsesRemaining );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Crafter = reader.ReadMobile();
|
||||
m_Quality = (ToolQuality) reader.ReadInt();
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
m_UsesRemaining = reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#region ICraftable Members
|
||||
|
||||
public int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
|
||||
{
|
||||
Quality = (ToolQuality)quality;
|
||||
|
||||
if ( makersMark )
|
||||
Crafter = from;
|
||||
|
||||
return quality;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
49
Scripts/Items/Skill Items/Tools/Blowpipe.cs
Normal file
49
Scripts/Items/Skill Items/Tools/Blowpipe.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0xE8A, 0xE89 )]
|
||||
public class Blowpipe : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem { get { return DefGlassblowing.CraftSystem; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1044608; } } // blow pipe
|
||||
|
||||
[Constructable]
|
||||
public Blowpipe() : base( 0xE8A )
|
||||
{
|
||||
Weight = 4.0;
|
||||
Hue = 0x3B9;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Blowpipe( int uses ) : base( uses, 0xE8A )
|
||||
{
|
||||
Weight = 4.0;
|
||||
Hue = 0x3B9;
|
||||
}
|
||||
|
||||
public Blowpipe( 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();
|
||||
|
||||
if ( Weight == 2.0 )
|
||||
Weight = 4.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Skill Items/Tools/DovetailSaw.cs
Normal file
45
Scripts/Items/Skill Items/Tools/DovetailSaw.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable( 0x1028, 0x1029 )]
|
||||
public class DovetailSaw : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefCarpentry.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public DovetailSaw() : base( 0x1028 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DovetailSaw( int uses ) : base( uses, 0x1028 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public DovetailSaw( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 2.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Items/Skill Items/Tools/DrawKnife.cs
Normal file
41
Scripts/Items/Skill Items/Tools/DrawKnife.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DrawKnife : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefCarpentry.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public DrawKnife() : base( 0x10E4 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DrawKnife( int uses ) : base( uses, 0x10E4 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public DrawKnife( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Skill Items/Tools/FletcherTools.cs
Normal file
45
Scripts/Items/Skill Items/Tools/FletcherTools.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1022, 0x1023 )]
|
||||
public class FletcherTools : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefBowFletching.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public FletcherTools() : base( 0x1022 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FletcherTools( int uses ) : base( uses, 0x1022 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public FletcherTools( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 2.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Items/Skill Items/Tools/FlourSifter.cs
Normal file
41
Scripts/Items/Skill Items/Tools/FlourSifter.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FlourSifter : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefCooking.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public FlourSifter() : base( 0x103E )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FlourSifter( int uses ) : base( uses, 0x103E )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public FlourSifter( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Items/Skill Items/Tools/Froe.cs
Normal file
41
Scripts/Items/Skill Items/Tools/Froe.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Froe : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefCarpentry.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public Froe() : base( 0x10E5 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Froe( int uses ) : base( uses, 0x10E5 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public Froe( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Items/Skill Items/Tools/Hammer.cs
Normal file
41
Scripts/Items/Skill Items/Tools/Hammer.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Hammer : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefCarpentry.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public Hammer() : base( 0x102A )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Hammer( int uses ) : base( uses, 0x102A )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public Hammer( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Items/Skill Items/Tools/Inshave.cs
Normal file
41
Scripts/Items/Skill Items/Tools/Inshave.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Inshave : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefCarpentry.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public Inshave() : base( 0x10E6 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Inshave( int uses ) : base( uses, 0x10E6 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public Inshave( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Skill Items/Tools/JointingPlane.cs
Normal file
45
Scripts/Items/Skill Items/Tools/JointingPlane.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable( 0x1030, 0x1031 )]
|
||||
public class JointingPlane : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefCarpentry.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public JointingPlane() : base( 0x1030 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public JointingPlane( int uses ) : base( uses, 0x1030 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public JointingPlane( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 2.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Items/Skill Items/Tools/MalletAndChisel.cs
Normal file
41
Scripts/Items/Skill Items/Tools/MalletAndChisel.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MalletAndChisel : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem { get { return DefMasonry.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public MalletAndChisel() : base( 0x12B3 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MalletAndChisel( int uses ) : base( uses, 0x12B3 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public MalletAndChisel( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Items/Skill Items/Tools/MapmakersPen.cs
Normal file
47
Scripts/Items/Skill Items/Tools/MapmakersPen.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x0FBF, 0x0FC0 )]
|
||||
public class MapmakersPen : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefCartography.CraftSystem; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1044167; } } // mapmaker's pen
|
||||
|
||||
[Constructable]
|
||||
public MapmakersPen() : base( 0x0FBF )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MapmakersPen( int uses ) : base( uses, 0x0FBF )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public MapmakersPen( 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();
|
||||
|
||||
if ( Weight == 2.0 )
|
||||
Weight = 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Items/Skill Items/Tools/MortarPestle.cs
Normal file
41
Scripts/Items/Skill Items/Tools/MortarPestle.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MortarPestle : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefAlchemy.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public MortarPestle() : base( 0xE9B )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MortarPestle( int uses ) : base( uses, 0xE9B )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public MortarPestle( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Skill Items/Tools/MouldingPlane.cs
Normal file
42
Scripts/Items/Skill Items/Tools/MouldingPlane.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable( 0x102C, 0x102D )]
|
||||
public class MouldingPlane : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefCarpentry.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public MouldingPlane() : base( 0x102C )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MouldingPlane( int uses ) : base( uses, 0x102C )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public MouldingPlane( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Skill Items/Tools/Nails.cs
Normal file
42
Scripts/Items/Skill Items/Tools/Nails.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable( 0x102E, 0x102F )]
|
||||
public class Nails : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefCarpentry.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public Nails() : base( 0x102E )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Nails( int uses ) : base( uses, 0x102C )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public Nails( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Items/Skill Items/Tools/RollingPin.cs
Normal file
41
Scripts/Items/Skill Items/Tools/RollingPin.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class RollingPin : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefCooking.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public RollingPin() : base( 0x1043 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RollingPin( int uses ) : base( uses, 0x1043 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public RollingPin( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Scripts/Items/Skill Items/Tools/RunicDovetailSaw.cs
Normal file
56
Scripts/Items/Skill Items/Tools/RunicDovetailSaw.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class RunicDovetailSaw : BaseRunicTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefCarpentry.CraftSystem; } }
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
int index = CraftResources.GetIndex( Resource );
|
||||
|
||||
if ( index >= 1 && index <= 6 )
|
||||
return 1072633 + index;
|
||||
|
||||
return 1024137; // dovetail saw
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RunicDovetailSaw( CraftResource resource ) : base( resource, 0x1028 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RunicDovetailSaw( CraftResource resource, int uses ) : base( resource, uses, 0x1028 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
}
|
||||
|
||||
public RunicDovetailSaw( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Scripts/Items/Skill Items/Tools/RunicFletcherTool.cs
Normal file
56
Scripts/Items/Skill Items/Tools/RunicFletcherTool.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class RunicFletcherTool : BaseRunicTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefBowFletching.CraftSystem; } }
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
int index = CraftResources.GetIndex( Resource );
|
||||
|
||||
if ( index >= 1 && index <= 6 )
|
||||
return 1072627 + index;
|
||||
|
||||
return 1044559; // Fletcher's Tools
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RunicFletcherTool( CraftResource resource ) : base( resource, 0x1022 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RunicFletcherTool( CraftResource resource, int uses ) : base( resource, uses, 0x1022 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
}
|
||||
|
||||
public RunicFletcherTool( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
79
Scripts/Items/Skill Items/Tools/RunicHammer.cs
Normal file
79
Scripts/Items/Skill Items/Tools/RunicHammer.cs
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13E4, 0x13E3 )]
|
||||
public class RunicHammer : BaseRunicTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefBlacksmithy.CraftSystem; } }
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
int index = CraftResources.GetIndex( Resource );
|
||||
|
||||
if ( index >= 1 && index <= 8 )
|
||||
return 1049019 + index;
|
||||
|
||||
return 1045128; // runic smithy hammer
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
|
||||
int index = CraftResources.GetIndex( Resource );
|
||||
|
||||
if ( index >= 1 && index <= 8 )
|
||||
return;
|
||||
|
||||
if ( !CraftResources.IsStandard( Resource ) )
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber( Resource );
|
||||
|
||||
if ( num > 0 )
|
||||
list.Add( num );
|
||||
else
|
||||
list.Add( CraftResources.GetName( Resource ) );
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RunicHammer( CraftResource resource ) : base( resource, 0x13E3 )
|
||||
{
|
||||
Weight = 8.0;
|
||||
Layer = Layer.OneHanded;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RunicHammer( CraftResource resource, int uses ) : base( resource, uses, 0x13E3 )
|
||||
{
|
||||
Weight = 8.0;
|
||||
Layer = Layer.OneHanded;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
}
|
||||
|
||||
public RunicHammer( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
80
Scripts/Items/Skill Items/Tools/RunicSewingKit.cs
Normal file
80
Scripts/Items/Skill Items/Tools/RunicSewingKit.cs
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class RunicSewingKit : BaseRunicTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefTailoring.CraftSystem; } }
|
||||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
string v = " ";
|
||||
|
||||
if ( !CraftResources.IsStandard( Resource ) )
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber( Resource );
|
||||
|
||||
if ( num > 0 )
|
||||
v = String.Format( "#{0}", num );
|
||||
else
|
||||
v = CraftResources.GetName( Resource );
|
||||
}
|
||||
|
||||
list.Add( 1061119, v ); // ~1_LEATHER_TYPE~ runic sewing kit
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
string v = " ";
|
||||
|
||||
if ( !CraftResources.IsStandard( Resource ) )
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber( Resource );
|
||||
|
||||
if ( num > 0 )
|
||||
v = String.Format( "#{0}", num );
|
||||
else
|
||||
v = CraftResources.GetName( Resource );
|
||||
}
|
||||
|
||||
LabelTo( from, 1061119, v ); // ~1_LEATHER_TYPE~ runic sewing kit
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RunicSewingKit( CraftResource resource ) : base( resource, 0xF9D )
|
||||
{
|
||||
Weight = 2.0;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RunicSewingKit( CraftResource resource, int uses ) : base( resource, uses, 0xF9D )
|
||||
{
|
||||
Weight = 2.0;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
}
|
||||
|
||||
public RunicSewingKit( 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();
|
||||
|
||||
if ( ItemID == 0x13E4 || ItemID == 0x13E3 )
|
||||
ItemID = 0xF9D;
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Skill Items/Tools/Saw.cs
Normal file
42
Scripts/Items/Skill Items/Tools/Saw.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1034, 0x1035 )]
|
||||
public class Saw : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefCarpentry.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public Saw() : base( 0x1034 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Saw( int uses ) : base( uses, 0x1034 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public Saw( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Items/Skill Items/Tools/Scorp.cs
Normal file
41
Scripts/Items/Skill Items/Tools/Scorp.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Scorp : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefCarpentry.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public Scorp() : base( 0x10E7 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Scorp( int uses ) : base( uses, 0x10E7 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public Scorp( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Items/Skill Items/Tools/ScribesPen.cs
Normal file
47
Scripts/Items/Skill Items/Tools/ScribesPen.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x0FBF, 0x0FC0 )]
|
||||
public class ScribesPen : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefInscription.CraftSystem; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1044168; } } // scribe's pen
|
||||
|
||||
[Constructable]
|
||||
public ScribesPen() : base( 0x0FBF )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ScribesPen( int uses ) : base( uses, 0x0FBF )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public ScribesPen( 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();
|
||||
|
||||
if ( Weight == 2.0 )
|
||||
Weight = 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Items/Skill Items/Tools/SewingKit.cs
Normal file
41
Scripts/Items/Skill Items/Tools/SewingKit.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SewingKit : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefTailoring.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public SewingKit() : base( 0xF9D )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SewingKit( int uses ) : base( uses, 0xF9D )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public SewingKit( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
43
Scripts/Items/Skill Items/Tools/Skillet.cs
Normal file
43
Scripts/Items/Skill Items/Tools/Skillet.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Skillet : BaseTool
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1044567; } } // skillet
|
||||
|
||||
public override CraftSystem CraftSystem{ get{ return DefCooking.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public Skillet() : base( 0x97F )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Skillet( int uses ) : base( uses, 0x97F )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public Skillet( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Skill Items/Tools/SledgeHammer.cs
Normal file
42
Scripts/Items/Skill Items/Tools/SledgeHammer.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0xFB5, 0xFB4 )]
|
||||
public class SledgeHammer : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefBlacksmithy.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public SledgeHammer() : base( 0xFB5 )
|
||||
{
|
||||
Layer = Layer.OneHanded;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SledgeHammer( int uses ) : base( uses, 0xFB5 )
|
||||
{
|
||||
Layer = Layer.OneHanded;
|
||||
}
|
||||
|
||||
public SledgeHammer( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Scripts/Items/Skill Items/Tools/SmithHammer.cs
Normal file
44
Scripts/Items/Skill Items/Tools/SmithHammer.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13E3, 0x13E4 )]
|
||||
public class SmithHammer : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefBlacksmithy.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public SmithHammer() : base( 0x13E3 )
|
||||
{
|
||||
Weight = 8.0;
|
||||
Layer = Layer.OneHanded;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SmithHammer( int uses ) : base( uses, 0x13E3 )
|
||||
{
|
||||
Weight = 8.0;
|
||||
Layer = Layer.OneHanded;
|
||||
}
|
||||
|
||||
public SmithHammer( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Skill Items/Tools/SmoothingPlane.cs
Normal file
42
Scripts/Items/Skill Items/Tools/SmoothingPlane.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable( 0x1032, 0x1033 )]
|
||||
public class SmoothingPlane : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefCarpentry.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public SmoothingPlane() : base( 0x1032 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SmoothingPlane( int uses ) : base( uses, 0x1032 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public SmoothingPlane( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
80
Scripts/Items/Skill Items/Tools/TinkerTools.cs
Normal file
80
Scripts/Items/Skill Items/Tools/TinkerTools.cs
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable( 0x1EB8, 0x1EB9 )]
|
||||
public class TinkerTools : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefTinkering.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public TinkerTools() : base( 0x1EB8 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public TinkerTools( int uses ) : base( uses, 0x1EB8 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public TinkerTools( 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 TinkersTools : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem { get { return DefTinkering.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public TinkersTools()
|
||||
: base(0x1EBC)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public TinkersTools(int uses)
|
||||
: base(uses, 0x1EBC)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public TinkersTools(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Skill Items/Tools/Tongs.cs
Normal file
42
Scripts/Items/Skill Items/Tools/Tongs.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0xfbb, 0xfbc )]
|
||||
public class Tongs : BaseTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefBlacksmithy.CraftSystem; } }
|
||||
|
||||
[Constructable]
|
||||
public Tongs() : base( 0xFBB )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Tongs( int uses ) : base( uses, 0xFBB )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public Tongs( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue