Is there a reason why it hasnt been implemented yet upon killing?

Adding few lines on each monster it can be possible to implement it

example:

public override void OnDeath(Container c)
{

base.OnDeath(c);
/* Give Queens Loyalty Points Start*/
if (LastKiller is PlayerMobile)
{
((PlayerMobile)LastKiller).Exp += 20;/* 10 = 1 Loyalty Point */
LastKiller.SendMessage("You have been awarded 2 Loyalty Points for killing an enemy of the Queen!");
}
/* Give Queens Loyalty Points End*/
}

I own a list of creatures which release loyalty upon killing and relative values.
 
Edit: I see that adding simply

QLPoints = XX; //where XX is the number of QL points you want a creature to release upon killing

in their attributes

you have done the job, and they are released only in termur map.

Example

Code:
[Constructable]
        public GreenGoblin()
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
	
	 this.Name = "Green Goblin";
            this.Body = 723;
            this.BaseSoundID = 0x45A;

       //ETC..........
	QLPoints = 8;
}

This need also to add a very small piece of code inside basecreature telling the game you are going to have the points only upon wandering Termur

if (mob is PlayerMobile && mob.Map == Map.TerMur && m_QLPoints > 0)
{
PlayerMobile pm = mob as PlayerMobile;
pm.Exp += m_QLPoints;
pm.SendMessage("You have been awarded {0} points for your loyalty to the Queen of TerMur!", m_QLPoints);
}

Let me know if this may be interesting I can pull the request directly with all the changes and creatures which include the QLPoints attribute I got.
 
Somehow is already present the system, but system doesnt count points over creature's killing but over some quests only.
I wonder if this is correct or not before pulling requests.
 
The loyalty system in ServUO is all over the place. It is not worth working on it right now as @Ravenwolfe has a better system that we should probably incorporate into ServUO.
 
I believe so. I have not looked into it much though, I just know it is an improved system.

It would not be hard to make the system OSI accurate anyway I feel, it is not that complex on official servers.
 
It seems like the whole thing could be implemented as a stand-alone service by just hooking EventSink.OnKilledBy(). And the concept of loyalty points should really be a dynamic system that can be easily extended in the future for town loyalty and such. We really need to be doing less inside these 12,000 line base classes and leveraging eventing more.
 
It seems like the whole thing could be implemented as a stand-alone service by just hooking EventSink.OnKilledBy(). And the concept of loyalty points should really be a dynamic system that can be easily extended in the future for town loyalty and such. We really need to be doing less inside these 12,000 line base classes and leveraging eventing more.

Yep, I use the event system a lot in my own work. It is quite extensive and I agree it should be used a lot more. I leverage it a little in the Humility virtue.
 
I would be happy to add what I did into ServUO if you want. Last time I looked, I thought yall had done something already. I did not hook the EventSink (which is not a bad idea) but I would be glad to give you what I did as a pull request if you want it. If I remember correctly it was one little edit to PlayerMobile only.

https://github.com/JustUO/JustUO/commit/d66c601745a7b3ebfca57bc88108f8b1dbf4c28c
https://github.com/JustUO/JustUO/commit/5477f9a8e19799765482fac15e48dcdd987d1177
https://github.com/JustUO/JustUO/commit/14cd10e367ae5fb9741c711e549b2999a73c23d5
https://github.com/JustUO/JustUO/commit/92e43a760f1dbda6d1f195af3344dd4e8a3afd6d
https://github.com/JustUO/JustUO/commit/48ebf55c2c1a5ceeed141d095f1a292fac8df962
 
I would be happy to add what I did into ServUO if you want. Last time I looked, I thought yall had done something already. I did not hook the EventSink (which is not a bad idea) but I would be glad to give you what I did as a pull request if you want it. If I remember correctly it was one little edit to PlayerMobile only.

https://github.com/JustUO/JustUO/commit/d66c601745a7b3ebfca57bc88108f8b1dbf4c28c
https://github.com/JustUO/JustUO/commit/5477f9a8e19799765482fac15e48dcdd987d1177
https://github.com/JustUO/JustUO/commit/14cd10e367ae5fb9741c711e549b2999a73c23d5
https://github.com/JustUO/JustUO/commit/92e43a760f1dbda6d1f195af3344dd4e8a3afd6d
https://github.com/JustUO/JustUO/commit/48ebf55c2c1a5ceeed141d095f1a292fac8df962


That would be awesome if you could make that pull!
 
Ok, I sent it from a separate branch so you can test it. I didn't have an existing shard to test it on and I fear it might want to delete some creatures at first run (fire ant had some changes as example).
 
Back