using System using System Drawing using VitaNex Network Reference for

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
using System;
using System.Drawing;
using VitaNex.Network; // Reference for Cliloc Hack
// Reference to Windows and Web Colors
using Server.Items;
namespace Server.Items
{
abstract public class EA2014Class : Backpack
{
[Constructable]
public EA2014Class(int ItemID)
{
Name = "A Shiny Giftbox";
I_ID = ItemID;
Weight = 1.0;
m_Year = DateTime.Now.Year; // Sets var Year to the current Year
Hue = Utility.RandomMinMax(0, 3000); // Set Random Color between 0 and 3000
AddItem(new SnowStatueGriffon());
int Gift = Utility.RandomMinMax(1, 3);
if (Gift == 3)
{
AddItem(new HolidayBell("Pure"));
}
else if (Gift == 2)
{
AddItem(new HolidayBell("CStalker"));
}
else if (Gift == 1)
{
AddItem(new Snowman());
}
}
}
[Constructable]
public EA2014Class(int ItemID)
{
: base(ItemID)
{
ItemID = I_ID;
}
}
public override int DefaultGumpID
{
get
{
return 30586; // Overwrites the Gump of Container
}
}
public EA2014Class(Serial serial)
: base(serial)
{
}
private int m_Year { get; set; }
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list); // Loading Base ToolTip
var l = new ExtendedOPL(list); // Apply Tooltip to Cliloc Hack
l.Add(("Merry Christmas " + m_Year).WrapUOHtmlColor(Color.Purple));
// Adds Text with Year and Colored via ClilocHack
l.Apply(); // Applys the Cliloc Hack
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0); // version
writer.Write(m_Year); //Saves the written Year
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
m_Year = reader.ReadInt(); // Reads the written Year
}
}