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!

Resource icon

[2.x] XmlSpawner 2 Version 4.0 Revision 21

No permission to download

Pace Abbott

Wanderer
Update:
I downloaded fresh files of both XML Spawner 2 and RunUO2.3 I Unzipped them one right after the other "installed XML spawner as stated in the instructions and I am still getting the same error I have tried it on a windows 7 Machine as well as a Windows 8 Machine Using both .NET 4.0 and .Net 4.5 Same error everytime.
 

fwiffo

Sorceror
I think you'll have to recompile even the server, but anyway, if it's a problem I'll fix it as I said before, it should remain compatible.
 

fwiffo

Sorceror
fwiffo updated XmlSpawner 2 with a new update entry:

Fix to Enum.TryParse unaivailable in .net 2.0

Now the TryParse for enum types is done internally, with the use of Enum.IsDefined, previous check on null string is done, so the method will remain secure and try{}catch{} will be unnecessary.
If you have compiled with .net 4.0, you can convert all the "TryParse" with "Enum.TryParse" and it will use the original Framework methods.

Precompressed source of revision 8 is available here: https://docs.google.com/file/d/0B_I6Jquo2-k8VDNnbGFuSm03c28

Read the rest of this update entry...
 

fwiffo

Sorceror
fwiffo updated XmlSpawner 2 with a new update entry:

Update to all XmlQuest files

Generic/Strongly typed List<T> conversion from arraylist in all XmlQuest/*

Another joucy addon is the RewardAction in "XmlQuestHolder"/"QuestHolder", in this string an action could be done to the player when completing the quest with "AutoReward" to true, playing a song, damage, teleporting, changes. all with the same XmlSpawner syntax, considering the invoker/trigger mobile as the owner of the questbook.

Also a bugfix was done during the screening of the code, questpoints where not...

Read the rest of this update entry...
 

Formosa

Traveler
Errors:
+ Customs/XmlSpawner 2 4.0 revision 11/XmlSpawner Core/BaseXmlSpawner.cs:
CS1010: Line 367: Newline in constant
CS1012: Line 367: Too many characters in character literal
CS1513: Line 367: } expected
CS1002: Line 367: ; expected


Code:
to
private static char[] literalend = new char[1] { '? };
 
Change
private static char[] literalend = new char[1] { '?' };
 

fwiffo

Sorceror
private static char[] literalend = new char[1] { '§' }; <-- it's correct in my side, so I guess it's a character set problem in your side, I use UTF-8 usually
 

Arachaic

Sorceror
Is there a list somewhere off all the actions within the questnpc. Like GIVE and KILL. I've been trying to use KILL in quests that require you to kill mobs, but its not counting the kills so I figured there must be another code or something. I'm also having issues with the teleporting action SETONTRIGMOB/OFFSET,5282,1164,0 its teleporting me to 10559,2327,0 and there are no other actions.
 

Dian

Sorceror
Are you setting the KillReset property to a high number?

You have to set KillReset to a higher number. Ticks are in minutes I believe.. so default it resets the kills every minute. Set it to 100, and see if your kill counts work.
 

Arachaic

Sorceror
is there any place to find all the actions like GIVE, KILL, COLLECT, Etc? Otherwise I've got loads of questions ha. Right now I'm trying to add more than 1 reward item to a bag with this action rewardstring/@bag/ADD/dyetub/dyes/sboots/sshirt/spants I didn't know how to format it...
 

Dian

Sorceror
search the forums for xmlspawner archive

There is a huge zip file archive of all sorts of documentation, how-to's, and stuff for xmlspawner.
 

Arachaic

Sorceror
Ok so I have tried and tried to get NextRepeatable to work here is what I got GIVE/<questholder/name/Shipwrecked/notestring/I need a small boat deed. Please find me one./objective1/COLLECT,SmallBoatDeed,1/NextRepeatable/24:00/autoreward/true/rewardstring/@bag/ADD/gold,2000
 

Hexon

Sorceror
Hey I'm using 2.4 so of course I get a nasty line error in \scripts\XmlSpawner Core\XmlAttach\XmlAttach.cs, line 2371
Code:
            if (from.AccessLevel >= AccessLevel.GameMaster || DateTime.Now >= from.NextActionTime)
Changed it to
Code:
            if (from.AccessLevel >= AccessLevel.GameMaster || from.NextActionTime - Core.TickCount < 0 )

Seems to work magic, have to give many kudos to this |post| for the heads up.

P.S. I've only played with just dumping the core folder into scripts. I'll see what else breaks in a minute. xD

Edit: I just realized I could also use DateTime.UtcNow to replace DateTime.Now without touching the logic instead of Core.TickCount. Without doing any of the additional recommended steps in the readme, I can certainly say it compiles without an error.

Update: So I've managed to apply all the non mandatory but suggested steps with the exception of step number seven, I end up with this error

Code:
Errors:
+ Items/Weapons/BaseWeapon.cs:
    CS1501: Line 1762: No overload for method 'OnWeaponHit' takes 4 arguments

If anyone has any ideas care to share? Also I've got some of these merged scripts that I'm willing to share if anyone wants them.
 

fwiffo

Sorceror
The reccomended steps are logical, but you should keep the methods as they are, and adjust accordingly...

Anyway, show the script but this is not really the right place to discuss, I think.

The best place is script support.
 

Hexon

Sorceror
So unfortunately I had to make an -tiny- tweak to the method OnWeaponHit inside of XmlAttach.cs, line 2276.
Code:
Before
 
public static void OnWeaponHit(BaseWeapon weapon, Mobile attacker, Mobile defender, ref int damage, int originalDamage )
{
  //Rest of method.
}
 
 
After
 
public static void OnWeaponHit(BaseWeapon weapon, Mobile attacker, Mobile defender, ref int damage )
{
  //Rest of method.
}

I couldn't find anything needing to pass originalDamage to the method.. so I axed it, also fixed the line up in the readme with the appropriate change for the hook, gotta pass that damage value by ref with love. :D

Code:
// hook for attachment OnWeaponHit method
Server.Engines.XmlSpawner2.XmlAttach.OnWeaponHit( this, attacker, defender, ref damageGiven );

Anyways have to say this was a bit of fun of a challenge to tackle, now to see what I've actually borked IG. Also, attached the merges I made, just remember its for Runuo 2.4! Though before I forget, its not exactly all of them, but the more annoying ones per say that required multiple edits or weren't really straight forward. (To me at least.)
 

Attachments

  • XMLSpawne2r_rev12_merges.zip
    41.8 KB · Views: 13
Top