This time I enabled XmlLevelItem in XmlSpawner2. Load normal, but why I can't get the experience after killing the monster? The way that the item is acquired is? Weapon and armor and jewelry, there is no way to get different? Thank you
QQ截图20150606021602.png
 
I'm guessing one of two things has probably happened, or possibly both and they are both covered in the Optional installation instructions for XmlSpawner.

Culprit 1:
Code:
STEP 2: (recommended but not required)
--------------------------------------
To take advantage of the XmlQuest killtask keywords KILL and KILLNAMED, one line must be added to the OnDeath method in BaseCreature.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 do anything)

around line 4172 of basecreature.cs change

Titles.AwardKarma( ds.m_Mobile, totalKarma, true );

to

Titles.AwardKarma( ds.m_Mobile, totalKarma, true );
// modification to support XmlQuest Killtasks
XmlQuest.RegisterKill( this, ds.m_Mobile);

Culprit 2:
Code:
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);

Culprit 3:
Code:
STEP 7: (recommended but not required)
--------------------------------------
To allow attachments to be triggered on weapon hits, one line must be added to BaseWeapon.cs (Scripts/Items/Weapons/BaseWeapon.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 attachment OnWeaponHit method simply wont be called so attachments such as XmlMinionStrike will not work) 

around line 1644 of BaseWeapon.cs at the end of the OnHit method, change

				if ( AnimalForm.UnderTransformation( defender, typeof( BullFrog ) ) )
					attacker.ApplyPoison( defender, Poison.Regular );
			}
		}

to

				if ( AnimalForm.UnderTransformation( defender, typeof( BullFrog ) ) )
					attacker.ApplyPoison( defender, Poison.Regular );
			}
			// hook for attachment OnWeaponHit method
			Server.Engines.XmlSpawner2.XmlAttach.OnWeaponHit(this, attacker, defender, damageGiven);
		}

Culprit 4:
Code:
STEP 11: (recommended but not required)
---------------------------------------
To allow attachment properties on weapons/armor to be automatically displayed in the properties list on mouseover/click, these changes must be made to BaseWeapon.cs (Scripts/Items/Weapons/BaseWeapon.cs), BaseArmor.cs (Scripts/Items/Armor/BaseArmor.cs) and BaseJewel.cs (Scripts/Items/Jewels/BaseJewel.cs) 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, players just wont automatically see attachment properties on items with attachments).

at the end of the GetProperties method around line 3246 of BaseWeapon.cs change

	if ( m_Hits > 0 && m_MaxHits > 0 )
		list.Add( 1060639, "{0}\t{1}", m_Hits, m_MaxHits ); // durability ~1_val~ / ~2_val~

to

	if ( m_Hits > 0 && m_MaxHits > 0 )
		list.Add( 1060639, "{0}\t{1}", m_Hits, m_MaxHits ); // durability ~1_val~ / ~2_val~

	// mod to display attachment properties
	Server.Engines.XmlSpawner2.XmlAttach.AddAttachmentProperties(this, list);


at the end of the GetProperties method around line 1518 of BaseArmor.cs change

	if ( m_HitPoints > 0 && m_MaxHitPoints > 0 )
		list.Add( 1060639, "{0}\t{1}", m_HitPoints, m_MaxHitPoints ); // durability ~1_val~ / ~2_val~

to

	if ( m_HitPoints > 0 && m_MaxHitPoints > 0 )
		list.Add( 1060639, "{0}\t{1}", m_HitPoints, m_MaxHitPoints ); // durability ~1_val~ / ~2_val~
			
	// mod to display attachment properties
	Server.Engines.XmlSpawner2.XmlAttach.AddAttachmentProperties(this, list);

at the end of the GetProperties method around line 226 of BaseJewel.cs change


	base.AddResistanceProperties( list );
to

	base.AddResistanceProperties( list );
			
        // mod to display attachment properties
        Server.Engines.XmlSpawner2.XmlAttach.AddAttachmentProperties(this, list);

Personally, I would say make sure you have all the optional installation instructions completed. Down the road you may decide to utilize an addon for XmlSpawner that requires one of the optional steps anyway.
The other thing about this too is: It depends on how the weapon was generated in-game. Meaning, if you just dropped a sword [Add LongSword then used [ADDATT XmlLevelItem and added it to the sword that way, it won't work properly. Use a spawner to generate the sword and add the attachment. That seems to work best.
 

Attachments

  • installation 2.0.txt
    17.3 KB · Views: 7
I have a check again, but the goods still can not get the experience value. I don't know where the problem is..
I use the command [ADDATT XmlLevelItem to activate the upgrade
 
I'm guessing one of two things has probably happened, or possibly both and they are both covered in the Optional installation instructions for XmlSpawner.

Culprit 1:
Code:
STEP 2: (recommended but not required)
--------------------------------------
To take advantage of the XmlQuest killtask keywords KILL and KILLNAMED, one line must be added to the OnDeath method in BaseCreature.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 do anything)

around line 4172 of basecreature.cs change

Titles.AwardKarma( ds.m_Mobile, totalKarma, true );

to

Titles.AwardKarma( ds.m_Mobile, totalKarma, true );
// modification to support XmlQuest Killtasks
XmlQuest.RegisterKill( this, ds.m_Mobile);
Errors:
+ Mobiles/BaseCreature.cs:
CS0103: Line 5872: The name 'ds' does not exist in the current context
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

I have all the steps, and only this one is wrong. How to solve?
 

Attachments

  • BaseCreature.cs
    174.1 KB · Views: 2
Last edited:
You had it in the wrong place. I fixed it :)
 

Attachments

  • [ServUO.com]-BaseCreature.cs
    174.1 KB · Views: 4
  • Like
Reactions: ExX
You had it in the wrong place. I fixed it :)
Thank you very much, but even so, the equipment is still unable to get the experience,Is it the property that you use XmlLevelItem [ADDATT to get the experience? Must be the server will naturally produce normal?:)
 
Back