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!

[RunUO SVN 663 + ML] Custom Slayer Title System

Slayer Title System for RunUO 2.1+
Version 1.6

Using these scripts will allow shard administrators to create fun kill-based titles that players can earn.

This is a simple system that allows you to create as many slayer title systems as you want. An example system is included. The system uses attachments to track slayer title progression.

In the example system, the player is awarded to following titles:
  • Hunter of Mutton after 50 sheep kills.
  • Master of the Feast after 100 sheep kills.
  • Mammoth of the Wool after 250 sheep kills.
Each time a new title is awarded, the previous title is removed.

Changelog:
  • Added a virtual routine, OnTitleAwarded, to BaseSlayerTitle.cs. This routine is called when the player is assigned a new title. This routine can be overridden to allow custom title systems to reward players with more than just titles when a new title is awarded. (v1.6)
  • Updated the example system to award a trophy to the player when the title of 'Collector of Wool' is obtained. (v1.6)
  • Updated the system to work with both RunUO 2.1 and 2.2. (v1.5)
  • Changed the example system slightly. (v1.5)
  • Changed the core modification for BaseCreature.cs to a generic event driven hook usable by any system. (v1.5)
  • Added a core modification to PlayerMobile.cs that implements a generic event driven hook usable by any system. (v1.5)
  • Alters the method that the slayer title is displayed. (v1.5)
  • Added a gump interface to allow players to select the title to be displayed. (v1.5)
  • Added the command [titles that players can use to select the title to be displayed. (v1.5)
  • If you do not want the persistent gump displayed and prefer to have your players only use the [titles command, then comment out the following line from the SlayerTitleSystem.cs script. (v1.5)
    • #define SHOW_PERSISTENT_GUMP
Customization of Core System:
To modify the system to allow tracking of kills, open the BaseCreature.cs script and locate the following code.​
Code:
public virtual void OnKilledBy( Mobile mob )
{
    .
    .    [Existing Code]
    .
}
Change the code block to the following:

Code:
public delegate void CreatureKilledByEventHandler(CreatureKilledByEventArgs e);
public static event CreatureKilledByEventHandler CreatureKilledBy;
 
public class CreatureKilledByEventArgs : EventArgs
{
    public BaseCreature CreatureKilled = null;
    public PlayerMobile Player = null;
 
    public CreatureKilledByEventArgs(BaseCreature creatureKilled, PlayerMobile player)
    {
        CreatureKilled = creatureKilled;
        Player = player;
    }
}
 
public virtual void OnKilledBy( Mobile mob )
{
    .
    .    [Existing Code]
    .
 
    if (CreatureKilledBy != null && mob is PlayerMobile)
        CreatureKilledBy(new CreatureKilledByEventArgs(this, ((PlayerMobile)mob)));
}

To modify the system to display a custom title under the player's name on mouse-over, open the PlayerMobile.cs script and locate the following code:​
Code:
public override void GetProperties(ObjectPropertyList list)
{
    .
    .    [Existing Code]
    .
}
Change the code block to the following:
Code:
public delegate void PlayerPropertiesEventHandler(PlayerPropertiesEventArgs e);
public static event PlayerPropertiesEventHandler PlayerProperties;
 
public class PlayerPropertiesEventArgs : EventArgs
{
    public PlayerMobile Player = null;
    public ObjectPropertyList PropertyList = null;
 
    public PlayerPropertiesEventArgs(PlayerMobile player, ObjectPropertyList list)
    {
        Player = player;
        PropertyList = list;
    }
}
 
public override void GetProperties(ObjectPropertyList list)
{
    .
    .    [Existing Code]
    .
 
    if (PlayerProperties != null)
        PlayerProperties(new PlayerPropertiesEventArgs(this, list));
}
Disclaimer:
There are two core changes required to implement these scripts.​
This script requires the use of XmlAttachments.​
This script has been tested with both RunUO 2.1 and 2.2.​
The current version of this script and all prior versions can be downloaded from the project page listed in my signature.​

I sincerely hope these scripts will help someone out there.

Dougan Ironfist
 

Attachments

  • Slayer Title System v1.6.zip
    13.4 KB · Views: 62

Hotshot

Sorceror
Gonna check this out, I am just getting back into this.... I just put my server back onto my comp. and have to say...It's been awhile. But the Kids want to play it. Thanks for the script !! : )
 

Nockar

Sorceror
Pretty neat.

Ever think about creating a achievement system?? Something really versatile that could track all sorts of stuff & that could use gumps?
 

Thagoras

Sorceror
This is really great! This was one of the things I liked from LotRO and eventually was going to write for my shard. Now I don't have to :) The only thing left I'd have to figure out, would be a Title Log (a way to save earned titles and then display them at will). Thanks!
 

Nockar

Sorceror
This is really great! This was one of the things I liked from LotRO and eventually was going to write for my shard. Now I don't have to :) The only thing left I'd have to figure out, would be a Title Log (a way to save earned titles and then display them at will). Thanks!

That is Exactly what I wanted to do. From LoTR online
 

Thagoras

Sorceror
It might be possible to store said titles in a deed (scroll or whatever)...but the goal would be a book gump. And obviously make them playermobile specific. Titles are totally for brag rights and a fun part of the game which really hasn't been exploited enough.
 
Nockar:
The core script adds the attachment at login. If the attachment was previously setup for a player, then it is reattached at login.

Thagoras:
The slayer title system makes use of the champion title system. Simply click on your character and use the 'Select Reward Title' option to cycle through your earned titles to choose which one you want to display.

Also, I also played LOTRO and liked this feature also, but I modeled it mainly after EverQuest 2. ^^
 

Thagoras

Sorceror
The slayer title system makes use of the champion title system. Simply click on your character and use the 'Select Reward Title' option to cycle through your earned titles to choose which one you want to display.
Wow, I really need to play the game more and script less. So much escapes my attention. I didn't even realize this feature existed. Thanks so much!
 

Thagoras

Sorceror
So, I was playing around on OSI and they've added all this great stuff.

pic1.jpgpic2.jpgpic3.jpg

Obviously these are the titles I've achieved... but still pondering the gump.
 

Nockar

Sorceror
oh nice... We need soething like that.

I was looking at the curent title slection gump. Its a time little thing that only displayes one name at a time. We need something that shows a whole bunch of names at once.
 
I haven't played online much recently. I can't really now since I have satellite internet with limited usage :( You may want to make a post in the Modification Suggestions forum with those screenshots so the devs know about them. In the meantime, I will look into a way to override the title selection system if I have some time free up.
 

Thagoras

Sorceror
Seems to me, one would just have to rewrite the SelectTitleGump...as this is what opens with the Title Selection.
 

Nockar

Sorceror
Titles Customization - Publish 65

- New titles customization menu is now available through the “Open Titles Menu” choice in the context menu on your paperdoll
- Titles may now be customized in the following locations
- Paperdoll Name (prefix)
- Paperdoll Name (Suffix)
- Overhead Name (shown in your All Names and first line of your item properties tooltip)
- Subtitle (shown in the second line of your item properties tooltip
- Each title location will have different categories available, including
- Monster (Champion Spawns)
- Guild (Abbreviation & Custom Title)
- Reward (Community Collections & Special Events)
- Skills
- Fame/Karma (Reputation)
- Additional Changes
- Skill Titles may now be used in your Overhead Name location (as a suffix, such as “the swordsman”) and required skill levels be above 90.0 to - be available.
- Skill and monster titles may now be used in your Subtitle Location
- Several skills which have similar titles have been updated
 
Top