ServUO Version
Publish Unknown
Ultima Expansion
Lord Blackthorn's Revenge
I am trying to get Valorite elementals to have a small chance to drop a Valorite hammer. I know it need to specify the ore type and amout of charges, just not sure how to write it in here.
C#:
public override void GenerateLoot()
{
    this.AddLoot(LootPack.FilthyRich);
    this.AddLoot(LootPack.Gems, 4);

    switch (Utility.Random(20))
    {
        case 0: PackItem(new RunicHammer()); break;
    }
}

I get this Error when I start the server.
Errors:
+ Mobiles/Normal/ValoriteElemental.cs:
CS1729: Line 90: 'Server.Items.RunicHammer' does not contain a constructor that takes 0 arguments
Scripts: One or more scripts failed to compile or no script files were found.

Can anyone help me figure out what I need to add to line 90 to make a Valorite hammer with say 5 charges?
 
If you look at the repository here. You can see it needs a CraftResource to add it in.

Would look like this

C#:
public override void GenerateLoot()
{
    this.AddLoot(LootPack.FilthyRich);
    this.AddLoot(LootPack.Gems, 4);

    switch (Utility.Random(20))
    {
        case 0: PackItem(new RunicHammer(CraftResource.Valorite)); break;
    }
}
 
Back