RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

XmlSpawner2

LordHogFred

Knight
ArteGordon said:
you should be able to [xmlload them and then most of them involve some kind of npc interaction to get them started that require player accesslevel to trigger.

For example a simple one like katarquest you can just

[xmlloadhere katarquest.xml

and it will load the quest spawners whereever you happen to be.
Doing a quick respawn on them will set them up immediately (instead of waiting for any npcs and such to spawn).


Some, such as dracondarquest.xml are more involved and have multiple npcs spread out over several locations.

[xmlload dracondarquest.xml

will load in the quest spawners and it begins in the brit bards guild in fel with the npc Samantha.


Ok cool, I loaded the quest (I had to move it to my top most RunUO folder) but I can't see how I am supposed to start the quest
:confused:
Sorry to be so annoying but I'm confused

(edit)
Ok I tried moving the Katar Quest.npc into ym top most RunUO folder and when I wlaked up to one of the npcs the server crashed giving this error:
Code:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.SpokenTextLogger.EventSink_Speech(SpeechEventArgs args)
   at Server.SpeechEventHandler.Invoke(SpeechEventArgs e)
   at Server.Mobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Mobiles.TalkingBaseCreature.DelayedSpeech(Object state)
   at Server.DelayStateCallTimer.OnTick()
   at Server.Timer.Slice()
   at Server.Core.Main(String[] args)

Chz :),
 

ArteGordon

Wanderer
that would be due to some script that you have that is logging speech and it is getting confused trying to log the npc's speech.

These npcs dont just generate text messages, they generate speech that can be processed by other speech handlers.

You could either track down the other script, or you could modify the TalkingBaseCreature so that it didnt generate actual speech

around line 756 in TalkingBaseCreature.cs you can change

this.DoSpeech(text,new int[] {},CurrentEntry.SpeechStyle,SpeechHue);

to

PublicOverheadMessage( MessageType.Regular, 0x3B2, true, text );

Note that by making this change, some of the examples will no longer work (since the npcs are no longer actually speaking), such as the whosonfirst.xml abbott and costello routine.

(edit)

to start the katar quest, just talk to katar and offer to help.
 

LordHogFred

Knight
ArteGordon said:
that would be due to some script that you have that is logging speech and it is getting confused trying to log the npc's speech.

These npcs dont just generate text messages, they generate speech that can be processed by other speech handlers.

You could either track down the other script, or you could modify the TalkingBaseCreature so that it didnt generate actual speech

around line 756 in TalkingBaseCreature.cs you can change

this.DoSpeech(text,new int[] {},CurrentEntry.SpeechStyle,SpeechHue);

to

PublicOverheadMessage( MessageType.Regular, 0x3B2, true, text );

Note that by making this change, some of the examples will no longer work (since the npcs are no longer actually speaking), such as the whosonfirst.xml abbott and costello routine.

(edit)

to start the katar quest, just talk to katar and offer to help.


Ok cool,

This is my logging script:

Code:
//   RunUO script: Remote Console
//   Originally made by Shurugwi
//
//   Portions Copyright (c) 2003 by Philantrop (Wulf C. Krueger <[email protected]>)
//
//   This script is free software; you can redistribute it and/or modify
//   it under the terms of the GNU General Public License as published by
//   the Free Software Foundation; version 2 of the License applies.
//
//   This program is distributed in the hope that it will be useful,
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   GNU General Public License for more details. 
//   [url]http://www.gnu.org/licenses/gpl.html[/url]
//
//   In short: Whatever you do to this script, you MUST publish it and
//   let it be used for free. 
//
//   More of my scripts can be found on: [url]http://www.mailstation.de[/url]
//
//   Please do NOT remove or change this header.

using System;
using System.IO;
using Server;
using Server.Accounting;
using Server.Network;
using Server.Scripts.Commands;

namespace Server
{
	public class SpokenTextLogger
	{
	  private static bool enabled = true;
 	  private static string path = Core.BaseDirectory;
	  private static string LogFile = Path.Combine(path, String.Format("Logs\\SpokenText-{0}-{1}-{2}.log", DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day) );
 	  private static StreamWriter logger = new StreamWriter(LogFile,true);

	  public static void Initialize()
	  {
	    EventSink.Speech += new SpeechEventHandler( EventSink_Speech );
	    LogLine("\n\n");
	    LogLine("*********************************************************");
	    LogLine("---- NEW LOG SESSION STARTED ---");
	    LogLine("*********************************************************\n");
	    Console.WriteLine("TEXT LOGGER: Started... [" + LogFile + "]");
	  }

	  private static void EventSink_Speech( SpeechEventArgs args )
	  {
	    Mobile from = args.Mobile;
	    LogLine(from.Name + "/" + ((Account)from.Account).Username + " " + ((NetState)from.NetState) + ": " + args.Speech);
	  }

	  public static void LogLine(string data)
	  {
	    Log(data + "\n");
	  }

	  public static void Log(string data)
	  {
	    if(enabled) {
	      try {
		if(logger != null) {
		  Console.Write(DateTimestamp + data);
		  logger.Write(DateTimestamp + data);
		  logger.Flush();
		}
	      }
	      catch(Exception e) {
		enabled = false;
		Console.WriteLine("TEXT LOGGER: Exception: " + e.Message);
		Console.WriteLine("TEXT LOGGER: HALTED");
	      }
	    }
	  }

	  private static string DateTimestamp
	  {
	    get 
	    { 
	      string time = String.Format("[{0:D2}:{1:D2}:{2:D2}] ",DateTime.Now.Hour,DateTime.Now.Minute,DateTime.Now.Second);
	      string date = String.Format("[{0:D2}/{1:D2}/{2:D2}] ",DateTime.Now.Year ,DateTime.Now.Month,DateTime.Now.Day);
	      return date + " " + time;
	    } 
	  }
	  
	}
}

I'm thinking that maybe an if statement could be put in somewhere that checked if it was a TalkingMobile and didnt log the speech. Problem is I have no idea where I would put it and even if it would work.

ANy help would be great :)

Chz :),
 

ArteGordon

Wanderer
this is the problem line

Code:
LogLine(from.Name + "/" + ((Account)from.Account).Username + " " + ((NetState)from.NetState) + ": " + args.Speech);

since npcs wont have accounts, and therefore trying to get the Username from the null Account will give you that error.

just do something like this

Code:
if(from.Account != null)
{
     LogLine(from.Name + "/" + ((Account)from.Account).Username + " " + ((NetState)from.NetState) + ": " + args.Speech);
}
 

LordHogFred

Knight
Wow man ur so cool the support u give is excellent :D

Just one last thing is it possible for me to store the .npc files anywhere else except the top most RunUO folder?

Chz :),
 

ArteGordon

Wanderer
updated to version 2.69

from the changelog

Version 2.69
updated 11/25/04
- fixed a potential crash bug in initializing attachments for the first time that was introduced in v2.68. This could occur on server restart if no attachments had ever been previously saved.

- fixed a parsing problem with the SET keyword when used in the "SET,name,type" form (it was only parsing 2 instead of 3 args).

- added the OnArmorHit method to XmlAttachments that allows them to respond to being hit with a weapon.

- added an additional installation step 10 to support the OnArmorHit method.

- minor attachment reporting change. The XmlAttach.AttachTo static method now returns false if the attachment is deleted while being attached. One small cosmetic consequence of this change is that some attachments that automatically delete themselves if attached to an inappropriate target (like trying to attach XmlPoints to an item) will now be reported as having failed to be attached when using the [addatt command.
 

ArteGordon

Wanderer
made a slight modification to installation step 10 to allow shields to process the original damage dealt by the attacker instead of the already-shield-absorbed damage.

(edit)

installation notes in XmlSpawner2-v269-1of2.zip were updated with this info as well.
 

ArteGordon

Wanderer
LordHogFred said:
Wow man ur so cool the support u give is excellent :D

Just one last thing is it possible for me to store the .npc files anywhere else except the top most RunUO folder?

Chz :),

yeah, you can also put them in a folder named XmlQuestNPC that has been placed in your RunUO installation folder.
 

KhaoZ

Sorceror
Is this what i would use to spawn all the dungeons like OSI? my shard is pvp but we wouldnt mine having all fel dungeons spawned just like osi
 

ArteGordon

Wanderer
this package does not include world spawn maps. There are other submissions that have these world spawn specifications, such as Nerun's distro and cwards OSI world spawns. These spawn specifications can be read in by XmlSpawner using the various importing commands, such as

[xmlimportmap

for .map files

[xmlimportmsf

for .msf files
 

Reggie

Wanderer
i got a problem with the spawner i activate showbounds and cant deactivate it now any suggestions for solutions?
 

ArteGordon

Wanderer
ah, yes. This is an old feature of showbounds that occurs if you do a server restart while is it active.
It displays statics for the bounds, but the spawner doesnt save the list of statics so when you restart it can no longer delete them, so you have to manually delete them.
The easiest way to do this is to use [xmlfind.

Bring up the [xmlfind gump (just type "[xmlfind")

Select type, property test, and range checkboxes.

Set the range field to extend beyond the showbounds area.
Set the propertytest field to "itemid=14089" (which is the id for the flame static used by showbounds)
Set the type field to "static".

Hit the search button.

This will list all of the flame statics within range. Select the "select all" button in the upper right corner of the gump (there are two right next to one another, it is the one on the left, the one on the right is the "select-all-on-page").

Then hit the "Delete" button and you will be prompted to confirm deletion of all of the flame statics.

I'll work on having it deal with restarts properly.
 

akrondar

Wanderer
Now on the right topic... :rolleyes:

I´m very sorry.. but i want to ask if there is any faq or guide with steps to set your own questr, i couldn´t find any of these in the documentation. If it doesn´t, can you point me out shortly how to set them?

Thanks in advance, and sorry if it´s a dumb question XD XD XD
 

Reggie

Wanderer
can i just replace to old version with the new one without deleting all the spawners i have?

cause i dont have [xmlfind
 

ArteGordon

Wanderer
akrondar said:
Now on the right topic... :rolleyes:

I´m very sorry.. but i want to ask if there is any faq or guide with steps to set your own questr, i couldn´t find any of these in the documentation. If it doesn´t, can you point me out shortly how to set them?

Thanks in advance, and sorry if it´s a dumb question XD XD XD

There is no step-by-step guide to setting up the quests, but there are several examples of quests in the example.xml file and some descriptions of how the specific examples are configured in xmlspawner2.txt

The basic element of all of the quests is the use of the questholder or questnote items, which keeps track of quest objectives and quest progress.

This is typically handed out by an npc after some dialog. Some of the quests use questnpcs and .npc dialog files that allow them use specified keywords to move through a dialog tree.

So typically you would have 2 spawners. One to hand out the quest and one to give out rewards.

The simplest quests can be set up with just a single spawner with the questholder items set to automatically give out rewards on completion so no reward spawner is required.
Examples of this type of quest can be found in questfaction.xml, repeatquest.xml, boboquest.xml, and others.

A more involved quest would be something like dracondar.xml which has about 5 steps and involves 4 different quest npcs. It also has a forking outcome depending upon the way the character interacts with one of the npcs, so it is a good example.

Blather3.xml uses gumps to start the quest as well as to give rewards. This one is a good demonstration of how to use the TriggerOnCarried property of the spawner to control its activation based upon quest items that a player is carrying.

If you look in the xmlspawner2.txt file and do a search on those quests, you will find additional information relating to how they are set up.
 

ArteGordon

Wanderer
did you install the recommended support packages XmlSpawner2-support1of2.zip and XmlSpawner2-support2of2.zip?
That is where you will find [xmlfind.
 

akrondar

Wanderer
Thank you very much arte for your informative and fast answer. I will go to play more with this, and make great quests for my players XD.
 
Top