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!

XmlPoints

ArteGordon

Wanderer
updated to version 1.19a

from the changelog

New to version 1.19a
updated 2/5/05
- added Spanish translation text thanks to Darkness_PR. This adds the file SpanishText.cs and adds the SPANISH language option to XmlPoints.cs.
To change to this language in-game, just issue the command "[pointslanguage spanish".
I'll be looking at some of the gump text issues to see about improving spacing and appearance with variable length text in the game gumps.
 

Darkness_PR

Wanderer
ArteGordon said:
very nice! Thanks for getting it done so quickly. I'll put it into the latest update.

hehe np, when i do something that im gonna i try my best and have right away =D hehehe, im gonna work more on it in case i dosent seems right or something ill let ya know
 

ArteGordon

Wanderer
updated to version 1.20

from the changelog

New to version 1.20
updated 2/10/05
- slight modification to the leaderboard ranking system. Previously, players with the same points totals were assigned tied rankings. Now ties are resolved by comparing kills, deaths, and previous ranking (in that order). So if two players have the same points total, the player with more kills will be ranked higher. Players with the same points and kills, will be ordered by deaths (fewer deaths means higher rank). So in the modified system, there are no tied ranks.

- added an optional player faction listing to the leaderboard. This can be enabled by uncommenting the #define FACTIONS statement at the top of XmlPoints.cs. If enabled, faction affiliation will be displayed in the leaderboard gump as well as saved to the .xml and .html leaderboard files. (thanks to sage707a for the suggestion)
 

Asmoug

Wanderer
Hi.
I had a small issue; if i don't use [addallpoints or "addatt xmlpoints" on at least one character, [topplayers will make the server crash.
to fix this, in the constructor of TopPlayersGump place
Code:
 		if( attachment == null )
			return;
around line 2364 in my version.
 

ArteGordon

Wanderer
Asmoug said:
Hi.
I had a small issue; if i don't use [addallpoints or "addatt xmlpoints" on at least one character, [topplayers will make the server crash.
to fix this, in the constructor of TopPlayersGump place
Code:
 		if( attachment == null )
			return;
around line 2364 in my version.

thanks. I'll check that out.
 

Asmoug

Wanderer
another thing.
moving away non-partecipants seems to give some troubles ... it moved away NPCs (could be used to escape ?) and moved players to invalid location ("black" areas, over the mountains if made inside a cavern/mine...)
I wondered if it could be used to enter houses, but i didn't check it.
I just commented it out ... I don't think it's really necessary.
Oh, besides this it's still a great work, big thanks!
 

ArteGordon

Wanderer
Asmoug said:
another thing.
moving away non-partecipants seems to give some troubles ... it moved away NPCs (could be used to escape ?) and moved players to invalid location ("black" areas, over the mountains if made inside a cavern/mine...)
I wondered if it could be used to enter houses, but i didn't check it.
I just commented it out ... I don't think it's really necessary.
Oh, besides this it's still a great work, big thanks!

ah, true about the NPCs (I forgot about that). That is easily fixed.
I'll have to look at the invalid locations issue, since it is supposed to be checking for that.
Thanks.
 

Igon

Wanderer
Asmoug said:
Hi.
I had a small issue; if i don't use [addallpoints or "addatt xmlpoints" on at least one character, [topplayers will make the server crash.
to fix this, in the constructor of TopPlayersGump place
Code:
Same problem here

Here is a Debug crash from XMLPoints. It occured when executing the [TopPlayers command.  I just put the system in last night and nobody has had a chance to accumulate any points as of yet. Ill try to duplicate with Debug info.

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Engines.XmlSpawner2.TopPlayersGump..ctor(XmlPoints attachment) in d:\UO\1.0.0\Scripts\_Custom\XMLPoints 1.20\XmlAttachments\XmlPoints.cs:line 2379
   at Server.Engines.XmlSpawner2.XmlPoints.TopPlayers_OnCommand(CommandEventArgs e) in d:\UO\1.0.0\Scripts\_Custom\XMLPoints 1.20\XmlAttachments\XmlPoints.cs:line 1081
   at Server.Commands.Handle(Mobile from, String text)
   at Server.Mobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Network.PacketHandlers.UnicodeSpeech(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)
 

ArteGordon

Wanderer
thanks, I'll try to reproduce it as well.

(edit)

ah, I wonder if it is the same bug that asmoug reported a little while ago. That fix will be in the next update but it is not in the current release. That occurred when topplayers was issued when there were players without points attachments. The fix was to test for null attachments.

around line 2358 in xmlpoints.cs

Code:
public TopPlayersGump(XmlPoints attachment) : base( 0,0)
            {

                if(RankList == null || attachment == null) return;

see if that takes care of it.
 

Igon

Wanderer
ArteGordon said:
thanks, I'll try to reproduce it as well.

(edit)

ah, I wonder if it is the same bug that asmoug reported a little while ago. That fix will be in the next update but it is not in the current release. That occurred when topplayers was issued when there were players without points attachments. The fix was to test for null attachments.

around line 2358 in xmlpoints.cs

Code:
public TopPlayersGump(XmlPoints attachment) : base( 0,0)
            {

                if(RankList == null || attachment == null) return;

see if that takes care of it.

That fixed it. I ran [addallpoints afterwards to make sure there were no other issues, and all is fine. Thanks for the fast reply.
 

LFFPicard

Sorceror
Great work ArteGordon
XMLSPawner2 gave one error as i missed a }
XMLPoints installed with no problems at all..

The only thing i want to do though and i cant figur eout.
I changed my main command prefix to . instead of [
When i installed XMLPoints it also uses the . prefix instead of [
Is there anyway i can edit it so it uses [ instead of .
I cant find the option in the XMLPoints.cs and there is too much code to look thorugh, i thought u could gimem the quick answer :)

I am learning C# but i aint that good yet :p
Thakns mate and good work!
 

ArteGordon

Wanderer
the xmlpoints commands use the same interface as all other server commands, so if you change the default command prefix (which is a static that is used for all commands) it will affect all commands including those in xmlpoints.
There isnt really any way around that other than changing the way xmlpoints commands are handled altogether, moving them into the xmlpoints speech eventsink handler instead of registering them as server commands.
 

Kai

Wanderer
I had this crash shard a few days back. I just wanted you to see it.

Code:
Exception:
System.ArgumentNullException: Value cannot be null.
Parameter name: format
   at System.String.Format(IFormatProvider provider, String format, Object[] args)
   at Server.Engines.XmlSpawner2.ConfirmChallengeGump..ctor(Mobile from, Mobile target)
   at Server.Engines.XmlSpawner2.IssueChallengeGump.OnResponse(NetState state, RelayInfo info)
   at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)

Can you tell what happened?
 

ArteGordon

Wanderer
that would result from an error in one of these statements

Code:
AddLabel( 20, 205, 68, String.Format(GetText(target, 200259)) );  // "You have been challenged by"
                AddLabel( 20, 225, 68, String.Format(GetText(target, 200260),from.Name) );      // "{0}. Accept?"

AddLabel( 20, 245, 33, String.Format(GetText(target, 200256)) );   // "You will NOT gain points!"

in which the indexed text call GetText returned a null value due to a missing language or a missing text entry (200256, 200259, or 200260)

I will change GetText so that on failure it returns something other than null, that way it will just report what the problem was and not produce a crash.
 

ArteGordon

Wanderer
updated to version 1.21

from the changelog

New to version 1.21
updated 3/10/05

- fixed a possible crash bug when trying to use the [topplayers when no players have points attachments (thanks to asmoug for pointing this out).

- missing language or language text entries will now appear as error strings instead of simply returning null values that could produce server crashes (thanks to Kai for pointing this out).

- modified the points-decay-with-pvp-inactivity system to stop deducting when the points drop below the default starting level (e.g. 100 points).
 

ArteGordon

Wanderer
I forgot to mention one thing in the v1.21 release

- added the option for automatically teleporting to a specified location upon accepting a duel, and then automatically returning when the duel is over. This feature can be enabled by setting the static bool TeleportOnDuel to true (it is false by default). You should also set the DuelLocation and DuelMap static variables to the spot where you want people teleported if you use this feature. These can be found at the beginning of XmlPoints.cs

I will add some checks for players already at the location, and a gump to allow selection of multiple locations. Maybe the next update.
 

manofwar

Sorceror
I was wondering?

I am having problem with some players going out challenging and get turned down and just keep challenging. Was wondering if there is way to keep track of the challenges to a text file so i can reference that or something like that so i can have proof instead of just someones word that they are doing it? This is the only type of PVP i have on my server and dont want people abusing it. I also dont want people telling me this is happening and start banning people on some elses word if they dont like the person. Any help would be appreciated, Thanks in advance.
 

ArteGordon

Wanderer
manofwar said:
I am having problem with some players going out challenging and get turned down and just keep challenging. Was wondering if there is way to keep track of the challenges to a text file so i can reference that or something like that so i can have proof instead of just someones word that they are doing it? This is the only type of PVP i have on my server and dont want people abusing it. I also dont want people telling me this is happening and start banning people on some elses word if they dont like the person. Any help would be appreciated, Thanks in advance.

If they are using the [challenge command, then those are being logged already in the Commands logs. Those entries dont mention who is being challenged though. If you would like to make the logging more comprehensive and cover challenges issued through the points gump as well, and also keep track of who is being challenged you can add a line to the ConfirmChallengeGump around line 2745 in xmlpoints.cs

Code:
            public ConfirmChallengeGump(Mobile from, Mobile target) : base ( 0, 0 )
            {

                if(target == null || from == null) return;

                // log all challenges in the Command logs
                CommandLogging.WriteLine( from, "{0} {1} challenged {2}", from.AccessLevel, CommandLogging.Format( from ), CommandLogging.Format( target ));
 
Top