#W# Initial Commit: Avatars Conquest
This commit is contained in:
commit
8eae46895e
7512 changed files with 416187 additions and 0 deletions
44
Scripts/Items/Resources/Arrows/Arrow.cs
Normal file
44
Scripts/Items/Resources/Arrows/Arrow.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Arrow : Item
|
||||
{
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Arrow() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Arrow( int amount ) : base( 0xF3F )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Arrow( 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/Resources/Arrows/Bolt.cs
Normal file
44
Scripts/Items/Resources/Arrows/Bolt.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Bolt : Item
|
||||
{
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Bolt() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Bolt( int amount ) : base( 0x1BFB )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Bolt( 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/Resources/Arrows/Feather.cs
Normal file
45
Scripts/Items/Resources/Arrows/Feather.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Feather : Item
|
||||
{
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Feather() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Feather( int amount ) : base( 0x1BD1 )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Feather( 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/Resources/Arrows/Shaft.cs
Normal file
45
Scripts/Items/Resources/Arrows/Shaft.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Shaft : Item
|
||||
{
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Shaft() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Shaft( int amount ) : base( 0x1BD4 )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Shaft( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
134
Scripts/Items/Resources/Blacksmithing/Ingot.cs
Normal file
134
Scripts/Items/Resources/Blacksmithing/Ingot.cs
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseIngot : Item
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get{ return m_Resource; }
|
||||
set{ m_Resource = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int) m_Resource );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
OreInfo info = OreInfo.Iron;
|
||||
m_Resource = CraftResources.GetFromOreInfo( info );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BaseIngot( CraftResource resource ) : this( resource, 1 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseIngot( CraftResource resource, int amount ) : base( 0x1BF2 )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseIngot( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
if ( Amount > 1 )
|
||||
list.Add( 1050039, "{0}\t#{1}", Amount, 1027154 ); // ~1_NUMBER~ ~2_ITEMNAME~
|
||||
else
|
||||
list.Add( 1027154 ); // ingots
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( !CraftResources.IsStandard( m_Resource ) )
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber( m_Resource );
|
||||
|
||||
if ( num > 0 )
|
||||
list.Add( num );
|
||||
else
|
||||
list.Add( CraftResources.GetName( m_Resource ) );
|
||||
}
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1042692;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1BF2, 0x1BEF )]
|
||||
public class IronIngot : BaseIngot
|
||||
{
|
||||
[Constructable]
|
||||
public IronIngot() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public IronIngot( int amount ) : base( CraftResource.Iron, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public IronIngot( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
377
Scripts/Items/Resources/Blacksmithing/Ore.cs
Normal file
377
Scripts/Items/Resources/Blacksmithing/Ore.cs
Normal file
|
|
@ -0,0 +1,377 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
using Server.Engines.Craft;
|
||||
using Server.Mobiles;
|
||||
using Server.Misc;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseOre : Item
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get{ return m_Resource; }
|
||||
set{ m_Resource = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public abstract BaseIngot GetIngot();
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int) m_Resource );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
OreInfo info = OreInfo.Iron;
|
||||
m_Resource = CraftResources.GetFromOreInfo( info );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BaseOre( CraftResource resource ) : this( resource, 1 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseOre( CraftResource resource, int amount ) : base( Utility.Random( 4 ) )
|
||||
{
|
||||
{
|
||||
double random = Utility.RandomDouble();
|
||||
if ( 0.12 >= random )
|
||||
ItemID = 0x19B7;
|
||||
else if ( 0.18 >= random )
|
||||
ItemID = 0x19B8;
|
||||
else if ( 0.25 >= random )
|
||||
ItemID = 0x19BA;
|
||||
else
|
||||
ItemID = 0x19B9;
|
||||
}
|
||||
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseOre( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
if ( Amount > 1 )
|
||||
list.Add( 1050039, "{0}\t#{1}", Amount, 1026583 ); // ~1_NUMBER~ ~2_ITEMNAME~
|
||||
else
|
||||
list.Add( 1026583 ); // ore
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( !CraftResources.IsStandard( m_Resource ) )
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber( m_Resource );
|
||||
|
||||
if ( num > 0 )
|
||||
list.Add( num );
|
||||
else
|
||||
list.Add( CraftResources.GetName( m_Resource ) );
|
||||
}
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1042853; // iron ore;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !Movable )
|
||||
return;
|
||||
|
||||
if ( RootParent is BaseCreature )
|
||||
{
|
||||
from.SendLocalizedMessage( 500447 ); // That is not accessible
|
||||
return;
|
||||
}
|
||||
else if ( from.InRange( this.GetWorldLocation(), 2 ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 501971 ); // Select the forge on which to smelt the ore, or another pile of ore with which to combine it.
|
||||
from.Target = new InternalTarget( this );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 501976 ); // The ore is too far away.
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private BaseOre m_Ore;
|
||||
|
||||
public InternalTarget( BaseOre ore ) : base ( 2, false, TargetFlags.None )
|
||||
{
|
||||
m_Ore = ore;
|
||||
}
|
||||
|
||||
private bool IsForge( object obj )
|
||||
{
|
||||
if ( obj.GetType().IsDefined( typeof( ForgeAttribute ), false ) )
|
||||
return true;
|
||||
|
||||
int itemID = 0;
|
||||
|
||||
if ( obj is Item )
|
||||
itemID = ((Item)obj).ItemID;
|
||||
else if ( obj is StaticTarget )
|
||||
itemID = ((StaticTarget)obj).ItemID;
|
||||
|
||||
return ( itemID == 4017 || (itemID >= 6522 && itemID <= 6569) );
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Ore.Deleted )
|
||||
return;
|
||||
|
||||
if ( !from.InRange( m_Ore.GetWorldLocation(), 2 ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 501976 ); // The ore is too far away.
|
||||
return;
|
||||
}
|
||||
|
||||
#region Combine Ore
|
||||
if ( targeted is BaseOre )
|
||||
{
|
||||
BaseOre ore = (BaseOre)targeted;
|
||||
if ( !ore.Movable )
|
||||
return;
|
||||
else if ( m_Ore == ore )
|
||||
{
|
||||
from.SendLocalizedMessage( 501972 ); // Select another pile or ore with which to combine this.
|
||||
from.Target = new InternalTarget( ore );
|
||||
return;
|
||||
}
|
||||
else if ( ore.Resource != m_Ore.Resource )
|
||||
{
|
||||
from.SendLocalizedMessage( 501979 ); // You cannot combine ores of different metals.
|
||||
return;
|
||||
}
|
||||
|
||||
int worth = ore.Amount;
|
||||
if ( ore.ItemID == 0x19B9 )
|
||||
worth *= 8;
|
||||
else if ( ore.ItemID == 0x19B7 )
|
||||
worth *= 2;
|
||||
else
|
||||
worth *= 4;
|
||||
int sourceWorth = m_Ore.Amount;
|
||||
if ( m_Ore.ItemID == 0x19B9 )
|
||||
sourceWorth *= 8;
|
||||
else if ( m_Ore.ItemID == 0x19B7 )
|
||||
sourceWorth *= 2;
|
||||
else
|
||||
sourceWorth *= 4;
|
||||
worth += sourceWorth;
|
||||
|
||||
int plusWeight = 0;
|
||||
int newID = ore.ItemID;
|
||||
if ( ore.DefaultWeight != m_Ore.DefaultWeight )
|
||||
{
|
||||
if ( ore.ItemID == 0x19B7 || m_Ore.ItemID == 0x19B7 )
|
||||
{
|
||||
newID = 0x19B7;
|
||||
}
|
||||
else if ( ore.ItemID == 0x19B9 )
|
||||
{
|
||||
newID = m_Ore.ItemID;
|
||||
plusWeight = ore.Amount * 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
plusWeight = m_Ore.Amount * 2;
|
||||
}
|
||||
}
|
||||
|
||||
if ( (ore.ItemID == 0x19B9 && worth > 120000) || (( ore.ItemID == 0x19B8 || ore.ItemID == 0x19BA ) && worth > 60000) || (ore.ItemID == 0x19B7 && worth > 30000))
|
||||
{
|
||||
from.SendLocalizedMessage( 1062844 ); // There is too much ore to combine.
|
||||
return;
|
||||
}
|
||||
else if ( ore.RootParent is Mobile && (plusWeight + ((Mobile)ore.RootParent).Backpack.TotalWeight) > ((Mobile)ore.RootParent).Backpack.MaxWeight )
|
||||
{
|
||||
from.SendLocalizedMessage( 501978 ); // The weight is too great to combine in a container.
|
||||
return;
|
||||
}
|
||||
|
||||
ore.ItemID = newID;
|
||||
if ( ore.ItemID == 0x19B9 )
|
||||
{
|
||||
ore.Amount = worth / 8;
|
||||
m_Ore.Delete();
|
||||
}
|
||||
else if ( ore.ItemID == 0x19B7 )
|
||||
{
|
||||
ore.Amount = worth / 2;
|
||||
m_Ore.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
ore.Amount = worth / 4;
|
||||
m_Ore.Delete();
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
|
||||
if ( IsForge( targeted ) )
|
||||
{
|
||||
double difficulty = 50.0;
|
||||
|
||||
double minSkill = difficulty - 25.0;
|
||||
double maxSkill = difficulty + 25.0;
|
||||
|
||||
if ( difficulty > 50.0 && difficulty > Server.Misc.SkillCheck.TradeSkill( from, Trades.Mining, false ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 501986 ); // You have no idea how to smelt this strange ore!
|
||||
return;
|
||||
}
|
||||
|
||||
if ( m_Ore.Amount <= 1 && m_Ore.ItemID == 0x19B7 )
|
||||
{
|
||||
from.SendLocalizedMessage( 501987 ); // There is not enough metal-bearing ore in this pile to make an ingot.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( Server.Misc.SkillCheck.TestTrade( from, Trades.Mining, minSkill, maxSkill ) )
|
||||
{
|
||||
if ( m_Ore.Amount <= 0 )
|
||||
{
|
||||
from.SendLocalizedMessage( 501987 ); // There is not enough metal-bearing ore in this pile to make an ingot.
|
||||
}
|
||||
else
|
||||
{
|
||||
int amount = m_Ore.Amount;
|
||||
if ( m_Ore.Amount > 30000 )
|
||||
amount = 30000;
|
||||
|
||||
BaseIngot ingot = m_Ore.GetIngot();
|
||||
|
||||
if ( m_Ore.ItemID == 0x19B7 )
|
||||
{
|
||||
if ( m_Ore.Amount % 2 == 0 )
|
||||
{
|
||||
amount /= 2;
|
||||
m_Ore.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
amount /= 2;
|
||||
m_Ore.Amount = 1;
|
||||
}
|
||||
}
|
||||
|
||||
else if ( m_Ore.ItemID == 0x19B9 )
|
||||
{
|
||||
amount *= 2;
|
||||
m_Ore.Delete();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
amount /= 1;
|
||||
m_Ore.Delete();
|
||||
}
|
||||
|
||||
ingot.Amount = amount;
|
||||
from.AddToBackpack( ingot );
|
||||
//from.PlaySound( 0x57 );
|
||||
|
||||
|
||||
from.SendLocalizedMessage( 501988 ); // You smelt the ore removing the impurities and put the metal in your backpack.
|
||||
}
|
||||
}
|
||||
else if ( m_Ore.Amount < 2 && m_Ore.ItemID == 0x19B9 )
|
||||
{
|
||||
from.SendLocalizedMessage( 501990 ); // You burn away the impurities but are left with less useable metal.
|
||||
m_Ore.ItemID = 0x19B8;
|
||||
}
|
||||
else if ( m_Ore.Amount < 2 && m_Ore.ItemID == 0x19B8 || m_Ore.ItemID == 0x19BA )
|
||||
{
|
||||
from.SendLocalizedMessage( 501990 ); // You burn away the impurities but are left with less useable metal.
|
||||
m_Ore.ItemID = 0x19B7;
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 501990 ); // You burn away the impurities but are left with less useable metal.
|
||||
m_Ore.Amount /= 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class IronOre : BaseOre
|
||||
{
|
||||
[Constructable]
|
||||
public IronOre() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public IronOre( int amount ) : base( CraftResource.Iron, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public IronOre( 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 override BaseIngot GetIngot()
|
||||
{
|
||||
return new IronIngot();
|
||||
}
|
||||
}
|
||||
}
|
||||
79
Scripts/Items/Resources/Fishing/BigFish.cs
Normal file
79
Scripts/Items/Resources/Fishing/BigFish.cs
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BigFish : Item, ICarvable
|
||||
{
|
||||
private Mobile m_Fisher;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Fisher
|
||||
{
|
||||
get{ return m_Fisher; }
|
||||
set{ m_Fisher = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public void Carve( Mobile from, Item item )
|
||||
{
|
||||
base.ScissorHelper( from, new RawFishSteak(), Math.Max( 16, (int)Weight ) / 4 , false );
|
||||
}
|
||||
|
||||
public override int LabelNumber{ get{ return 1041112; } } // a big fish
|
||||
|
||||
[Constructable]
|
||||
public BigFish() : base( 0x09CC )
|
||||
{
|
||||
Weight = Utility.RandomMinMax( 3, 200 ); //TODO: Find correct formula. max on OSI currently 200, OSI dev says it's not 200 as max, and ~ 1/1,000,000 chance to get highest
|
||||
Hue = Utility.RandomBool() ? 0x847 : 0x58C;
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( Weight >= 20 )
|
||||
{
|
||||
if ( m_Fisher != null )
|
||||
list.Add( 1070857, m_Fisher.Name ); // Caught by ~1_fisherman~
|
||||
|
||||
list.Add( 1070858, ((int)Weight).ToString() ); // ~1_weight~ stones
|
||||
}
|
||||
}
|
||||
|
||||
public BigFish( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (Mobile) m_Fisher );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Fisher = reader.ReadMobile();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
Weight = Utility.RandomMinMax( 3, 200 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Items/Resources/Fishing/Fish.cs
Normal file
47
Scripts/Items/Resources/Fishing/Fish.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Fish : Item, ICarvable
|
||||
{
|
||||
public void Carve( Mobile from, Item item )
|
||||
{
|
||||
base.ScissorHelper( from, new RawFishSteak(), 4 );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Fish() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Fish( int amount ) : base( Utility.Random( 0x09CC, 4 ) )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 1.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Fish( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
203
Scripts/Items/Resources/Fishing/MagicFish.cs
Normal file
203
Scripts/Items/Resources/Fishing/MagicFish.cs
Normal file
|
|
@ -0,0 +1,203 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseMagicFish : Item
|
||||
{
|
||||
public virtual int Bonus{ get{ return 0; } }
|
||||
public virtual StatType Type{ get{ return StatType.Str; } }
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 1.0; }
|
||||
}
|
||||
|
||||
public BaseMagicFish( int hue ) : base( 0xDD6 )
|
||||
{
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public BaseMagicFish( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public virtual bool Apply( Mobile from )
|
||||
{
|
||||
bool applied = Spells.SpellHelper.AddStatOffset( from, Type, Bonus, TimeSpan.FromMinutes( 1.0 ) );
|
||||
|
||||
if ( !applied )
|
||||
from.SendLocalizedMessage( 502173 ); // You are already under a similar effect.
|
||||
|
||||
return applied;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if ( Apply( from ) )
|
||||
{
|
||||
from.FixedEffect( 0x375A, 10, 15 );
|
||||
from.PlaySound( 0x1E7 );
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 501774 ); // You swallow the fish whole!
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
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 PrizedFish : BaseMagicFish
|
||||
{
|
||||
public override int Bonus{ get{ return 5; } }
|
||||
public override StatType Type{ get{ return StatType.Int; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1041073; } } // prized fish
|
||||
|
||||
[Constructable]
|
||||
public PrizedFish() : base( 51 )
|
||||
{
|
||||
}
|
||||
|
||||
public PrizedFish( 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 ( Hue == 151 )
|
||||
Hue = 51;
|
||||
}
|
||||
}
|
||||
|
||||
public class WondrousFish : BaseMagicFish
|
||||
{
|
||||
public override int Bonus{ get{ return 5; } }
|
||||
public override StatType Type{ get{ return StatType.Dex; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1041074; } } // wondrous fish
|
||||
|
||||
[Constructable]
|
||||
public WondrousFish() : base( 86 )
|
||||
{
|
||||
}
|
||||
|
||||
public WondrousFish( 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 ( Hue == 286 )
|
||||
Hue = 86;
|
||||
}
|
||||
}
|
||||
|
||||
public class TrulyRareFish : BaseMagicFish
|
||||
{
|
||||
public override int Bonus{ get{ return 5; } }
|
||||
public override StatType Type{ get{ return StatType.Str; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1041075; } } // truly rare fish
|
||||
|
||||
[Constructable]
|
||||
public TrulyRareFish() : base( 76 )
|
||||
{
|
||||
}
|
||||
|
||||
public TrulyRareFish( 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 ( Hue == 376 )
|
||||
Hue = 76;
|
||||
}
|
||||
}
|
||||
|
||||
public class PeculiarFish : BaseMagicFish
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1041076; } } // highly peculiar fish
|
||||
|
||||
[Constructable]
|
||||
public PeculiarFish() : base( 66 )
|
||||
{
|
||||
}
|
||||
|
||||
public PeculiarFish( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool Apply( Mobile from )
|
||||
{
|
||||
from.Stam += 10;
|
||||
return true;
|
||||
}
|
||||
|
||||
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 ( Hue == 266 )
|
||||
Hue = 66;
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Items/Resources/Reagents/BaseReagent.cs
Normal file
41
Scripts/Items/Resources/Reagents/BaseReagent.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseReagent : Item
|
||||
{
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
public BaseReagent( int itemID ) : this( itemID, 1 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseReagent( int itemID, int amount ) : base( itemID )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public BaseReagent( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
37
Scripts/Items/Resources/Reagents/BlackPearl.cs
Normal file
37
Scripts/Items/Resources/Reagents/BlackPearl.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BlackPearl : BaseReagent
|
||||
{
|
||||
[Constructable]
|
||||
public BlackPearl() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BlackPearl( int amount ) : base( 0xF7A, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public BlackPearl( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
39
Scripts/Items/Resources/Reagents/Bloodmoss.cs
Normal file
39
Scripts/Items/Resources/Reagents/Bloodmoss.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Bloodmoss : BaseReagent
|
||||
{
|
||||
[Constructable]
|
||||
public Bloodmoss() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Bloodmoss( int amount ) : base( 0xF7B, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public Bloodmoss( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
39
Scripts/Items/Resources/Reagents/Garlic.cs
Normal file
39
Scripts/Items/Resources/Reagents/Garlic.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Garlic : BaseReagent
|
||||
{
|
||||
[Constructable]
|
||||
public Garlic() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Garlic( int amount ) : base( 0xF84, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public Garlic( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
39
Scripts/Items/Resources/Reagents/Ginseng.cs
Normal file
39
Scripts/Items/Resources/Reagents/Ginseng.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Ginseng : BaseReagent
|
||||
{
|
||||
[Constructable]
|
||||
public Ginseng() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Ginseng( int amount ) : base( 0xF85, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public Ginseng( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
39
Scripts/Items/Resources/Reagents/MandrakeRoot.cs
Normal file
39
Scripts/Items/Resources/Reagents/MandrakeRoot.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MandrakeRoot : BaseReagent
|
||||
{
|
||||
[Constructable]
|
||||
public MandrakeRoot() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MandrakeRoot( int amount ) : base( 0xF86, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public MandrakeRoot( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
37
Scripts/Items/Resources/Reagents/Nightshade.cs
Normal file
37
Scripts/Items/Resources/Reagents/Nightshade.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Nightshade : BaseReagent
|
||||
{
|
||||
[Constructable]
|
||||
public Nightshade() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Nightshade( int amount ) : base( 0xF88, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public Nightshade( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
39
Scripts/Items/Resources/Reagents/SpidersSilk.cs
Normal file
39
Scripts/Items/Resources/Reagents/SpidersSilk.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SpidersSilk : BaseReagent
|
||||
{
|
||||
[Constructable]
|
||||
public SpidersSilk() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SpidersSilk( int amount ) : base( 0xF8D, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public SpidersSilk( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
39
Scripts/Items/Resources/Reagents/SulfurousAsh.cs
Normal file
39
Scripts/Items/Resources/Reagents/SulfurousAsh.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SulfurousAsh : BaseReagent
|
||||
{
|
||||
[Constructable]
|
||||
public SulfurousAsh() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SulfurousAsh( int amount ) : base( 0xF8C, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public SulfurousAsh( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
604
Scripts/Items/Resources/Supplies.cs
Normal file
604
Scripts/Items/Resources/Supplies.cs
Normal file
|
|
@ -0,0 +1,604 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using System.Text;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BaseSupply : Item
|
||||
{
|
||||
[Constructable]
|
||||
public BaseSupply() : base( 0x1709 )
|
||||
{
|
||||
Name = "bottles";
|
||||
SpecialName = "Bottle";
|
||||
Weight = 10;
|
||||
}
|
||||
|
||||
public override void OnLocationChange( Point3D oldLocation )
|
||||
{
|
||||
if ( RootParentEntity is PlayerMobile )
|
||||
{
|
||||
Type itemType = ScriptCompiler.FindTypeByName( SpecialName );
|
||||
Item supply = (Item)Activator.CreateInstance(itemType);
|
||||
supply.Amount = 100;
|
||||
if ( Name == "lockpicks" ){ supply.Amount = 50; }
|
||||
else if ( Name == "boards" ){ supply.ItemID = 0x1BD7; supply.Weight = 1.0; }
|
||||
((Mobile)RootParentEntity).AddToBackpack ( supply );
|
||||
this.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
if ( this.Name == "lockpicks" )
|
||||
list.Add( 1070722, "A Bundle of 50");
|
||||
else
|
||||
list.Add( 1070722, "A Bundle of 100");
|
||||
}
|
||||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
list.Add( Name );
|
||||
}
|
||||
|
||||
public BaseSupply( 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 SupplyBottles : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyBottles()
|
||||
{
|
||||
ItemID = 0x1709;
|
||||
Name = "bottles";
|
||||
SpecialName = "Bottle";
|
||||
}
|
||||
|
||||
public SupplyBottles( 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 SupplyLeather : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyLeather()
|
||||
{
|
||||
ItemID = 0x170A;
|
||||
Name = "leather";
|
||||
SpecialName = "Leather";
|
||||
}
|
||||
|
||||
public SupplyLeather( 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 SupplyLogs : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyLogs()
|
||||
{
|
||||
ItemID = 0x172F;
|
||||
Name = "logs";
|
||||
SpecialName = "WoodBoard";
|
||||
}
|
||||
|
||||
public SupplyLogs( 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 SupplyBoards : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyBoards()
|
||||
{
|
||||
ItemID = 0x17BB;
|
||||
Name = "boards";
|
||||
SpecialName = "WoodBoard";
|
||||
}
|
||||
|
||||
public SupplyBoards( 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 SupplyIngots : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyIngots()
|
||||
{
|
||||
ItemID = 0x17BC;
|
||||
Name = "ingots";
|
||||
SpecialName = "IronIngot";
|
||||
}
|
||||
|
||||
public SupplyIngots( 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 SupplyCloth : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyCloth()
|
||||
{
|
||||
ItemID = 0x1730;
|
||||
Name = "cloth";
|
||||
SpecialName = "Cloth";
|
||||
}
|
||||
|
||||
public SupplyCloth( 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 SupplyMaps : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyMaps()
|
||||
{
|
||||
ItemID = 0x1644;
|
||||
Name = "blank maps";
|
||||
SpecialName = "BlankMap";
|
||||
}
|
||||
|
||||
public SupplyMaps( 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 SupplyScrolls : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyScrolls()
|
||||
{
|
||||
ItemID = 0x1794;
|
||||
Name = "blank scrolls";
|
||||
SpecialName = "BlankScroll";
|
||||
}
|
||||
|
||||
public SupplyScrolls( 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 SupplyBandages : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyBandages()
|
||||
{
|
||||
ItemID = 0x1795;
|
||||
Name = "bandages";
|
||||
SpecialName = "Bandage";
|
||||
}
|
||||
|
||||
public SupplyBandages( 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 SupplyArrows : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyArrows()
|
||||
{
|
||||
ItemID = 0xF41;
|
||||
Name = "arrows";
|
||||
SpecialName = "Arrow";
|
||||
}
|
||||
|
||||
public SupplyArrows( 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 SupplyBolts : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyBolts()
|
||||
{
|
||||
ItemID = 0x1BFD;
|
||||
Name = "bolts";
|
||||
SpecialName = "Bolt";
|
||||
}
|
||||
|
||||
public SupplyBolts( 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 SupplyLockpicks : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyLockpicks()
|
||||
{
|
||||
ItemID = 0x14FD;
|
||||
Name = "lockpicks";
|
||||
SpecialName = "Lockpick";
|
||||
}
|
||||
|
||||
public SupplyLockpicks( 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 SupplyBlackPearl : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyBlackPearl()
|
||||
{
|
||||
ItemID = 0x17B3;
|
||||
Name = "black pearls";
|
||||
SpecialName = "BlackPearl";
|
||||
}
|
||||
|
||||
public SupplyBlackPearl( 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 SupplyBloodmoss : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyBloodmoss()
|
||||
{
|
||||
ItemID = 0x17B4;
|
||||
Name = "blood moss";
|
||||
SpecialName = "Bloodmoss";
|
||||
}
|
||||
|
||||
public SupplyBloodmoss( 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 SupplyGarlic : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyGarlic()
|
||||
{
|
||||
ItemID = 0x17B5;
|
||||
Name = "garlic";
|
||||
SpecialName = "Garlic";
|
||||
}
|
||||
|
||||
public SupplyGarlic( 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 SupplyGinseng : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyGinseng()
|
||||
{
|
||||
ItemID = 0x17B6;
|
||||
Name = "ginseng";
|
||||
SpecialName = "Ginseng";
|
||||
}
|
||||
|
||||
public SupplyGinseng( 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 SupplyMandrakeRoot : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyMandrakeRoot()
|
||||
{
|
||||
ItemID = 0x17B7;
|
||||
Name = "mandrake roots";
|
||||
SpecialName = "MandrakeRoot";
|
||||
}
|
||||
|
||||
public SupplyMandrakeRoot( 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 SupplyNightshade : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplyNightshade()
|
||||
{
|
||||
ItemID = 0x17B8;
|
||||
Name = "nightshade";
|
||||
SpecialName = "Nightshade";
|
||||
}
|
||||
|
||||
public SupplyNightshade( 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 SupplySpidersSilk : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplySpidersSilk()
|
||||
{
|
||||
ItemID = 0x17B9;
|
||||
Name = "spider silk";
|
||||
SpecialName = "SpidersSilk";
|
||||
}
|
||||
|
||||
public SupplySpidersSilk( 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 SupplySulfurousAsh : BaseSupply
|
||||
{
|
||||
[Constructable]
|
||||
public SupplySulfurousAsh()
|
||||
{
|
||||
ItemID = 0x17BA;
|
||||
Name = "sulfurous ashes";
|
||||
SpecialName = "SulfurousAsh";
|
||||
}
|
||||
|
||||
public SupplySulfurousAsh( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
65
Scripts/Items/Resources/Tailor/BoltOfCloth.cs
Normal file
65
Scripts/Items/Resources/Tailor/BoltOfCloth.cs
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0xF95, 0xF96, 0xF97, 0xF98, 0xF99, 0xF9A, 0xF9B, 0xF9C )]
|
||||
public class BoltOfCloth : Item, IScissorable, IDyable
|
||||
{
|
||||
[Constructable]
|
||||
public BoltOfCloth() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BoltOfCloth( int amount ) : base( 0xF95 )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 5.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public BoltOfCloth( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted ) return false;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
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 bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
|
||||
base.ScissorHelper( from, new UncutCloth(), 25 );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
int number = (Amount == 1) ? 1049122 : 1049121;
|
||||
|
||||
from.Send( new MessageLocalized( Serial, ItemID, MessageType.Label, 0x3B2, 3, number, "", (Amount * 50).ToString() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Items/Resources/Tailor/Bone.cs
Normal file
41
Scripts/Items/Resources/Tailor/Bone.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Bone : Item
|
||||
{
|
||||
[Constructable]
|
||||
public Bone() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Bone( int amount ) : base( 0xf7e )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public Bone( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Scripts/Items/Resources/Tailor/Cloth.cs
Normal file
72
Scripts/Items/Resources/Tailor/Cloth.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1766, 0x1768 )]
|
||||
public class Cloth : Item, IScissorable, IDyable
|
||||
{
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Cloth() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Cloth( int amount ) : base( 0x1766 )
|
||||
{
|
||||
Name = "cloth";
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Cloth( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
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 override void OnSingleClick( Mobile from )
|
||||
{
|
||||
int number = (Amount == 1) ? 1049124 : 1049123;
|
||||
|
||||
from.Send( new MessageLocalized( Serial, ItemID, MessageType.Regular, 0x3B2, 3, number, "", Amount.ToString() ) );
|
||||
}
|
||||
|
||||
public bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
|
||||
base.ScissorHelper( from, new Bandage(), 1 );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
122
Scripts/Items/Resources/Tailor/Cotton.cs
Normal file
122
Scripts/Items/Resources/Tailor/Cotton.cs
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Cotton : Item, IDyable
|
||||
{
|
||||
[Constructable]
|
||||
public Cotton() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Cotton( int amount ) : base( 0xDF9 )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Cotton( 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 bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 502655 ); // What spinning wheel do you wish to spin this on?
|
||||
from.Target = new PickWheelTarget( this );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
public static void OnSpun( ISpinningWheel wheel, Mobile from, Item yarn )
|
||||
{
|
||||
if ( yarn != null )
|
||||
{
|
||||
Item item = new SpoolOfThread( (yarn.Amount * 6 ) );
|
||||
item.Hue = yarn.Hue;
|
||||
yarn.Delete();
|
||||
|
||||
from.AddToBackpack( item );
|
||||
from.SendLocalizedMessage( 1010577 ); // You put the spools of thread in your backpack.
|
||||
}
|
||||
}
|
||||
|
||||
private class PickWheelTarget : Target
|
||||
{
|
||||
private Cotton m_Cotton;
|
||||
|
||||
public PickWheelTarget( Cotton cotton ) : base( 3, false, TargetFlags.None )
|
||||
{
|
||||
m_Cotton = cotton;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Cotton.Deleted )
|
||||
return;
|
||||
|
||||
ISpinningWheel wheel = targeted as ISpinningWheel;
|
||||
|
||||
if ( wheel == null && targeted is AddonComponent )
|
||||
wheel = ((AddonComponent)targeted).Addon as ISpinningWheel;
|
||||
|
||||
if ( wheel is Item )
|
||||
{
|
||||
Item item = (Item)wheel;
|
||||
|
||||
if ( !m_Cotton.IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if ( wheel.Spinning )
|
||||
{
|
||||
from.SendLocalizedMessage( 502656 ); // That spinning wheel is being used.
|
||||
}
|
||||
else
|
||||
{
|
||||
wheel.BeginSpin( new SpinCallback( Cotton.OnSpun ), from, m_Cotton );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502658 ); // Use that on a spinning wheel.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
110
Scripts/Items/Resources/Tailor/Flax.cs
Normal file
110
Scripts/Items/Resources/Tailor/Flax.cs
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Flax : Item
|
||||
{
|
||||
[Constructable]
|
||||
public Flax() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Flax( int amount ) : base( 0x1A9C )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Flax( 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 override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 502655 ); // What spinning wheel do you wish to spin this on?
|
||||
from.Target = new PickWheelTarget( this );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
public static void OnSpun( ISpinningWheel wheel, Mobile from, Item yarn )
|
||||
{
|
||||
if ( yarn != null )
|
||||
{
|
||||
Item item = new SpoolOfThread( (yarn.Amount * 6 ) );
|
||||
item.Hue = yarn.Hue;
|
||||
yarn.Delete();
|
||||
|
||||
from.AddToBackpack( item );
|
||||
from.SendLocalizedMessage( 1010577 ); // You put the spools of thread in your backpack.
|
||||
}
|
||||
}
|
||||
|
||||
private class PickWheelTarget : Target
|
||||
{
|
||||
private Flax m_Flax;
|
||||
|
||||
public PickWheelTarget( Flax flax ) : base( 3, false, TargetFlags.None )
|
||||
{
|
||||
m_Flax = flax;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Flax.Deleted )
|
||||
return;
|
||||
|
||||
ISpinningWheel wheel = targeted as ISpinningWheel;
|
||||
|
||||
if ( wheel == null && targeted is AddonComponent )
|
||||
wheel = ((AddonComponent)targeted).Addon as ISpinningWheel;
|
||||
|
||||
if ( wheel is Item )
|
||||
{
|
||||
Item item = (Item)wheel;
|
||||
|
||||
if ( !m_Flax.IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if ( wheel.Spinning )
|
||||
{
|
||||
from.SendLocalizedMessage( 502656 ); // That spinning wheel is being used.
|
||||
}
|
||||
else
|
||||
{
|
||||
wheel.BeginSpin( new SpinCallback( Flax.OnSpun ), from, m_Flax );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502658 ); // Use that on a spinning wheel.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
120
Scripts/Items/Resources/Tailor/Hides.cs
Normal file
120
Scripts/Items/Resources/Tailor/Hides.cs
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseHides : Item
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get{ return m_Resource; }
|
||||
set{ m_Resource = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int) m_Resource );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
OreInfo info = new OreInfo( reader.ReadInt(), reader.ReadInt(), reader.ReadString() );
|
||||
|
||||
m_Resource = CraftResources.GetFromOreInfo( info );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BaseHides( CraftResource resource ) : this( resource, 1 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseHides( CraftResource resource, int amount ) : base( 0x1079 )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 5.0;
|
||||
Amount = amount;
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseHides( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1047023;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1079, 0x1078 )]
|
||||
public class Hides : BaseHides, IScissorable
|
||||
{
|
||||
[Constructable]
|
||||
public Hides() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Hides( int amount ) : base( CraftResource.Leathered, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public Hides( 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 bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
|
||||
if ( !IsChildOf ( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
}
|
||||
base.ScissorHelper( from, new Leather(), 1 );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
106
Scripts/Items/Resources/Tailor/Leathers.cs
Normal file
106
Scripts/Items/Resources/Tailor/Leathers.cs
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseLeather : Item
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get{ return m_Resource; }
|
||||
set{ m_Resource = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int) m_Resource );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
OreInfo info = new OreInfo( reader.ReadInt(), reader.ReadInt(), reader.ReadString() );
|
||||
|
||||
m_Resource = CraftResources.GetFromOreInfo( info );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BaseLeather( CraftResource resource ) : this( resource, 1 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseLeather( CraftResource resource, int amount ) : base( 0x1081 )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 1.0;
|
||||
Amount = amount;
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseLeather( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1047022;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1081, 0x1082 )]
|
||||
public class Leather : BaseLeather
|
||||
{
|
||||
[Constructable]
|
||||
public Leather() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Leather( int amount ) : base( CraftResource.Leathered, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public Leather( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Scripts/Items/Resources/Tailor/UncutCloth.cs
Normal file
72
Scripts/Items/Resources/Tailor/UncutCloth.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class UncutCloth : Item, IScissorable, IDyable
|
||||
{
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public UncutCloth() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public UncutCloth( int amount ) : base( 0x1767 )
|
||||
{
|
||||
Name = "uncut cloth";
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
ItemID = Utility.RandomList( 0x175D, 0x175E, 0x175F, 0x1760, 0x1761, 0x1762, 0x1763, 0x1764, 0x1765, 0x1767 );
|
||||
}
|
||||
|
||||
public UncutCloth( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
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 override void OnSingleClick( Mobile from )
|
||||
{
|
||||
int number = (Amount == 1) ? 1049124 : 1049123;
|
||||
|
||||
from.Send( new MessageLocalized( Serial, ItemID, MessageType.Regular, 0x3B2, 3, number, "", Amount.ToString() ) );
|
||||
}
|
||||
|
||||
public bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
|
||||
base.ScissorHelper( from, new Cloth(), 2 );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
165
Scripts/Items/Resources/Tailor/Wool.cs
Normal file
165
Scripts/Items/Resources/Tailor/Wool.cs
Normal file
|
|
@ -0,0 +1,165 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Wool : Item, IDyable
|
||||
{
|
||||
[Constructable]
|
||||
public Wool() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Wool( int amount ) : base( 0xDF8 )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 4.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Wool( 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 bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 502655 ); // What spinning wheel do you wish to spin this on?
|
||||
from.Target = new PickWheelTarget( this );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
public static void OnSpun( ISpinningWheel wheel, Mobile from, Item yarn )
|
||||
{
|
||||
if ( yarn != null )
|
||||
{
|
||||
Item item = new DarkYarn( (yarn.Amount * 3 ) );
|
||||
item.Hue = yarn.Hue;
|
||||
yarn.Delete();
|
||||
|
||||
from.AddToBackpack( item );
|
||||
from.SendLocalizedMessage( 1010576 ); // You put the balls of yarn in your backpack.
|
||||
}
|
||||
}
|
||||
|
||||
private class PickWheelTarget : Target
|
||||
{
|
||||
private Wool m_Wool;
|
||||
|
||||
public PickWheelTarget( Wool wool ) : base( 3, false, TargetFlags.None )
|
||||
{
|
||||
m_Wool = wool;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Wool.Deleted )
|
||||
return;
|
||||
|
||||
ISpinningWheel wheel = targeted as ISpinningWheel;
|
||||
|
||||
if ( wheel == null && targeted is AddonComponent )
|
||||
wheel = ((AddonComponent)targeted).Addon as ISpinningWheel;
|
||||
|
||||
if ( wheel is Item )
|
||||
{
|
||||
Item item = (Item)wheel;
|
||||
|
||||
if ( !m_Wool.IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if ( wheel.Spinning )
|
||||
{
|
||||
from.SendLocalizedMessage( 502656 ); // That spinning wheel is being used.
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_Wool is TaintedWool ) wheel.BeginSpin( new SpinCallback( TaintedWool.OnSpun ), from, m_Wool );
|
||||
else wheel.BeginSpin( new SpinCallback( Wool.OnSpun ), from, m_Wool );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502658 ); // Use that on a spinning wheel.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public class TaintedWool : Wool
|
||||
{
|
||||
[Constructable]
|
||||
public TaintedWool() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public TaintedWool( int amount ) : base( 0x101F )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 4.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public TaintedWool( 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();
|
||||
}
|
||||
|
||||
new public static void OnSpun( ISpinningWheel wheel, Mobile from, Item yarn )
|
||||
{
|
||||
if ( yarn != null )
|
||||
{
|
||||
Item item = new DarkYarn( yarn.Amount );
|
||||
item.Hue = yarn.Hue;
|
||||
yarn.Delete();
|
||||
|
||||
from.AddToBackpack( item );
|
||||
from.SendLocalizedMessage( 1010574 ); // You put a ball of yarn in your backpack.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
291
Scripts/Items/Resources/Tailor/YarnsAndThreads.cs
Normal file
291
Scripts/Items/Resources/Tailor/YarnsAndThreads.cs
Normal file
|
|
@ -0,0 +1,291 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseClothMaterial : Item, IDyable
|
||||
{
|
||||
public BaseClothMaterial( int itemID ) : this( itemID, 1 )
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
public BaseClothMaterial( int itemID, int amount ) : base( itemID )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public BaseClothMaterial( 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 bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 500366 ); // Select a loom to use that on.
|
||||
from.Target = new PickLoomTarget( this );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
private class PickLoomTarget : Target
|
||||
{
|
||||
private BaseClothMaterial m_Material;
|
||||
|
||||
public PickLoomTarget( BaseClothMaterial material ) : base( 3, false, TargetFlags.None )
|
||||
{
|
||||
m_Material = material;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Material.Deleted )
|
||||
return;
|
||||
|
||||
ILoom loom = targeted as ILoom;
|
||||
|
||||
if ( loom == null && targeted is AddonComponent )
|
||||
loom = ((AddonComponent)targeted).Addon as ILoom;
|
||||
|
||||
if ( loom != null )
|
||||
{
|
||||
if ( !m_Material.IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
int cycle = m_Material.Amount;
|
||||
int looms = loom.Phase;
|
||||
int amount = 0;
|
||||
|
||||
bool sendMessage = false;
|
||||
|
||||
while ( cycle > 0 )
|
||||
{
|
||||
cycle--;
|
||||
|
||||
if ( looms >= 4 )
|
||||
{
|
||||
looms = 0;
|
||||
amount++;
|
||||
sendMessage = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
looms++;
|
||||
}
|
||||
}
|
||||
|
||||
m_Material.Delete();
|
||||
loom.Phase = looms;
|
||||
|
||||
if ( sendMessage )
|
||||
{
|
||||
Item create = new BoltOfCloth(amount);
|
||||
create.Hue = m_Material.Hue;
|
||||
from.AddToBackpack( create );
|
||||
|
||||
from.SendLocalizedMessage( 500368 ); // You create some cloth and put it in your backpack.
|
||||
if ( loom.Phase > 0 ){ from.SendMessage( "The loom still has some incomplete cloth started." ); }
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "You don't have enough to create a bolt of cloth." );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 500367 ); // Try using that on a loom.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class BaseString: BaseClothMaterial
|
||||
{
|
||||
public BaseString( int itemID, int amount ) : base( itemID )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public BaseString( 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 DarkYarn : BaseString
|
||||
{
|
||||
[Constructable]
|
||||
public DarkYarn() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DarkYarn( int amount ) : base( 0xE1D, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public DarkYarn( 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 LightYarn : BaseString
|
||||
{
|
||||
[Constructable]
|
||||
public LightYarn() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LightYarn( int amount ) : base( 0xE1E, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public LightYarn( 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 LightYarnUnraveled : BaseString
|
||||
{
|
||||
[Constructable]
|
||||
public LightYarnUnraveled() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LightYarnUnraveled( int amount ) : base( 0xE1F, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public LightYarnUnraveled( 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 SpoolOfThread : BaseClothMaterial
|
||||
{
|
||||
[Constructable]
|
||||
public SpoolOfThread() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SpoolOfThread( int amount ) : base( 0xFA0, amount )
|
||||
{
|
||||
Name = "spool of thread";
|
||||
}
|
||||
|
||||
public SpoolOfThread( 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();
|
||||
|
||||
ItemID = 0x543A;
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Scripts/Items/Resources/Tinkering/CrystalPowder.cs
Normal file
40
Scripts/Items/Resources/Tinkering/CrystalPowder.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CrystalPowder : Item
|
||||
{
|
||||
[Constructable]
|
||||
public CrystalPowder() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CrystalPowder( int amount ) : base( 0x0F05 )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 0.1;
|
||||
Name = "crystal powder";
|
||||
}
|
||||
|
||||
public CrystalPowder( 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