asdasdasdf

Initiate
I'm trying to figure out how to create a "Hardcore Mode" style tag for players who have elected to participate in "Hardcore" play. I have a script I found that allows users to select this game mode via gate, and I want to create a custom tag that is created for players who walk through this gate, so they can be easily identified by other players. I had hoped I could insert a simple fix into the gate's code, but I haven't had any luck doing that. I'm thinking I may need to modify playermobile.cs to do this, and I'm not quite sure how to do that. Here is the gate code I'm using:

Code:
using System;
using Server.Network;
using Server.Accounting;

namespace Server.Items
{
  public class NHMHardcoreModeGate : Item
  {
  [Constructable]
  public NHMHardcoreModeGate()
  : base(0xDDA)
  {
  this.Name = "Hardcore Mode(Limited Lives) - [CAUTION]Double clicking this can't be undone.";
  this.Movable = false;
  this.Hue = 1174;
  this.Light = LightType.Circle300;
  }

  public NHMHardcoreModeGate(Serial serial)
  : base(serial)
  {
  }

  public override void OnDoubleClick(Mobile from)
  {
  Account acct = (Account)from.Account;
  int NHMHardcore = Convert.ToInt32(acct.GetTag("HardcoreMode~" + from.Name));
  if ((NHMHardcore == 0) && (from.AccessLevel < AccessLevel.GameMaster))
  {
  acct.SetTag("HardcoreMode~" + from.Name, "1");
  acct.SetTag("HardcoreDeathCount~" + from.Name, "0");
  acct.SetTag("HardcoreLifeCount~" + from.Name, Convert.ToString(3)); //Extra lives a new player starts with
  from.Emote("You have selected Hardcore Mode.");
  from.Emote("A Skillball has been added to your backpack.");
  from.AddToBackpack(new SkillBallPlus());
               
         
  }
       
  from.PlaySound(0x1FE);
  Map map = from.Map;
  from.MoveToWorld(new Point3D(1430, 1700, 2), map); //britain bank
  }

  public override void Serialize(GenericWriter writer)
  {
  base.Serialize(writer);

  writer.Write((int)0); // version
  }

  public override void Deserialize(GenericReader reader)
  {
  base.Deserialize(reader);

  int version = reader.ReadInt();
  }
  }
}

Any help would be greatly appreciated.
 
The acct tag I believe is only visible via Admin gump.

You could add Hardmode tag to the players Property list when you hover the mouse over them
 
How would I go about doing that? I'm still pretty new to all of this.
[doublepost=1499040924][/doublepost]I have a level system that provides a level tag via this in playermobile.cs:

Code:
    public override void GetProperties(ObjectPropertyList list)
     {
       base.GetProperties(list);

  //Level System
  if (BelowName.Enabled && charLevel >= 0)
  {
  Configured c = new Configured();
  string d = LevelCore.Display(this, new Configured());
         
  if (d != null)
  list.Add("Level: " + d);
  }
  //End Level System

There has to be a similar way that I can similarly display a Hardcore tag for players who have walked through the HC gate.
 
Make a check so see if they have hardcore status, if they're hardcore, make an if/else statement for line 13 that changes hardcore players to read Hardcore: rather than Level: (Or otherwise just add HC or HardCore in there somewhere)
 
Alright, little bit of progress. I went ahead and added this on double clicking the gate, and it seems to have worked. It created the tag next to the player's name. Not quite exactly where I was hoping to have it, but for the time being it will suffice.

Code:
  from.Emote("You have selected Hardcore Mode.");
  from.Emote("A Skillball has been added to your backpack.");
  from.AddToBackpack(new SkillBallPlus());
  from.Title = "<BASEFONT COLOR=#990000>Hardcore Mode</font>";
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back