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

AHappyAdmin

Wanderer
Is there a way to change the rewards on the rewards stone?

If yes is it as simple as changing the artifacts dropped in the gauntlet?

like inserting a file name into a space?

Im kinda new to scripting but i have some skills :)
 

AHappyAdmin

Wanderer
i love this script alrdy :))


*ive found how to add new items :) but theres a few numbers at the end of the lines of code i dont rly understand! ill try it tomorrow and post if i have problems!"
 

ArteGordon

Wanderer
AHappyAdmin said:
Is there a way to change the rewards on the rewards stone?

If yes is it as simple as changing the artifacts dropped in the gauntlet?

like inserting a file name into a space?

Im kinda new to scripting but i have some skills :)

It's pretty simple. You just have to add an entry into the XmlPointsReward.cs file in the Initialize method where you will see stuff like

Code:
PointsRewardList.Add( new XmlPointsRewards( 2000, typeof(PowerScroll), "+10 Smithing powerscroll", 2000, 0x14F0, new object[] { SkillName.Blacksmith, 10 }));

The arguments that you have to specify are the minimum points, the type of the reward, a descriptive string, the cost in credits, an itemid used for display, and any arguments that have to be passed to the constructor for the reward type.

It's similar to what you would do if you were adding items to a vendor.
 

ArteGordon

Wanderer
updated to version 1.03
11/10/04

from the changelog

- improved the leaderboard display to track change in rank (who is moving up or down the board), and length of time at present rank.

- modified [addallpoints command to ignore players that already have XmlPoints attachments instead of resetting their points.

- added support for minimum points requirements for points rewards. A new argument was added to the XmlPointsReward constructor that allows you to specify a minimum points requirement in the reward entries in XmlPointsReward. Players will be required to have at least that many points before the reward will become available for purchase. Unavailable rewards are indicated in red in the reward gump brought up by the PointsRewardStone. This allows different tiers of rewards to be set up based on Points standings. Things are still purchased with credits, and purchases have no effect on points regardless of any points requirements.

- added the "[LeaderboardSave [filename [minutes [nentries]]][off]" command that can be run by administrators to enable/disable the periodic saving of xml leaderboard information to the specified file (thanks to stormwolff for the idea). Once turned on, it will continue to save the updated leaderboard at regular intervals (default is 15 mins). The number of ranked players to be saved can optionally be specified (default is 20). Setting this to zero saves all players. Leaderboard saving is off by default.

- implemented a system for automatic point loss if the player does not engage in pvp activity over the specified time window (default 10 points every 15 days). Both the amount of loss and time period can be configured by setting the m_PointsDecay and m_PointsDecayTime static variables. This feature can also be disabled.
 

AHappyAdmin

Wanderer
i have made some serilization changes to my playermobile(for old points sytem). will i need to remove this or is it ok to remove this??

Also is there a command such as [showscore which shows a players kills above his/her head?

*im at college and cannot check!*
 

ArteGordon

Wanderer
you dont have to touch your playermobile. It wont make any difference if you leave your old points system in or take it out.

[checkpoints will display the points score, rank, kill credits, and recent kills in a little gump.

If you make the ItemIdentification skill mod suggested then you can also check other players points by using that skill and targeting them.
 

AHappyAdmin

Wanderer
i thought [checkpoints just opened a gump for the player who used the command??


im thinking off like osi? when u said "showscore" or "punkte" and it showed the points above the players head??
 

AHappyAdmin

Wanderer
Is there any chance u could help me mod my version? or if i made some type of script on my own somthin like

when [showscore is used show xmlpoints or whatever the points r saved as?

Or is my noobness showing 2 much ???
 

ArteGordon

Wanderer
very easy. In your command, whatever you are calling to get points, just replace it with a call to XmlPoints.GetPoints(Mobile m) which returns the points on the mobile.

so just do something like

int mypoints = XmlPoints.GetPoints(from);

// where 'from' is your player
// then display mypoints however you like.

you will also have to add the line

using Server.Engines.XmlSpawner2;

at the top of your script.
 

v1ck

Wanderer
Doesn't work for me....

I droped in the XMLspawner files, and I droped in this point system, shard loads. etc... players get the commands and etc... but its not working, no points are being given out, when I use the [getatt command on a player it doesn't show me their recent kills or deaths and their points are still at 100. Any idea where I went wrong?
 
S

Seven

Guest
Does anyone have a live example of this script they could show me so I can look at it? If you do IM me your shard or PM me it ;)
 

ArteGordon

Wanderer
v1ck said:
Doesn't work for me....

I droped in the XMLspawner files, and I droped in this point system, shard loads. etc... players get the commands and etc... but its not working, no points are being given out, when I use the [getatt command on a player it doesn't show me their recent kills or deaths and their points are still at 100. Any idea where I went wrong?
sounds like you didnt perform installation step 6 of the xmlspawner installation which involves a 1 line change to Scripts/Gumps/ReportMurderer.cs. It is needed to register player kills to the system.

(edit)

also, the [getatt command will open up a gump showing all attachments on the target, so you should see the xmlpoints attachment listed and you can open up the properties gump (with the button on the left), or display the points information by hitting the question mark button on the right.
 
S

Seven

Guest
v1ck can i see this in action on your server/ i want to see it b4 i install it ;)
 

AHappyAdmin

Wanderer
i have a shard you can look at it on :)
its called west side pvp ill put it up in like 3 hours from now so u can see it.

im gonna try adding new rewards to the stone and get a [showscore command workings
 

ArteGordon

Wanderer
Here is the code that I have added (will be in the next update) for the showpoints function. You can try it out if you like.

It is the equivalent of the OSI "showscore" and will display overhead points when players say "showpoints".

It isnt a command so players will see you actually say showpoints, like on OSI (although the points appear before, instead of after the words).

Add this around the Initialize method in XmlPoints.cs (around line 300)

replace this

Code:
		public static new void Initialize()
        {

with this

Code:
public static void EventSink_Speech( SpeechEventArgs args )
		{
			Mobile from = args.Mobile;

            if(from == null || from.Map == null || !from.Player) return;

            if(args.Speech != null && args.Speech.ToLower() == "showpoints")
                ShowPointsOverhead(from);
        }
        
        public static void ShowPointsOverhead( Mobile from )
        {
            if(from == null) return;

            from.PublicOverheadMessage( MessageType.Regular, 0x3B2, false, GetPoints(from).ToString());
        }

		public static new void Initialize()
        {
            // Register our speech handler
			EventSink.Speech += new SpeechEventHandler( EventSink_Speech );
 

sUpplier1

Wanderer
Great system!
I made one addition to override OnKill method:
if( killed.SkillsTotal < 6000 || killed.RawStatTotal <= 200 ) return;

This will prevent killing newbies.
 

ArteGordon

Wanderer
good idea. You might also want to put the check into the OnKilled method so that newbs dont lose points as well.
Another thing you might consider is checking to the difference in total skills/stats between the killer and killed instead of just the killed so that newbs could kills other newbs for points, but experienced players wouldnt get anything for whacking newbs.

(edit)

I dropped this into the OnKill and OnKilled methods. thanks for the suggestion.

Code:
// uncomment this for newbie protection
            //if( (killed.SkillsTotal < 6000 && (killer.SkillsTotal - killed.SkillsTotal ) > 1000) ||
            //(killed.RawStatTotal <= 200 && (killer.RawStatTotal - killed.RawStatTotal) > 20 ) ) return;
 
Top