|
||
|
|
#877 (permalink) | |
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
Quote:
__________________
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 |
|
|
|
|
|
#878 (permalink) |
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
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 |
|
|
|
|
#880 (permalink) |
|
Forum Novice
Join Date: Apr 2004
Age: 39
Posts: 110
|
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;
}
|
|
|
|
|
#881 (permalink) | |
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
Quote:
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 |
|
|
|
|
|
#882 (permalink) | |
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
Quote:
__________________
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 |
|
|
|
|
|
#883 (permalink) |
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
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 |
|
|
|
|
#884 (permalink) | |
|
Join Date: Jun 2005
Age: 31
Posts: 68
|
Quote:
):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();}
}
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));
}
}
}
thx, Arte |
|
|
|
|
|
#885 (permalink) | |
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
Quote:
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 |
|
|
|
|
|
#886 (permalink) |
|
Join Date: May 2005
Location: Poland
Age: 22
Posts: 30
|
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 |
|
|
|
|
#887 (permalink) | |||
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
Quote:
change this Quote:
Quote:
(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 |
|||
|
|
|
|
#889 (permalink) | |
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
Quote:
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 |
|
|
|
|
|
#890 (permalink) |
|
Forum Novice
Join Date: Jun 2005
Age: 30
Posts: 111
|
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![]() |
|
|
|
|
#891 (permalink) |
|
Forum Expert
Join Date: May 2004
Age: 29
Posts: 358
|
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) |
|
|
|
|
#892 (permalink) |
|
Join Date: Jun 2005
Age: 31
Posts: 68
|
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 ? |
|
|
|
|
#893 (permalink) |
|
Join Date: Jun 2005
Age: 31
Posts: 68
|
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. |
|
|
|
|
#894 (permalink) | |
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
Quote:
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 |
|
|
|
|
|
#895 (permalink) | |
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
Quote:
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 ) );
__________________
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 |
|
|
|
|
|
#896 (permalink) | |
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
Quote:
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 |
|
|
|
|
|
#897 (permalink) | |
|
Join Date: Jun 2005
Age: 31
Posts: 68
|
Quote:
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? ![]() |
|
|
|
|
|
#898 (permalink) | ||||
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
Quote:
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:
Quote:
Quote:
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 |
||||
|
|