#W# Initial Commit: Avatars Conquest
This commit is contained in:
commit
8eae46895e
7512 changed files with 416187 additions and 0 deletions
52
Scripts/Items/Farming/FarmableCabbage.cs
Normal file
52
Scripts/Items/Farming/FarmableCabbage.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableCabbage : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return 0x0DC4;
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Cabbage cabbage = new Cabbage();
|
||||
|
||||
cabbage.ItemID = Utility.Random( 3195, 2 );
|
||||
|
||||
return cabbage;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 3254;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableCabbage() : base( GetCropID() )
|
||||
{
|
||||
Name = "cabbage";
|
||||
}
|
||||
|
||||
public FarmableCabbage( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Farming/FarmableCantaloupe.cs
Normal file
52
Scripts/Items/Farming/FarmableCantaloupe.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableCantaloupe : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return 0x01FB;
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Cantaloupe cantaloupe = new Cantaloupe();
|
||||
|
||||
cantaloupe.ItemID = 0xc79;
|
||||
|
||||
return cantaloupe;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 0x0C60;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableCantaloupe() : base( GetCropID() )
|
||||
{
|
||||
Name = "cantaloupe";
|
||||
}
|
||||
|
||||
public FarmableCantaloupe( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
53
Scripts/Items/Farming/FarmableCarrot.cs
Normal file
53
Scripts/Items/Farming/FarmableCarrot.cs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableCarrot : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return 3190;
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Carrot carrot = new Carrot();
|
||||
|
||||
carrot.ItemID = Utility.Random( 3191, 2 );
|
||||
carrot.Amount = 6;
|
||||
|
||||
return carrot;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 3254;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableCarrot() : base( GetCropID() )
|
||||
{
|
||||
Name = "carrots";
|
||||
}
|
||||
|
||||
public FarmableCarrot( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Farming/FarmableCorn.cs
Normal file
52
Scripts/Items/Farming/FarmableCorn.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableCorn : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return 0x0C7D;
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
EarOfCorn corn = new EarOfCorn();
|
||||
|
||||
corn.ItemID = 0xC81;
|
||||
|
||||
return corn;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 0x0C7E;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableCorn() : base( GetCropID() )
|
||||
{
|
||||
Name = "corn";
|
||||
}
|
||||
|
||||
public FarmableCorn( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Farming/FarmableCotton.cs
Normal file
48
Scripts/Items/Farming/FarmableCotton.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableCotton : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return Utility.Random( 3153, 4 );
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
return new Cotton();
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 3254;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableCotton() : base( GetCropID() )
|
||||
{
|
||||
Name = "cotton";
|
||||
}
|
||||
|
||||
public FarmableCotton( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
115
Scripts/Items/Farming/FarmableCrop.cs
Normal file
115
Scripts/Items/Farming/FarmableCrop.cs
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Regions;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class FarmableCrop : Item
|
||||
{
|
||||
private bool m_Picked;
|
||||
|
||||
public abstract Item GetCropObject();
|
||||
public abstract int GetPickedID();
|
||||
|
||||
public FarmableCrop( int itemID ) : base( itemID )
|
||||
{
|
||||
Movable = false;
|
||||
Weight = -2.0;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
Map map = this.Map;
|
||||
Point3D loc = this.Location;
|
||||
|
||||
if ( Parent != null || Movable || IsLockedDown || IsSecure || map == null || map == Map.Internal )
|
||||
return;
|
||||
|
||||
if ( !from.InRange( loc, 2 ) || !from.InLOS( this ) )
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
|
||||
else if ( !m_Picked )
|
||||
OnPicked( from, loc, map );
|
||||
}
|
||||
|
||||
public override bool OnMoveOver( Mobile m )
|
||||
{
|
||||
if ( m is PlayerMobile && m.Alive )
|
||||
{
|
||||
this.OnDoubleClick( m );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual void OnPicked( Mobile from, Point3D loc, Map map )
|
||||
{
|
||||
ItemID = GetPickedID();
|
||||
|
||||
Item spawn = GetCropObject();
|
||||
|
||||
if ( spawn != null )
|
||||
{
|
||||
if ( from.PlaceInBackpack( spawn ) )
|
||||
{
|
||||
from.SendMessage( "You put it in your backpack." );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "You can't fit it in your backpack!" );
|
||||
spawn.MoveToWorld( loc, map );
|
||||
}
|
||||
}
|
||||
|
||||
m_Picked = true;
|
||||
|
||||
Unlink();
|
||||
|
||||
Timer.DelayCall( TimeSpan.FromMinutes( 5.0 ), new TimerCallback( Delete ) );
|
||||
}
|
||||
|
||||
public void Unlink()
|
||||
{
|
||||
ISpawner se = this.Spawner;
|
||||
|
||||
if ( se != null )
|
||||
{
|
||||
this.Spawner.Remove( this );
|
||||
this.Spawner = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public FarmableCrop( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
|
||||
writer.Write( m_Picked );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
m_Picked = reader.ReadBool();
|
||||
break;
|
||||
}
|
||||
if ( m_Picked )
|
||||
{
|
||||
Unlink();
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Farming/FarmableEggs.cs
Normal file
52
Scripts/Items/Farming/FarmableEggs.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableEggs : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return 0x1AD4;
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Eggs eggs = new Eggs();
|
||||
|
||||
eggs.Amount = Utility.RandomMinMax(3,5);
|
||||
|
||||
return eggs;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 0x1AD5;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableEggs() : base( GetCropID() )
|
||||
{
|
||||
Name = "nest";
|
||||
}
|
||||
|
||||
public FarmableEggs( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Farming/FarmableFlax.cs
Normal file
52
Scripts/Items/Farming/FarmableFlax.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableFlax : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return Utility.Random( 6809, 3 );
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Flax flax = new Flax();
|
||||
|
||||
flax.ItemID = 0x1A9C;
|
||||
|
||||
return flax;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 3254;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableFlax() : base( GetCropID() )
|
||||
{
|
||||
Name = "flax";
|
||||
}
|
||||
|
||||
public FarmableFlax( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Farming/FarmableGarlic.cs
Normal file
48
Scripts/Items/Farming/FarmableGarlic.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableGarlic : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return 0x18E1;
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Item item = new Garlic();
|
||||
item.Amount = 3;
|
||||
return item;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 0xCB0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableGarlic() : base( GetCropID() )
|
||||
{
|
||||
Name = "garlic";
|
||||
}
|
||||
|
||||
public FarmableGarlic( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Farming/FarmableGinseng.cs
Normal file
48
Scripts/Items/Farming/FarmableGinseng.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableGinseng : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return Utility.RandomList( 0x18E9, 0x18EA );
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Item item = new Ginseng();
|
||||
item.Amount = 1;
|
||||
return item;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 0xCB5;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableGinseng() : base( GetCropID() )
|
||||
{
|
||||
Name = "ginseng";
|
||||
}
|
||||
|
||||
public FarmableGinseng( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Scripts/Items/Farming/FarmableGrape.cs
Normal file
56
Scripts/Items/Farming/FarmableGrape.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableGrape : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return Utility.RandomList( 0x0DB6, 0x0DB7 );
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Grapes grape = new Grapes();
|
||||
|
||||
grape.ItemID = 0x9D1;
|
||||
grape.Amount = 2;
|
||||
|
||||
return grape;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
if ( GetCropID() == 0x0DB6 )
|
||||
return 0x0CEE;
|
||||
|
||||
return 0x0CF2;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableGrape() : base( GetCropID() )
|
||||
{
|
||||
Name = "grape vine";
|
||||
}
|
||||
|
||||
public FarmableGrape( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
53
Scripts/Items/Farming/FarmableGreenGourd.cs
Normal file
53
Scripts/Items/Farming/FarmableGreenGourd.cs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableGreenGourd : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return 0x01FE;
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
GreenGourd gourd = new GreenGourd();
|
||||
|
||||
gourd.ItemID = 0xC66;
|
||||
gourd.Amount = 2;
|
||||
|
||||
return gourd;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 0x0C60;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableGreenGourd() : base( GetCropID() )
|
||||
{
|
||||
Name = "gourds";
|
||||
}
|
||||
|
||||
public FarmableGreenGourd( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Farming/FarmableHoneydewMelon.cs
Normal file
52
Scripts/Items/Farming/FarmableHoneydewMelon.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableHoneydewMelon : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return 0x01FC;
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Grapes grape = new Grapes();
|
||||
|
||||
grape.ItemID = 0xC74;
|
||||
|
||||
return grape;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 0x0C60;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableHoneydewMelon() : base( GetCropID() )
|
||||
{
|
||||
Name = "honeydew melon";
|
||||
}
|
||||
|
||||
public FarmableHoneydewMelon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Farming/FarmableLettuce.cs
Normal file
52
Scripts/Items/Farming/FarmableLettuce.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableLettuce : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return 0x0DC5;
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Lettuce lettuce = new Lettuce();
|
||||
|
||||
lettuce.ItemID = 0xc70;
|
||||
|
||||
return lettuce;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 0x0CB0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableLettuce() : base( GetCropID() )
|
||||
{
|
||||
Name = "lettuce";
|
||||
}
|
||||
|
||||
public FarmableLettuce( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Farming/FarmableMandrakeRoot.cs
Normal file
48
Scripts/Items/Farming/FarmableMandrakeRoot.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableMandrakeRoot : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return Utility.RandomList( 0x18DF, 0x18E0 );
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Item item = new MandrakeRoot();
|
||||
item.Amount = 1;
|
||||
return item;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 0xCB6;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableMandrakeRoot() : base( GetCropID() )
|
||||
{
|
||||
Name = "mandrake root";
|
||||
}
|
||||
|
||||
public FarmableMandrakeRoot( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Farming/FarmableNightshade.cs
Normal file
48
Scripts/Items/Farming/FarmableNightshade.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableNightshade : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return Utility.RandomList( 0x18E5, 0x18E6 );
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Item item = new Nightshade();
|
||||
item.Amount = 1;
|
||||
return item;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 0xCAF;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableNightshade() : base( GetCropID() )
|
||||
{
|
||||
Name = "nightshade";
|
||||
}
|
||||
|
||||
public FarmableNightshade( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
53
Scripts/Items/Farming/FarmableOnion.cs
Normal file
53
Scripts/Items/Farming/FarmableOnion.cs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableOnion : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return 3183;
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Onion onion = new Onion();
|
||||
|
||||
onion.ItemID = Utility.Random( 3181, 2 );
|
||||
onion.Amount = 6;
|
||||
|
||||
return onion;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 3254;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableOnion() : base( GetCropID() )
|
||||
{
|
||||
Name = "onions";
|
||||
}
|
||||
|
||||
public FarmableOnion( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
53
Scripts/Items/Farming/FarmablePumpkin.cs
Normal file
53
Scripts/Items/Farming/FarmablePumpkin.cs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmablePumpkin : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return 0x0DC6;
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Pumpkin pumpkin = new Pumpkin();
|
||||
|
||||
pumpkin.ItemID = 0xC6A;
|
||||
|
||||
return pumpkin;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 0x0C5F;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmablePumpkin(): base( GetCropID() )
|
||||
{
|
||||
Name = "pumpkin";
|
||||
}
|
||||
|
||||
public FarmablePumpkin( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Farming/FarmableSquash.cs
Normal file
52
Scripts/Items/Farming/FarmableSquash.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableSquash : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return 0x020E;
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Squash squash = new Squash();
|
||||
|
||||
squash.ItemID = 0xc72;
|
||||
|
||||
return squash;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 0x0C60;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableSquash() : base( GetCropID() )
|
||||
{
|
||||
Name = "squash";
|
||||
}
|
||||
|
||||
public FarmableSquash( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
53
Scripts/Items/Farming/FarmableTomato.cs
Normal file
53
Scripts/Items/Farming/FarmableTomato.cs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableTomato : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return 0x01FA;
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Tomato tomato = new Tomato();
|
||||
|
||||
tomato.ItemID = 0x098F;
|
||||
tomato.Amount = 2;
|
||||
|
||||
return tomato;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 0x0CAD;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableTomato() : base( GetCropID() )
|
||||
{
|
||||
Name = "tomatoes";
|
||||
}
|
||||
|
||||
public FarmableTomato( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Farming/FarmableTurnip.cs
Normal file
52
Scripts/Items/Farming/FarmableTurnip.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableTurnip : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return Utility.Random( 3169, 3 );
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Turnip turnip = new Turnip();
|
||||
|
||||
turnip.ItemID = Utility.Random( 3385, 2 );
|
||||
|
||||
return turnip;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 3254;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableTurnip() : base( GetCropID() )
|
||||
{
|
||||
Name = "turnip";
|
||||
}
|
||||
|
||||
public FarmableTurnip( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Farming/FarmableWatermelon.cs
Normal file
52
Scripts/Items/Farming/FarmableWatermelon.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableWatermelon : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return 0x0DC7;
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
Watermelon watermelon = new Watermelon();
|
||||
|
||||
watermelon.ItemID = 0xC5C;
|
||||
|
||||
return watermelon;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 0x0C5F;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableWatermelon(): base( GetCropID() )
|
||||
{
|
||||
Name = "watermelon";
|
||||
}
|
||||
|
||||
public FarmableWatermelon( Serial serial ): base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Farming/FarmableWheat.cs
Normal file
48
Scripts/Items/Farming/FarmableWheat.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableWheat : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return Utility.Random( 3157, 4 );
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
return new WheatSheaf();
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 7869;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableWheat() : base( GetCropID() )
|
||||
{
|
||||
Name = "wheat";
|
||||
}
|
||||
|
||||
public FarmableWheat( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
53
Scripts/Items/Farming/FarmableYellowGourd.cs
Normal file
53
Scripts/Items/Farming/FarmableYellowGourd.cs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FarmableYellowGourd : FarmableCrop
|
||||
{
|
||||
public static int GetCropID()
|
||||
{
|
||||
return 0x01FD;
|
||||
}
|
||||
|
||||
public override Item GetCropObject()
|
||||
{
|
||||
YellowGourd gourd = new YellowGourd();
|
||||
|
||||
gourd.ItemID = 0xC64;
|
||||
gourd.Amount = 2;
|
||||
|
||||
return gourd;
|
||||
}
|
||||
|
||||
public override int GetPickedID()
|
||||
{
|
||||
return 0x0C60;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FarmableYellowGourd() : base( GetCropID() )
|
||||
{
|
||||
Name = "gourds";
|
||||
}
|
||||
|
||||
public FarmableYellowGourd( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue