Carlos_ar submitted a new resource:

Chocolatiering Adventure! - Oompa Loompah Doop-a-dee-do!

The credit for scripting the Guardian House system goes to Juzzver. He did an incredible job of getting what I had in mind into UO. For that he has my eternal gratitude.

Here's what you can expect when players go adventuring in this house.

Candy Cottage:

When they try to open the door, Oompas and Loompas will appear and they must be killed or flee before the players can open the door. The Oompas and Loompas will
randomly drop items needed for the system, with the exception of cocoa...

Read more about this resource...
 
Last edited:
Got an error, running the latest servuo release, Any idea?
Scripts: Compiling C# scripts...Failed with: 1 errors, 0 warnings
Errors:
+ Custom/ChocolatieringAdventure/GuardianHouses/CandyHut/OompaLoompas.cs:
CS0115: Line 48: 'Oompa.FleeChance': no suitable method found to override
CS0115: Line 49: 'Oompa.BreakFleeChance': no suitable method found to override
CS0115: Line 86: 'Oompa.CheckBreakFlee()': no suitable method found to override
CS0115: Line 91: 'Oompa.BreakFlee()': no suitable method found to override
CS0115: Line 222: 'Loompa.FleeChance': no suitable method found to override
CS0115: Line 223: 'Loompa.BreakFleeChance': no suitable method found to override
CS0115: Line 261: 'Loompa.CheckBreakFlee()': no suitable method found to override
CS0115: Line 266: 'Loompa.BreakFlee()': no suitable method found to override
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 
Got an error, running the latest servuo release, Any idea?
Scripts: Compiling C# scripts...Failed with: 1 errors, 0 warnings
Errors:
+ Custom/ChocolatieringAdventure/GuardianHouses/CandyHut/OompaLoompas.cs:
CS0115: Line 48: 'Oompa.FleeChance': no suitable method found to override
CS0115: Line 49: 'Oompa.BreakFleeChance': no suitable method found to override
CS0115: Line 86: 'Oompa.CheckBreakFlee()': no suitable method found to override
CS0115: Line 91: 'Oompa.BreakFlee()': no suitable method found to override
CS0115: Line 222: 'Loompa.FleeChance': no suitable method found to override
CS0115: Line 223: 'Loompa.BreakFleeChance': no suitable method found to override
CS0115: Line 261: 'Loompa.CheckBreakFlee()': no suitable method found to override
CS0115: Line 266: 'Loompa.BreakFlee()': no suitable method found to override
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
What version are you running? This is for pub57
 
57, just downloaded it
Hmmm. Give me just a moment. Going to find the specific FleeChance scripts.
*****
Man I'm not really sure. I just ran it on a clean pub57 and I didn't get the error. I was really hoping I would so I could fix it.

Anyone else on here that can offer advice?
 
Last edited:
Ok thanks, mine was a brand new download with nothing else installed, I have another copy I will try it on. Thanks for looking at it
 
Ok thanks, mine was a brand new download with nothing else installed, I have another copy I will try it on. Thanks for looking at it
I did try it on a brand new download, no other files or anything installed. I don't doubt you, at all, I just can't get the error to come up. Of course I want to, so I can fix it... and for my own personal knowledge of what I did incorrectly.
 
I am running windows btw, not sure what you are running. I got the same errors on my server one too. I wish I knew more about scrypting to look at it :) It sounds awesome. Thanks again
 
I am running windows btw, not sure what you are running. I got the same errors on my server one too. I wish I knew more about scrypting to look at it :) It sounds awesome. Thanks again
Same, Windows10. hmm can you post your vorpalbunny.cs file?

The Oompas are based on that. If that script is working, I cant't see why this one wouldnt.

Actually... post the Oompas script and the VorpalBunny

Just in case, somehow it's different on your end.
 
Code:
using Server.Items;
using System;

namespace Server.Mobiles
{
    [CorpseName("an oompa corpse")]
    public class Oompa : BaseCreature
    {
        [Constructable]
        public Oompa()
            : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.1, 0.2)
        {
            Name = "an oompa";
            Body = 334;
            Hue = 1260;

            SetStr(15);
            SetDex(2000);
            SetInt(1000);

            SetHits(800);
            SetStam(2000);
            SetMana(2000);

            SetDamage(1);

            SetDamageType(ResistanceType.Physical, 100);

            SetSkill(SkillName.Magery, 200.0);
            SetSkill(SkillName.MagicResist, 200.0);
            SetSkill(SkillName.Tactics, 5.0);
            SetSkill(SkillName.Wrestling, 200.0);

            Fame = 1000;
            Karma = 0;

            DelayBeginTunnel();

            ForceActiveSpeed = 0.2;
            ForcePassiveSpeed = 0.4;
        }

        public Oompa(Serial serial)
            : base(serial)
        {
        }

        public override double FleeChance => 1.0;
        public override double BreakFleeChance => 0.05;

        public override void GenerateLoot()
        {
            AddLoot(LootPack.Rich, 1);
        }
       
        public override bool OnBeforeDeath()
        {           
            Gold gold = new Gold(Utility.RandomMinMax(120, 300));
           
            if ( 50.0 > Utility.RandomDouble() )
            {
               
                switch (Utility.RandomMinMax( 1, 12 ))
                {
                    case  0: PackItem(new ChocolateBeetle()); break;
                    case  1: PackItem (new ChocolateBunny()); break;
                    case  2: PackItem(new ChocolateOrc()); break;
                    case  3: PackItem(new ChocolateSolen()); break;
                    case  4: PackItem(new ChocolateUnicorn()); break;
                    case  5: PackItem(new NutcrackerMold()); break;
                    case  6: PackItem(new OrcMold()); break;
                    case  7: PackItem(new BeetleMold()); break;
                    case  8: PackItem(new BunnyMold()); break;
                    case  9: PackItem(new SolenMold()); break;
                    case  10: PackItem(new UnicornMold()); break;
                    case  11: PackItem(new GoldFoil()); break;   
                }
            }
            return base.OnBeforeDeath();
        }
        public override bool CheckFlee()
        {
            return true;
        }

        public override bool CheckBreakFlee()
        {
            return false;
        }

        public override bool BreakFlee()
        {
            NextFleeCheck = Core.TickCount + 1500;

            return true;
        }

        public virtual void DelayBeginTunnel()
        {
            Timer.DelayCall(TimeSpan.FromMinutes(3.0), BeginTunnel);
        }

        public virtual void BeginTunnel()
        {
            if (Deleted)
                return;

            new BunnyHole().MoveToWorld(Location, Map);

            Frozen = true;
            Say("* The oompa mysteriously vanishes! *");
            PlaySound(0x247);

            Timer.DelayCall(TimeSpan.FromSeconds(5.0), Delete);
        }

        public override int GetAttackSound() { return 0x55C; }
        public override int GetHurtSound() { return 0x542; }
        public override int GetDeathSound() { return 0x55D; }
       
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            if (Paragon.ChestChance > Utility.RandomDouble())
                c.DropItem(new ParagonChest(Name, 5));
        }
       
        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();

            DelayBeginTunnel();
        }

        public class BunnyHole : Item
        {
            public BunnyHole()
                : base(0x913)
            {
                Movable = false;
                Hue = 1;
                Name = "a mysterious hole";

                Timer.DelayCall(TimeSpan.FromSeconds(40.0), Delete);
            }

            public BunnyHole(Serial serial)
                : base(serial)
            {
            }

            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();

                Delete();
            }
        }
    }
   
    [CorpseName("an loompa corpse")]
    public class Loompa : BaseCreature
    {
        [Constructable]
        public Loompa()
            : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.1, 0.2)
        {
            Name = "an oompa";
            Body = 334;
            Hue = 1260;

            SetStr(15);
            SetDex(2000);
            SetInt(1000);

            SetHits(800);
            SetStam(2000);
            SetMana(2000);

            SetDamage(1);

            SetDamageType(ResistanceType.Physical, 100);

            SetSkill(SkillName.Magery, 200.0);
            SetSkill(SkillName.MagicResist, 200.0);
            SetSkill(SkillName.Tactics, 5.0);
            SetSkill(SkillName.Wrestling, 200.0);

            Fame = 1000;
            Karma = 0;

            DelayBeginTunnel();

            ForceActiveSpeed = 0.2;
            ForcePassiveSpeed = 0.4;
        }

        public Loompa(Serial serial)
            : base(serial)
        {
        }

        public override double FleeChance => 1.0;
        public override double BreakFleeChance => 0.05;

        public override void GenerateLoot()
        {
            AddLoot(LootPack.Rich, 1);
        }
       
        public override bool OnBeforeDeath()
        {           
            Gold gold = new Gold(Utility.RandomMinMax(120, 300));
           
            if ( 50.0 > Utility.RandomDouble() )
            {
               
                switch (Utility.RandomMinMax( 1, 12 ))
                {
                    case  0: PackItem(new ChocolateBeetle()); break;
                    case  1: PackItem (new ChocolateBunny()); break;
                    case  2: PackItem(new ChocolateOrc()); break;
                    case  3: PackItem(new ChocolateSolen()); break;
                    case  4: PackItem(new ChocolateUnicorn()); break;
                    case  5: PackItem(new NutcrackerMold()); break;
                    case  6: PackItem(new OrcMold()); break;
                    case  7: PackItem(new BeetleMold()); break;
                    case  8: PackItem(new BunnyMold()); break;
                    case  9: PackItem(new SolenMold()); break;
                    case  10: PackItem(new UnicornMold()); break;
                    case  11: PackItem(new GoldFoil()); break;   
                }
            }
            return base.OnBeforeDeath();
        }

        public override bool CheckFlee()
        {
            return true;
        }

        public override bool CheckBreakFlee()
        {
            return false;
        }

        public override bool BreakFlee()
        {
            NextFleeCheck = Core.TickCount + 1500;

            return true;
        }

        public virtual void DelayBeginTunnel()
        {
            Timer.DelayCall(TimeSpan.FromMinutes(3.0), BeginTunnel);
        }

        public virtual void BeginTunnel()
        {
            if (Deleted)
                return;

            new BunnyHole().MoveToWorld(Location, Map);

            Frozen = true;
            Say("* The oompa mysteriously vanishes! *");
            PlaySound(0x247);

            Timer.DelayCall(TimeSpan.FromSeconds(5.0), Delete);
        }

        public override int GetAttackSound() { return 0x55C; }
        public override int GetHurtSound() { return 0x542; }
        public override int GetDeathSound() { return 0x55D; }
       
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            if (Paragon.ChestChance > Utility.RandomDouble())
                c.DropItem(new ParagonChest(Name, 5));
        }
       
        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();

            DelayBeginTunnel();
        }

        public class BunnyHole : Item
        {
            public BunnyHole()
                : base(0x913)
            {
                Movable = false;
                Hue = 1;
                Name = "a mysterious hole";

                Timer.DelayCall(TimeSpan.FromSeconds(40.0), Delete);
            }

            public BunnyHole(Serial serial)
                : base(serial)
            {
            }

            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();

                Delete();
            }
        }
    }
}

vorpalbunny

Code:
using System;
using Server.Items;

namespace Server.Mobiles
{
    [CorpseName("a vorpal bunny corpse")]
    public class VorpalBunny : BaseCreature
    {
        [Constructable]
        public VorpalBunny()
            : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.1, 0.2)
        {
            Name = "a vorpal bunny";
            Body = 205;
            Hue = 0x480;

            SetStr(15);
            SetDex(2000);
            SetInt(1000);

            SetHits(2000);
            SetStam(500);
            SetMana(0);

            SetDamage(1);

            SetDamageType(ResistanceType.Physical, 100);

            SetSkill(SkillName.MagicResist, 200.0);
            SetSkill(SkillName.Tactics, 5.0);
            SetSkill(SkillName.Wrestling, 5.0);

            Fame = 1000;
            Karma = 0;

            VirtualArmor = 4;

            DelayBeginTunnel();

            ForceActiveSpeed = 0.2;
            ForcePassiveSpeed = 0.4;
        }
       
        public virtual void SpawnPackItems()
        {
            int carrots = Utility.RandomMinMax(5, 10);
            PackItem(new Carrot(carrots));

            if (Utility.Random(5) == 0)
                PackItem(new BrightlyColoredEggs());

            PackStatue();
        }

        public VorpalBunny(Serial serial)
            : base(serial)
        {
        }

        public override int Meat { get { return 1; } }
        public override int Hides { get { return 1; } }
        public override bool BardImmune { get { return !Core.AOS; } }
       
        public override void GenerateLoot()
        {
            AddLoot(LootPack.FilthyRich);
            AddLoot(LootPack.Rich, 2);
        }

        public override IDamageable Combatant
        {
            get { return base.Combatant; }
            set
            {
                base.Combatant = value;

                if (0.05 > Utility.RandomDouble())
                {
                    StopFlee();
                }
                else if (!CheckFlee())
                {
                    BeginFlee(TimeSpan.FromSeconds(30));
                }
            }
        }


        public override bool CheckFlee()
        {
            return DateTime.UtcNow < EndFleeTime;
        }

        public virtual void DelayBeginTunnel()
        {
            Timer.DelayCall(TimeSpan.FromMinutes(3.0), new TimerCallback(BeginTunnel));
        }

        public virtual void BeginTunnel()
        {
            if (Deleted)
                return;

            new BunnyHole().MoveToWorld(Location, Map);

            Frozen = true;
            Say("* The bunny begins to dig a tunnel back to its underground lair *");
            PlaySound(0x247);

            Timer.DelayCall(TimeSpan.FromSeconds(5.0), new TimerCallback(Delete));
        }

        public override int GetAttackSound() { return 0xC9; }
        public override int GetHurtSound() { return 0xCA; }
        public override int GetDeathSound() { return 0xCB; }

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);

            writer.Write((int)0);
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            DelayBeginTunnel();
        }

        public class BunnyHole : Item
        {
            public BunnyHole()
                : base(0x913)
            {
                Movable = false;
                Hue = 1;
                Name = "a mysterious rabbit hole";

                Timer.DelayCall(TimeSpan.FromSeconds(40.0), new TimerCallback(Delete));
            }

            public BunnyHole(Serial serial)
                : base(serial)
            {
            }

            public override void Serialize(GenericWriter writer)
            {
                base.Serialize(writer);

                writer.Write((int)0);
            }

            public override void Deserialize(GenericReader reader)
            {
                base.Deserialize(reader);

                int version = reader.ReadInt();

                Delete();
            }
        }
    }
}
 
Last edited by a moderator:
Code:
using System;
using Server.Items;

namespace Server.Mobiles
{
    [CorpseName("a vorpal bunny corpse")]
    public class VorpalBunny : BaseCreature
    {
        [Constructable]
        public VorpalBunny()
            : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.1, 0.2)
        {
            Name = "a vorpal bunny";
            Body = 205;
            Hue = 0x480;

            SetStr(15);
            SetDex(2000);
            SetInt(1000);

            SetHits(2000);
            SetStam(500);
            SetMana(0);

            SetDamage(1);

            SetDamageType(ResistanceType.Physical, 100);

            SetSkill(SkillName.MagicResist, 200.0);
            SetSkill(SkillName.Tactics, 5.0);
            SetSkill(SkillName.Wrestling, 5.0);

            Fame = 1000;
            Karma = 0;

            VirtualArmor = 4;

            DelayBeginTunnel();

            ForceActiveSpeed = 0.2;
            ForcePassiveSpeed = 0.4;
        }
       
        public virtual void SpawnPackItems()
        {
            int carrots = Utility.RandomMinMax(5, 10);
            PackItem(new Carrot(carrots));

            if (Utility.Random(5) == 0)
                PackItem(new BrightlyColoredEggs());

            PackStatue();
        }

        public VorpalBunny(Serial serial)
            : base(serial)
        {
        }

        public override int Meat { get { return 1; } }
        public override int Hides { get { return 1; } }
        public override bool BardImmune { get { return !Core.AOS; } }
       
        public override void GenerateLoot()
        {
            AddLoot(LootPack.FilthyRich);
            AddLoot(LootPack.Rich, 2);
        }

        public override IDamageable Combatant
        {
            get { return base.Combatant; }
            set
            {
                base.Combatant = value;

                if (0.05 > Utility.RandomDouble())
                {
                    StopFlee();
                }
                else if (!CheckFlee())
                {
                    BeginFlee(TimeSpan.FromSeconds(30));
                }
            }
        }


        public override bool CheckFlee()
        {
            return DateTime.UtcNow < EndFleeTime;
        }

        public virtual void DelayBeginTunnel()
        {
            Timer.DelayCall(TimeSpan.FromMinutes(3.0), new TimerCallback(BeginTunnel));
        }

        public virtual void BeginTunnel()
        {
            if (Deleted)
                return;

            new BunnyHole().MoveToWorld(Location, Map);

            Frozen = true;
            Say("* The bunny begins to dig a tunnel back to its underground lair *");
            PlaySound(0x247);

            Timer.DelayCall(TimeSpan.FromSeconds(5.0), new TimerCallback(Delete));
        }

        public override int GetAttackSound() { return 0xC9; }
        public override int GetHurtSound() { return 0xCA; }
        public override int GetDeathSound() { return 0xCB; }

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);

            writer.Write((int)0);
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            DelayBeginTunnel();
        }

        public class BunnyHole : Item
        {
            public BunnyHole()
                : base(0x913)
            {
                Movable = false;
                Hue = 1;
                Name = "a mysterious rabbit hole";

                Timer.DelayCall(TimeSpan.FromSeconds(40.0), new TimerCallback(Delete));
            }

            public BunnyHole(Serial serial)
                : base(serial)
            {
            }

            public override void Serialize(GenericWriter writer)
            {
                base.Serialize(writer);

                writer.Write((int)0);
            }

            public override void Deserialize(GenericReader reader)
            {
                base.Deserialize(reader);

                int version = reader.ReadInt();

                Delete();
            }
        }
    }
}
 
Last edited by a moderator:
Carlos, I dont think you went with the pub57, just checked, BaseCreature does not have
FleeChance and so on, just as the error reports.

Those are in the current repo but not in pub57.

Thats also why th vorap Bunny Script from Banethorn does not have those either, but the vorpal bunny script from master does.
 
Carlos, I dont think you went with the pub57, just checked, BaseCreature does not have
FleeChance and so on, just as the error reports.

Those are in the current repo but not in pub57.

Thats also why th vorap Bunny Script from Banethorn does not have those either, but the vorpal bunny script from master does.
Possible... I just downloaded the pub57 from ServUO/Download (the link at the top of the forum) then go to "Code" dropdown and hit "Zip Version"

Is that not Pub57?

I see the "Latest" is 57.1
 
View attachment 20020
This is the master branch

while this is pub 57
View attachment 20021

Ah well jeez. My apologies... I've been operating since November, under the assumption that I was using Pub57... grrrrrr

My bad. In that case, let me look it all over.
Thanks for that!
Ah well jeez. My apologies... I've been operating since November, under the assumption that I was using Pub57... grrrrrr

My bad. In that case, let me look it all over.
Thanks for that!
So, looking over the actual pub57. I fixed the issue, but p57 doesnt have the Wedding package? Or is it just named something else?

@Banethorn I'm working to get it switched over. I am using the current repo, but apparently that is not pub57 as I originally thought. There are some major differences in creature behavior as well as how the containers generate loot. It appears there are items not in pub57 that are in the core of the current repo. (the wedding set is missing and the chocolatier is wearing a purple version of the set) So I am doing some recode for pub57. I'll have it up in the next day or so.
Sorry for the inconvenience.
 
Last edited:
wow at least we found out what was wrong!
I have it figured out except one small thing, but as it turns out is a pretty big thing.

In the current distro, to add loot to a container the code is: AddLoot(LootPack.FilthyRich, 3);

What that does is give you 3 rolls of all the FilthyRich loot pack entry and put all those items in the chest.

Unfortunately that doesn't work in pub57. So I'm trying to figure out how to get the equivalent to work in this release.

Stay tuned :)
 
Back