- ServUO Version
- Publish Unknown
- Ultima Expansion
- Mondain's Legacy
My shard is running on RunUO Version 2.1 . . . *ducks*
I don't know if this is possible or just fanciful dreaming. I searched everywhere and came up blank or just used the wrong searches. If it's possible then I have no clue how to make it work.
I want to create a NPC who will pay players for certain artifacts that a player drops on them (OnDragDrop) and specifically pay a higher amount depending on item's Properties for things like 'Defense, Guarding, Hardening, Fortification and Invulnerability' etc.
The artifacts I have show these properties in their 'GetProperties ( ObjectPropertyList list )'.
Here is an example:
1) Is it possible for a NPC to search an item's PropertyList for certain words (ie Defense, Guarding, Hardening, Fortification or Invulnerability) when the item is dropped on them so the NPC can calculate how much to gold to pay the player for the item?
2) Would it be necessary to have the key word in a line of its own or can it be detected out of a sentence like in the sample code above?
Either way, I'm sure it would involve some complicated text search of the ObjectPropertyList which is a few miles over my paygrade so to speak.
Has anyone tried this before? Can anyone offer some guidance (or if not possible . . put me out of my misery)?
I appreciate the community's input.
Many Thanks
I don't know if this is possible or just fanciful dreaming. I searched everywhere and came up blank or just used the wrong searches. If it's possible then I have no clue how to make it work.
I want to create a NPC who will pay players for certain artifacts that a player drops on them (OnDragDrop) and specifically pay a higher amount depending on item's Properties for things like 'Defense, Guarding, Hardening, Fortification and Invulnerability' etc.
The artifacts I have show these properties in their 'GetProperties ( ObjectPropertyList list )'.
Here is an example:
Code:
public override void GetProperties( ObjectPropertyList list )
{
base.GetProperties( list );
list.Add( "<BASEFONT COLOR=#FD4541>Guarding<BR><BASEFONT COLOR=#75FBEB>Something about this item might be<BR>apparent when you have it enhanced" );
}
1) Is it possible for a NPC to search an item's PropertyList for certain words (ie Defense, Guarding, Hardening, Fortification or Invulnerability) when the item is dropped on them so the NPC can calculate how much to gold to pay the player for the item?
2) Would it be necessary to have the key word in a line of its own or can it be detected out of a sentence like in the sample code above?
Either way, I'm sure it would involve some complicated text search of the ObjectPropertyList which is a few miles over my paygrade so to speak.
Has anyone tried this before? Can anyone offer some guidance (or if not possible . . put me out of my misery)?
I appreciate the community's input.
Many Thanks