#W# Initial Commit: Avatars Conquest
This commit is contained in:
commit
5df497787a
7510 changed files with 416048 additions and 0 deletions
476
Scripts/Items/Home/HouseSigns.cs
Normal file
476
Scripts/Items/Home/HouseSigns.cs
Normal file
|
|
@ -0,0 +1,476 @@
|
|||
using System;
|
||||
using Server.Prompts;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Furniture]
|
||||
public class HouseSigns : Item
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSigns() : base(3082)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Movable = true;
|
||||
Name = "sign";
|
||||
}
|
||||
|
||||
public HouseSigns(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
{
|
||||
list.Add( this.Name );
|
||||
if ( Movable )
|
||||
list.Add( 1070722, "Use Sign To Name It");
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1060640 ); // The item must be in your backpack to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Please Enter The New Name For This Sign");
|
||||
from.Prompt = new RenamePrompt( this );
|
||||
}
|
||||
}
|
||||
|
||||
private class RenamePrompt : Prompt
|
||||
{
|
||||
private HouseSigns m_Sign;
|
||||
|
||||
public RenamePrompt( HouseSigns sign )
|
||||
{
|
||||
m_Sign = sign;
|
||||
}
|
||||
|
||||
public override void OnResponse( Mobile from, string text )
|
||||
{
|
||||
m_Sign.Name = text;
|
||||
from.SendMessage("The Name has been changed");
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int) 0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable(0x0A96,0x0AA6)]
|
||||
public class HouseSignHerbalist : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignHerbalist()
|
||||
{
|
||||
Name = "herbalist sign";
|
||||
ItemID = 0x0A96;
|
||||
}
|
||||
public HouseSignHerbalist(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0AA7,0x0AA8)]
|
||||
public class HouseSignMiner : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignMiner()
|
||||
{
|
||||
Name = "miner sign";
|
||||
ItemID = 0x0AA7;
|
||||
}
|
||||
public HouseSignMiner(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0906,0x0907)]
|
||||
public class HouseSignDocks : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignDocks()
|
||||
{
|
||||
Name = "dock sign";
|
||||
ItemID = 0x0906;
|
||||
}
|
||||
public HouseSignDocks(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0908,0x0909)]
|
||||
public class HouseSignArms : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignArms()
|
||||
{
|
||||
Name = "arms sign";
|
||||
ItemID = 0x0908;
|
||||
}
|
||||
public HouseSignArms(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0B3B,0x0B4D)]
|
||||
public class HouseSignFisherman : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignFisherman()
|
||||
{
|
||||
Name = "fisherman sign";
|
||||
ItemID = 0x0B3B;
|
||||
}
|
||||
public HouseSignFisherman(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0B95,0x0B96)]
|
||||
public class HouseSignLibrary : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignLibrary()
|
||||
{
|
||||
Name = "library sign";
|
||||
ItemID = 0x0B95;
|
||||
}
|
||||
public HouseSignLibrary(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BA3,0x0BA4)]
|
||||
public class HouseSignFood : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignFood()
|
||||
{
|
||||
Name = "food sign";
|
||||
ItemID = 0x0BA3;
|
||||
}
|
||||
public HouseSignFood(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BA5,0x0BA6)]
|
||||
public class HouseSignTailor : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignTailor()
|
||||
{
|
||||
Name = "tailor sign";
|
||||
ItemID = 0x0BA5;
|
||||
}
|
||||
public HouseSignTailor(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BA7,0x0BA8)]
|
||||
public class HouseSignTinker : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignTinker()
|
||||
{
|
||||
Name = "tinker sign";
|
||||
ItemID = 0x0BA7;
|
||||
}
|
||||
public HouseSignTinker(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BA9,0x0BAA)]
|
||||
public class HouseSignButcher : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignButcher()
|
||||
{
|
||||
Name = "butcher sign";
|
||||
ItemID = 0x0BA9;
|
||||
}
|
||||
public HouseSignButcher(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BAB,0x0BAC)]
|
||||
public class HouseSignHealer : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignHealer()
|
||||
{
|
||||
Name = "healer sign";
|
||||
ItemID = 0x0BAB;
|
||||
}
|
||||
public HouseSignHealer(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BAD,0x0BAE)]
|
||||
public class HouseSignMage : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignMage()
|
||||
{
|
||||
Name = "mage sign";
|
||||
ItemID = 0x0BAD;
|
||||
}
|
||||
public HouseSignMage(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BAF,0x0BB0)]
|
||||
public class HouseSignCarpenter : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignCarpenter()
|
||||
{
|
||||
Name = "carpenter sign";
|
||||
ItemID = 0x0BAF;
|
||||
}
|
||||
public HouseSignCarpenter(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BB1,0x0BB2)]
|
||||
public class HouseSignMaps : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignMaps()
|
||||
{
|
||||
Name = "maps sign";
|
||||
ItemID = 0x0BB1;
|
||||
}
|
||||
public HouseSignMaps(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BB3,0x0BB4)]
|
||||
public class HouseSignInn : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignInn()
|
||||
{
|
||||
Name = "inn sign";
|
||||
ItemID = 0x0BB3;
|
||||
}
|
||||
public HouseSignInn(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BB5,0x0BB6)]
|
||||
public class HouseSignShipbuilder : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignShipbuilder()
|
||||
{
|
||||
Name = "shipbuilder sign";
|
||||
ItemID = 0x0BB5;
|
||||
}
|
||||
public HouseSignShipbuilder(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BB7,0x0BB8)]
|
||||
public class HouseSignStable : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignStable()
|
||||
{
|
||||
Name = "stable sign";
|
||||
ItemID = 0x0BB7;
|
||||
}
|
||||
public HouseSignStable(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BBB,0x0BBC)]
|
||||
public class HouseSignBard : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignBard()
|
||||
{
|
||||
Name = "bard sign";
|
||||
ItemID = 0x0BBB;
|
||||
}
|
||||
public HouseSignBard(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BBD,0x0BBE)]
|
||||
public class HouseSignBowyer : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignBowyer()
|
||||
{
|
||||
Name = "bowyer sign";
|
||||
ItemID = 0x0BBD;
|
||||
}
|
||||
public HouseSignBowyer(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BBF,0x0BC0)]
|
||||
public class HouseSignWeapons : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignWeapons()
|
||||
{
|
||||
Name = "weapons sign";
|
||||
ItemID = 0x0BBF;
|
||||
}
|
||||
public HouseSignWeapons(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BC1,0x0BC2)]
|
||||
public class HouseSignJewels : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignJewels()
|
||||
{
|
||||
Name = "jewelry sign";
|
||||
ItemID = 0x0BC1;
|
||||
}
|
||||
public HouseSignJewels(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BC3,0x0BC4)]
|
||||
public class HouseSignTavern : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignTavern()
|
||||
{
|
||||
Name = "tavern sign";
|
||||
ItemID = 0x0BC3;
|
||||
}
|
||||
public HouseSignTavern(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BC5,0x0BC6)]
|
||||
public class HouseSignAlchemy : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignAlchemy()
|
||||
{
|
||||
Name = "alchemy sign";
|
||||
ItemID = 0x0BC5;
|
||||
}
|
||||
public HouseSignAlchemy(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BC7,0x0BC8)]
|
||||
public class HouseSignSmithing : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignSmithing()
|
||||
{
|
||||
Name = "smithing sign";
|
||||
ItemID = 0x0BC7;
|
||||
}
|
||||
public HouseSignSmithing(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BCB,0x0BCC)]
|
||||
public class HouseSignProvisions : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignProvisions()
|
||||
{
|
||||
Name = "provisions sign";
|
||||
ItemID = 0x0BCB;
|
||||
}
|
||||
public HouseSignProvisions(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BCD,0x0BCE)]
|
||||
public class HouseSignArchery : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignArchery()
|
||||
{
|
||||
Name = "archery sign";
|
||||
ItemID = 0x0BCD;
|
||||
}
|
||||
public HouseSignArchery(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BCF,0x0BD0)]
|
||||
public class HouseSignWooden : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignWooden()
|
||||
{
|
||||
Name = "wooden sign";
|
||||
ItemID = 0x0BCF;
|
||||
}
|
||||
public HouseSignWooden(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0BD1,0x0BD2)]
|
||||
public class HouseSignBrass : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignBrass()
|
||||
{
|
||||
Name = "brass sign";
|
||||
ItemID = 0x0BD1;
|
||||
}
|
||||
public HouseSignBrass(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
|
||||
[Flipable(0x0C0B,0x0C0C)]
|
||||
public class HouseSignGold : HouseSigns
|
||||
{
|
||||
[Constructable]
|
||||
public HouseSignGold()
|
||||
{
|
||||
Name = "gold sign";
|
||||
ItemID = 0x0C0B;
|
||||
}
|
||||
public HouseSignGold(Serial serial) : base(serial){}
|
||||
public override void Serialize(GenericWriter writer){ base.Serialize(writer); writer.Write((int) 0); }
|
||||
public override void Deserialize(GenericReader reader){ base.Deserialize(reader); int version = reader.ReadInt(); }
|
||||
}
|
||||
}
|
||||
683
Scripts/Items/Home/InteriorDecorator.cs
Normal file
683
Scripts/Items/Home/InteriorDecorator.cs
Normal file
|
|
@ -0,0 +1,683 @@
|
|||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Multis;
|
||||
using Server.Network;
|
||||
using Server.Regions;
|
||||
using Server.Targeting;
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public enum DecorateCommand
|
||||
{
|
||||
None,
|
||||
Secure,
|
||||
Lockdown,
|
||||
Release,
|
||||
Turn,
|
||||
Up,
|
||||
Down,
|
||||
North,
|
||||
East,
|
||||
South,
|
||||
West,
|
||||
Close
|
||||
}
|
||||
|
||||
public class InteriorDecorator : Item
|
||||
{
|
||||
private DecorateCommand m_Command;
|
||||
|
||||
[Constructable]
|
||||
public InteriorDecorator() : base( 0x1EBA )
|
||||
{
|
||||
Name = "Homeowner Tools";
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public InteriorDecorator(Serial serial): base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public DecorateCommand Command
|
||||
{
|
||||
get { return m_Command; }
|
||||
set
|
||||
{
|
||||
m_Command = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public static bool InHouse(Mobile from)
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
|
||||
return (house != null && house.IsFriend(from));
|
||||
}
|
||||
|
||||
public static bool CheckUse(InteriorDecorator tool, Mobile from)
|
||||
{
|
||||
if (!InHouse(from))
|
||||
from.SendLocalizedMessage(502092); // You must be in your house to do this.
|
||||
else
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
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 (from.FindGump(typeof(InternalGump)) == null)
|
||||
from.SendGump(new InternalGump(from, this));
|
||||
|
||||
if (m_Command != DecorateCommand.None)
|
||||
from.Target = new InternalTarget(this);
|
||||
}
|
||||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
private readonly InteriorDecorator m_Decorator;
|
||||
|
||||
public InternalGump(Mobile from, InteriorDecorator decorator)
|
||||
: base(150, 50)
|
||||
{
|
||||
m_Decorator = decorator;
|
||||
|
||||
|
||||
AddBackground(0, 0, 170, 559 , 2600);
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddButton(40, 45, (decorator.Command == DecorateCommand.Secure ? 2154 : 2152), 2154, 1, GumpButtonType.Reply, 0);
|
||||
AddLabel(80, 50, 0, @"Secure"); //secure
|
||||
|
||||
AddButton(40, 85, (decorator.Command == DecorateCommand.Lockdown ? 2154 : 2152), 2154, 2, GumpButtonType.Reply, 0);
|
||||
AddLabel(80, 90, 0, @"Lockdown"); // lockdown
|
||||
|
||||
AddButton(40, 125, (decorator.Command == DecorateCommand.Release ? 2154 : 2152), 2154, 3, GumpButtonType.Reply, 0);
|
||||
AddLabel(80, 130, 0, @"Release"); // release
|
||||
|
||||
AddButton(40, 165, (decorator.Command == DecorateCommand.Turn ? 2154 : 2152), 2154, 4, GumpButtonType.Reply, 0);
|
||||
AddLabel(80, 170, 0, @"Turn"); // Turn
|
||||
|
||||
AddButton(40, 205, (decorator.Command == DecorateCommand.Up ? 2154 : 2152), 2154, 5, GumpButtonType.Reply, 0);
|
||||
AddLabel(80, 210, 0, @"Up"); // Up
|
||||
|
||||
AddButton(40, 245, (decorator.Command == DecorateCommand.Down ? 2154 : 2152), 2154, 6, GumpButtonType.Reply, 0);
|
||||
AddLabel(80, 250, 0, @"Down"); // Down
|
||||
|
||||
AddButton(40, 285, (decorator.Command == DecorateCommand.North ? 2154 : 2152), 2154, 7, GumpButtonType.Reply, 0);
|
||||
AddLabel(80, 290, 0, @"North"); // North
|
||||
|
||||
AddButton(40, 325, (decorator.Command == DecorateCommand.East ? 2154 : 2152), 2154, 8, GumpButtonType.Reply, 0);
|
||||
AddLabel(80, 330, 0, @"East"); // East
|
||||
|
||||
AddButton(40, 365, (decorator.Command == DecorateCommand.South ? 2154 : 2152), 2154, 9, GumpButtonType.Reply, 0);
|
||||
AddLabel(80, 370, 0, @"South"); // South
|
||||
|
||||
AddButton(40, 405, (decorator.Command == DecorateCommand.West ? 2154 : 2152), 2154, 10, GumpButtonType.Reply, 0);
|
||||
AddLabel(80, 410, 0, @"West"); // West
|
||||
|
||||
AddButton(40, 485, (decorator.Command == DecorateCommand.Close ? 2472 : 2472), 2154, 13, GumpButtonType.Reply, 0);
|
||||
AddLabel(80, 490, 0, @"Close"); // close
|
||||
|
||||
AddHtmlLocalized(0, 0, 0, 0, 4, false, false);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
DecorateCommand command = DecorateCommand.None;
|
||||
Mobile m = sender.Mobile;
|
||||
|
||||
int cliloc = 0;
|
||||
string c_String = null;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 1://secure
|
||||
c_String = "Select an object to secure."; // Select an object to secure.
|
||||
command = DecorateCommand.Secure;
|
||||
break;
|
||||
case 2://lockdown
|
||||
c_String = "Select an object to lock down."; // Select an object to lock down.
|
||||
command = DecorateCommand.Lockdown;
|
||||
break;
|
||||
case 3://release
|
||||
c_String = "Select an object to release."; // Select an object to release.
|
||||
command = DecorateCommand.Release;
|
||||
break;
|
||||
case 4://turn
|
||||
cliloc = 1073404; // Select an object to turn.
|
||||
command = DecorateCommand.Turn;
|
||||
break;
|
||||
case 5://up
|
||||
cliloc = 1073405; // Select an object to increase its height.
|
||||
command = DecorateCommand.Up;
|
||||
break;
|
||||
case 6://down
|
||||
cliloc = 1073406; // Select an object to lower its height.
|
||||
command = DecorateCommand.Down;
|
||||
break;
|
||||
case 7://north
|
||||
c_String = "Select an object to move north."; // Select an object to move north.
|
||||
command = DecorateCommand.North;
|
||||
break;
|
||||
case 8://east
|
||||
c_String = "Select an object to move east."; // Select an object to move east.
|
||||
command = DecorateCommand.East;
|
||||
break;
|
||||
case 9://south
|
||||
c_String = "Select an object to move south."; // Select an object to move south.
|
||||
command = DecorateCommand.South;
|
||||
break;
|
||||
case 10://west
|
||||
c_String = "Select an object to move west."; // Select an object to move west.
|
||||
command = DecorateCommand.West;
|
||||
break;
|
||||
case 12://Close
|
||||
c_String = "Close"; // Close
|
||||
command = DecorateCommand.Close;
|
||||
break;
|
||||
}
|
||||
|
||||
if (command != DecorateCommand.None & command != DecorateCommand.Close)
|
||||
{
|
||||
m_Decorator.Command = command;
|
||||
m.SendGump(new InternalGump(m, m_Decorator));
|
||||
|
||||
if (cliloc != 0)
|
||||
m.SendLocalizedMessage(cliloc);
|
||||
if (c_String != null)
|
||||
m.SendMessage(c_String);
|
||||
|
||||
m.Target = new InternalTarget(m_Decorator);
|
||||
}
|
||||
else
|
||||
{
|
||||
Target.Cancel(m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private readonly InteriorDecorator m_Decorator;
|
||||
|
||||
public InternalTarget(InteriorDecorator decorator)
|
||||
: base(-1, false, TargetFlags.None)
|
||||
{
|
||||
CheckLOS = false;
|
||||
|
||||
m_Decorator = decorator;
|
||||
}
|
||||
|
||||
protected override void OnTargetNotAccessible(Mobile from, object targeted)
|
||||
{
|
||||
OnTarget(from, targeted);
|
||||
}
|
||||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (targeted is Item && CheckUse(m_Decorator, from))
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
Item item = (Item)targeted;
|
||||
|
||||
bool isDecorableComponent = false;
|
||||
|
||||
if (item is AddonComponent || item is AddonContainerComponent || item is BaseAddonContainer)
|
||||
{
|
||||
object addon = null;
|
||||
int count = 0;
|
||||
|
||||
if (item is AddonComponent)
|
||||
{
|
||||
AddonComponent component = (AddonComponent)item;
|
||||
count = component.Addon.Components.Count;
|
||||
addon = component.Addon;
|
||||
}
|
||||
else if (item is AddonContainerComponent)
|
||||
{
|
||||
AddonContainerComponent component = (AddonContainerComponent)item;
|
||||
count = component.Addon.Components.Count;
|
||||
addon = component.Addon;
|
||||
}
|
||||
else if (item is BaseAddonContainer)
|
||||
{
|
||||
BaseAddonContainer container = (BaseAddonContainer)item;
|
||||
count = container.Components.Count;
|
||||
addon = container;
|
||||
}
|
||||
|
||||
if (m_Decorator.Command == DecorateCommand.Turn)
|
||||
{
|
||||
FlipableAddonAttribute[] attributes = (FlipableAddonAttribute[])addon.GetType().GetCustomAttributes(typeof(FlipableAddonAttribute), false);
|
||||
|
||||
if (attributes.Length > 0)
|
||||
isDecorableComponent = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool moveAddon = false;
|
||||
|
||||
if ( item is AddonComponent && ( m_Decorator.Command == DecorateCommand.North || m_Decorator.Command == DecorateCommand.South || m_Decorator.Command == DecorateCommand.East || m_Decorator.Command == DecorateCommand.West ) )
|
||||
moveAddon = true;
|
||||
|
||||
if (house == null || !house.IsFriend(from))
|
||||
{
|
||||
from.SendLocalizedMessage(502092); // You must be in your house to do
|
||||
}
|
||||
else if (item.Parent != null || !house.IsInside(item))
|
||||
{
|
||||
from.SendLocalizedMessage(1042270); // That is not in your house.
|
||||
}
|
||||
else if (!house.IsLockedDown(item) && !house.IsSecure(item) && !isDecorableComponent && !(item is BaseAddonDeed) && !moveAddon )
|
||||
{
|
||||
if (item is AddonComponent && m_Decorator.Command == DecorateCommand.Turn)
|
||||
from.SendLocalizedMessage(1042273); // You cannot turn that.
|
||||
else if (item is AddonComponent && m_Decorator.Command == DecorateCommand.Up)
|
||||
from.SendLocalizedMessage(1042274); // You cannot raise it up any higher.
|
||||
else if (item is AddonComponent && m_Decorator.Command == DecorateCommand.Down)
|
||||
from.SendLocalizedMessage(1042275); // You cannot lower it down any further.
|
||||
else if (m_Decorator.Command == DecorateCommand.Secure)
|
||||
Secure(item, from);
|
||||
else if (m_Decorator.Command == DecorateCommand.Lockdown)
|
||||
Lockdown(item, from);
|
||||
else
|
||||
from.SendMessage("That is not locked down or secured.");
|
||||
}
|
||||
else if (item is VendorRentalContract)
|
||||
{
|
||||
from.SendLocalizedMessage(1062491); // You cannot use the house decorator on that object.
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (m_Decorator.Command)
|
||||
{
|
||||
case DecorateCommand.None:
|
||||
None(item, from);
|
||||
break;
|
||||
case DecorateCommand.Secure:
|
||||
Secure(item, from);
|
||||
break;
|
||||
case DecorateCommand.Lockdown:
|
||||
Lockdown(item, from);
|
||||
break;
|
||||
case DecorateCommand.Release:
|
||||
Release(item, from);
|
||||
break;
|
||||
case DecorateCommand.Turn:
|
||||
Turn(item, from);
|
||||
break;
|
||||
case DecorateCommand.Up:
|
||||
Up(item, from);
|
||||
break;
|
||||
case DecorateCommand.Down:
|
||||
Down(item, from);
|
||||
break;
|
||||
case DecorateCommand.North:
|
||||
North(item, from);
|
||||
break;
|
||||
case DecorateCommand.East:
|
||||
East(item, from);
|
||||
break;
|
||||
case DecorateCommand.South:
|
||||
South(item, from);
|
||||
break;
|
||||
case DecorateCommand.West:
|
||||
West(item, from);
|
||||
break;
|
||||
case DecorateCommand.Close:
|
||||
Close(item, from);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
from.Target = new InternalTarget(m_Decorator);
|
||||
}
|
||||
|
||||
protected override void OnTargetCancel(Mobile from, TargetCancelType cancelType)
|
||||
{
|
||||
if (cancelType == TargetCancelType.Canceled)
|
||||
from.CloseGump(typeof(InteriorDecorator.InternalGump));
|
||||
}
|
||||
|
||||
private static void None(Item item, Mobile from)
|
||||
{
|
||||
}
|
||||
|
||||
private static void Secure(Item item, Mobile from)
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
if (house.IsLockedDown(item))
|
||||
from.SendMessage("That is already locked down.");
|
||||
else if (house.IsSecure(item))
|
||||
from.SendMessage("That is already secured.");
|
||||
else if (house.IsFriend(from)&&!house.IsCoOwner(from))
|
||||
{ from.SendMessage("Only Owners and CoOwners are allowed to secure things in a house.");
|
||||
return;
|
||||
}
|
||||
else
|
||||
house.AddSecure(from, item);
|
||||
}
|
||||
|
||||
private static void Lockdown(Item item, Mobile from)
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
if (house.IsLockedDown(item))
|
||||
from.SendMessage("That is already locked down.");
|
||||
else if (house.IsSecure(item))
|
||||
from.SendMessage("That is already secured.");
|
||||
else
|
||||
house.LockDown(from, item, true);
|
||||
}
|
||||
|
||||
private static void Release(Item item, Mobile from)
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
if (!house.IsLockedDown(item) && !house.IsSecure(item) && (item.Movable))
|
||||
from.SendMessage("That is not locked down or secured.");
|
||||
else
|
||||
house.Release(from, item);
|
||||
}
|
||||
|
||||
private static void Turn(Item item, Mobile from)
|
||||
{
|
||||
FlipableAttribute[] attributes = (FlipableAttribute[])item.GetType().GetCustomAttributes(typeof(FlipableAttribute), false);
|
||||
|
||||
Item deed = null;
|
||||
|
||||
if ( item is AnvilEastDeed ){ deed = new AnvilSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is AnvilSouthDeed ){ deed = new AnvilEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is BrownBearRugEastDeed ){ deed = new BrownBearRugSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is BrownBearRugSouthDeed ){ deed = new BrownBearRugEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is PolarBearRugEastDeed ){ deed = new PolarBearRugSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is PolarBearRugSouthDeed ){ deed = new PolarBearRugEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is DartBoardEastDeed ){ deed = new DartBoardSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is DartBoardSouthDeed ){ deed = new DartBoardEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is FlourMillEastDeed ){ deed = new FlourMillSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is FlourMillSouthDeed ){ deed = new FlourMillEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is LightFlowerTapestryEastDeed ){ deed = new LightFlowerTapestrySouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is LightFlowerTapestrySouthDeed ){ deed = new LightFlowerTapestryEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is DarkFlowerTapestryEastDeed ){ deed = new DarkFlowerTapestrySouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is DarkFlowerTapestrySouthDeed ){ deed = new DarkFlowerTapestryEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is GrayBrickFireplaceEastDeed ){ deed = new GrayBrickFireplaceSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is GrayBrickFireplaceSouthDeed ){ deed = new GrayBrickFireplaceEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is LargeBedEastDeed ){ deed = new LargeBedSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is LargeBedSouthDeed ){ deed = new LargeBedEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is LadderSouthAddonDeed ){ deed = new LadderEastAddonDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is LadderEastAddonDeed ){ deed = new LadderSouthAddonDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is LargeForgeEastDeed ){ deed = new LargeForgeSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is LargeForgeSouthDeed ){ deed = new LargeForgeEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is LargeStoneTableEastDeed ){ deed = new LargeStoneTableSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is LargeStoneTableSouthDeed ){ deed = new LargeStoneTableEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is LoomEastDeed ){ deed = new LoomSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is LoomSouthDeed ){ deed = new LoomEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is MediumStoneTableEastDeed ){ deed = new MediumStoneTableSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is MediumStoneTableSouthDeed ){ deed = new MediumStoneTableEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is PickpocketDipEastDeed ){ deed = new PickpocketDipSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is PickpocketDipSouthDeed ){ deed = new PickpocketDipEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is SandstoneFireplaceEastDeed ){ deed = new SandstoneFireplaceSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is SandstoneFireplaceSouthDeed ){ deed = new SandstoneFireplaceEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is SmallBedEastDeed ){ deed = new SmallBedSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is SmallBedSouthDeed ){ deed = new SmallBedEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is SpinningwheelEastDeed ){ deed = new SpinningwheelSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is SpinningwheelSouthDeed ){ deed = new SpinningwheelEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is StoneFireplaceEastDeed ){ deed = new StoneFireplaceSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is StoneFireplaceSouthDeed ){ deed = new StoneFireplaceEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is StoneOvenEastDeed ){ deed = new StoneOvenSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is StoneOvenSouthDeed ){ deed = new StoneOvenEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is SmallStretchedHideEastDeed ){ deed = new SmallStretchedHideSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is SmallStretchedHideSouthDeed ){ deed = new SmallStretchedHideEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is MediumStretchedHideEastDeed ){ deed = new MediumStretchedHideSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is MediumStretchedHideSouthDeed ){ deed = new MediumStretchedHideEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is TrainingDummyEastDeed ){ deed = new TrainingDummySouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is TrainingDummySouthDeed ){ deed = new TrainingDummyEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is WaterTroughEastDeed ){ deed = new WaterTroughSouthDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
else if ( item is WaterTroughSouthDeed ){ deed = new WaterTroughEastDeed(); deed.MoveToWorld(item.Location, item.Map); item.Delete(); }
|
||||
|
||||
else if ( item is MyTentEastAddonDeed )
|
||||
{
|
||||
MyTentEastAddonDeed tent = (MyTentEastAddonDeed)item;
|
||||
deed = new MyTentSouthAddonDeed();
|
||||
MyTentSouthAddonDeed hut = (MyTentSouthAddonDeed)deed;
|
||||
deed.Hue = item.Hue;
|
||||
hut.TentColor = tent.TentColor;
|
||||
deed.MoveToWorld(item.Location, item.Map);
|
||||
item.Delete();
|
||||
}
|
||||
else if ( item is MyTentSouthAddonDeed )
|
||||
{
|
||||
MyTentSouthAddonDeed tent = (MyTentSouthAddonDeed)item;
|
||||
deed = new MyTentEastAddonDeed();
|
||||
MyTentEastAddonDeed hut = (MyTentEastAddonDeed)deed;
|
||||
deed.Hue = item.Hue;
|
||||
hut.TentColor = tent.TentColor;
|
||||
deed.MoveToWorld(item.Location, item.Map);
|
||||
item.Delete();
|
||||
}
|
||||
|
||||
if (attributes.Length > 0)
|
||||
attributes[0].Flip(item);
|
||||
else if ( item.ItemID != FlipID( item.ItemID ) )
|
||||
item.ItemID = FlipID( item.ItemID );
|
||||
else
|
||||
from.SendLocalizedMessage(1042273); // You cannot turn that.
|
||||
}
|
||||
|
||||
private static void Up(Item item, Mobile from)
|
||||
{
|
||||
int floorZ = GetFloorZ(item);
|
||||
|
||||
if (floorZ > int.MinValue && item.Z < (floorZ + 14)) // Confirmed : no height checks here
|
||||
item.Location = new Point3D(item.Location, item.Z + 1);
|
||||
else
|
||||
from.SendLocalizedMessage(1042274); // You cannot raise it up any higher.
|
||||
}
|
||||
|
||||
private static void Down(Item item, Mobile from)
|
||||
{
|
||||
int floorZ = GetFloorZ(item);
|
||||
|
||||
if (floorZ > int.MinValue && item.Z > GetFloorZ(item))
|
||||
item.Location = new Point3D(item.Location, item.Z - 1);
|
||||
else
|
||||
from.SendLocalizedMessage(1042275); // You cannot lower it down any further.
|
||||
}
|
||||
|
||||
private static void North(Item item, Mobile from)
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(item);
|
||||
|
||||
Point3D ourLoc = item.GetWorldLocation();
|
||||
Point3D goingLoc = new Point3D(ourLoc.X, ourLoc.Y -2, ourLoc.Z);
|
||||
|
||||
if (house.IsInside(goingLoc, ourLoc.Z))
|
||||
item.Y = (item.Y -1);
|
||||
else
|
||||
from.SendMessage("You cannot move it to the north any further.");
|
||||
|
||||
}
|
||||
|
||||
private static void East(Item item, Mobile from)
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(item);
|
||||
|
||||
Point3D ourLoc = item.GetWorldLocation();
|
||||
Point3D goingLoc = new Point3D(ourLoc.X +1, ourLoc.Y, ourLoc.Z);
|
||||
|
||||
if (house.IsInside(goingLoc, ourLoc.Z))
|
||||
item.X = (item.X +1);
|
||||
else
|
||||
from.SendMessage("You cannot move it to the east any further.");
|
||||
|
||||
}
|
||||
|
||||
private static void South(Item item, Mobile from)
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(item);
|
||||
|
||||
Point3D ourLoc = item.GetWorldLocation();
|
||||
Point3D goingLoc = new Point3D(ourLoc.X, ourLoc.Y +1, ourLoc.Z);
|
||||
|
||||
if (house.IsInside(goingLoc, ourLoc.Z))
|
||||
item.Y = (item.Y +1);
|
||||
else
|
||||
from.SendMessage("You cannot move it to the south any further.");
|
||||
}
|
||||
|
||||
private static void West(Item item, Mobile from)
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(item);
|
||||
|
||||
Point3D ourLoc = item.GetWorldLocation();
|
||||
Point3D goingLoc = new Point3D(ourLoc.X -2, ourLoc.Y, ourLoc.Z);
|
||||
|
||||
if (house.IsInside(goingLoc, ourLoc.Z))
|
||||
item.X = (item.X -1);
|
||||
else
|
||||
from.SendMessage("You cannot move it to the west any further.");
|
||||
}
|
||||
|
||||
private static void Close(Item item, Mobile from)
|
||||
{
|
||||
from.CloseGump(typeof(InteriorDecorator.InternalGump));
|
||||
Target.Cancel(from);
|
||||
}
|
||||
|
||||
private static void Command(Item item, Mobile from)
|
||||
{
|
||||
}
|
||||
|
||||
private static int GetFloorZ(Item item)
|
||||
{
|
||||
Map map = item.Map;
|
||||
|
||||
if (map == null)
|
||||
return int.MinValue;
|
||||
|
||||
StaticTile[] tiles = map.Tiles.GetStaticTiles(item.X, item.Y, true);
|
||||
|
||||
int z = int.MinValue;
|
||||
|
||||
for (int i = 0; i < tiles.Length; ++i)
|
||||
{
|
||||
StaticTile tile = tiles[i];
|
||||
ItemData id = TileData.ItemTable[tile.ID & 0x3FFF];
|
||||
|
||||
int top = tile.Z; // Confirmed : no height checks here
|
||||
|
||||
if (id.Surface && !id.Impassable && top > z && top <= item.Z)
|
||||
z = top;
|
||||
}
|
||||
|
||||
if (z == int.MinValue)
|
||||
z = map.Tiles.GetLandTile(item.X, item.Y).Z;
|
||||
|
||||
return z;
|
||||
}
|
||||
|
||||
public static int FlipID( int id )
|
||||
{
|
||||
if ( id == 8356 ){ id = 8357; }
|
||||
else if ( id == 8358 ){ id = 8359; }
|
||||
else if ( id == 8360 ){ id = 8361; }
|
||||
else if ( id == 8362 ){ id = 8363; }
|
||||
else if ( id == 8364 ){ id = 8365; }
|
||||
else if ( id == 8366 ){ id = 8367; }
|
||||
else if ( id == 8368 ){ id = 8369; }
|
||||
else if ( id == 8370 ){ id = 8371; }
|
||||
else if ( id == 8372 ){ id = 8373; }
|
||||
else if ( id == 8374 ){ id = 8375; }
|
||||
else if ( id == 8376 ){ id = 8377; }
|
||||
else if ( id == 8378 ){ id = 8379; }
|
||||
else if ( id == 8380 ){ id = 8381; }
|
||||
else if ( id == 8382 ){ id = 8383; }
|
||||
else if ( id == 8384 ){ id = 8385; }
|
||||
else if ( id == 8386 ){ id = 8387; }
|
||||
else if ( id == 8388 ){ id = 8389; }
|
||||
else if ( id == 8390 ){ id = 8391; }
|
||||
else if ( id == 8392 ){ id = 8393; }
|
||||
else if ( id == 8394 ){ id = 8395; }
|
||||
else if ( id == 8396 ){ id = 8397; }
|
||||
else if ( id == 0xC0F ){ id = 0xC2C; }
|
||||
else if ( id == 0xE9F ){ id = 0xEC8; }
|
||||
else if ( id == 0xEA0 ){ id = 0xEA9; }
|
||||
else if ( id == 0xEA1 ){ id = 0xEA2; }
|
||||
else if ( id == 0xEA3 ){ id = 0xEA4; }
|
||||
else if ( id == 0xEA5 ){ id = 0x121C; }
|
||||
else if ( id == 0xEA7 ){ id = 0x1229; }
|
||||
else if ( id == 0xEA8 ){ id = 0x1236; }
|
||||
else if ( id == 8357 ){ id = 8356; }
|
||||
else if ( id == 8359 ){ id = 8358; }
|
||||
else if ( id == 8361 ){ id = 8360; }
|
||||
else if ( id == 8363 ){ id = 8362; }
|
||||
else if ( id == 8365 ){ id = 8364; }
|
||||
else if ( id == 8367 ){ id = 8366; }
|
||||
else if ( id == 8369 ){ id = 8368; }
|
||||
else if ( id == 8371 ){ id = 8370; }
|
||||
else if ( id == 8373 ){ id = 8372; }
|
||||
else if ( id == 8375 ){ id = 8374; }
|
||||
else if ( id == 8377 ){ id = 8376; }
|
||||
else if ( id == 8379 ){ id = 8378; }
|
||||
else if ( id == 8381 ){ id = 8380; }
|
||||
else if ( id == 8383 ){ id = 8382; }
|
||||
else if ( id == 8385 ){ id = 8384; }
|
||||
else if ( id == 8387 ){ id = 8386; }
|
||||
else if ( id == 8389 ){ id = 8388; }
|
||||
else if ( id == 8391 ){ id = 8390; }
|
||||
else if ( id == 8393 ){ id = 8392; }
|
||||
else if ( id == 8395 ){ id = 8394; }
|
||||
else if ( id == 8397 ){ id = 8396; }
|
||||
else if ( id == 0xC2C ){ id = 0xC0F; }
|
||||
else if ( id == 0xEC8 ){ id = 0xE9F; }
|
||||
else if ( id == 0xEA9 ){ id = 0xEA0; }
|
||||
else if ( id == 0xEA2 ){ id = 0xEA1; }
|
||||
else if ( id == 0xEA4 ){ id = 0xEA3; }
|
||||
else if ( id == 0x121C ){ id = 0xEA5; }
|
||||
else if ( id == 0x1229 ){ id = 0xEA7; }
|
||||
else if ( id == 0x1236 ){ id = 0xEA8; }
|
||||
|
||||
return id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
107
Scripts/Items/Home/LadderEastAddon.cs
Normal file
107
Scripts/Items/Home/LadderEastAddon.cs
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LadderEastAddon : BaseAddon
|
||||
{
|
||||
private static int[,] m_AddOnSimpleComponents = new int[,] {
|
||||
{8249, 0, 0, 0}, {1109, 0, 0, 22}
|
||||
};
|
||||
|
||||
public override BaseAddonDeed Deed
|
||||
{
|
||||
get
|
||||
{
|
||||
return new LadderEastAddonDeed();
|
||||
}
|
||||
}
|
||||
|
||||
[ Constructable ]
|
||||
public LadderEastAddon()
|
||||
{
|
||||
for (int i = 0; i < m_AddOnSimpleComponents.Length / 4; i++)
|
||||
AddComponent( new AddonComponent( m_AddOnSimpleComponents[i,0] ), m_AddOnSimpleComponents[i,1], m_AddOnSimpleComponents[i,2], m_AddOnSimpleComponents[i,3] );
|
||||
}
|
||||
|
||||
public override void OnComponentUsed( AddonComponent c, Mobile from )
|
||||
{
|
||||
if ( !from.InRange( GetWorldLocation(), 4 ) || !from.InLOS( this ) )
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
|
||||
else if ( c.ItemID == 1109 )
|
||||
{
|
||||
from.Z = c.Z-22;
|
||||
from.X = c.X;
|
||||
from.Y = c.Y;
|
||||
from.PlaySound( 234 );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.Z = c.Z+22;
|
||||
from.X = c.X;
|
||||
from.Y = c.Y;
|
||||
from.PlaySound( 234 );
|
||||
}
|
||||
}
|
||||
|
||||
public LadderEastAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( 0 ); // Version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class LadderEastAddonDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon
|
||||
{
|
||||
get
|
||||
{
|
||||
return new LadderEastAddon();
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LadderEastAddonDeed()
|
||||
{
|
||||
Name = "ladder deed (east)";
|
||||
}
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
list.Add( 1070722, "Used to Access Upper Floor");
|
||||
list.Add( 1049644, "To Be Placed In Your Home");
|
||||
}
|
||||
|
||||
public LadderEastAddonDeed( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( 0 ); // Version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
107
Scripts/Items/Home/LadderSouthAddon.cs
Normal file
107
Scripts/Items/Home/LadderSouthAddon.cs
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LadderSouthAddon : BaseAddon
|
||||
{
|
||||
private static int[,] m_AddOnSimpleComponents = new int[,] {
|
||||
{8250, 0, 0, 0}, {1110, 0, 0, 22}
|
||||
};
|
||||
|
||||
public override BaseAddonDeed Deed
|
||||
{
|
||||
get
|
||||
{
|
||||
return new LadderSouthAddonDeed();
|
||||
}
|
||||
}
|
||||
|
||||
[ Constructable ]
|
||||
public LadderSouthAddon()
|
||||
{
|
||||
for (int i = 0; i < m_AddOnSimpleComponents.Length / 4; i++)
|
||||
AddComponent( new AddonComponent( m_AddOnSimpleComponents[i,0] ), m_AddOnSimpleComponents[i,1], m_AddOnSimpleComponents[i,2], m_AddOnSimpleComponents[i,3] );
|
||||
}
|
||||
|
||||
public override void OnComponentUsed( AddonComponent c, Mobile from )
|
||||
{
|
||||
if ( !from.InRange( GetWorldLocation(), 4 ) || !from.InLOS( this ) )
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
|
||||
else if ( c.ItemID == 1110 )
|
||||
{
|
||||
from.Z = c.Z-22;
|
||||
from.X = c.X;
|
||||
from.Y = c.Y;
|
||||
from.PlaySound( 234 );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.Z = c.Z+22;
|
||||
from.X = c.X;
|
||||
from.Y = c.Y;
|
||||
from.PlaySound( 234 );
|
||||
}
|
||||
}
|
||||
|
||||
public LadderSouthAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( 0 ); // Version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class LadderSouthAddonDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon
|
||||
{
|
||||
get
|
||||
{
|
||||
return new LadderSouthAddon();
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LadderSouthAddonDeed()
|
||||
{
|
||||
Name = "ladder deed (south)";
|
||||
}
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
list.Add( 1070722, "Used to Access Upper Floor");
|
||||
list.Add( 1049644, "To Be Placed In Your Home");
|
||||
}
|
||||
|
||||
public LadderSouthAddonDeed( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( 0 ); // Version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
446
Scripts/Items/Home/Tents.cs
Normal file
446
Scripts/Items/Home/Tents.cs
Normal file
|
|
@ -0,0 +1,446 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MyTentEastAddon : BaseAddon
|
||||
{
|
||||
public int TentColor;
|
||||
public int TentFound;
|
||||
|
||||
[CommandProperty(AccessLevel.Owner)]
|
||||
public int Tent_Color { get { return TentColor; } set { TentColor = value; InvalidateProperties(); } }
|
||||
|
||||
[CommandProperty(AccessLevel.Owner)]
|
||||
public int Tent_Found { get { return TentFound; } set { TentFound = value; InvalidateProperties(); } }
|
||||
|
||||
public override BaseAddonDeed Deed
|
||||
{
|
||||
get
|
||||
{
|
||||
return new MyTentEastAddonDeed( Tent_Color, 1 );
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MyTentEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[ Constructable ]
|
||||
public MyTentEastAddon( int RelHue )
|
||||
{
|
||||
AddComplexComponent( (BaseAddon) this, 1630, 0, 1, 26, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1630, -1, 0, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1630, -1, 1, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1630, -1, 2, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1630, -2, 0, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1630, -2, 1, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1630, -2, -1, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1630, -2, 2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1630, -2, 3, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, 0, -1, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, 0, -2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, 1, 0, 26, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, 1, -1, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, 1, -2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, -1, -2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, 2, -1, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, 2, -2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, 3, -2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, 0, 3, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, 0, 4, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, 1, 2, 26, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, 1, 3, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, 1, 4, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, -1, 4, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, 2, 3, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, 2, 4, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, 3, 4, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 2, 1, 26, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 3, 0, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 3, 1, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 3, 2, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 4, 0, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 4, 1, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 4, -1, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 4, 2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 4, 3, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1635, 2, 2, 26, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1635, 3, 3, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1635, 4, 4, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1636, 2, 0, 26, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1636, 3, -1, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1636, 4, -2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1637, 0, 0, 26, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1637, -1, -1, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1637, -2, -2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1638, 0, 2, 26, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1638, -1, 3, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1638, -2, 4, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1639, 1, 1, 34, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 872, 4, 4, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 873, 0, 4, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 873, 1, 4, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 873, -1, 4, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 873, 2, 4, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 873, -2, 4, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 873, 3, 4, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 874, 4, -2, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 874, 4, -1, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 874, 4, 2, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 874, 4, 3, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 875, -3, -3, 0, 0, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 876, -3, 4, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 877, 4, -3, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 880, -3, 0, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 880, -3, 1, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 880, -3, -1, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 880, -3, 2, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 880, -3, -2, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 880, -3, 3, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 881, 0, -3, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 881, 1, -3, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 881, -1, -3, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 881, 2, -3, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 881, -2, -3, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 881, 3, -3, 0, RelHue, -1, "tent", 1);
|
||||
|
||||
TentColor = RelHue;
|
||||
}
|
||||
|
||||
public MyTentEastAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource)
|
||||
{
|
||||
AddComplexComponent(addon, item, xoffset, yoffset, zoffset, hue, lightsource, null, 1);
|
||||
}
|
||||
|
||||
private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource, string name, int amount)
|
||||
{
|
||||
AddonComponent ac;
|
||||
ac = new AddonComponent(item);
|
||||
if (name != null && name.Length > 0)
|
||||
ac.Name = name;
|
||||
if (hue != 0)
|
||||
ac.Hue = hue;
|
||||
if (amount > 1)
|
||||
{
|
||||
ac.Stackable = true;
|
||||
ac.Amount = amount;
|
||||
}
|
||||
if (lightsource != -1)
|
||||
ac.Light = (LightType) lightsource;
|
||||
addon.AddComponent(ac, xoffset, yoffset, zoffset);
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( 0 ); // Version
|
||||
writer.Write( TentColor );
|
||||
writer.Write( TentFound );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
TentColor = reader.ReadInt();
|
||||
TentFound = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class MyTentEastAddonDeed : BaseAddonDeed
|
||||
{
|
||||
public int TentColor;
|
||||
public int TentFound;
|
||||
|
||||
[CommandProperty(AccessLevel.Owner)]
|
||||
public int Tent_Color { get { return TentColor; } set { TentColor = value; InvalidateProperties(); } }
|
||||
|
||||
[CommandProperty(AccessLevel.Owner)]
|
||||
public int Tent_Found { get { return TentFound; } set { TentFound = value; InvalidateProperties(); } }
|
||||
|
||||
public override BaseAddon Addon
|
||||
{
|
||||
get
|
||||
{
|
||||
return new MyTentEastAddon( Tent_Color );
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MyTentEastAddonDeed() : this( 0, 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MyTentEastAddonDeed( int RelHue, int RelRolled )
|
||||
{
|
||||
Weight = 50;
|
||||
ItemID = 0xA58;
|
||||
|
||||
/// COLOR ////////////////
|
||||
if ( TentFound > 0 ){ TentColor = Tent_Color; Hue = Tent_Color; }
|
||||
else if ( RelRolled > 0 ){ TentColor = RelHue; Hue = RelHue; }
|
||||
else
|
||||
{
|
||||
Hue = Utility.RandomHue();
|
||||
TentColor = Hue;
|
||||
}
|
||||
|
||||
Name = "Tent (East Door)";
|
||||
TentFound = 1;
|
||||
}
|
||||
|
||||
public MyTentEastAddonDeed( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
list.Add( 1070722, "Can Be Dyed Different Colors");
|
||||
list.Add( 1049644, "To Be Placed In Your Home");
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( 0 ); // Version
|
||||
writer.Write( TentColor );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
TentColor = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
public class MyTentSouthAddon : BaseAddon
|
||||
{
|
||||
public int TentColor;
|
||||
public int TentFound;
|
||||
|
||||
[CommandProperty(AccessLevel.Owner)]
|
||||
public int Tent_Color { get { return TentColor; } set { TentColor = value; InvalidateProperties(); } }
|
||||
|
||||
[CommandProperty(AccessLevel.Owner)]
|
||||
public int Tent_Found { get { return TentFound; } set { TentFound = value; InvalidateProperties(); } }
|
||||
|
||||
public override BaseAddonDeed Deed
|
||||
{
|
||||
get
|
||||
{
|
||||
return new MyTentSouthAddonDeed( Tent_Color, 1 );
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MyTentSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[ Constructable ]
|
||||
public MyTentSouthAddon( int RelHue )
|
||||
{
|
||||
AddComplexComponent( (BaseAddon) this, 1630, 0, 1, 26, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1630, -1, 0, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1630, -1, 1, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1630, -1, 2, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1630, -2, 0, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1630, -2, 1, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1630, -2, -1, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1630, -2, 2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1630, -2, 3, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, 0, -1, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, 0, -2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, 1, 0, 26, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, 1, -1, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, 1, -2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, -1, -2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, 2, -1, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, 2, -2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1631, 3, -2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, 0, 3, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, 0, 4, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, 1, 2, 26, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, 1, 3, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, 1, 4, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, -1, 4, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, 2, 3, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, 2, 4, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1632, 3, 4, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 2, 1, 26, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 3, 0, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 3, 1, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 3, 2, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 4, 0, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 4, 1, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 4, -1, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 4, 2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1633, 4, 3, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1635, 2, 2, 26, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1635, 3, 3, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1635, 4, 4, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1636, 2, 0, 26, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1636, 3, -1, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1636, 4, -2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1637, 0, 0, 26, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1637, -1, -1, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1637, -2, -2, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1638, 0, 2, 26, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1638, -1, 3, 23, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1638, -2, 4, 20, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 1639, 1, 1, 34, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 872, 4, 4, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 873, -2, 4, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 873, -1, 4, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 873, 2, 4, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 873, 3, 4, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 874, 4, 0, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 874, 4, 1, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 874, 4, -1, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 874, 4, 2, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 874, 4, -2, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 874, 4, 3, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 875, -3, -3, 0, 0, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 876, -3, 4, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 877, 4, -3, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 880, -3, 0, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 880, -3, 1, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 880, -3, -1, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 880, -3, 2, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 880, -3, -2, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 880, -3, 3, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 881, 0, -3, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 881, 1, -3, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 881, -1, -3, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 881, 2, -3, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 881, -2, -3, 0, RelHue, -1, "tent", 1);
|
||||
AddComplexComponent( (BaseAddon) this, 881, 3, -3, 0, RelHue, -1, "tent", 1);
|
||||
|
||||
TentColor = RelHue;
|
||||
}
|
||||
|
||||
public MyTentSouthAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource)
|
||||
{
|
||||
AddComplexComponent(addon, item, xoffset, yoffset, zoffset, hue, lightsource, null, 1);
|
||||
}
|
||||
|
||||
private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource, string name, int amount)
|
||||
{
|
||||
AddonComponent ac;
|
||||
ac = new AddonComponent(item);
|
||||
if (name != null && name.Length > 0)
|
||||
ac.Name = name;
|
||||
if (hue != 0)
|
||||
ac.Hue = hue;
|
||||
if (amount > 1)
|
||||
{
|
||||
ac.Stackable = true;
|
||||
ac.Amount = amount;
|
||||
}
|
||||
if (lightsource != -1)
|
||||
ac.Light = (LightType) lightsource;
|
||||
addon.AddComponent(ac, xoffset, yoffset, zoffset);
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( 0 ); // Version
|
||||
writer.Write( TentColor );
|
||||
writer.Write( TentFound );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
TentColor = reader.ReadInt();
|
||||
TentFound = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class MyTentSouthAddonDeed : BaseAddonDeed
|
||||
{
|
||||
public int TentColor;
|
||||
public int TentFound;
|
||||
|
||||
[CommandProperty(AccessLevel.Owner)]
|
||||
public int Tent_Color { get { return TentColor; } set { TentColor = value; InvalidateProperties(); } }
|
||||
|
||||
[CommandProperty(AccessLevel.Owner)]
|
||||
public int Tent_Found { get { return TentFound; } set { TentFound = value; InvalidateProperties(); } }
|
||||
|
||||
public override BaseAddon Addon
|
||||
{
|
||||
get
|
||||
{
|
||||
return new MyTentSouthAddon( Tent_Color );
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MyTentSouthAddonDeed() : this( 0, 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MyTentSouthAddonDeed( int RelHue, int RelRolled )
|
||||
{
|
||||
Weight = 50;
|
||||
ItemID = 0xA59;
|
||||
|
||||
/// COLOR ////////////////
|
||||
if ( TentFound > 0 ){ TentColor = Tent_Color; Hue = Tent_Color; }
|
||||
else if ( RelRolled > 0 ){ TentColor = RelHue; Hue = RelHue; }
|
||||
else
|
||||
{
|
||||
Hue = Utility.RandomHue();
|
||||
TentColor = Hue;
|
||||
}
|
||||
|
||||
Name = "Tent (South Door)";
|
||||
TentFound = 1;
|
||||
}
|
||||
|
||||
public MyTentSouthAddonDeed( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
list.Add( 1070722, "Can Be Dyed Different Colors");
|
||||
list.Add( 1049644, "To Be Placed In Your Home");
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( 0 ); // Version
|
||||
writer.Write( TentColor );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
TentColor = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue