Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
142
Scripts/Services/22nd Anniversary/Anniversary22GiftToken.cs
Normal file
142
Scripts/Services/22nd Anniversary/Anniversary22GiftToken.cs
Normal file
@@ -0,0 +1,142 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Anniversary22GiftToken : Item, IRewardOption
|
||||
{
|
||||
public override int LabelNumber { get { return 1159145; } } // 22nd Anniversary Gift Token
|
||||
|
||||
[Constructable]
|
||||
public Anniversary22GiftToken()
|
||||
: base(0x4BC6)
|
||||
{
|
||||
Hue = 1286;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump(typeof(RewardOptionGump));
|
||||
from.SendGump(new RewardOptionGump(this, 1156888));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1062334); // This item must be in your backpack to be used.
|
||||
}
|
||||
}
|
||||
|
||||
public void GetOptions(RewardOptionList list)
|
||||
{
|
||||
list.Add(1, 1159146); // Copper Wings
|
||||
list.Add(2, 1159147); // Copper Portraits
|
||||
list.Add(3, 1159148); // Copper Ship Relief
|
||||
list.Add(4, 1159149); // Copper Sunflower
|
||||
}
|
||||
|
||||
|
||||
public void OnOptionSelected(Mobile from, int choice)
|
||||
{
|
||||
var bag = new Bag();
|
||||
bag.Hue = 1286;
|
||||
|
||||
bool chance = Utility.RandomDouble() < .1;
|
||||
|
||||
Item item;
|
||||
|
||||
switch (choice)
|
||||
{
|
||||
default:
|
||||
bag.Delete();
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
item = new CopperWings();
|
||||
|
||||
if (chance)
|
||||
{
|
||||
item.Hue = 2951;
|
||||
}
|
||||
|
||||
bag.DropItem(item);
|
||||
from.AddToBackpack(bag);
|
||||
Delete();
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
item = new CopperPortrait1();
|
||||
|
||||
if (chance)
|
||||
{
|
||||
item.Hue = 2951;
|
||||
}
|
||||
|
||||
bag.DropItem(item);
|
||||
|
||||
item = new CopperPortrait2();
|
||||
|
||||
if (chance)
|
||||
{
|
||||
item.Hue = 2951;
|
||||
}
|
||||
|
||||
bag.DropItem(item);
|
||||
|
||||
from.AddToBackpack(bag);
|
||||
Delete();
|
||||
break;
|
||||
}
|
||||
|
||||
case 3:
|
||||
{
|
||||
item = new CopperShipReliefAddonDeed();
|
||||
|
||||
if (chance)
|
||||
{
|
||||
item.Hue = 2951;
|
||||
}
|
||||
|
||||
bag.DropItem(item);
|
||||
|
||||
from.AddToBackpack(bag);
|
||||
Delete();
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
item = new CopperSunflower();
|
||||
|
||||
if (chance)
|
||||
{
|
||||
item.Hue = 2951;
|
||||
}
|
||||
|
||||
bag.DropItem(item);
|
||||
|
||||
from.AddToBackpack(bag);
|
||||
Delete();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public Anniversary22GiftToken(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
33
Scripts/Services/22nd Anniversary/Giver.cs
Normal file
33
Scripts/Services/22nd Anniversary/Giver.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Misc
|
||||
{
|
||||
public class AnniversaryGiver22nd : GiftGiver
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
GiftGiving.Register(new AnniversaryGiver22nd());
|
||||
}
|
||||
|
||||
public override DateTime Start { get { return new DateTime(2019, 09, 01); } }
|
||||
public override DateTime Finish { get { return new DateTime(2019, 10, 18); } }
|
||||
public override TimeSpan MinimumAge { get { return TimeSpan.FromDays(30); } }
|
||||
|
||||
public override void GiveGift(Mobile mob)
|
||||
{
|
||||
Item token = new Anniversary22GiftToken();
|
||||
|
||||
switch (GiveGift(mob, token))
|
||||
{
|
||||
case GiftResult.Backpack:
|
||||
mob.SendLocalizedMessage(1159142); // Happy 22nd Anniversary! We have placed a gift for you in your backpack.
|
||||
break;
|
||||
case GiftResult.BankBox:
|
||||
mob.SendLocalizedMessage(1159143); // Happy 22nd Anniversary! We have placed a gift for you in your bank box.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
115
Scripts/Services/22nd Anniversary/Items/CopperPortraits.cs
Normal file
115
Scripts/Services/22nd Anniversary/Items/CopperPortraits.cs
Normal file
@@ -0,0 +1,115 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable(0xA3E0, 0xA3E4)]
|
||||
public class CopperPortrait1 : Item
|
||||
{
|
||||
private string _DisplayName;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string DisplayName { get { return _DisplayName; } set { _DisplayName = value; InvalidateProperties(); } }
|
||||
|
||||
public override int LabelNumber { get { return 1159154; } } // Copper Portrait
|
||||
|
||||
[Constructable]
|
||||
public CopperPortrait1()
|
||||
: base(0xA3E0)
|
||||
{
|
||||
_DisplayName = _Names[Utility.Random(_Names.Length)];
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (!string.IsNullOrEmpty(_DisplayName))
|
||||
{
|
||||
list.Add(1159151, _DisplayName); // <BASEFONT COLOR=#FFD24D>Relief of ~1_NAME~<BASEFONT COLOR=#FFFFFF>
|
||||
}
|
||||
|
||||
if (Hue == 2951)
|
||||
list.Add(1076187); // Antique
|
||||
}
|
||||
|
||||
public CopperPortrait1(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
writer.Write(_DisplayName);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
_DisplayName = reader.ReadString();
|
||||
}
|
||||
|
||||
public static string[] _Names =
|
||||
{
|
||||
"Long Tooth Riccia", "Long Leg Topaz", "Glass Tongue Takako", "Iron Fist Riccia", "Fat Eye Takako", "Bloody Back Greg", "Cursed Powder Mercury", "Lone Tongue Erebus", "Mad Powder Sarah", "Long Beard Jim",
|
||||
"Lazy Eye Thrixx", "Cursed Patch Artemis", "Mad Back Aeon", "Glass Tooth Asiantam", "Iron Mouth Artemis", "Stink Back Elizabella", "Lost Blade Mercury", "Lazy Mouth Malachi", "Glass Back Nekomata",
|
||||
"Tooth Silver Fox"
|
||||
};
|
||||
}
|
||||
|
||||
[Flipable(0xA3E3, 0xA3E7)]
|
||||
public class CopperPortrait2 : Item
|
||||
{
|
||||
private string _DisplayName;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string DisplayName { get { return _DisplayName; } set { _DisplayName = value; InvalidateProperties(); } }
|
||||
|
||||
public override int LabelNumber { get { return 1159154; } } // Copper Portrait
|
||||
|
||||
[Constructable]
|
||||
public CopperPortrait2()
|
||||
: base(0xA3E3)
|
||||
{
|
||||
_DisplayName = CopperPortrait1._Names[Utility.Random(CopperPortrait1._Names.Length)];
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (!string.IsNullOrEmpty(_DisplayName))
|
||||
{
|
||||
list.Add(1159151, _DisplayName); // <BASEFONT COLOR=#FFD24D>Relief of ~1_NAME~<BASEFONT COLOR=#FFFFFF>
|
||||
}
|
||||
|
||||
if (Hue == 2951)
|
||||
list.Add(1076187); // Antique
|
||||
}
|
||||
|
||||
public CopperPortrait2(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
writer.Write(_DisplayName);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
_DisplayName = reader.ReadString();
|
||||
}
|
||||
}
|
||||
}
|
||||
205
Scripts/Services/22nd Anniversary/Items/CopperShipRelief.cs
Normal file
205
Scripts/Services/22nd Anniversary/Items/CopperShipRelief.cs
Normal file
@@ -0,0 +1,205 @@
|
||||
using System;
|
||||
using Server.Gumps;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CopperShipReliefAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed { get { return new CopperShipReliefAddonDeed(DisplayName); } }
|
||||
|
||||
private string _DisplayName;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string DisplayName { get { return _DisplayName; } set { _DisplayName = value; InvalidateProperties(); } }
|
||||
|
||||
public AddonFacing Facing { get; set; }
|
||||
|
||||
[Constructable]
|
||||
public CopperShipReliefAddon(AddonFacing facing, string name)
|
||||
{
|
||||
DisplayName = name;
|
||||
Facing = facing;
|
||||
|
||||
switch (facing)
|
||||
{
|
||||
case AddonFacing.South:
|
||||
AddComponent(new CopperShipReliefComponent(41954), -1, 0, 0);
|
||||
AddComponent(new CopperShipReliefComponent(41953), 1, 0, 0);
|
||||
break;
|
||||
case AddonFacing.East:
|
||||
AddComponent(new CopperShipReliefComponent(41957), 0, 1, 0);
|
||||
AddComponent(new CopperShipReliefComponent(41958), 0, -1, 0);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private class CopperShipReliefComponent : LocalizedAddonComponent
|
||||
{
|
||||
public override bool ForceShowProperties { get { return true; } }
|
||||
|
||||
public CopperShipReliefComponent(int id)
|
||||
: base(id, 1159148) // Copper Ship Relief
|
||||
{
|
||||
Weight = 0;
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
string name = ((CopperShipReliefAddon)Addon).DisplayName;
|
||||
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
{
|
||||
list.Add(1159152, name); // <BASEFONT COLOR=#FFD24D>Depicting the Maiden Voyage of ~1_NAME~<BASEFONT COLOR=#FFFFFF>
|
||||
}
|
||||
|
||||
if (Hue == 2951)
|
||||
list.Add(1076187); // Antique
|
||||
}
|
||||
|
||||
public CopperShipReliefComponent(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();
|
||||
}
|
||||
}
|
||||
|
||||
public CopperShipReliefAddon(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.WriteEncodedInt(1); // version
|
||||
|
||||
writer.Write(_DisplayName);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
if (version == 0)
|
||||
{
|
||||
_DisplayName = CopperShipReliefAddonDeed._Names[Utility.Random(CopperShipReliefAddonDeed._Names.Length)];
|
||||
}
|
||||
else
|
||||
{
|
||||
_DisplayName = reader.ReadString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class CopperShipReliefAddonDeed : BaseAddonDeed, IRewardOption
|
||||
{
|
||||
public override BaseAddon Addon { get { return new CopperShipReliefAddon(Facing, DisplayName); } }
|
||||
|
||||
private string _DisplayName;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string DisplayName { get { return _DisplayName; } set { _DisplayName = value; InvalidateProperties(); } }
|
||||
|
||||
private AddonFacing Facing { get; set; }
|
||||
|
||||
public override int LabelNumber { get { return 1159148; } } // Copper Ship Relief
|
||||
|
||||
[Constructable]
|
||||
public CopperShipReliefAddonDeed()
|
||||
: this(null)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CopperShipReliefAddonDeed(string name)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
if (name == null)
|
||||
_DisplayName = _Names[Utility.Random(_Names.Length)];
|
||||
else
|
||||
_DisplayName = name;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump(typeof(AddonOptionGump));
|
||||
from.SendGump(new AddonOptionGump(this));
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage(1062334); // This item must be in your backpack to be used.
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (!string.IsNullOrEmpty(_DisplayName))
|
||||
{
|
||||
list.Add(1159152, _DisplayName); // <BASEFONT COLOR=#FFD24D>Depicting the Maiden Voyage of ~1_NAME~<BASEFONT COLOR=#FFFFFF>
|
||||
}
|
||||
|
||||
if (Hue == 2951)
|
||||
list.Add(1076187); // Antique
|
||||
}
|
||||
|
||||
public CopperShipReliefAddonDeed(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
|
||||
writer.Write(_DisplayName);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
_DisplayName = reader.ReadString();
|
||||
}
|
||||
|
||||
public void GetOptions(RewardOptionList list)
|
||||
{
|
||||
list.Add((int)AddonFacing.South, 1075386);
|
||||
list.Add((int)AddonFacing.East, 1075387);
|
||||
}
|
||||
|
||||
|
||||
public void OnOptionSelected(Mobile from, int choice)
|
||||
{
|
||||
Facing = (AddonFacing)choice;
|
||||
|
||||
if (!Deleted)
|
||||
base.OnDoubleClick(from);
|
||||
}
|
||||
|
||||
public static string[] _Names =
|
||||
{
|
||||
"The HMS Cape", "The Mustang", "The Dragon's Breath", "The Crown Jewel", "The Empire", "The Scaly Eel", "The Spartan", "The Beast", "The Ararat", "The Arabella", "The Lusty Wench", "The Golden Ankh",
|
||||
"The Poseidon's Fury", "The Silver Hart"
|
||||
};
|
||||
}
|
||||
}
|
||||
64
Scripts/Services/22nd Anniversary/Items/CopperSunflower.cs
Normal file
64
Scripts/Services/22nd Anniversary/Items/CopperSunflower.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable(0xA35D, 0xA35E)]
|
||||
public class CopperSunflower : Item
|
||||
{
|
||||
private string _DisplayName;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string DisplayName { get { return _DisplayName; } set { _DisplayName = value; InvalidateProperties(); } }
|
||||
|
||||
public override int LabelNumber { get { return 1159149; } } // Copper Sunflower
|
||||
|
||||
[Constructable]
|
||||
public CopperSunflower()
|
||||
: base(0xA35D)
|
||||
{
|
||||
_DisplayName = _Names[Utility.Random(_Names.Length)];
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (!string.IsNullOrEmpty(_DisplayName))
|
||||
{
|
||||
list.Add(1159150, _DisplayName); // <BASEFONT COLOR=#FFD24D>Cast from Flowers Grown in The Warm Sun of ~1_NAME~<BASEFONT COLOR=#FFFFFF>
|
||||
}
|
||||
|
||||
if (Hue == 2951)
|
||||
list.Add(1076187); // Antique
|
||||
}
|
||||
|
||||
public CopperSunflower(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
writer.Write(_DisplayName);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
_DisplayName = reader.ReadString();
|
||||
}
|
||||
|
||||
private static string[] _Names =
|
||||
{
|
||||
"Trinsic", "Jhelom", "Vesper", "Ocllo", "Yew", "Britain", "Minoc", "Moonglow", "Skara Brae", "Delucia"
|
||||
};
|
||||
}
|
||||
}
|
||||
62
Scripts/Services/22nd Anniversary/Items/CopperWings.cs
Normal file
62
Scripts/Services/22nd Anniversary/Items/CopperWings.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable(0xA3DE, 0xA3DF)]
|
||||
public class CopperWings : Item
|
||||
{
|
||||
private string _DisplayName;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string DisplayName { get { return _DisplayName; } set { _DisplayName = value; InvalidateProperties(); } }
|
||||
|
||||
public override int LabelNumber { get { return 1159146; } } // Copper Wings
|
||||
|
||||
[Constructable]
|
||||
public CopperWings()
|
||||
: base(0xA3DE)
|
||||
{
|
||||
_DisplayName = _Names[Utility.Random(_Names.Length)];
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (!string.IsNullOrEmpty(_DisplayName))
|
||||
{
|
||||
list.Add(1159153, _DisplayName); // <BASEFONT COLOR=#FFD24D>Symbolizing Glory During the ~1_NAME~<BASEFONT COLOR=#FFFFFF>
|
||||
}
|
||||
|
||||
if (Hue == 2951)
|
||||
list.Add(1076187); // Antique
|
||||
}
|
||||
|
||||
public CopperWings(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
writer.Write(_DisplayName);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
_DisplayName = reader.ReadString();
|
||||
}
|
||||
|
||||
private static string[] _Names =
|
||||
{
|
||||
"Hook's Pirate War", "Endless Struggle Between Platinum And Crimson", "Ophidian War", "Battle Of The Bloody Plains", "Expedition Against Khal Ankur", "Evacuation Of Haven", "Defeat Of Virtuebane", "Siege Of Ver Lor Reg",
|
||||
"Assault On The Temple Of The Abyss", "Fall Of Trinsic", "Despise Onslaught"
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user