I had the token and master looter working before... then had hard drive crash. I am setting everything back up but I seem to be missing some instructions for the tokens. When I kill a monster I get a message that X Tokens have been added - but none are added. The Trash backpack does add Tokens, though.

I was thinking there was a change to make in the basecreature.cs but my files don't have any instructions... So I went to RunUO and downloaded OWLTR and in the Token folder there is a text file file that says to add tokens to creatures:

In BaseCreature.cs look for those 2 lines:

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

Add just after them this line:

GiveTokens.CalculateTokens(ds.m_Mobile, this);

Problem now is that I get an error that "ds does not exist in the current context". So maybe there is an update to make it work forServ UO... The whole ds.m_Mobile bit is different... because mine looks like this:

Titles.AwardFame(titles, fame, true);
Titles.AwardKarma(titles, karma, true);
 
I had the token and master looter working before... then had hard drive crash. I am setting everything back up but I seem to be missing some instructions for the tokens. When I kill a monster I get a message that X Tokens have been added - but none are added. The Trash backpack does add Tokens, though.

I was thinking there was a change to make in the basecreature.cs but my files don't have any instructions... So I went to RunUO and downloaded OWLTR and in the Token folder there is a text file file that says to add tokens to creatures:

In BaseCreature.cs look for those 2 lines:

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

Add just after them this line:

GiveTokens.CalculateTokens(ds.m_Mobile, this);

Problem now is that I get an error that "ds does not exist in the current context". So maybe there is an update to make it work forServ UO... The whole ds.m_Mobile bit is different... because mine looks like this:

Titles.AwardFame(titles, fame, true);
Titles.AwardKarma(titles, karma, true);


You have to add more than that one line, can you post your basecreature? Add this code on line 5412 if you are using ServUO basecreature.cs. Put it where I placed it, in between those 2 bits of code.

for (int i = 0; i < list.Count; ++i)
{
DamageStore ds = list;

if (!ds.m_HasRight)
{
continue;
}
Code:
//daat99 OWLTR start - add tokens on death
                        if (OWLTROptionsManager.IsEnabled(OWLTROptionsManager.OPTIONS_ENUM.MONSTER_GIVE_TOKENS))
                            //daat99 Tokens start - add tokens on death
                            GiveTokens.CalculateTokens(ds.m_Mobile, this);
                        //daat99 OWLTR/Tokens end - add tokens on death
if (GivesFameAndKarmaAward)
{
Party party = Engines.PartySystem.Party.Get(ds.m_Mobile);

if (party != null)
{
int divedFame = totalFame / party.Members.Count;
int divedKarma = totalKarma / party.Members.Count;
 
Last edited:
This is straight out of the ServUO Repo, downloaded yesterday. I am using the newest release, although this file is the same as the one I have from over a year ago.
 

Attachments

  • BaseCreature.cs
    162.7 KB · Views: 17
Last edited:
This is straight out of the ServUO Repo, downloaded yesterday. I am using the newest release, although this file is the same as the one I have from over a year ago.

You have the line commented at line 5525. Move it to line 5483 and uncomment, and you should be good to go.
 
Interesting... Now when I kill a critter I get tokens, same time as the gold sweep (never did before, as far as I know). But... when I do the [loot command it says I get tokens and I do not... How would I tell it not to do tokens on [loot? As long as i get them once, it is enough. :)
 
Back