The player tooltip Lives display is a bit buggy.

When does this code update and can I force it to update, or can someone suggest a better way of displaying lives left?
Code:
Expand Collapse Copy
        public override void AddNameProperties(ObjectPropertyList list)
        {
            base.AddNameProperties(list);

            XmlPoints a = (XmlPoints)XmlAttach.FindAttachment(this, typeof(XmlPoints));

            XmlData XmlPointsTitle = (XmlData)XmlAttach.FindAttachment(this, typeof(XmlData), "XmlPointsTitle");

            if ((XmlPointsTitle != null && XmlPointsTitle.Data == "True") || a == null)
            {
                return;
            }
            else if (IsPlayer())
            {
                #region Nuggzy's Hardcore Mod
                Account acct = (Account)this.Account;
                int NHMHardcore = Convert.ToInt32(acct.GetTag("HardcoreMode~" + this.Name));
                if (NHMHardcore == 1)
                {
                    int NHMLCount = Convert.ToInt32(acct.GetTag("HardcoreLifeCount~" + this.Name));
                    list.Add(1070722, "Kills {0} / Deaths {1} : Rank={2} : Lives {3}", a.Kills, a.Deaths, a.Rank, NHMLCount);
                }
                else
                {
                    list.Add(1070722, "Kills {0} / Deaths {1} : Rank={2}", a.Kills, a.Deaths, a.Rank);
                }
                #endregion
            }
        }
 
Its possible gives extra lives to players using
[props or anythinh?

I included an extra life token to be used for that. It was intended to be used as rewards for quests or achievements.

[addtopack NHMFreeLife

I will add a command to give players lives in case they are dead and can't use the token.
 
i have this problems when i update:

Code:
Expand Collapse Copy
 + custom/mobiles/PlayerMobile.cs:
    CS0103: Line 3357: The name `NHMpmX' does not exist in the current context
    CS0103: Line 3360: The name `NHMpmY' does not exist in the current context
    CS0103: Line 3372: The name `NHMUpdateGump' does not exist in the current context
    CS0103: Line 3447: The name `NHMUpdateGump' does not exist in the current context
    CS0103: Line 3908: The name `NHMpmX' does not exist in the current context
    CS0103: Line 3909: The name `NHMpmY' 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 do anything brong?
 

Attachments

You missed some imports after the OnDeath section. I am at work now so I can't get to it for a little while. If you can't get it let me know and I will look at it on lunch.
 
i try it but i can solve it :S,

Code:
Expand Collapse Copy
Errors:
+ custom/mobiles/PlayerMobile.cs:
    CS0136: Line 3356: A local variable named `acct' cannot be declared in this scope because it would give a different meaning to `acct', which is already used in a `parent or current' scope to denote something else
    CS0136: Line 3360: A local variable named `NHMLifeCount' cannot be declared in this scope because it would give a different meaning to `NHMLifeCount', which is already used in a `parent or current' scope to denote something else
    CS0136: Line 3367: A local variable named `deathRobe' cannot be declared in this scope because it would give a different meaning to `deathRobe', which is already used in a `parent or current' scope to denote something else
    CS0136: Line 3500: A local variable named `deathRobe' cannot be declared in this scope because it would give a different meaning to `deathRobe', which is already used in a `parent or current' scope to denote something else
    CS1525: Line 3517: Unexpected symbol `private'
    CS1547: Line 3517: Keyword `void' cannot be used in this context
    CS1525: Line 3517: Unexpected symbol `('
    CS1525: Line 3522: Unexpected symbol `private'
    CS1547: Line 3522: Keyword `void' cannot be used in this context
    CS1525: Line 3522: Unexpected symbol `('
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
Exiting...done
 
Last edited:
if i don't modify nothing in playermobile works, but without the news xD

Ok, unfortunately it's been crazy at work so I haven't had a chance to look at it. I will finish my command script as soon as I get home and update your playermobile with the latest version. I will be home in about 3.5 hours(4:50 EST).
 
Ok, if you are using custom maps then you need to change the locations. The playermobile.cs will send you to jail the first time you log on then you select a gate and it send you back to New Haven. When you choose the gate it sets up all of the account information that it's a hardcore/normal player.
 
i'm trying so hard this system and i like so much! thanks!!!!

it's possible for the last life when player dead, save the log of the dead, and send a gump for report to the staff if this dead its out of control for the role play?
 
i'm trying so hard this system and i like so much! thanks!!!!

it's possible for the last life when player dead, save the log of the dead, and send a gump for report to the staff if this dead its out of control for the role play?

Probably some way or another but I'm not really sure how. I will do some digging and see what I can work out.
 
i remember, using the comand [challenge (i think its from xmlspawner) when one player dead, show a popup gump saying if you will report the dead at the staff.

Can help you this?
 
I would really love to get this system working but I keep getting the following errors:

CS0246: Line 101: The type or namespace name 'IHonorTarget' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 4772: The type or namespace name 'DuelContext' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 4774: The type or namespace name 'DuelPlayer' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 5272: The type or namespace name 'HonorContext' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 5273: The type or namespace name 'HonorContext' could not be found (are you missing a using directive or an assembly reference?)
CS0115: Line 1415: 'PlayerMobile.CanBeHarmful(Mobile, bool, bool)': no suitable method found to override
CS0508: Line 3441: 'PlayerMobile.Damage(int, Mobile)': return type must be 'int' to match overridden member 'Mobile.Damage(int, Mobile)'
CS0115: Line 3552: 'PlayerMobile.IsHarmfulCriminal(Mobile)': no suitable method found to override
CS0115: Line 4738: 'PlayerMobile.Asleep': no suitable method found to override
CS0246: Line 4769: The type or namespace name 'DuelContext' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 4770: The type or namespace name 'DuelPlayer' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 5262: The type or namespace name 'HonorContext' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 5263: The type or namespace name 'HonorContext' could not be found (are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
 

Attachments

Donations

Total amount
$50.00
Goal
$500.00

Shards

Back