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 - pvp dueling and challenge game system [RunUO 2.0]

ArteGordon

Wanderer
XmlPoints - pvp dueling and challenge game system [RunUO 2.0]

XmlPoints
v1.24a
RunUO 2.0 version
updated 6/30/06
ArteGordon

Summary:
A system that supports player-vs-player kill tracking, 1-on-1 challenge dueling, multi-player challenge games, shardwide pvp ranking, and pvp rewards.

Recent Updates:

New to version 1.24a
updated 6/30/06

- updated ChallengeRegionStone.cs in the xmlpoints-20-v124a-1of2.zip package with a small fix for a deserialization problem with ChallengeRegions. (thanks to Johabius for pointing it out).


New to version 1.24
updated 6/23/06

- fixed a potential exploit in challenge games involving autores. Games now check when a player is killed to make sure the killer was a participant in the game before autoresing the victim. The exploit allowed players to start a challenge game, and then go out and pvp, and when killed it would be considered a game kill and they could be autores'd because they were still in a challenge game. This was only an issue with challenge games, not 1-on-1 duels. (thanks to newbies13 for pointing this out).

- added in automatic cancellation of any precast spells once a 1-on-1 challenge has been accepted (thanks to Rhivan Legacy for the suggestion).

- after cancellation of a duel, the participants will be teleported back to their starting point (if Teleport on Duel has been enabled) just as if the duel had been successfully completed.

- added portuguese language support (thanks to ShadowCrow for the translation).

- the deathball in the deathball challenge game is now cursed to prevent people from insuring it (thanks to okyzan for pointing this out).

- added restrictions to the teleport-on-duel feature. Teleport duel locations will not be available if the players are in a location that restricts recalling.

- blocked duel challenges in jail regions (thanks to ambak for the suggestion)

- fixed a problem with people losing points when killed by the same person within the protected kill delay period (default is 6 hours). The killer wouldnt gain points but the killed person could lose points.

- better formatting of the timeranked string in the html leaderboard save file.

- players in CTF challenge games automatically teleported to the base location when the game starts.

- added an option to log all kills that award points to a file called kills.log (default is disabled). This can be enabled/disabled by setting the LogKills flag at the beginning of xmlpoints.cs (thanks to Shadow1980 for the suggestion).


New to version 1.23
updated 4/15/05

- another slight modification to the points-decay-with-pvp-inactivity system. Points decay is now capped so that it wont drop below the default starting level (e.g. 100 points).

- disabled the ClearArena call in StartGame() in BaseChallegeGame.cs that moved all mobs that were not participating in challenge games out of the challenge arena at the start of a challenge game. It was causing problems by moving mobs that really shouldnt be moved.

New to version 1.22a
updated 3/28/05

- added the option to gain Honor virtue points from duels. (thanks to LordHogFred for the idea) Just set the static bool GainHonorFromDuel (false by default) to true at the beginning of xmlpoints.cs (around line 121)

- fixed a bug that could lead to people being teleported back to former locations after duels carried out in place ("Duel here" location).

New to version 1.22
updated 3/22/05

- disallow challenges to players that do not have XmlPoints support instead of just saying that they would result in no points.

- added the ability to specify multiple locations for the TeleportOnDuel feature. The duel location can be selected by the challenger when a challenge is issued. Locations that are currently occupied (any player found within the DuelRange of the location) are indicated in red. Occupied locations cannot be teleported to.
Entries can be added to the DuelLocations list that is found in the beginning of XmlPoints.cs. The DuelRange is the range used to determine if the location is occupied.

- Players that have recently been in combat will not be allowed to duel or to teleport on duel to prevent the use of challenges to escape battle.

- after a duel, a players' nearby pets/mounts (16 tiles by default) will be teleported back along with player if TeleportOnDuel is enabled. (thanks to sh1ny for the suggestion)

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).

- 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


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)

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.

New to version 1.19
updated 2/5/05

- added a language translation system that allows individual players to see points-related text in their selected language. The default language for a shard can be specified in XmlPoints in the SystemLanguage static variable (ENGLISH by default).
Individual players can change their language by issuing the "[pointslanguage language" command. Presently only english is available.
Anyone who is willing to provide additional language translations, simply make a copy of the EnglishText.cs file, translate the text that it contains into the target language, and send it to me. I will include it with full acknowledgements. (thanks to sUpplier1 for the suggestion).

- the game and gump scripts have been streamlined with a number of common methods moved to BaseChallengeGame.

- added checks for newbie and young status to the challenge system. Experienced players will be prohibited from challenging either players with Young status, or players with insufficient experience (skills and stats). This can be customized by modifying the tests in the YoungProtection() method in XmlPoints.cs. (thanks to sUpplier1 for the suggestion).

- changed the default value for AllowPoints for challenge games to false. This means that by default, there will be no points gained or lost by participating in challenge games. This can be turned back on again if you like.

New to version 1.18
updated 1/24/05

- leaderboard stats are now saved in both XML and HTML formats. The html file can be used directly to display leaderboard stats on a website.

- added total Kills and Deaths to the leaderboard stats and in-game leaderboard display.

New to version 1.17
updated 1/22/05

- For games created within a ChallengeGameRegion when a participant is no longer within a ChallengeGameRegion they will be flagged as out-of-bounds. This is true even if no arena size has been specified or an arena size has been specified that might extend out of any ChallengeGameRegion so the ChallengeGameRegion bounds also serve as the maximum arena size. (thanks to Trying for the suggestion).

- updated the installation instructions for 1.0.0


Description:

This system makes use of the XmlSpawner2 attachment system and the XmlSpawner2 package must be installed to support it. You dont need to use the xmlspawners themselves, and it doesnt matter whether you use the standard distribution spawners or any other spawning system but you do need the XmlSpawner2 package installed.

Because the attachment system neither requires nor makes any changes to serialization/deserializations of any item or mobile (including the playermobile), it can be safely added and removed at any time now or in the future without interfering with any other systems that you might have installed and that includes any existing points system.

Note, only kills by players are recognized by the system. Make sure your accesslevel is player when testing features.

Game Rules:

Capture the Flag rules
The game organizer is responsible for assigning teams and for placing the home bases for each team.

Home bases are placed by clicking the button next to each team entry in the Team Status gump, and then targeting a location. Bases can be placed/repositioned at any time prior to starting a match.

Players capture opponents flags by moving to within 1 tile of the opponents home base when the flag is present. The flag will then be placed in the players backpack and the player will be surrounded with a particle effect in the color of the flag they are carrying.

Flags cannot be placed in containers, given to other players, or placed on the ground.

A player can only carry one flag at a time.

Players score a point by returning to their home base while carrying an opponents flag.

If a player is killed, any flag that they are carrying is returned to its home base. Players will then be autores'd after the specified RespawnTime (default 6 seconds).

If a player remains out of bounds (defined by the arena size) for longer than the allowed time , remains hidden past the allowed hiding time, is offline for longer than the allowed time, or changes maps, any flag they are carrying will be returned to its base.

The game ends when either the target score is reached or when the match timer counts down to zero. The team with the highest score at that point wins and the total purse is divided equally among winning team players.

DeathBall Rules

- The general rules are similar to a Deathmatch with the following differences.

- A target score can be specified, which is the total number of seconds a player must spend carrying the deathball to win.

- When a player picks up the deathball their score will be increased by 1 per second for as long as they carry it. The score will be displayed over the players head and updated in the game gump.

- The first player to reach the target score wins the match.

- If a player is killed, they drop the ball at the location of their death, and are automatically resurrected and returned to the game after the respawn delay (6 sec default),

- Non-participants cannot pick up the Deathball.

- scores do not increase while a player is hidden or out of bounds.

- if a player is disqualified the ball is returned to the gauntlet location and the player is dropped from the match.

King of the Hill Rules

- The general rules are the same as a Last Man Standing match with the following differences.

- A target score can be specified, which is the number of seconds a player must spend as king of the hill to win.

- When a single player occupies the tile on which the KotH challenge gauntlet is placed, their score will be increased by 1 per second. The score will be displayed overhead and updated in the game gump. If more than one player occupies the tile, no scores are incremented.

- The first player to reach the target score wins the match.

- Once a participant is killed, they are out of the game. If only one participant remains, they are declared the winner.

- Any non-participant that tries to occupy the KotH tile will be automatically moved off to a random nearby location to prevent attempts to block the tile.

Deathmatch Rules

- The player that initiates the game is responsible for adding/removing players, setting game conditions, and is responsible for starting the game.

- Individual participants must accept the challenge by selecting the accept button in the Deathmatch gump.

- An optional entry fee in gold that each player must pay in order to participate can be specified. The entry fee will be taken from the players bank account when the game starts.

- The match completion conditions can be specified as a target score or a match length, or both. If a target score > 0 is specified, then the first player to reach that score is the winner. If a match length > 0 is specified, then the player with the highest score at the end of the match is the winner. In the case of a tie, the purse is split between them. If both target score and match length are specified, then the game continues until one of those conditions is met.

- When a participant is killed, their score is reduced by one and they are resurrected with full health/mana/stam. The killer has their score increased by one.

- An optional arena size that defines the valid playing area can be specified.

- Players that leave the arena area, defined by the distance from the challenge gauntlet, will have a specified amount of time to return in bounds before they will be penalized and respawned at the gauntlet location. This time is 15 seconds by default but can be adjusted with the DeathmatchGauntlet static variable MaximumOutOfBoundsDuration.

- Players that become hidden will have a certain amount of time to become visible before they are penalized and made visible. This time is set to 10 seconds by default but can be adjusted with the DeathmatchGauntlet static variable MaximumHiddenDuration.

- Players that are offline will have a certain amount of time to return before they are penalized. This time is set to 60 seconds by default but can be adjusted with the DeathmatchGauntlet static variable MaximumOfflineDuration.

- Players that change maps are immediately penalized and respawned at the gauntlet location.

- While a game is being set up, players can accept or withdraw at any time prior to the game starting.

- Once a game has been started, individual players can drop out of the game by pressing the forfeit button (X) next to their name in the Deathmatch challenge gump.

- Completed challenge gauntlets will remain for a short period before they decay so that players or observers can see the results. The default decay time is 5 minutes but can be adjusted with the DeathmatchGauntlet DecayTime property.

- Players are automatically resurrected with full stats after being killed in the match by default. This can be changed by setting the DeathmatchGauntlet AutoRes property.

- The default interval between killing the same player for points is enforced by default during the match. This can be overridden by changing the DeathmatchGauntlet UseKillDelay property. While you can change this, I would not recommend it due to potential for exploits unless you are running a small non-pvp oriented shard where you dont really care about rankings.

- Note that the organizer of a Challenge game does not have to actually participate in it. This makes it easy for staff to organize matches.

- Players can only participate in one Challenge game or 1 on 1 challenge duel at a time.

- Players can only organize 1 challenge game at a time. Attempting to organize a second challenge game while one is still being set up will result in the first being cancelled.

- Note that changing game conditions after players have already accepted, such as adding/removing players, changing the entry fee, or arena size, will require that players must reaccept the new conditions.

- There is no limit to the number of players that can participate in a Deathmatch game by default. This can be changed with the DeathmatchGump constant MaxTeamSize.

Last Man Standing Rules

- The player that initiates the game is responsible for adding/removing players, setting game conditions, and is responsible for starting the game.

- Individual participants must accept the challenge by selecting the accept button in the LMS gump.

- An optional entry fee in gold that each player must pay in order to participate can be specified. The entry fee will be taken from the players bank account when the game starts.

- Once a participant is killed, they are out of the game. The last remaining participant is the winner. That player takes the purse which is the total of all entry fees.

- An optional arena size that defines the valid playing area can be specified.

- Players that leave the arena area, defined by the distance from the challenge gauntlet, will have a specified amount of time to return in bounds before they will be disqualified. This time is 15 seconds by default but can be adjusted with the LastManStandingGauntlet static variable MaximumOutOfBoundsDuration.

- Players that become hidden will have a certain amount of time to become visible before they will be disqualified. This time is set to 10 seconds by default but can be adjusted with the LastManStandingGauntlet static variable MaximumHiddenDuration.

- Players that are offline will have a certain amount of time to return before they will be disqualified. This time is set to 60 seconds by default but can be adjusted with the LastManStandingGauntlet static variable MaximumOfflineDuration.

- Players that change maps will be immediately disqualified.

- While a game is being set up, players can accept or withdraw at any time prior to the game starting.

- Once a game has been started, individual players can drop out of the game by pressing the forfeit button (X) next to their name in the LMS challenge gump.

- Completed challenge gauntlets will remain for a short period before they decay so that players or observers can see the results. The default decay time is 5 minutes but can be adjusted with the LastManStandingGauntlet DecayTime property.

- Players are automatically resurrected after being killed in the match by default. This can be changed by setting the LastManStandingGauntlet AutoRes property.

- The default interval between killing the same player for points is enforced by default during the match. This can be overridden by changing the LastManStandingGauntlet UseKillDelay property. While you can change this, I would not recommend it due to potential for exploits unless you are running a small non-pvp oriented shard where you dont really care about rankings.

- Note that the organizer of a Challenge game does not have to actually participate in it. This makes it easy for staff to organize matches.

- Players can only participate in one Challenge game or 1 on 1 challenge duel at a time.

- Players can only organize 1 challenge game at a time. Attempting to organize a second challenge game while one is still being set up will result in the first being cancelled.

- Note that changing game conditions after players have already accepted, such as adding/removing players, changing the entry fee, or arena size, will require that players must reaccept the new conditions.

- There is no limit to the number of players that can participate in an LMS match by default. This can be changed with the LastManStandingGump constant MaxTeamSize.

- The challenge gump lists the total number of participants in the Players: field, and the number of remaining participants in the Active: field.


Features:

Points - accumulated or lost based upon PvP kills or deaths, these are used to rank players. Individual and shard-wide standings can be displayed. Amount of Point loss or gain can be made dependent upon the relative Point difference between the players, providing additional incentives for taking on players with higher ranking, and penalties for losing to players of lower ranking. The system can also be configured for automatic point loss if the player does not engage in pvp activity over the specified time window.

Rankings - relative Points standing of players on a shard is maintained and can be displayed for individuals as well as for the entire shard (the top 20). If the Item Identification feature of the XmlSpawner2 installation is enabled (XmlSpawner2 installation step 8), the skill can be used to examine the points and standing of other players as well. Using the [leaderboardsave command, shardwide ranking information can also be periodically saved to a specified xml file.

Duels - The challenge system allows 1-on-1 consensual pvp between players for points.

Challenge Games - The challenge game system supports multi-player consensual pvp games. Current Games: Last Man Standing, Deathmatch, King of the Hill, DeathBall, Team Last Man Standing, Team Deathmatch, Team Deathball, Team King of the Hill, Capture the Flag.

Credits - accumulated through PvP kills, these are used to purchase PvP rewards.

Rewards - the PointsRewardStone allows players to exchange kill credits that are accumulated through PvP activity for rewards including items, mobiles, or attachments. These can be defined in XmlPointReward.cs. Minimum points requirements can also be specified in addition to credit requirements for each reward. To place this just do an "[add pointsrewardstone"


Commands Supported:

[getatt - this is the general command from the XmlSpawner2 package for displaying/modifying/deleting attachments on a target. Just execute the command and target a player to open the attachment list. From there you can open the xmlpoints properties by finding the xmlpoints attachment on the list, and selecting the button on the left, or display the points gump by pressing the question mark button on the right. This command is available to GMs or higher only.

[addallpoints - this command will add the xmlpoints attachment to all current players that dont have it yet and can only be run by an administrator.

[removeallpoints - this command will remove the xmlpoints attachment from all current players and can only be run by an administrator.

[checkpoints - this command can be run by players to report their current points standing including rank, available credits, number of kills, number of deaths, and recent kill list (this is the same as using the item identification skill on themselves if that feature has been enabled through XmlSpawner2 installation step 8)

[pointslanguage language - this command can be run by players to change the language in which points-related text appears to them. English and Spanish are currently supported.

showpoints - when players type this it publicly displays their points overhead.

[topplayers - this command can be run by players to list the current top 20 players ranked by points. This can also be invoked through the points gump.

[challenge - this command can be run by players to allow challenge duels for points. Just issue the command and target another player. The targeted player can then accept or decline the challenge. This can also be invoked through the points gump.

[lmschallenge - this command can be run by players to create a last man standing challenge game.

[deathmatch - this command can be run by players to create a deathmatch challenge game.

[kingofthehill - this command can be run by players to create a king of the hill challenge game.

[deathball - this command can be run by players to create a death ball challenge game.

[teamlmschallenge - this command can be run by players to create a team last man standing challenge game.

[teamdeathmatch - this command can be run by players to create a teamdeathmatch challenge game.

[teamkoth - this command can be run by players to create a new Team king of the hill challenge game.

[teamdeathball - this command can be run by players to create a new Team Deathball challenge game.

[ctfchallenge - this command can be run by players to create a new Capture the Flag challenge game.


[seekills - this command can be run by players to allow them to control whether or not they see the broadcast results of pvp kills. This can also be set through the points gump.

[broadcastkill - this command can be run by players to toggle system-wide broadcasts of their pvp-kills. Broadcast is determined by the winners setting. This can also be set through the points gump.

[systembroadcastkill - this command can be run by GMs to allow system-wide GM override of player BroadcastKill settings. When set to false, no results will be broadcast. When set to true, results will again be broadcast based on players BroadcastKill settings.

[leaderboardsave - this command can be run by administrators to enable/disable the periodic saving of xml and html leaderboard information to a specified file.


Default settings that can be modified:

- There is a 6 hour minimum time between kills of the same player for point gain. This is set by the static variable m_KillDelay.

- There is a 60 second minimum time between deaths of a player for point loss. This is set by the static variable m_DeathDelay.

- Points gained/lost can depend upon the point difference between the players. Default setting is 5% of the point difference. The percentage gain/loss is set by the m_WinScale and m_LoseScale static variables and this can be changed to whatever you like. If it is set to zero then gain/loss will be fixed at 1 point per kill.

For example, if player1 with 500 points killed player2 with 100 points, player1 would only gain the minimum of 1 point and player2 would lose the minimum of 1 point. But if player2 killed player1, player2 would gain 20 points (5% of 400) and player1 would lose 20 points.

- Credits gained can depend upon the point difference between the players. Default setting is 5% of the point difference. Set by the m_CreditScale

- Players start off with a default of 100 points, set on m_Points.

- broadcasting of kills is on by default. This is set by the m_Broadcast (for players) and m_SystemBroadcast (for GM override) variables.

- rewards can be specified by adding/removing entries to the PointsRewardList in the Initialize method in XmlPointsReward.cs.

- leaderboard save settings can be specified on the command line to the [leaderboardsave command, with default values set in the m_LeaderboardSaveInterval (default 15 mins), m_LeaderboardSaveDirectory (default "Leaderboard"), and m_LeaderboardSaveRanks (default 20) static variables.

- for automatic point loss if the player does not engage in pvp activity the amount of loss and time period can be configured by setting the m_PointsDecay (10 points default) and m_PointsDecayTime ( 15 days default) static variables.

- receiving kill broadcasts is on by default set by the m_ReceiveBroadcasts variable.

- challenges can be cancelled by issuing another challenge and targeting another player (self-target is allowed for this purpose). There is a 15 minute timeout from the time the cancellation request is made. This default time can be changed in the static variable CancelTimeout.


Installation:
for RunUO 2.0

STEP 1:
Install the latest XmlSpawner2 package. You can find it here XmlSpawner2. You must perform installation step 6 from the XmlSpawner2 thread otherwise the system wont recognize kills and nothing will seem to work. I would also recommend going through installation step 8 to enable the use of the ItemIdentification skill for checking point status on players, but this is optional.
Note, if you do not install any of the optional support files (in particular XmlSpawner2-support1of2.zip) then some of the sample attachment rewards in XmlPointsRewards will not be available. You can either install that support package or just comment out lines 54 and 55 in XmlPointsRewards.cs that refer to the XmlEnemyMastery and XmlStr attachments.

STEP 2:
Place the scripts from this package into your custom scripts directory, or into the XmlAttachments area of your XmlSpawner2 installation. (anywhere in your Scripts folder is fine, these locations are suggested for organizational purposes only).

STEP 3:
Add points support to all existing players while ingame using the command "[addallpoints". If you change your mind and decide to remove it, you can use the "[removeallpoints" command. If you would just like to add it to specific players you can use the "[addatt xmlpoints" command and target a player.

STEP 4:
To automatically add xmlpoints support to newly created characters, add the following line to the end of the EventSink_CharacterCreated method in CharacterCreation.cs

around line 709 of Scripts/Misc/CharacterCreation.cs change
Code:
	new WelcomeTimer( newChar ).Start();
to
Code:
	new WelcomeTimer( newChar ).Start();

	// mod to attach the XmlPoints attachment automatically to new chars
	XmlAttach.AttachTo(newChar, new XmlPoints());
also at the top of the file add the line
Code:
using Server.Engines.XmlSpawner2;

STEP 5:
To support consensual pvp between players for points through the use of Challenges, make the following two changes in Scripts/Misc/Notoriety.cs

in the Mobile_AllowHarmful method around line 112 change
Code:
		return true; // Uncontroled NPCs are only restricted by the young system
	}
to
Code:
		return true; // Uncontroled NPCs are only restricted by the young system
	}
				
	// XmlPoints challenge mod
	if(XmlPoints.AreChallengers(from,target))
                return true;
and in the MobileNotoriety method around line 279 make the following change. Look carefully when making this change, it is easy to accidentally put this in the CorpseNotoriety method which looks very similar to MobileNotoriety.
Code:
	if ( target.Criminal )
		return Notoriety.Criminal;
to
Code:
	if ( target.Criminal )
		return Notoriety.Criminal;

	// XmlPoints challenge mod
	if(XmlPoints.AreTeamMembers(source,target))
                	return Notoriety.Ally;
	else
	if(XmlPoints.AreChallengers(source,target))
                	return Notoriety.Enemy;
also at the top of the file add the line
Code:
using Server.Engines.XmlSpawner2;

STEP 6:
To support overriding insurance fees/award during challenge games, make the following change in Scripts/Mobiles/PlayerMobile.cs

in the CheckInsuranceOnDeath method around line 1825 change
Code:
private bool CheckInsuranceOnDeath( Item item )
{
	if ( InsuranceEnabled && item.Insured )
	{
to
Code:
private bool CheckInsuranceOnDeath( Item item )
{
	if ( InsuranceEnabled && item.Insured )
	{
                // XmlPoints mod to support overriding insurance fees/awards during challenge games
                if(XmlPoints.InsuranceIsFree(this, m_InsuranceAward))
                {
                    item.PayedInsurance = true;
                    return true;
                }

also at the top of the file add the line
Code:
using Server.Engines.XmlSpawner2;

STEP 7:
to allow beneficial acts between team members make the following change in Scripts/Misc/Notoriety.cs

in the Mobile_AllowBeneficial method around line 82 change
Code:
	if ( target is BaseCreature && !((BaseCreature)target).Controled )
		return false; // Players cannot heal uncontroled mobiles
to
Code:
	if ( target is BaseCreature && !((BaseCreature)target).Controled )
		return false; // Players cannot heal uncontroled mobiles
				
	// XmlPoints challenge mod
	if(XmlPoints.AreInAnyGame(target))
                	return XmlPoints.AreTeamMembers(from,target);

STEP 8:
to prevent faction skill loss when participating in challenge games make the following change in Scripts/Mobiles/PlayerMobile.cs

in the OnDeath method around line 1990 change
Code:
			Faction.HandleDeath( this, killer );
to
Code:
			// block faction skill loss during challenge games
			if(!XmlPoints.AreChallengers(this, killer))
				Faction.HandleDeath( this, killer );

STEP 9:
to display kills and deaths below the players name on mouseover add this to playermobile.cs

Code:
			public override void AddNameProperties( ObjectPropertyList list )
			{
				base.AddNameProperties(list);

				XmlPoints a = (XmlPoints)XmlAttach.FindAttachment(this, typeof(XmlPoints));

				if (a != null)
				{
					list.Add(1070722, "Kills {0} / Deaths {1} : Rank={2}", a.Kills, a.Deaths, a.Rank);
				}
			}
 

Attachments

  • XmlPoints-20-v124-2of2.zip
    86.4 KB · Views: 221
  • XmlPoints-20-v124a-1of2.zip
    55.8 KB · Views: 146

Lord Neo

Sorceror
Jail Error

Code:
RunUO - [www.runuo.com] Version 2.0, Build 2357.32527
Core: Running on .NET Framework Version 2.0.50727
Core: Running with arguments: -debug
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)

Errors:
 + 1Custom/XmlPoints-20-v124-1of2/XmlAttachments/XmlPoints.cs:
    CS0104: Line 1364: 'Jail' is an ambiguous reference between 'Server.Regions.Jail' and 'Server.Commands.Jail'
    CS0104: Line 1364: 'Jail' is an ambiguous reference between 'Server.Regions.Jail' and 'Server.Commands.Jail'
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.




Code:
			if (Region.Find(from.Location, from.Map) is Jail || Region.Find(target.Location, target.Map) is Jail) return false;

I have the Jail system from this link installed,

http://www.runuo.com/forums/showthread.php?t=45941

I removed it and the errors went away and compiled. I do however need a Jail system, is there away around this Arte?
I'm sure other people will be using the same systems as well. Thanks for the Great Scripts.
 

ArteGordon

Wanderer
Lord Neo said:
Code:
RunUO - [www.runuo.com] Version 2.0, Build 2357.32527
Core: Running on .NET Framework Version 2.0.50727
Core: Running with arguments: -debug
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)

Errors:
 + 1Custom/XmlPoints-20-v124-1of2/XmlAttachments/XmlPoints.cs:
    CS0104: Line 1364: 'Jail' is an ambiguous reference between 'Server.Regions.Jail' and 'Server.Commands.Jail'
    CS0104: Line 1364: 'Jail' is an ambiguous reference between 'Server.Regions.Jail' and 'Server.Commands.Jail'
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.




Code:
			if (Region.Find(from.Location, from.Map) is Jail || Region.Find(target.Location, target.Map) is Jail) return false;

I have the Jail system from this link installed,

http://www.runuo.com/forums/showthread.php?t=45941

I removed it and the errors went away and compiled. I do however need a Jail system, is there away around this Arte?
I'm sure other people will be using the same systems as well. Thanks for the Great Scripts.

just make the Jail reference explicit, like this

if (Region.Find(from.Location, from.Map) is Server.Regions.Jail || Region.Find(target.Location, target.Map) is Server.Regions.Jail) return false;
 

Novafire

Wanderer
Count Down

Was the count down feature before the actual duel starts meant to be released in this version? I can't seem to find the configuration for it.
 

GPXtC02

Wanderer
There a [2.0] compliant XMLSpawner that is unbeknownst to me? i would love to check this out, but am hindered by a updated Spawner. Aprreciate the work :)
 

nielsen

Wanderer
This might sound silly :p But i can't see Step 6 at xmlspawner 2 enywhere:confused: What is step 6?

So far it worked great, thank you so much for this:)

PS- will it work with p15? (Disabled AOS)
 

ArteGordon

Wanderer
nielsen said:
This might sound silly :p But i can't see Step 6 at xmlspawner 2 enywhere:confused: What is step 6?

So far it worked great, thank you so much for this:)

PS- will it work with p15? (Disabled AOS)

look at the 'installation 2.0.txt' file in the first xmlspawner2 installation .zip file.

STEP 6: (recommended but not required)
To allow the XmlQuest killtask keywords KILL and KILLNAMED to be applied to players providing a contract kill system, one line must be added to ReportMurderer.cs (Scripts/Gumps/ReportMurderer.cs) as described below (note, you dont have to make this mod if you dont want to, the spawner and other items will work just fine without it, the KILL and KILLNAMED features simply wont work when specifying players as the targets).
This is also required to allow the attachment system to register kills (through the OnKill or OnKilled methods). Some addons such as XmlPoints require this.

around line 64 of ReportMurderer.cs change

Titles.AwardKarma( g, karmaAward, true );

to

Titles.AwardKarma( g, karmaAward, true );
// modification to support XmlQuest Killtasks of players
Server.Items.XmlQuest.RegisterKill( m, g);

and it should work fine with p15.
 

ArteGordon

Wanderer
Novafire said:
Was the count down feature before the actual duel starts meant to be released in this version? I can't seem to find the configuration for it.

I was going to put it into this update but I wanted to test it out a bit more so not it yet.
 

nielsen

Wanderer
Is this the step 6? I Cant find the textfile in XML Spawner 2 you directed me to

STEP 6: (recommended but not required)
To allow the XmlQuest killtask keywords KILL and KILLNAMED to be applied to players providing a contract kill system, one line must be added to ReportMurderer.cs (Scripts/Gumps/ReportMurderer.cs) as described below (note, you dont have to make this mod if you dont want to, the spawner and other items will work just fine without it, the KILL and KILLNAMED features simply wont work when specifying players as the targets).
This is also required to allow the attachment system to register kills (through the OnKill or OnKilled methods). Some addons such as XmlPoints require this.

around line 64 of ReportMurderer.cs change

Titles.AwardKarma( g, karmaAward, true );

to

Titles.AwardKarma( g, karmaAward, true );
// modification to support XmlQuest Killtasks of players
Server.Items.XmlQuest.RegisterKill( m, g);

PS I Mean Step 1 here, Step 6 on XML Spawner 2
 

ArteGordon

Wanderer
nielsen said:
Is this the step 6? I Cant find the textfile in XML Spawner 2 you directed me to

STEP 6: (recommended but not required)
To allow the XmlQuest killtask keywords KILL and KILLNAMED to be applied to players providing a contract kill system, one line must be added to ReportMurderer.cs (Scripts/Gumps/ReportMurderer.cs) as described below (note, you dont have to make this mod if you dont want to, the spawner and other items will work just fine without it, the KILL and KILLNAMED features simply wont work when specifying players as the targets).
This is also required to allow the attachment system to register kills (through the OnKill or OnKilled methods). Some addons such as XmlPoints require this.

around line 64 of ReportMurderer.cs change

Titles.AwardKarma( g, karmaAward, true );

to

Titles.AwardKarma( g, karmaAward, true );
// modification to support XmlQuest Killtasks of players
Server.Items.XmlQuest.RegisterKill( m, g);

PS I Mean Step 1 here, Step 6 on XML Spawner 2


yes, that is the one. If you look in the xmlspawner2-v312-1of3.zip you will see a file named 'installation 2.0.txt' that has the installation steps. If you dont see it in that .zip file, try downloading it again.
 

Ajax2000

Wanderer
Awesome script as always Arte.

Couple of requests for the future... (if they arent already in there and I just didnt notice them)

- Optional automated tournament for players, perhaps where the accumulated "entry fee" of all contestants is given over to the winner.

- Ability for GMs or admins to give additional PvP Points for winners of official shard tournaments.
 

ArteGordon

Wanderer
Ajax2000 said:
Awesome script as always Arte.

Couple of requests for the future... (if they arent already in there and I just didnt notice them)

- Optional automated tournament for players, perhaps where the accumulated "entry fee" of all contestants is given over to the winner.

- Ability for GMs or admins to give additional PvP Points for winners of official shard tournaments.

That is currently how entry fees in the challenge games work. Accumulated entry fees are distributed to the winners divided up evenly among winning team members.

GMs can manually modify points by doing a [getatt and opening the attachments, but being able to specify it as an automatic reward for challenge games is a good idea.
Adding an optional "points" fee that would be taken from losers and given to winners like gold is something that is on the todo list.
 

Ajax2000

Wanderer
Ah didnt see that about the challenge games. :)

You always put so much detail into your scripts its hard to absorb it all at first glance.

Thanks again Arte!
 
You must perform installation step 6 from the XmlSpawner2 thread otherwise the system wont recognize kills and nothing will seem to work. I would also recommend going through installation step 8 to enable the use of the ItemIdentification skill for checking point status on players, but this is optional.

I dont understand what this means could someone point out what I do?
 
Code:
RunUO - [www.runuo.com] Version 2.0, Build 2357.32527
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
 + Customs/My shit/Notoriety.cs:
    CS0117: Line 84: 'Server.Mobiles.BaseCreature' does not contain a definition
 for 'Controlled'
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.


Notoriety.cs

Code:
using Server.Engines.XmlSpawner2;
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Items;
using Server.Guilds;
using Server.Multis;
using Server.Mobiles;
using Server.Engines.PartySystem;
using Server.Factions;

namespace Server.Misc
{
	public class NotorietyHandlers
	{
		public static void Initialize()
		{
			Notoriety.Hues[Notoriety.Innocent]		= 0x59;
			Notoriety.Hues[Notoriety.Ally]			= 0x3F;
			Notoriety.Hues[Notoriety.CanBeAttacked]	= 0x3B2;
			Notoriety.Hues[Notoriety.Criminal]		= 0x3B2;
			Notoriety.Hues[Notoriety.Enemy]			= 0x90;
			Notoriety.Hues[Notoriety.Murderer]		= 0x22;
			Notoriety.Hues[Notoriety.Invulnerable]	= 0x35;

			Notoriety.Handler = new NotorietyHandler( MobileNotoriety );

			Mobile.AllowBeneficialHandler = new AllowBeneficialHandler( Mobile_AllowBeneficial );
			Mobile.AllowHarmfulHandler = new AllowHarmfulHandler( Mobile_AllowHarmful );
		}

		private enum GuildStatus { None, Peaceful, Waring }

		private static GuildStatus GetGuildStatus( Mobile m )
		{
			if( m.Guild == null )
				return GuildStatus.None;
			else if( ((Guild)m.Guild).Enemies.Count == 0 && m.Guild.Type == GuildType.Regular )
				return GuildStatus.Peaceful;

			return GuildStatus.Waring;
		}

		private static bool CheckBeneficialStatus( GuildStatus from, GuildStatus target )
		{
			if( from == GuildStatus.Waring || target == GuildStatus.Waring )
				return false;

			return true;
		}

		/*private static bool CheckHarmfulStatus( GuildStatus from, GuildStatus target )
		{
			if ( from == GuildStatus.Waring && target == GuildStatus.Waring )
				return true;

			return false;
		}*/

		public static bool Mobile_AllowBeneficial( Mobile from, Mobile target )
		{
			if( from == null || target == null || from.AccessLevel > AccessLevel.Player || target.AccessLevel > AccessLevel.Player )
				return true;

			#region Factions
			Faction targetFaction = Faction.Find( target, true );

			if( targetFaction != null )
			{
				if( Faction.Find( from, true ) != targetFaction )
					return false;
			}
			#endregion

			Map map = from.Map;

			if( map != null && (map.Rules & MapRules.BeneficialRestrictions) == 0 )
				return true; // In felucca, anything goes

			if( !from.Player )
				return true; // NPCs have no restrictions

			if ( target is BaseCreature && !((BaseCreature)target).Controled )
				return false; // Players cannot heal uncontroled mobiles
				
			// XmlPoints challenge mod
			if(XmlPoints.AreInAnyGame(target))
                		return XmlPoints.AreTeamMembers(from,target);

			if( from is PlayerMobile && ((PlayerMobile)from).Young && (!(target is PlayerMobile) || !((PlayerMobile)target).Young) )
				return false; // Young players cannot perform beneficial actions towards older players

			Guild fromGuild = from.Guild as Guild;
			Guild targetGuild = target.Guild as Guild;

			if( fromGuild != null && targetGuild != null && (targetGuild == fromGuild || fromGuild.IsAlly( targetGuild )) )
				return true; // Guild members can be beneficial

			return CheckBeneficialStatus( GetGuildStatus( from ), GetGuildStatus( target ) );
		}

		public static bool Mobile_AllowHarmful( Mobile from, Mobile target )
		{
			if( from == null || target == null || from.AccessLevel > AccessLevel.Player || target.AccessLevel > AccessLevel.Player )
				return true;

			Map map = from.Map;

			if( map != null && (map.Rules & MapRules.HarmfulRestrictions) == 0 )
				return true; // In felucca, anything goes

			if( !from.Player && !(from is BaseCreature && (((BaseCreature)from).Controlled || ((BaseCreature)from).Summoned)) )
			{
				if( !CheckAggressor( from.Aggressors, target ) && !CheckAggressed( from.Aggressed, target ) && target is PlayerMobile && ((PlayerMobile)target).CheckYoungProtection( from ) )
					return false;

				return true; // Uncontroled NPCs are only restricted by the young system
	}
				
	// XmlPoints challenge mod
	if(XmlPoints.AreChallengers(from,target))
                return true;

			Guild fromGuild = GetGuildFor( from.Guild as Guild, from );
			Guild targetGuild = GetGuildFor( target.Guild as Guild, target );

			if( fromGuild != null && targetGuild != null && (fromGuild == targetGuild || fromGuild.IsAlly( targetGuild ) || fromGuild.IsEnemy( targetGuild )) )
				return true; // Guild allies or enemies can be harmful

			if( target is BaseCreature && (((BaseCreature)target).Controlled || (((BaseCreature)target).Summoned && from != ((BaseCreature)target).SummonMaster)) )
				return false; // Cannot harm other controlled mobiles

			if( target.Player )
				return false; // Cannot harm other players

			if( !(target is BaseCreature && ((BaseCreature)target).InitialInnocent) )
			{
				if( Notoriety.Compute( from, target ) == Notoriety.Innocent )
					return false; // Cannot harm innocent mobiles
			}

			return true;
		}

		public static Guild GetGuildFor( Guild def, Mobile m )
		{
			Guild g = def;

			BaseCreature c = m as BaseCreature;

			if( c != null && c.Controlled && c.ControlMaster != null )
			{
				c.DisplayGuildTitle = false;

				if( c.Map != Map.Internal && (Core.AOS || Guild.NewGuildSystem || c.ControlOrder == OrderType.Attack || c.ControlOrder == OrderType.Guard) )
					g = (Guild)(c.Guild = c.ControlMaster.Guild);
				else if( c.Map == Map.Internal || c.ControlMaster.Guild == null )
					g = (Guild)(c.Guild = null);
			}

			return g;
		}

		public static int CorpseNotoriety( Mobile source, Corpse target )
		{
			if( target.AccessLevel > AccessLevel.Player )
				return Notoriety.CanBeAttacked;

			Body body = (Body)target.Amount;

			BaseCreature cretOwner = target.Owner as BaseCreature;

			if( cretOwner != null )
			{
				Guild sourceGuild = GetGuildFor( source.Guild as Guild, source );
				Guild targetGuild = GetGuildFor( target.Guild as Guild, target.Owner );

				if( sourceGuild != null && targetGuild != null )
				{
					if( sourceGuild == targetGuild || sourceGuild.IsAlly( targetGuild ) )
						return Notoriety.Ally;
					else if( sourceGuild.IsEnemy( targetGuild ) )
						return Notoriety.Enemy;
				}

				Faction srcFaction = Faction.Find( source, true, true );
				Faction trgFaction = Faction.Find( target.Owner, true, true );

				if( srcFaction != null && trgFaction != null && srcFaction != trgFaction && source.Map == Faction.Facet )
					return Notoriety.Enemy;

				if( CheckHouseFlag( source, target.Owner, target.Location, target.Map ) )
					return Notoriety.CanBeAttacked;

				int actual = Notoriety.CanBeAttacked;

				if( target.Kills >= 5 || (body.IsMonster && IsSummoned( target.Owner as BaseCreature )) || (target.Owner is BaseCreature && (((BaseCreature)target.Owner).AlwaysMurderer || ((BaseCreature)target.Owner).IsAnimatedDead)) )
					actual = Notoriety.Murderer;

				if( DateTime.Now >= (target.TimeOfDeath + Corpse.MonsterLootRightSacrifice) )
					return actual;

				Party sourceParty = Party.Get( source );

				List<Mobile> list = target.Aggressors;

				for( int i = 0; i < list.Count; ++i )
				{
					if( list[i] == source || (sourceParty != null && Party.Get( list[i] ) == sourceParty) )
						return actual;
				}

				return Notoriety.Innocent;
			}
			else
			{
				if( target.Kills >= 5 || (body.IsMonster && IsSummoned( target.Owner as BaseCreature )) || (target.Owner is BaseCreature && (((BaseCreature)target.Owner).AlwaysMurderer || ((BaseCreature)target.Owner).IsAnimatedDead)) )
					return Notoriety.Murderer;

				if( target.Criminal )
					return Notoriety.Criminal;

				Guild sourceGuild = GetGuildFor( source.Guild as Guild, source );
				Guild targetGuild = GetGuildFor( target.Guild as Guild, target.Owner );

				if( sourceGuild != null && targetGuild != null )
				{
					if( sourceGuild == targetGuild || sourceGuild.IsAlly( targetGuild ) )
						return Notoriety.Ally;
					else if( sourceGuild.IsEnemy( targetGuild ) )
						return Notoriety.Enemy;
				}

				Faction srcFaction = Faction.Find( source, true, true );
				Faction trgFaction = Faction.Find( target.Owner, true, true );

				if( srcFaction != null && trgFaction != null && srcFaction != trgFaction && source.Map == Faction.Facet )
				{
					List<Mobile> secondList = target.Aggressors;

					for( int i = 0; i < secondList.Count; ++i )
					{
						if( secondList[i] == source || secondList[i] is BaseFactionGuard )
							return Notoriety.Enemy;
					}
				}

				if( target.Owner != null && target.Owner is BaseCreature && ((BaseCreature)target.Owner).AlwaysAttackable )
					return Notoriety.CanBeAttacked;

				if( CheckHouseFlag( source, target.Owner, target.Location, target.Map ) )
					return Notoriety.CanBeAttacked;

				if( !(target.Owner is PlayerMobile) && !IsPet( target.Owner as BaseCreature ) )
					return Notoriety.CanBeAttacked;

				List<Mobile> list = target.Aggressors;

				for( int i = 0; i < list.Count; ++i )
				{
					if( list[i] == source )
						return Notoriety.CanBeAttacked;
				}

				return Notoriety.Innocent;
			}
		}

		public static int MobileNotoriety( Mobile source, Mobile target )
		{
			if( Core.AOS && (target.Blessed || (target is BaseVendor && ((BaseVendor)target).IsInvulnerable) || target is PlayerVendor || target is TownCrier) )
				return Notoriety.Invulnerable;

			if( target.AccessLevel > AccessLevel.Player )
				return Notoriety.CanBeAttacked;

			if( source.Player && !target.Player && source is PlayerMobile && target is BaseCreature )
			{
				BaseCreature bc = (BaseCreature)target;

				if( !bc.Summoned && !bc.Controlled && ((PlayerMobile)source).EnemyOfOneType == target.GetType() )
					return Notoriety.Enemy;
			}

			if( target.Kills >= 5 || (target.Body.IsMonster && IsSummoned( target as BaseCreature ) && !(target is BaseFamiliar) && !(target is Golem)) || (target is BaseCreature && (((BaseCreature)target).AlwaysMurderer || ((BaseCreature)target).IsAnimatedDead)) )
				return Notoriety.Murderer;

			if ( target.Criminal )
				return Notoriety.Criminal;

			// XmlPoints challenge mod
			if(XmlPoints.AreTeamMembers(source,target))
                		return Notoriety.Ally;
			else
			if(XmlPoints.AreChallengers(source,target))
                		return Notoriety.Enemy;
			Guild sourceGuild = GetGuildFor( source.Guild as Guild, source );
			Guild targetGuild = GetGuildFor( target.Guild as Guild, target );

			if( sourceGuild != null && targetGuild != null )
			{
				if( sourceGuild == targetGuild || sourceGuild.IsAlly( targetGuild ) )
					return Notoriety.Ally;
				else if( sourceGuild.IsEnemy( targetGuild ) )
					return Notoriety.Enemy;
			}

			Faction srcFaction = Faction.Find( source, true, true );
			Faction trgFaction = Faction.Find( target, true, true );

			if( srcFaction != null && trgFaction != null && srcFaction != trgFaction && source.Map == Faction.Facet )
				return Notoriety.Enemy;

			if( SkillHandlers.Stealing.ClassicMode && target is PlayerMobile && ((PlayerMobile)target).PermaFlags.Contains( source ) )
				return Notoriety.CanBeAttacked;

			if( target is BaseCreature && ((BaseCreature)target).AlwaysAttackable )
				return Notoriety.CanBeAttacked;

			if( CheckHouseFlag( source, target, target.Location, target.Map ) )
				return Notoriety.CanBeAttacked;

			if( !(target is BaseCreature && ((BaseCreature)target).InitialInnocent) )
			{
				if( !target.Body.IsHuman && !target.Body.IsGhost && !IsPet( target as BaseCreature ) && !Server.Spells.Necromancy.TransformationSpell.UnderTransformation( target ) )
					return Notoriety.CanBeAttacked;
			}

			if( CheckAggressor( source.Aggressors, target ) )
				return Notoriety.CanBeAttacked;

			if( CheckAggressed( source.Aggressed, target ) )
				return Notoriety.CanBeAttacked;

			if( target is BaseCreature )
			{
				BaseCreature bc = (BaseCreature)target;

				if( bc.Controlled && bc.ControlOrder == OrderType.Guard && bc.ControlTarget == source )
					return Notoriety.CanBeAttacked;
			}

			if( source is BaseCreature )
			{
				BaseCreature bc = (BaseCreature)source;

				Mobile master = bc.GetMaster();
				if( master != null && CheckAggressor( master.Aggressors, target ) )
					return Notoriety.CanBeAttacked;
			}

			return Notoriety.Innocent;
		}

		public static bool CheckHouseFlag( Mobile from, Mobile m, Point3D p, Map map )
		{
			BaseHouse house = BaseHouse.FindHouseAt( p, map, 16 );

			if( house == null || house.Public || !house.IsFriend( from ) )
				return false;

			if( m != null && house.IsFriend( m ) )
				return false;

			BaseCreature c = m as BaseCreature;

			if( c != null && !c.Deleted && c.Controlled && c.ControlMaster != null )
				return !house.IsFriend( c.ControlMaster );

			return true;
		}

		public static bool IsPet( BaseCreature c )
		{
			return (c != null && c.Controlled);
		}

		public static bool IsSummoned( BaseCreature c )
		{
			return (c != null && /*c.Controlled &&*/ c.Summoned);
		}

		public static bool CheckAggressor( List<AggressorInfo> list, Mobile target )
		{
			for( int i = 0; i < list.Count; ++i )
				if( list[i].Attacker == target )
					return true;

			return false;
		}

		public static bool CheckAggressed( List<AggressorInfo> list, Mobile target )
		{
			for( int i = 0; i < list.Count; ++i )
			{
				AggressorInfo info = list[i];

				if( !info.CriminalAggression && info.Defender == target )
					return true;
			}

			return false;
		}
	}
}
 

ArteGordon

Wanderer
Code:
if (target is BaseCreature && !((BaseCreature)target).Controled)
				return false; // Players cannot heal uncontroled mobiles

you need to change 'Controled' to 'Controlled'
 

ArteGordon

Wanderer
XxPrinceValoxX said:
I dont understand what this means could someone point out what I do?

If you look in the 'installation 2.0.txt' file that is in the first .zip file of the xmlspawner installation, you will see the additional installation steps listed.

STEP 6: (recommended but not required)
To allow the XmlQuest killtask keywords KILL and KILLNAMED to be applied to players providing a contract kill system, one line must be added to ReportMurderer.cs (Scripts/Gumps/ReportMurderer.cs) as described below (note, you dont have to make this mod if you dont want to, the spawner and other items will work just fine without it, the KILL and KILLNAMED features simply wont work when specifying players as the targets).
This is also required to allow the attachment system to register kills (through the OnKill or OnKilled methods). Some addons such as XmlPoints require this.

around line 64 of ReportMurderer.cs change

Titles.AwardKarma( g, karmaAward, true );

to

Titles.AwardKarma( g, karmaAward, true );
// modification to support XmlQuest Killtasks of players
Server.Items.XmlQuest.RegisterKill( m, g);
 
Top