ExX
Member
So I have been working on a simple bad that I can give new warriors. I want the bag to contain some items most specifically a set of plate mail with lower stat requirements so that they can wear it as a new player. I have been searching this forum and mostly the RunUO forums and have found a "little" bit of information regarding creating an item with a specific propertie but I can't seem to get it down properly. This is the full script.
As you can see I am trying to add a PlateChest with the lowerstatreq propertie of 50 but this is the errors I get.
Now by all counts of what I can find I was pretty sure the propertie was called LowerStatReq but if it's not, I am unsure what the specific name definition is. Also I'm not sure why I am getting a refrence assembly error I am calling the server, system and items. Sorry if I am overlooking something dumb still learning a lot.
Code:
using System;
using Server;
using Server.Items;
namespace Server.Items
{
public class WarriorBag : Bag
{
[Constructable]
public WarriorBag()
: this(50)
{
}
[Constructable]
public WarriorBag(int amount)
{
this.DropItem(new Gold(2000));
this.DropItem(new Bandage(50));
this.DropItem(new Daat99Tokens(100));
PlateChest item = new PlateChest();
item.LowerStatReq = 50;
this.DropItem(new item());
}
public WarriorBag(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();
}
}
}
As you can see I am trying to add a PlateChest with the lowerstatreq propertie of 50 but this is the errors I get.
Code:
Errors:
+ Custom/Zelda Quest/Zelda Quest Items/Warrior Bag.cs:
CS1061: Line 23: 'Server.Items.PlateChest' does not contain a definition for
'LowerStatReq' and no extension method 'LowerStatReq' accepting a first argumen
t of type 'Server.Items.PlateChest' could be found (are you missing a using dire
ctive or an assembly reference?)
CS0246: Line 24: The type or namespace name 'item' could not be found (are y
ou missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
Now by all counts of what I can find I was pretty sure the propertie was called LowerStatReq but if it's not, I am unsure what the specific name definition is. Also I'm not sure why I am getting a refrence assembly error I am calling the server, system and items. Sorry if I am overlooking something dumb still learning a lot.