Howdy folks, here's my attempt at an intermediate tutorial. I've used HellRazors suggestions as a template for my quest design.
The QuestThe player walks past a beggar named Salim, who asks him for some gold for food. Upon giving the beggar some gold, he tells you that he knows of a treasure chest at the end of the tunnel up ahead, and offers you two paths. The fighter’s path, and the Thinker’s path. The fighter’s path requires you to kill 10 Brigands to get to the chest, and the thinker’s path gives you a code to break, which will allow you to navigate a teleporter maze. Once the player has completed one of these 2 tasks he/she then has access to the treasure chest and the quest is complete.
Writing up the Beggar NPCThe first thing I do is add a frozen xmlquestnpc, so that he doesn't wander around Green Acres while I'm trying to work on him.
[add xmlquestnpc set frozen true
And I bring up his blank dialog box with [xmledit
Now I add in the name of the questholder that I am handing out, and the attachment, as I don't want the NPC to respond to a player that already has the book, or has already completed the quest (As this example is a non-repeatable quest).

The "dependson" field for the first line has a -2 in it, because I want that line to take into account the TriggerOnCarried and NoTriggerOnCarried conditions. (a -1 will ignore those conditions.) I have added an additional condition in the "Condition" field, this checks to see that the player has at least 10 gold in his pack, as the quest requires you to give 10 gold to the Beggar. The "Text" field is what the NPC will say when a player (who is within the proximityrange) is found to have at least 10 gold on him/her.

Now I add a new line by clicking the "Add" button at the bottom. This line handles what happens when the player responds to the beggars pleed, by saying "What seems to be the matter?" That is specified in the keywords field. You can also add multiple answers to the keywords field such as quest,yes,sure,hello,hail all seperated by commas. This allows the player to say any of those words or sentences to trigger this line. Another handy feature is the "talktext" property of the NPC itself, which allows you to type a word or sentence that the player will say, when he clicks the "Talk" button under the NPC's menu.
Once the player has said "What seems to be the matter?" This line triggers a GUMP that is brought up, and offers the player the choice of whether to give the Beggar some gold or not. The book allows you to add longer strings of text in the entry fields, and can be brought up by clicking the scroll-type button to the right of the entry line. This GUMP type (4) allows you to specify responses at the end of the text. The format is ;name of the button or response;response;name of next response;response2 etc… the second part of declaring the button (after the name of the button; ) is used as the keyword in the next line. As can be seen here…

Nogold is the response if the player chooses not to give the Beggar some gold, in which case the Beggar replies: “Alright ya slob! Have it your way!” and the dialog is ended. Alternatively, the player could have chosen to be kind and give the Beggar 10 gold, which leads to the next line…

In this line, the NPC actively takes the gold, as can be seen in the action field: TAKEBYTYPE,1,10/gold (with format TAKEBYTYPE,probability,count/itemtype). This takes 10 gold from the players backpack in this case. Note that the dependson field (in this case it has the number 20) refers to the line number from which the response is coming. Apart from taking the gold, this line also displays a GUMP of type 4 to the player, with this text:
GUMP,Salim,4/Why thank ye kind {GETONTRIGMOB,name}! I owe you my life. In fact, I may be of some help to you. There lies a treasure chest most valuable in the cave up ahead, two paths lead to it, one fit for a fighter, the other for a witty mind. Which path do you wish to take?; I am a fighter at heart!;fighter;I seek a path of intellectual challenge!;maze;I am not ready for this challenge yet;no
The function of {GETONTRIGMOB,name} is to display the name of the player in the GUMP, to make it more personalised. So if the players name is Vladimir. He would then see his own name in place of the {GETONTRIGMOB,name} as seen here..
Why thank ye kind Vladimir!
This particular GUMP offers 3 choices. To take the path of a fighter, a thinker or to decline the task completely
If the player chooses the path of the fighter, the line looks like this…

Note that I saved my work at this stage (Should probably have been done earlier

). This line displays the GUMP describing what the player has to do, note that it is a type 0 GUMP, which means it only have 1 button at the end “Okay”, and the keyword is set to “done” when the player clicks this button.
This is also the line where the player is given the questholder (in the action field) and that line looks like this:
GIVE/<questholder/name/A Beggars Treasure/notestring/Kill the 10 Brigands in the tunnel up ahead to get to the treasure!/objective1/KILL,Brigand,10/objective2/Find the treasure/autoreward/true/repeatable/false
This gives a questholder with 2 objectives, Kill 10 Brigands and Find the treasure. If the player chooses to take the path of the thinker, the Line looks identical to that of the fighter, except that the player is given a different quest book:
GIVE/<questholder/name/A Beggars Treasure/notestring/Use the code book found inside the tunnel to navigate the maze and find the treasure/objective1/Complete the maze/objective2/Find the treasure/autoreward/true/repeatable/false
Once the player clicks the “Okay” button I added one more line…

This line dependson 60,70 as it could come as a response to either the fighter or thinker line, depending on which the player chooses. The keyword is “done” because I used the GUMP type 0 in the previous 2 lines.
SETONTHIS/MSG/Good luck {GETONTRIGMOB,name}!/doreset/true
This line in the action field tells the NPC to wish the player good luck, and it also resets the timer on the NPC (Resets the ResetTime at the top of the dialog gump). This is just so that the next player that comes along doesn’t have to wait 2 minutes before the NPC will respond to him. Also note that I saved my NPC again, and it is important that you overwrite the file when this GUMP comes up.
That’s the NPC done, now to do the spawners and the puzzles.
The Random Book SpawnerThis is a spawner if that spawns a random book for the player doing the thinkers part of the quest. The book is a code that the player needs to break, and in my case the book was written and then added to the server as an item on its own. This is because I couldn’t find a way to spawn a book with writing in it. But the point of showing you this is to give you some insight into using the RND or random feature. To add a spawner, type [add xmlspawner and target the tile where you want to place the spawner. You can name the spawner by editing the field right at the top of the spawner gump on the left, or by adding it to the add string like this... [add xmlspawner set name "A Random Book Spawner" (the "" are important if the name of the spawner contains spaces).

This is how I set up the properties of the random book spawner gump. MinDelay and MaxDelay are set to 0, so that the book spawns instantly. To trigger the spawner, you need to set a proximityrange (in this case it was 1, which means it will trigger as soon as a player comes within 1 tile away from the spawner). The “TriggerOnCarried” property should have the name of the questholder in it (ie it should have “A Beggars Treasure” in it for this quest, it is different in my example because the spawner I used this quest for had a different name…). Also, I put the names of the books it spawns (a possibility of 6) in the “NoTriggerOnCarried” property so that it doesn’t spawn another book, if the player already has on. The format is name of book 1,name of book 2,name of book 3 etc…

As you can see, the entries on the spawner gump are quite full, and carry on to the "second page". to view the second page of the spawner, click the "2" button or the number corresponding to the page number you want to view, as highlighted in the image above.
This is the part of the spawner that generates a random book and spawns it. The first 6 lines generate a random number between 1 and 6.
IF/RND,1,6=1/8/2
This means that: If a random number, between 1 and 6 is equal to 1, then go to subgroup 8 else go to subgroup 2
In other words, if the random number is 1, then go to group 8 and spawn that book (subgroups are the coloured numbers on the right in the “Sub” column).
If the random number is NOT 1, then it will go to subgroup 2, which will do the same test, but for number 2.
If the number IS 1, then it will skip the following lines until it gets to subgroup 8. At this stage, it will GIVE/epic2teleporterbook1, which is the name of the book I have saved. Also in group 8, it will show a message above the players head, telling him he has received a book. And lastly, the GOTO/1 tells the spawner to go back to subgroup 1, where it will stay until it is triggered by another player.
The MazeThis is what the maze looks like to the player…

It consists of a grid of black and white tiles, that are numbered A1, A2, B1, B2 etc, much like a chess board.

In GM mode, you can see that on each tile, is a teleporter. The coordinates are set to somewhere outside the maze (preferably back to the beginning). The player must pass through the caged area to enter the maze, at that point I have placed 6 spawners on top of each other. There is 1 spawner for each of the books and what it does is turn off the teleporters along the path that that particular book has the answer to (All the teleporters are ON before the player walks past the initiating spawner). Here is what one of those spawners looks like…

The properties of the spawner are set to detect player in a proximityrange of 0 (or the same tile as the spawner). The spawner is also set to TriggerOnCarried “the name of that particular book” so that it only triggers the spawner, for the route that is described in the book. The spawnrange is irrelevant in this case… I only noticed I had changed it after I saved the image.

This shows how I turned off the teleporters along the path that the player must take (if he/she takes a wrong step he/she is teleported back to the beginning). If the lines are hard to read… here’s an example:
SET,TeleA1,teleporter/active/false
TeleA1 is the name of the teleporter on block A1 (the start of the route). All of these lines are under the same subgroup (this ensures that all of the lines are performed with 1 trigger, or at the same time). Once the player reaches the end of the maze there is a similar spawner that resets the maze. This is done using this line:
SETONNEARBY,20,teleporter/active/true (this sets all teleporters, in a range of 20 tiles to active)
This spawner also deletes the code book:
SETONCARRIED,The Teleporter Walkway/DELETE (DELETE must all be in caps)
Also having completed the maze, this should be reflected in the book, to do this you can add another line to the end spawner:
SETONCARRIED,A Beggars Treasure,questholder/completed1/true
The BrigandsHaving chosen the fighters path, the player must defeat 10 brigands in order to find the treasure chests. Here is the props gump for the spawner.

I set the proximityrange to 30, so that the brigands spawn before the player gets there. The key property here is the TriggerOnCarried property, it must be set to the name of the questholder “A Beggars Treasure” so that the brigands only spawn for a player doing the quest. RefractMax and RefractMin are set to 10 minutes; this means that the spawner will wait 10 minutes before respawning the brigands, because you don’t want them to keep respawning instantly.
The actual entry that spawns the brigands looks like this:
#CONDITION,GETONCARRIED,A Beggars Treasure,questholder,completed1=false ; Brigand
This spawns a brigand on the condition that the player hasn’t yet completed objective 1 on that quest, to spawn 10 brigands set the Max to 10 and the Per to 10 on the right hand side of the gump.
The Treasure Chest!
This is the props gump for the treasure chest spawner at the end of the quest, It has the same TriggerOnCarried as the previous spawner, but I have set the spawnrange to 0, so that the chest spawns on the same tile as the spawner. I have set a Duration of 20 minutes, this means that the chest will despawn after 20 mins so that (hopefully) other players won’t be able to loot from it. The entry for spawning the chest would look like this:
#CONDITION,GETONCARRIED,A Beggars Treasure,questholder,completed2=false ; TreasureChestLevel5
This would spawn a level 5 treasure chest, as long as the player hasn’t completed the second objective (Find the treasure). This stops the player spawning the chest repeatedly and getting infinite rewards, because in the next step we set that objective to complete:
On the next line in the spawner we have this:
SETONCARRIED,A Beggars Treasure,questholder/completed/2true
This completes the second objective, and the questholder should now dissapear (at it was set to autoreward/true and the player should get 1 quest point for completing the quest)
Both the of these lines should be placed under the SAME subgroup, so that they are both activated by the first trigger
And with that, your done!

Thanks to Justae for idea and implementation of the teleporter maze puzzle (which we actively use as a quest on our shard). I hope this post comes in handy, any corrections/suggestions/additions are MORE than welcome!
Regards, Vlad