- ServUO Version
- Publish 58
- Ultima Expansion
- Endless Journey
I am trying to adjust this so there is a 30% chance that one of these items will drop. I am using this:
I am getting this error:
F:\Games\Electronic Arts\Dark Karma Trials\Dark Karma Trial 1\Scripts\CUSTOM SCRIPTS PnP\Barbarians Lava\BarbarianRider.cs(86,16): error CS1501: No overload for method 'Random' takes 0 arguments [F:\Games\Electronic Arts\Dark Karma Trials\Dark Karma Trial 1\Scripts\Scripts.csproj]
What am I missing?
Is it wanting something in here like if (Utility.Random(5) < 30) // 30% chance to drop
C#:
public override bool OnBeforeDeath()
{
if (Utility.Random() < 30) // 30% chance to drop
switch (Utility.Random(4))
{
case 0: PackItem(new BarbarianGloves()); break;
case 1: PackItem(new BarbarianArms()); break;
case 2: PackItem(new BarbarianLegs()); break;
case 3: PackItem(new BarbarianChest()); break;
}
return base.OnBeforeDeath();
}
I am getting this error:
F:\Games\Electronic Arts\Dark Karma Trials\Dark Karma Trial 1\Scripts\CUSTOM SCRIPTS PnP\Barbarians Lava\BarbarianRider.cs(86,16): error CS1501: No overload for method 'Random' takes 0 arguments [F:\Games\Electronic Arts\Dark Karma Trials\Dark Karma Trial 1\Scripts\Scripts.csproj]
What am I missing?
Is it wanting something in here like if (Utility.Random(5) < 30) // 30% chance to drop