Wyli

Member
Hello,
I've been a long time fan of UO and I thank everyone here for your work!
I've just recently started up my own server for my friends and I.

I am trying to create new quests through the XMLQuest system. Through reading tutorials and posts here, I have managed to cobble together a simple collection quest. It works perfectly for {collect 5xitem1 and get reward}. I would like to have the quest more robust like {collect 5xitem1 or 5xitem2 and get reward} or even better, {collect 5xitem1 or item2 and get reward (mix and match to collect 5 items total)}.
I have searched these forums and the Internet in general, but can't find the syntax.
Is this possible to do?

I appreciate the help.
 
XmlQuests can be extremely robust, so much that you don't even have to use any of the Quest keywords at all. You can use Xmlspawners to complete objectives as well. In order to do what you're suggesting, it's just a matter of setting the objectives and having the player "go somewhere" to complete the quest, i.e. back to the questgiver, or really anywhere, because you're going to use an Xmlspawner to detect if either objective1 or objective2 is complete (one or the other HAS to be complete, can't do three of item1 and two of item2 unless you have items setup as a subclass of a master item, i.e. BunchOfGrapes: Fruit and then have the players collect "5 x Fruit"). Please refer to XmlDialog/XmlEdit (Page 2) in the Tutorials section as it walks you through NOT using an XmlQuest keyword and using and Xmlspawner to complete the quest instead.
 
There is a quest I downloaded called "den of evil". You are sent to a dungeon to kill special critters. I was killing them and was not getting credit. It confused me at first because I know I was killing the right stuff. Turns out they use a spawner at the door of the dungeon, to flag that you found the dungeon. I recalled in, and did not walk through the door, past the spawner. Without the flag - the kills did not count (first objective was 'find the dungeon').

I pulled up the spawner and was reading what they set for it. It is pretty cool. The entire quest is one npc file and one xml file. It is kind of what Tass is talking about. No keywords, just all on the xmlspawner. When you load the xml it generates 4 spawners. Reading the spawners I learned a lot about what they can do.

It makes sure you go to a certain place, it tracks your kills, it completes when you return to the quest giver - all with the spawner. It is a relatively simple quest, but a great tutorial.
 

Attachments

  • DenOfEvil.zip
    3.4 KB · Views: 22
There is a quest I downloaded called "den of evil". You are sent to a dungeon to kill special critters. I was killing them and was not getting credit. It confused me at first because I know I was killing the right stuff. Turns out they use a spawner at the door of the dungeon, to flag that you found the dungeon. I recalled in, and did not walk through the door, past the spawner. Without the flag - the kills did not count (first objective was 'find the dungeon').

I pulled up the spawner and was reading what they set for it. It is pretty cool. The entire quest is one npc file and one xml file. It is kind of what Tass is talking about. No keywords, just all on the xmlspawner. When you load the xml it generates 4 spawners. Reading the spawners I learned a lot about what they can do.

It makes sure you go to a certain place, it tracks your kills, it completes when you return to the quest giver - all with the spawner. It is a relatively simple quest, but a great tutorial.
Yeah, someone released that years ago as a tribute to Diablo, along with another one. The biggest problem with using an Xmlspawner to complete a quest, or even an objective, is that the players MUST trigger it (by getting within the ProximityRange) or they get "stuck". In Tukaram's case, I prevented runes from being marked in any region marked dungeon. This means the players HAVE to walk through the dungeon entrance, forcing them to trigger the Xmlspawner. The best advice I can give you for situations like that is: Find the choke-point; the spot where all players that get the quest have to pass by or enter and setup your Xmlspawner there. Using an Xmlspawner instead of an XmlQuest keyword means there is no limit to what can be done (think far beyond questing even). ;)
 
It did confuse me a bit ha ha. Then I opened the book and saw the "find dungeon" task was incomplete. I still learned a lot from reading through the spawners for that one though :)

The xml spawners are quite amazing
 
Thank you for the replies. That was very helpful!
Tass, the tutorial link you posted was the one I was using to get started. The XML Spawner part at the end was a bit confusing to me until I read through the quest that Tukaram posted. Then it made a lot more sense.

another thing I am trying out though, I am wanting to change the names of some items as well as add new items.
in the code for the items I'm seeing something like:
public override int LabelNumber
{
get
{
return <7digit number>;
}
}

I assume that this is a callout to a list of items names. but I'm unable to find where that list resides.
any advise on this one?

thank you again for your help!
 
That value in the LabelNumber is the number that the client reads from the cliloc
Pyro is correct, but it is also "safe" to remove that section of code and then add:
Code:
Name = "The Name of My Item";

That goes under the Constructor (where you see Hue, Title, Weapon Attributes, etc).
Just fyi, you can create brand new items on the fly with an Xmlspawner. It's very similar to setting up a custom mob:
Code:
 fork/itemID/2649/name/Inflatable Bed/hue/51

You can make anything that way, even weapons. With weapons, start with a weapon that has similar attributes to the final product, because then you just have to change those values in the entry line.
 
Just have to add it in this case ;)
You can also set the name to a specific one without having to change the LabelNumber.

Name has priority. If it is null the LabelNumber will be checked.
 
Just have to add it in this case ;)
You can also set the name to a specific one without having to change the LabelNumber.

Name has priority. If it is null the LabelNumber will be checked.
Not that I'm doubting you on this by any means PyrO I just want to make sure I'm wrong lol, but I seem to recall the cliloc name overriding anything you put under the constructor :|
That's why I usually removed it if it became an issue.
Is that not the case anymore?
 
Code:
if (Name == null)
{
	number = LabelNumber;
}
else
{
	LabelTo(from, Name);
	number = 1041000;	
}

Thats part of the BaseWeapon.cs OnSingleClick method ;)
 
Awesome! Someone fixed it then (and it wasn't me lol)! I started doing something similar to my scripts, but then I just removed all the clilocs for names and used Name = " "; instead.
Thanks ;)
 
XmlQuests can be extremely robust, so much that you don't even have to use any of the Quest keywords at all. You can use Xmlspawners to complete objectives as well. In order to do what you're suggesting, it's just a matter of setting the objectives and having the player "go somewhere" to complete the quest, i.e. back to the questgiver, or really anywhere, because you're going to use an Xmlspawner to detect if either objective1 or objective2 is complete (one or the other HAS to be complete, can't do three of item1 and two of item2 unless you have items setup as a subclass of a master item, i.e. BunchOfGrapes: Fruit and then have the players collect "5 x Fruit"). Please refer to XmlDialog/XmlEdit (Page 2) in the Tutorials section as it walks you through NOT using an XmlQuest keyword and using and Xmlspawner to complete the quest instead.
Greatings scripters fellows,
Do you know where I can reed the XmlDialog/XmlEdit that was mentionned?
 

Active Shards

Donations

Total amount
$80.00
Goal
$1,000.00
Back