Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Release Archive

Custom Script Release Archive This is a pre-script database archive of what our users had released.

 
 
Thread Tools Display Modes
Old 09-11-2005, 11:00 AM   #876 (permalink)
Forum Expert
 
arul's Avatar
 
Join Date: Jan 2005
Location: Hic sunt leones ...
Age: 21
Posts: 1,289
Send a message via MSN to arul
Default

You're right, I've got this IM few minutes after crash.
Quote:
I setted huge MinD and MaxD in order to XmlSpawner doesn't spawn anything further and it crashed. Honestly I've forgotten the [Off] button, sorry.
arul is offline  
Old 09-11-2005, 11:22 AM   #877 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by arul
You're right, I've got this IM few minutes after crash.
ok, thanks. Fixed for the next release.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline  
Old 09-12-2005, 07:31 PM   #878 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

updated to version 2.97

from the changelog


New to version 2.97
updated 9/12/05

- added several timekeeping properties to XmlDialog entries that allows you to control their activation based upon time of the day, day of the week, day of the month, or phase of the moon. These properties are:
GameTOD - has values of the form hh:mm:ss, so 14:00:00 would be 2pm. This is in UO time.
RealTOD - has values of the form hh:mm:ss in real world time.
RealDayOfWeek - has values Sunday, Monday, etc. Note, these are enums so when referring to them in property tests precede them with a #, like "RealDayOfWeek=#Monday"
RealDay - has values 1-31
RealMonth - has values 1-12
MoonPhase - has values NewMoon, WaxingCrescentMoon, FirstQuarter, WaxingGibbous, FullMoon, WaningGibbous, LastQuarter, WaningCrescent based upon the UO moon phase at the location of the object or npc the xmldialog is attached to.

There are a number of ways that you might use these new properties.
Setting the Home property on an npc will cause it to wander to that location, so by setting Home at different times, you can have your npcs go to different places throughout the day.

You could also have certain conversations that could only be carried out at certain times of the day, or days of the week.
For example, setting the Condition field in an xmldialog entry to

GameTOD>12:00:00 & GameTOD<16:00:00

would restrict its activation to between the times of 12 and 4pm

- added an example of the use of these new properties in a .npc file timeofday.npc, and a spawner example that loads it up onto an npc in timeofday.xml.
To test it out, just do an "[xmlloadhere timeofday.xml".
The npc will respond with the day of the week in his banter, and if you respond with the keyphrase "hello", you will get different responses depending on the time of day (game time), and even the day of the week (he doesnt work on Sunday).

- added an additional overload for XmlLoadFromFile(string filename, string SpawnerPrefix, bool loadnew, out int processedmaps, out int processedspawners).

- added a new NOT operator (~) that can be used in property tests. (thanks to Sou^^ for the suggestion) By preceeding the property test by a tilde (~), the boolean results of the test will be inverted. So for example the test

~GETONTRIGMOB,hits<20

would be true whenever the 'hits' property on the triggering mob was greater than or equal to 20.

Or the test

~GETONCARRIED,itemname,visible=true

would be true whenever the item was either not visible, or not found at all.

- added an additional check to the individual entry min/maxdelay specification to deal with a possible crash bug with integer overflow when entering an invalid min/max value in the spawner gump (thanks to arul for pointing this out).

- fixed the itemid on the reversedbackpack doom rare in xmlextras so that it is actually reversed (thanks to AdminVile for spotting this).
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline  
Old 09-13-2005, 02:38 AM   #879 (permalink)
Forum Expert
 
Join Date: May 2004
Age: 29
Posts: 358
Default

Hummmm. Moon phases. Spawn humans during all but full and werewolves during full. I see alot of potential for that!
MetallicSomber is offline  
Old 09-13-2005, 02:50 AM   #880 (permalink)
Forum Novice
 
manofwar's Avatar
 
Join Date: Apr 2004
Age: 39
Posts: 110
Default Great work ArteGordon!

I was adding the new version and decided to finally try some of the extra addons you have for it as well but i got stumped.

ERROR: Scripts\Items\Weapons\BaseWeapon.cs :CS0103 : ( line 1317, column 120) The Name 'originaldamage' does not exist in the class or namespace 'Server.Items.BaseWeapon'

heres the code i was trying to do with the install instructions.

Code:
		public virtual int AbsorbDamage( Mobile attacker, Mobile defender, int damage )
		{
			if ( Core.AOS )
				return AbsorbDamageAOS( attacker, defender, damage );

			double chance = Utility.RandomDouble();
			BaseArmor armor;

			if ( chance < 0.07 )
				armor = defender.NeckArmor as BaseArmor;
			else if ( chance < 0.14 )
				armor = defender.HandArmor as BaseArmor;
			else if ( chance < 0.28 )
				armor = defender.ArmsArmor as BaseArmor;
			else if ( chance < 0.43 )
				armor = defender.HeadArmor as BaseArmor;
			else if ( chance < 0.65 )
				armor = defender.LegsArmor as BaseArmor;
			else
				armor = defender.ChestArmor as BaseArmor;

			if ( armor != null )
				damage = armor.OnHit( this, damage );

			BaseShield shield = defender.FindItemOnLayer( Layer.TwoHanded ) as BaseShield;
			if ( shield != null )
				damage = shield.OnHit( this, damage );

			BaseClothing clothing;

			chance = Utility.RandomDouble();

			if ( chance < 0.07 )
				clothing = defender.NeckArmor as BaseClothing;
			else if ( chance < 0.14 )
				clothing = defender.HandArmor as BaseClothing;
			else if ( chance < 0.28 )
				clothing = defender.ArmsArmor as BaseClothing;
			else if ( chance < 0.43 )
				clothing = defender.HeadArmor as BaseClothing;
			else if ( chance < 0.65 )
				clothing = defender.LegsArmor as BaseClothing;
			else
				clothing = defender.ChestArmor as BaseClothing;

			if ( clothing != null )
				damage = clothing.OnHit( this, damage );

				// XmlAttachment check for OnArmorHit
	                  damage -= Server.Engines.XmlSpawner2.XmlAttach.OnArmorHit(attacker, defender, armor, this, damage);
	                  damage -= Server.Engines.XmlSpawner2.XmlAttach.OnArmorHit(attacker, defender, shield, this, damage);

	                  int virtualArmor = defender.VirtualArmor + defender.VirtualArmorMod;

			if ( virtualArmor > 0 )
			{
				double scalar;

				if ( chance < 0.14 )
					scalar = 0.07;
				else if ( chance < 0.28 )
					scalar = 0.14;
				else if ( chance < 0.43 )
					scalar = 0.15;
				else if ( chance < 0.65 )
					scalar = 0.22;
				else
					scalar = 0.35;

				int from = (int)(virtualArmor * scalar) / 2;
				int to = (int)(virtualArmor * scalar);

				damage -= Utility.Random( from, (to - from) + 1 );
			}

			return damage;
		}
Can you tell me what i did wrong? I did as the instructions said so i have no clue. This is the only error i am getting with all other instructions done in scripts already.
manofwar is offline  
Old 09-13-2005, 07:05 AM   #881 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by manofwar
I was adding the new version and decided to finally try some of the extra addons you have for it as well but i got stumped.

ERROR: Scripts\Items\Weapons\BaseWeapon.cs :CS0103 : ( line 1317, column 120) The Name 'originaldamage' does not exist in the class or namespace 'Server.Items.BaseWeapon'

heres the code i was trying to do with the install instructions.

Code:
		public virtual int AbsorbDamage( Mobile attacker, Mobile defender, int damage )
		{
			if ( Core.AOS )
				return AbsorbDamageAOS( attacker, defender, damage );

			double chance = Utility.RandomDouble();
			BaseArmor armor;

			if ( chance < 0.07 )
				armor = defender.NeckArmor as BaseArmor;
			else if ( chance < 0.14 )
				armor = defender.HandArmor as BaseArmor;
			else if ( chance < 0.28 )
				armor = defender.ArmsArmor as BaseArmor;
			else if ( chance < 0.43 )
				armor = defender.HeadArmor as BaseArmor;
			else if ( chance < 0.65 )
				armor = defender.LegsArmor as BaseArmor;
			else
				armor = defender.ChestArmor as BaseArmor;

			if ( armor != null )
				damage = armor.OnHit( this, damage );

			BaseShield shield = defender.FindItemOnLayer( Layer.TwoHanded ) as BaseShield;
			if ( shield != null )
				damage = shield.OnHit( this, damage );

			BaseClothing clothing;

			chance = Utility.RandomDouble();

			if ( chance < 0.07 )
				clothing = defender.NeckArmor as BaseClothing;
			else if ( chance < 0.14 )
				clothing = defender.HandArmor as BaseClothing;
			else if ( chance < 0.28 )
				clothing = defender.ArmsArmor as BaseClothing;
			else if ( chance < 0.43 )
				clothing = defender.HeadArmor as BaseClothing;
			else if ( chance < 0.65 )
				clothing = defender.LegsArmor as BaseClothing;
			else
				clothing = defender.ChestArmor as BaseClothing;

			if ( clothing != null )
				damage = clothing.OnHit( this, damage );

				// XmlAttachment check for OnArmorHit
	                  damage -= Server.Engines.XmlSpawner2.XmlAttach.OnArmorHit(attacker, defender, armor, this, damage);
	                  damage -= Server.Engines.XmlSpawner2.XmlAttach.OnArmorHit(attacker, defender, shield, this, damage);

	                  int virtualArmor = defender.VirtualArmor + defender.VirtualArmorMod;

			if ( virtualArmor > 0 )
			{
				double scalar;

				if ( chance < 0.14 )
					scalar = 0.07;
				else if ( chance < 0.28 )
					scalar = 0.14;
				else if ( chance < 0.43 )
					scalar = 0.15;
				else if ( chance < 0.65 )
					scalar = 0.22;
				else
					scalar = 0.35;

				int from = (int)(virtualArmor * scalar) / 2;
				int to = (int)(virtualArmor * scalar);

				damage -= Utility.Random( from, (to - from) + 1 );
			}

			return damage;
		}
Can you tell me what i did wrong? I did as the instructions said so i have no clue. This is the only error i am getting with all other instructions done in scripts already.

I think that the problem is in a different section of code. The error looks like it refers to the mods in step 10 that were supposed to go into the AbsorbDamageAOS method around line 892 and 932, but must have gotten placed somewhere else.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline  
Old 09-13-2005, 07:19 AM   #882 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by MetallicSomber
Hummmm. Moon phases. Spawn humans during all but full and werewolves during full. I see alot of potential for that!
forgot to put these on the spawners as well. Thanks for reminding me!
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline  
Old 09-13-2005, 07:25 AM   #883 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

a quick update to version 2.97a

from the changelog


New to version 2.97a
updated 9/13/05

- quick update to xmlspawner2-v297a-1of3.zip to add the new timekeeping properties to the spawners as well as the xmldialogs.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline  
Old 09-13-2005, 07:57 AM   #884 (permalink)
 
Join Date: Jun 2005
Age: 31
Posts: 68
Lightbulb

Quote:
Originally Posted by Eymerich
Thx, arte

i add a property to playermobile (points) and i add a property to questnote (difficult).

i choice the simple method because the calculate the points is not simple (it's a party quest i divide the point from the party).

when the modify works i see you what i make.

thx, arte
Here is the modify file (if is possible can you add the difficult prop in to the next release??, please ):

xmlquestHolder.cs

line 72
Code:
		private int m_difficult = 50;
		[CommandProperty( AccessLevel.GameMaster )]
		public int Difficult
		{
			get{ return m_difficult; }
			set { m_difficult = value; InvalidateProperties();}
		}
In serialize and deserialize i add a new version.

and my custom modification (not add this but is an idea per point for xmlquest)
Code:
	private void QuestCompletionAttachment()
		{
			if(IsCompleted)
			{
				int numeroComponentiParty = 0;
				// assign the point to player
				if(PartyEnabled)
				{
					Party p = null;
					if(Owner != null)
					{
						p = Party.Get( Owner );
						numeroComponentiParty = p.Count ;
					}  
				}
				Owner.QuestBasedFeatGainFactor += (float)(this.Difficult * 8)/(float)( (numeroComponentiParty +1)* 100000);


				// quest is completed
				XmlAttach.AttachTo(Owner, new XmlQuestCompleted(this.Name));
				// is this quest repeatable
				if(!Repeatable || NextRepeatable > TimeSpan.Zero)
				{
					// then add an attachment indicating that it has already been done
					XmlAttach.AttachTo(Owner, new XmlQuestAttachment(this.Name, NextRepeatable.TotalMinutes));
				}
			}
		}
and the same update is done for the questnote.

thx, Arte
Eymerich is offline  
Old 09-13-2005, 09:24 AM   #885 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by Eymerich
Here is the modify file (if is possible can you add the difficult prop in to the next release??, please ):

xmlquestHolder.cs

line 72
Code:
		private int m_difficult = 50;
		[CommandProperty( AccessLevel.GameMaster )]
		public int Difficult
		{
			get{ return m_difficult; }
			set { m_difficult = value; InvalidateProperties();}
		}
In serialize and deserialize i add a new version.

and my custom modification (not add this but is an idea per point for xmlquest)
Code:
	private void QuestCompletionAttachment()
		{
			if(IsCompleted)
			{
				int numeroComponentiParty = 0;
				// assign the point to player
				if(PartyEnabled)
				{
					Party p = null;
					if(Owner != null)
					{
						p = Party.Get( Owner );
						numeroComponentiParty = p.Count ;
					}  
				}
				Owner.QuestBasedFeatGainFactor += (float)(this.Difficult * 8)/(float)( (numeroComponentiParty +1)* 100000);


				// quest is completed
				XmlAttach.AttachTo(Owner, new XmlQuestCompleted(this.Name));
				// is this quest repeatable
				if(!Repeatable || NextRepeatable > TimeSpan.Zero)
				{
					// then add an attachment indicating that it has already been done
					XmlAttach.AttachTo(Owner, new XmlQuestAttachment(this.Name, NextRepeatable.TotalMinutes));
				}
			}
		}
and the same update is done for the questnote.

thx, Arte

I like the quest points idea a lot. I will take a look at it. Thanks!
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline  
Old 09-13-2005, 01:41 PM   #886 (permalink)
 
Join Date: May 2005
Location: Poland
Age: 22
Posts: 30
Default

Hi Arte

Thx for "~"

Could u write me something about operators in xmlquestnpc?

I need to know more about AND and OR operators like ; | & etc in CONDITION / ACTION .

I'm asking u about it because I create some quest and i have a lot of condition for example

GETONTRIGMOB,[ATTACHMENT,xmlquestattachment,Q1,name]=Q1 & ~GETONCARRIED,zadanie - szczuroludzie,completed1=true & ~GETONCARRIED,zadanie - szczuroludzie,completed2=true

and my player have Q1 xmlquestattachmend AND questholder named "zadanie - szczuroludzie" with completed2=false and completed1=false so why this condition doesn't "see" me ?:O
Sou^^ is offline  
Old 09-13-2005, 01:49 PM   #887 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by Sou^^
Hi Arte

Thx for "~"

Could u write me something about operators in xmlquestnpc?

I need to know more about AND and OR operators like ; | & etc in CONDITION / ACTION .

I'm asking u about it because I create some quest and i have a lot of condition for example

GETONTRIGMOB,[ATTACHMENT,xmlquestattachment,Q1,name]=Q1 & ~GETONCARRIED,zadanie - szczuroludzie,completed1=true & ~GETONCARRIED,zadanie - szczuroludzie,completed2=true

and my player have Q1 xmlquestattachmend AND questholder named "zadanie - szczuroludzie" with completed2=false and completed1=false so why this condition doesn't "see" me ?:O
when you check for string properties like name, use quotes for the string you are comparing against

change this

Quote:
GETONTRIGMOB,[ATTACHMENT,xmlquestattachment,Q1,name]=Q1
to this

Quote:
GETONTRIGMOB,[ATTACHMENT,xmlquestattachment,Q1,name]="Q1"

(edit)

if you dont add the quotes, it thinks you are checking against the property named Q1 instead of the string "Q1".
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline  
Old 09-13-2005, 06:03 PM   #888 (permalink)
Forum Novice
 
Join Date: Jun 2005
Age: 30
Posts: 111
Default How Do i go about adding the quests included with this script??

How Do i go about adding the quests included with this script?? Ive looked at all the documents and couldnt find it
Dave1969 is offline  
Old 09-13-2005, 06:25 PM   #889 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by Dave1969
How Do i go about adding the quests included with this script?? Ive looked at all the documents and couldnt find it

You just need to load them using the "[xmlload filename" command.

There are a few drop-in quests like dracondarquest.xml, and harmonsquest.xml that will load in playable locations and are intended as actual playable quests. Just do "[xmlload dracondarquest.xml"

There are some others that will load by default in green acres and are playable but are really intended to serve as examples or prototypes for your own quests. You can position the starting location to your liking using "[xmlloadhere filename" when you were standing in the spot you wanted it to start in.
These would be like blather3.xml, killtask.xml, and draugquest.xml.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline  
Old 09-13-2005, 09:19 PM   #890 (permalink)
Forum Novice
 
Join Date: Jun 2005
Age: 30
Posts: 111
Default Thanks Arte. Excellent work man!! And a gentleman also;)

Thanks Arte. Excellent work man!! And a gentleman also Unlike other guys that script and give smart ass replies when ya ask a question. I think we know who im talking about
Dave1969 is offline  
Old 09-14-2005, 01:26 AM   #891 (permalink)
Forum Expert
 
Join Date: May 2004
Age: 29
Posts: 358
Default

Do you have a FAQ section web page or something for common install screw ups? I got a little crash when I try to activate the premade quests, and one that I tried to set up using the tutorial. I know this has probaly been addressed bfore but thats alot of posts to have to try to read! heh.

Code:
Exception:
System.InvalidCastException: Specified cast is not valid.
   at Server.RaceSpeech.Speech_Event(SpeechEventArgs e)
   at Server.SpeechEventHandler.Invoke(SpeechEventArgs e)
   at Server.Mobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Engines.XmlSpawner2.XmlDialog.DelayedSpeech(Object state)
   at Server.DelayStateCallTimer.OnTick()
   at Server.Timer.Slice()
   at Server.Core.Main(String[] args)
MetallicSomber is offline  
Old 09-14-2005, 04:59 AM   #892 (permalink)
 
Join Date: Jun 2005
Age: 31
Posts: 68
Exclamation

hi Arte and other xmlspawner fan,

i work for a simple way to manage a different dialog with the same NPC in different situation.

Do you have any suggestion?

My idea is very complex.
i write on quest tutorial

3.1.2 Change dialog to the same NPC

You need the same procedure to a add a new npc.
For trigger the dialog when the PG have just the quest named Kill bobo objective completed. I add the following code to TrigOnCarrier : Kill Bobo,1 (if it’s the second objective “QuestName,2” and so on).
I add a single entry 10
Action:
{GETONCARRIED,Kill Bobo,rewardstring};TAKE/Kill Bobo;SETONTHIS/configfile/Anita/loadconfig/true

DependsOn =-2 = with -2 start only when all trigger condition are true
Gump = GUMP,Anita,0/I see Bobo corpse not so far from here. Compliments! Here your reward.

{GETONCARRIED,Kill Bobo,rewardstring}; = give the reward to player
TAKE/Kill Bobo; = delete on the backback the questholder (quest book)
SETONTHIS/configfile/Anita/loadconfig/true = change a dialog loaded. load a start configuration for Anita. (Anita.npc)

Now I attach the new dialgog to Anita npc if and only if the player is near Anita with objective one completed (he just killed orc Bobo ).

I create a new xmlspawner near Anita xmlspawner with the follow change to the props:

ItemOntrigger = Kill bobo,1

SETONSPAWN,AnitaNPC,0/configfile/AnitaEnd/loadconfig/true


This mechanism i s very complex and there are two problem for my knowledge in xmlspawner:

the second xmlspawner must be trigger only one shot when player is in range.

when reload config file NPC some property ex. TrigOnCarrier not reset (the value is the old config file).

any suggestion is very usefull.

Thx to all.

P.S: Arte is possible to add some trigger for change dialog ?
Eymerich is offline  
Old 09-14-2005, 05:44 AM   #893 (permalink)
 
Join Date: Jun 2005
Age: 31
Posts: 68
Thumbs down [request]

arte is possible change all access to the command (save, load and ecc) to the SEER level?

In my shard i can't become admin all quester.

Please take in high consideration this update for the next release.

thx in advance.
Eymerich is offline  
Old 09-14-2005, 06:57 AM   #894 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by MetallicSomber
Do you have a FAQ section web page or something for common install screw ups? I got a little crash when I try to activate the premade quests, and one that I tried to set up using the tutorial. I know this has probaly been addressed bfore but thats alot of posts to have to try to read! heh.

Code:
Exception:
System.InvalidCastException: Specified cast is not valid.
   at Server.RaceSpeech.Speech_Event(SpeechEventArgs e)
   at Server.SpeechEventHandler.Invoke(SpeechEventArgs e)
   at Server.Mobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Engines.XmlSpawner2.XmlDialog.DelayedSpeech(Object state)
   at Server.DelayStateCallTimer.OnTick()
   at Server.Timer.Slice()
   at Server.Core.Main(String[] args)
hehe. yes, this has come up before. What is happening is that the quest npcs can generate actual speech that gets handled by OnSpeech or Speech_Event event handlers (this allows them to talk to one another).
Your race script is probably automatically assuming that the Mobile argument that it is getting is a PlayerMobile and casting it without checking. Just add that check to your speech handler and you should be fine.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline  
Old 09-14-2005, 07:05 AM   #895 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by Eymerich
arte is possible change all access to the command (save, load and ecc) to the SEER level?

In my shard i can't become admin all quester.

Please take in high consideration this update for the next release.

thx in advance.
you can change this by adjusting the access level when they are registered in the Initialize method in xmlspawner2.cs, like

Code:
			Server.Commands.Register( "XmlLoad", AccessLevel.Administrator, new CommandEventHandler( Load_OnCommand ) );
			Server.Commands.Register( "XmlLoadHere", AccessLevel.Administrator, new CommandEventHandler( LoadHere_OnCommand ) );
			Server.Commands.Register( "XmlNewLoad", AccessLevel.Administrator, new CommandEventHandler( NewLoad_OnCommand ) );
I set any command that has disk read/write access to admin. by default.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline  
Old 09-14-2005, 07:06 AM   #896 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by Eymerich
hi Arte and other xmlspawner fan,

i work for a simple way to manage a different dialog with the same NPC in different situation.

Do you have any suggestion?

My idea is very complex.
i write on quest tutorial

3.1.2 Change dialog to the same NPC

You need the same procedure to a add a new npc.
For trigger the dialog when the PG have just the quest named Kill bobo objective completed. I add the following code to TrigOnCarrier : Kill Bobo,1 (if it’s the second objective “QuestName,2” and so on).
I add a single entry 10
Action:
{GETONCARRIED,Kill Bobo,rewardstring};TAKE/Kill Bobo;SETONTHIS/configfile/Anita/loadconfig/true

DependsOn =-2 = with -2 start only when all trigger condition are true
Gump = GUMP,Anita,0/I see Bobo corpse not so far from here. Compliments! Here your reward.

{GETONCARRIED,Kill Bobo,rewardstring}; = give the reward to player
TAKE/Kill Bobo; = delete on the backback the questholder (quest book)
SETONTHIS/configfile/Anita/loadconfig/true = change a dialog loaded. load a start configuration for Anita. (Anita.npc)

Now I attach the new dialgog to Anita npc if and only if the player is near Anita with objective one completed (he just killed orc Bobo ).

I create a new xmlspawner near Anita xmlspawner with the follow change to the props:

ItemOntrigger = Kill bobo,1

SETONSPAWN,AnitaNPC,0/configfile/AnitaEnd/loadconfig/true


This mechanism i s very complex and there are two problem for my knowledge in xmlspawner:

the second xmlspawner must be trigger only one shot when player is in range.

when reload config file NPC some property ex. TrigOnCarrier not reset (the value is the old config file).

any suggestion is very usefull.

Thx to all.

P.S: Arte is possible to add some trigger for change dialog ?

I'll have to study this for a bit.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline  
Old 09-14-2005, 07:13 AM   #897 (permalink)
 
Join Date: Jun 2005
Age: 31
Posts: 68
Default

Quote:
Originally Posted by ArteGordon
I'll have to study this for a bit.
In my mind appeare another idea :

make one .npc file with different condition at start but in this case TriggerOnCarried lose your sense.

an ex when a player return twice to NPC for other info at the end of each objective completed

entry 1

condition QuestName,1 && not (questName,2)

entry 2
condition not (QuestName)

entry 3
condition QuestName,2


can it works?
Eymerich is offline  
Old 09-14-2005, 09:17 AM   #898 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by Eymerich
In my mind appeare another idea :

make one .npc file with different condition at start but in this case TriggerOnCarried lose your sense.

an ex when a player return twice to NPC for other info at the end of each objective completed

entry 1

condition QuestName,1 && not (questName,2)

entry 2
condition not (QuestName)

entry 3
condition QuestName,2


can it works?
yes, this is the way that I was thinking that you should probably do it.
That is, have one .npc specification that has different conversational branches that are followed depending on the quest status.

You would not even need to set up the Trigger/NoTriggerOnCarried conditions because the tests would be in the Conditions for each starting entry.

So what you would do would be to set up your initial banter entries (DependsOn = -1), and set the Condition fields to something like

Quote:
entry 1
ID 1
DependsOn -1

Condition GETONCARRIED,QuestName,completed1=true & GETONCARRIED,QuestName,completed2=false
(this would start your branch involving completing objective 1 but not 2)
Quote:
entry 2
ID 2
DependsOn -1

Condition ~GETONCARRIED,QuestName,visible=true
(this would start your branch for when the player did not yet have the quest)
Quote:
entry 3
ID 3
DependsOn -1

Condition GETONCARRIED,QuestName,completed2=true
(this would start your branch involving completing objective 2)


These would serve as the starting points for the different conversational branches. Just make those branches depend on the different starting IDs
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline  
Old 09-14-2005, 09:35 AM   #899 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote: