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:
Any help would be greatly appreciated.
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.