ServUO Version
Publish 57
Ultima Expansion
Endless Journey
hi all , i ve been trying to discover whats goin 1702485763963.png here , maybe someone could hellp...
 

Attachments

  • Autobot.cs
    7.1 KB · Views: 9
Well the error tells you what the issue is, and the line too
C#:
            EquipItem(new Spellbook()); // Corrected line for equipping a spellbook

            Spells.Spellbook spbk = Spellbook; // <--- this is your error

            if (spbk != null)
            {
                spbk.Content = ulong.MaxValue;
                spbk.LootType = LootType.Newbied;
            }

My guess is that the code below the faulty line should be for the equipped book?

C#:
            Spellbook spbk = new Spellbook();
            spbk.Content = ulong.MaxValue;
            spbk.LootType = LootType.Newbied;
            EquipItem(spbk); // Corrected line for equipping a spellbook

you can also write it as
C#:
            EquipItem(new Spellbook(ulong.MaxValue) {LootType = LootType.Newbied}); // Corrected line for equipping a spellbook
 
Back