I am working on a quest and wanted to add a quest tag, so it could only be done once. The problem I am having is that the OnDragDrop has 4 different items you can drop, to get one of 4 rewards (each item determines the reward). There is a selection gump at the beginning of the quest, where you select one of 4 monster spawning items. A simple gump with 4 buttons. I tried adding the quest tag to the gump, so you could only ever select one summoner. I was trying to have the gump button look for the tag. I had no luck (account got tagged, but still allowed more selections).

Anyway, I gave up on that and moved to the OnDragDrop on the QuestGiver.

Same problem. The account flags (I used a new tag name to be sure). But you can complete the quest as many times as you want. The reward OnDragDrop is an 'else if' for each monster head you can drop. I tried putting the tag check above the if/else statement to skip the reward if you have the flag. I could not get it to work. So I tried moving it to each of the 4 reward portions of the 'else if'... no joy.

I remarked out the 4 tag checks, and went back to just one... still nothing. As is, the script loads, the account gets tagged, but the tag does nothing. I copied the tag syntax from another quest that does work correctly, but the nested reward is messing with me, I guess.

Anyone good with quest account tags? Am I close? I have spent an embarrassing amount of time on this ha ha

gump-tag.JPG Tags.JPG
 

Attachments

  • VincentQuestGiver.cs
    9.9 KB · Views: 8
Also, instead of a nested reward mess, could it be done with a list, and one reward statement? Just so it knows that item 1 gives reward 1, item 2 reward 2 etc. That would make a cleaner script and might make it easier to get the quest tag to work...
 
Try this in your context menu entry:

C#:
}

        public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
        {
            base.GetContextMenuEntries(from, list);
            
            Account acct = (Account)from.Account;
            bool ElementalWeaponRecieved = Convert.ToBoolean(acct.GetTag("ElementalWeaponRecieved"));

            if (!ElementalWeaponRecieved) // ONLY able to begin quest if NOT already tagged.
            {
                list.Add(new VincentEntry(from, this));
            }
        }

That should prevent them from starting the quest if they are tagged.
 
Cool, thanks! It worked. But... now I realize that "account" tags are in fact account tags. I tried it on another character and they were already tagged (it makes sense really).

Is there a player tag?

~Edit~ aren't murder tags per character? I will look that direction...
 
Well this is true. And there are good reasons for limiting things to one per account, especially when the reward for a quest is one that would be a game-changer. Otherwise, someone could keep creating characters, doing the quest, transfer the reward to their "main" character, then delete the character and repeat. If you want to limit the quest per player, you would probably just want to add an Xml Attachment.
 
The more I work on the larger quest, the more I think the account tag is good... we shall see. Also, I have a few decisions the player has to make, that change the flow & outcome of the quest, and I do not want them going back. So the tags will be helpful.
Thanks! :cool:
 
Last edited:
Speaking of account tags... is there a way to remove the account tags? I am testing a quest and have to keep going in to my account xml and manually removing the tag. Not a great option. :)
 
Cool! Both of those work. The script is very nice.
I am not a fan of messing with the account xml file... just cannot be a good idea ha ha...
Thanks for all the help! (not just this question)
 
Back