Aetherius Shadowblade
Member
- ServUO Version
- Publish 58
- Ultima Expansion
- Endless Journey
Watching an old 80s cartoon called "Dungeons and Dragons", I seen a chest on an episode that would allow people to travel to different locations and worlds. So I thought how wonderful and dangerous for the players if there was a chest that would send a player to a specified map location when it is double clicked. I started with a lantern script, modified a lot, tried adding the random locations and *BOOM*, nothing mixed well and I am seeking help.
Using newest repo, I tried.
ERROR - -
Using newest repo, I tried.
ERROR - -
/root/ServUO/Scripts/_Customs/ChestToSomewhere.cs(22,29): error CS0544: 'ChestToSomewhere.OnDoubleClick': cannot override because 'Item.OnDoubleClick(Mobile)' is not a property [/root/ServUO/Scripts/Scripts.csproj]
ChestToSomewhere.cs:
using System;
namespace Server.Items
{
public class ChestToSomewhere : Item
{
[Constructable]
public ChestToSomewhere()
: base(0xA25)
{
Name = "Chest to Somewhere";
Light = LightType.Circle100;
Weight = 2.0;
//LootType = Blessed
}
public ChestToSomewhere(Serial serial)
: base(serial)
{
}
public override int OnDoubleClick
{
set
{
switch ( Utility.Random( 2 ))
{
case 0: new MapEntry("Britain", new Point3D(1434, 1699, 2), Map.Trammel ); break; //Location Information
case 1: new MapEntry("Britain", new Point3D(1434, 1699, 2), Map.Trammel ); break; //Location Information
}
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
}