Iomega0318

Member
Ultima Expansion
Endless Journey
Is it possible to have the quest giver as an item rather than a mobile?

For example I am using this script for testing, is there a way to turn him into an item?

C#:
//=================================================
//This script was created by Gizmo's Uo Quest Maker
//This script was created on 11/8/2021 9:46:35 PM
//=================================================
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using System.Collections;
using System.Collections.Generic;

namespace Server.Engines.Quests
{
    public class Ochen : MondainQuester
    {
        public override Type[] Quests
        {
            get{ return new Type[]
            {
                typeof( ThePerfectCut ),
            };}
        }

        [Constructable]
        public Ochen() : base("Ochen", "The Tinker")
        {
            InitBody();
        }

        public Ochen(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();
        }

        public override void InitBody()
        {
            InitStats(100, 100, 100);
            Female = false;
            Race = Race.Human;
            base.InitBody();
        }
        public override void InitOutfit()
        {
            BearMask head = new BearMask();
            head.Hue = 347;
            AddItem( head );
            Tunic chest = new Tunic();
            chest.Hue = 347;
            AddItem( chest );
            LongPants leg = new LongPants();
            leg.Hue = 347;
            AddItem( leg );
            ThighBoots feet = new ThighBoots();
            feet.Hue = 347;
            AddItem( feet );
        }
    }
}
 
Is it possible to have the quest giver as an item rather than a mobile?

For example I am using this script for testing, is there a way to turn him into an item?

C#:
//=================================================
//This script was created by Gizmo's Uo Quest Maker
//This script was created on 11/8/2021 9:46:35 PM
//=================================================
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using System.Collections;
using System.Collections.Generic;

namespace Server.Engines.Quests
{
    public class Ochen : MondainQuester
    {
        public override Type[] Quests
        {
            get{ return new Type[]
            {
                typeof( ThePerfectCut ),
            };}
        }

        [Constructable]
        public Ochen() : base("Ochen", "The Tinker")
        {
            InitBody();
        }

        public Ochen(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();
        }

        public override void InitBody()
        {
            InitStats(100, 100, 100);
            Female = false;
            Race = Race.Human;
            base.InitBody();
        }
        public override void InitOutfit()
        {
            BearMask head = new BearMask();
            head.Hue = 347;
            AddItem( head );
            Tunic chest = new Tunic();
            chest.Hue = 347;
            AddItem( chest );
            LongPants leg = new LongPants();
            leg.Hue = 347;
            AddItem( leg );
            ThighBoots feet = new ThighBoots();
            feet.Hue = 347;
            AddItem( feet );
        }
    }
}
Yes it is. Guess how...
Yep, you guessed it: Xmlspawner ;)

You will need to attach XmlEdit to any item and then create the dialog like any other NPC. Make sure the item does not decay, or is spawned so it does not get "trashed" during a reboot. ;)
(with MondainQuesters, they were all meant to be mobiles, so you would have to code something entirely new.)
 
Yes it is. Guess how...
Yep, you guessed it: Xmlspawner ;)

You will need to attach XmlEdit to any item and then create the dialog like any other NPC. Make sure the item does not decay, or is spawned so it does not get "trashed" during a reboot. ;)
(with MondainQuesters, they were all meant to be mobiles, so you would have to code something entirely new.)
How did I know you were going to say that lol.. but are you able to use an existing quest with said item, my plan was to code all my quests ML style so you can keep track/do more than one/prettier haha

Here's an example of the quest line.. note I used a script generator to get the basics then I'll go in and completely mod it..
C#:
//=================================================
//This script was created by Gizmo's Uo Quest Maker
//This script was created on 11/8/2021 9:47:31 PM
//=================================================

using System;
using Server;
using Server.Items;
using Server.Mobiles;

namespace Server.Engines.Quests
{
    public class ThePerfectCut : BaseQuest
    {
        //The player will have a delay before they can redo quest again
        public override TimeSpan RestartDelay { get { return TimeSpan.FromMinutes(60); } }

        //This is the Quest Title the player sees at the top of the Gump
        public override object Title{ get{ return "The Perfect Cut"; } }
        //This tells the story of the quest
        public override object Description { get { return "I have had my fair share of gems come in and out of this place. But to find the truely rare cuts of gem is another story. Deep within the mines, the caverns and even along the mountain stretches riches beyond any mans dream. If you come across a gem I am looking for. Please bring it to me and I will reward you for your time."; } }
        //This decides how the npc reacts in text the player refusing the quest
        public override object Refuse{ get{ return "What a shame."; } }
        //This is what the npc says when the player returns without completing the objective(s)
        public override object Uncomplete{ get{ return "If you find a rare gem, bring it to me."; } }
        //This is what the Quest Giver says when the player completes the quest.
        public override object Complete{ get{ return "Sweet tator tots, look at the size of that thing. I really want to thank you for bringing me this. Im gonna make a.. I am going to put it in the display case so all can marvel at its rare beauty."; } }

        public ThePerfectCut() : base()
        {
            int which = Utility.RandomMinMax( 1, 6 );
            if( which == 1 )
                AddObjective(new ObtainObjective(typeof(DarkSapphire),"Dark Sapphire",1));
            if( which == 2 )
                AddObjective(new ObtainObjective(typeof(Turquoise),"Turquoise",1));
            if( which == 3 )
                AddObjective(new ObtainObjective(typeof(EcruCitrine),"Ecru Citrine",1));
            if( which == 4 )
                AddObjective(new ObtainObjective(typeof(FireRuby),"Fire Ruby",1));
            if( which == 5 )
                AddObjective(new ObtainObjective(typeof(BlueDiamond),"Blue Diamond",1));
            if( which == 6 )
                AddObjective(new ObtainObjective(typeof(PerfectEmerald),"Perfect Emerald",1));
        }

        public override QuestChain ChainID
        {
            get
            {
                return QuestChain.PerfectCut;
            }
        }
        public override Type NextQuest
        {
            get
            {
                return typeof(ThePerfectCut2);
            }
        }

        public override void GiveRewards()
        {
            //Random gold amount to add
            BankCheck gold = new BankCheck( Utility.RandomMinMax( 500, 600 ) );
            if( !Owner.AddToBackpack( gold ) )
            {
                gold.MoveToWorld(Owner.Location,Owner.Map);
            }

            //Add Quest Reward Token(s)
            //Owner.AddToBackpack( new QuestRewardToken( 1 ) );

            //Adding Quest Reward Token(s)
            for(int x = 0; x < 1; x++)
            {
                RandomTalisman talisman = new RandomTalisman();
                if(!Owner.AddToBackpack( talisman ) )
                {
                    talisman.MoveToWorld(Owner.Location,Owner.Map);
                }
            }
            Item bonusitem;
            bonusitem = new DullCopperIngot( 20 );
            //Adding Bonus Item #1
            if(!Owner.AddToBackpack( bonusitem ) )
            {
                bonusitem.MoveToWorld(Owner.Location,Owner.Map);
            }

            bonusitem = new ShadowIronIngot( 20 );
            //Adding Bonus Item #2
            if(!Owner.AddToBackpack( bonusitem ) )
            {
                bonusitem.MoveToWorld(Owner.Location,Owner.Map);
            }

            bonusitem = new CopperIngot( 20 );
            //Adding Bonus Item #3
            if(!Owner.AddToBackpack( bonusitem ) )
            {
                bonusitem.MoveToWorld(Owner.Location,Owner.Map);
            }

            bonusitem = new BronzeIngot( 20 );
            //Adding Bonus Item #4
            if(!Owner.AddToBackpack( bonusitem ) )
            {
                bonusitem.MoveToWorld(Owner.Location,Owner.Map);
            }

            bonusitem = new GoldIngot( 20 );
            //Adding Bonus Item #5
            if(!Owner.AddToBackpack( bonusitem ) )
            {
                bonusitem.MoveToWorld(Owner.Location,Owner.Map);
            }

            bonusitem = new AgapiteIngot( 20 );
            //Adding Bonus Item #6
            if(!Owner.AddToBackpack( bonusitem ) )
            {
                bonusitem.MoveToWorld(Owner.Location,Owner.Map);
            }

            bonusitem = new VeriteIngot( 20 );
            //Adding Bonus Item #7
            if(!Owner.AddToBackpack( bonusitem ) )
            {
                bonusitem.MoveToWorld(Owner.Location,Owner.Map);
            }

            bonusitem = new ValoriteIngot( 20 );
            //Adding Bonus Item #8
            if(!Owner.AddToBackpack( bonusitem ) )
            {
                bonusitem.MoveToWorld(Owner.Location,Owner.Map);
            }

            base.GiveRewards();
        }

        public override bool CanOffer()
        {
            return (Owner.Skills[SkillName.Mining].Base >= 100.0);
        }
    }

    public class ThePerfectCut2 : BaseQuest
    {
        //The player will have a delay before they can redo quest again
        public override TimeSpan RestartDelay { get { return TimeSpan.FromMinutes(60); } }

        //This is the Quest Title the player sees at the top of the Gump
        public override object Title { get { return "The Perfect Cut"; } }
        //This tells the story of the quest
        public override object Description { get { return "I have had my fair share of gems come in and out of this place. But to find the truely rare cuts of gem is another story. Deep within the mines, the caverns and even along the mountain stretches riches beyond any mans dream. If you come across a gem I am looking for. Please bring it to me and I will reward you for your time."; } }
        //This decides how the npc reacts in text the player refusing the quest
        public override object Refuse { get { return "What a shame."; } }
        //This is what the npc says when the player returns without completing the objective(s)
        public override object Uncomplete { get { return "If you find a rare gem, bring it to me."; } }
        //This is what the Quest Giver says when the player completes the quest.
        public override object Complete { get { return "Sweet tator tots, look at the size of that thing. I really want to thank you for bringing me this. Im gonna make a.. I am going to put it in the display case so all can marvel at its rare beauty."; } }

        public ThePerfectCut2() : base()
        {
            int which = Utility.RandomMinMax(1, 6);
            if (which == 1)
                AddObjective(new ObtainObjective(typeof(DarkSapphire), "Dark Sapphire", 1));
            if (which == 2)
                AddObjective(new ObtainObjective(typeof(Turquoise), "Turquoise", 1));
            if (which == 3)
                AddObjective(new ObtainObjective(typeof(EcruCitrine), "Ecru Citrine", 1));
            if (which == 4)
                AddObjective(new ObtainObjective(typeof(FireRuby), "Fire Ruby", 1));
            if (which == 5)
                AddObjective(new ObtainObjective(typeof(BlueDiamond), "Blue Diamond", 1));
            if (which == 6)
                AddObjective(new ObtainObjective(typeof(PerfectEmerald), "Perfect Emerald", 1));

            this.AddReward(new BaseReward(typeof(PerfectEmerald), "Perfect Emerald")); // Arcane Circle           
        }

        public override QuestChain ChainID
        {
            get
            {
                return QuestChain.PerfectCut;
            }
        }

        public override bool CanOffer()
        {
            return (Owner.Skills[SkillName.Mining].Base >= 100.0);
        }

        public override void GiveRewards()
        {
            base.GiveRewards();
        }
    }

}
 
How did I know you were going to say that lol.. but are you able to use an existing quest with said item, my plan was to code all my quests ML style so you can keep track/do more than one/prettier haha

Here's an example of the quest line.. note I used a script generator to get the basics then I'll go in and completely mod it..
C#:
//=================================================
//This script was created by Gizmo's Uo Quest Maker
//This script was created on 11/8/2021 9:47:31 PM
//=================================================

using System;
using Server;
using Server.Items;
using Server.Mobiles;

namespace Server.Engines.Quests
{
    public class ThePerfectCut : BaseQuest
    {
        //The player will have a delay before they can redo quest again
        public override TimeSpan RestartDelay { get { return TimeSpan.FromMinutes(60); } }

        //This is the Quest Title the player sees at the top of the Gump
        public override object Title{ get{ return "The Perfect Cut"; } }
        //This tells the story of the quest
        public override object Description { get { return "I have had my fair share of gems come in and out of this place. But to find the truely rare cuts of gem is another story. Deep within the mines, the caverns and even along the mountain stretches riches beyond any mans dream. If you come across a gem I am looking for. Please bring it to me and I will reward you for your time."; } }
        //This decides how the npc reacts in text the player refusing the quest
        public override object Refuse{ get{ return "What a shame."; } }
        //This is what the npc says when the player returns without completing the objective(s)
        public override object Uncomplete{ get{ return "If you find a rare gem, bring it to me."; } }
        //This is what the Quest Giver says when the player completes the quest.
        public override object Complete{ get{ return "Sweet tator tots, look at the size of that thing. I really want to thank you for bringing me this. Im gonna make a.. I am going to put it in the display case so all can marvel at its rare beauty."; } }

        public ThePerfectCut() : base()
        {
            int which = Utility.RandomMinMax( 1, 6 );
            if( which == 1 )
                AddObjective(new ObtainObjective(typeof(DarkSapphire),"Dark Sapphire",1));
            if( which == 2 )
                AddObjective(new ObtainObjective(typeof(Turquoise),"Turquoise",1));
            if( which == 3 )
                AddObjective(new ObtainObjective(typeof(EcruCitrine),"Ecru Citrine",1));
            if( which == 4 )
                AddObjective(new ObtainObjective(typeof(FireRuby),"Fire Ruby",1));
            if( which == 5 )
                AddObjective(new ObtainObjective(typeof(BlueDiamond),"Blue Diamond",1));
            if( which == 6 )
                AddObjective(new ObtainObjective(typeof(PerfectEmerald),"Perfect Emerald",1));
        }

        public override QuestChain ChainID
        {
            get
            {
                return QuestChain.PerfectCut;
            }
        }
        public override Type NextQuest
        {
            get
            {
                return typeof(ThePerfectCut2);
            }
        }

        public override void GiveRewards()
        {
            //Random gold amount to add
            BankCheck gold = new BankCheck( Utility.RandomMinMax( 500, 600 ) );
            if( !Owner.AddToBackpack( gold ) )
            {
                gold.MoveToWorld(Owner.Location,Owner.Map);
            }

            //Add Quest Reward Token(s)
            //Owner.AddToBackpack( new QuestRewardToken( 1 ) );

            //Adding Quest Reward Token(s)
            for(int x = 0; x < 1; x++)
            {
                RandomTalisman talisman = new RandomTalisman();
                if(!Owner.AddToBackpack( talisman ) )
                {
                    talisman.MoveToWorld(Owner.Location,Owner.Map);
                }
            }
            Item bonusitem;
            bonusitem = new DullCopperIngot( 20 );
            //Adding Bonus Item #1
            if(!Owner.AddToBackpack( bonusitem ) )
            {
                bonusitem.MoveToWorld(Owner.Location,Owner.Map);
            }

            bonusitem = new ShadowIronIngot( 20 );
            //Adding Bonus Item #2
            if(!Owner.AddToBackpack( bonusitem ) )
            {
                bonusitem.MoveToWorld(Owner.Location,Owner.Map);
            }

            bonusitem = new CopperIngot( 20 );
            //Adding Bonus Item #3
            if(!Owner.AddToBackpack( bonusitem ) )
            {
                bonusitem.MoveToWorld(Owner.Location,Owner.Map);
            }

            bonusitem = new BronzeIngot( 20 );
            //Adding Bonus Item #4
            if(!Owner.AddToBackpack( bonusitem ) )
            {
                bonusitem.MoveToWorld(Owner.Location,Owner.Map);
            }

            bonusitem = new GoldIngot( 20 );
            //Adding Bonus Item #5
            if(!Owner.AddToBackpack( bonusitem ) )
            {
                bonusitem.MoveToWorld(Owner.Location,Owner.Map);
            }

            bonusitem = new AgapiteIngot( 20 );
            //Adding Bonus Item #6
            if(!Owner.AddToBackpack( bonusitem ) )
            {
                bonusitem.MoveToWorld(Owner.Location,Owner.Map);
            }

            bonusitem = new VeriteIngot( 20 );
            //Adding Bonus Item #7
            if(!Owner.AddToBackpack( bonusitem ) )
            {
                bonusitem.MoveToWorld(Owner.Location,Owner.Map);
            }

            bonusitem = new ValoriteIngot( 20 );
            //Adding Bonus Item #8
            if(!Owner.AddToBackpack( bonusitem ) )
            {
                bonusitem.MoveToWorld(Owner.Location,Owner.Map);
            }

            base.GiveRewards();
        }

        public override bool CanOffer()
        {
            return (Owner.Skills[SkillName.Mining].Base >= 100.0);
        }
    }

    public class ThePerfectCut2 : BaseQuest
    {
        //The player will have a delay before they can redo quest again
        public override TimeSpan RestartDelay { get { return TimeSpan.FromMinutes(60); } }

        //This is the Quest Title the player sees at the top of the Gump
        public override object Title { get { return "The Perfect Cut"; } }
        //This tells the story of the quest
        public override object Description { get { return "I have had my fair share of gems come in and out of this place. But to find the truely rare cuts of gem is another story. Deep within the mines, the caverns and even along the mountain stretches riches beyond any mans dream. If you come across a gem I am looking for. Please bring it to me and I will reward you for your time."; } }
        //This decides how the npc reacts in text the player refusing the quest
        public override object Refuse { get { return "What a shame."; } }
        //This is what the npc says when the player returns without completing the objective(s)
        public override object Uncomplete { get { return "If you find a rare gem, bring it to me."; } }
        //This is what the Quest Giver says when the player completes the quest.
        public override object Complete { get { return "Sweet tator tots, look at the size of that thing. I really want to thank you for bringing me this. Im gonna make a.. I am going to put it in the display case so all can marvel at its rare beauty."; } }

        public ThePerfectCut2() : base()
        {
            int which = Utility.RandomMinMax(1, 6);
            if (which == 1)
                AddObjective(new ObtainObjective(typeof(DarkSapphire), "Dark Sapphire", 1));
            if (which == 2)
                AddObjective(new ObtainObjective(typeof(Turquoise), "Turquoise", 1));
            if (which == 3)
                AddObjective(new ObtainObjective(typeof(EcruCitrine), "Ecru Citrine", 1));
            if (which == 4)
                AddObjective(new ObtainObjective(typeof(FireRuby), "Fire Ruby", 1));
            if (which == 5)
                AddObjective(new ObtainObjective(typeof(BlueDiamond), "Blue Diamond", 1));
            if (which == 6)
                AddObjective(new ObtainObjective(typeof(PerfectEmerald), "Perfect Emerald", 1));

            this.AddReward(new BaseReward(typeof(PerfectEmerald), "Perfect Emerald")); // Arcane Circle         
        }

        public override QuestChain ChainID
        {
            get
            {
                return QuestChain.PerfectCut;
            }
        }

        public override bool CanOffer()
        {
            return (Owner.Skills[SkillName.Mining].Base >= 100.0);
        }

        public override void GiveRewards()
        {
            base.GiveRewards();
        }
    }

}
Yep, any item:
UO_te_xml_questitem_1.jpg
You can add attachments to players so quests reset over a period of time, or never (like a one and done quest).
Enjoy! ;)
(PM for support if you like :) )
 
lol that's awesome but I meant can it be linked to an already scripted quest, like lets just say the spellweaving quest for example.
Well the XmlEdit is the dialog you create and that is a cfg file, so you would have to re-create the quest as a cfg file.
It is a lot less painful than you think though. Mostly you are just copy/paste-ing lines of dialog from the script to the cfg (or XmlEdit window).
I have had to re-create several of those MondainQuesters, but not as Items. ;)
 
Well the XmlEdit is the dialog you create and that is a cfg file, so you would have to re-create the quest as a cfg file.
It is a lot less painful than you think though. Mostly you are just copy/paste-ing lines of dialog from the script to the cfg (or XmlEdit window).
I have had to re-create several of those MondainQuesters, but not as Items. ;)
Yeah I was just hoping to use the ML quest system I like the way it works.. but I supposed I'll give XML a try, and lol yeah I didn't want Mobiles all over as I am going to have about 30 different quests all semi related next to each other so an item would work way better :)
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back