servuo/Scripts/Items/Containers/ScrollBox2.cs
Dexter 4dd9184b77 - Fixed Star room teleporter in create World
- Removed conditions to remove speed walk in Splintering Weapon Special
- fixed soulforge quest scroll values (thanks argalep!!!)
- Shipwrecked items now count as 100 cleanup points, if they were otherwise less than 100
- added repair/enhace options in stonecrafting menu
- fixed lava harvest on Statics.
2017-02-05 09:49:44 -07:00

99 lines
No EOL
2.6 KiB
C#

using System;
namespace Server.Items
{
public class ScrollBox2 : WoodenBox
{
[Constructable]
public ScrollBox2()
: base()
{
this.Movable = true;
this.Hue = 1266;
DropItem(new PowerScroll(SkillName.Imbuing, 120.0));
if (0.05 >= Utility.RandomDouble())
{
double runictype = Utility.RandomDouble();
CraftResource res;
int charges;
if (runictype <= .25)
{
res = CraftResource.DullCopper;
charges = 50;
}
else if (runictype <= .40)
{
res = CraftResource.ShadowIron;
charges = 45;
}
else if (runictype <= .55)
{
res = CraftResource.Copper;
charges = 40;
}
else if (runictype <= .65)
{
res = CraftResource.Bronze;
charges = 35;
}
else if (runictype <= .75)
{
res = CraftResource.Gold;
charges = 30;
}
else if (runictype <= .85)
{
res = CraftResource.Agapite;
charges = 25;
}
else if (runictype <= .98)
{
res = CraftResource.Verite;
charges = 20;
}
else
{
res = CraftResource.Valorite;
charges = 15;
}
DropItem(new RunicMalletAndChisel(res, charges));
}
}
public ScrollBox2(Serial serial)
: base(serial)
{
}
public override string DefaultName
{
get
{
return "Reward Scroll Box";
}
}
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();
}
private static void PlaceItemIn(Container parent, int x, int y, Item item)
{
parent.AddItem(item);
item.Location = new Point3D(x, y, 0);
}
}
}