/max Command
Sick and tired of /giving yourself a maxy? well this will help you!
Goto wserver>realm>commands>admincommands.cs
and add this code in
You will get 8 errors don't worry about this we are not done...
Goto Db>descriptors.cs and find this:
Above it add these
after that find this
Above it add this
Next find
Under it add this code
Goto wserver>realm>commands>admincommands.cs
and add this code in
Code:
class Max : Command
{
public Max()
: base("max", 1)
{
}
protected override bool Process(Player player, RealmTime time, string args)
{
try
{
player.Stats[0] = player.ObjectDesc.MaxHitPoints;
player.Stats[1] = player.ObjectDesc.MaxMagicPoints;
player.Stats[2] = player.ObjectDesc.MaxAttack;
player.Stats[3] = player.ObjectDesc.MaxDefense;
player.Stats[4] = player.ObjectDesc.MaxSpeed;
player.Stats[5] = player.ObjectDesc.MaxHpRegen;
player.Stats[6] = player.ObjectDesc.MaxMpRegen;
player.Stats[7] = player.ObjectDesc.MaxDexterity;
player.SaveToCharacter();
player.Client.Save();
player.UpdateCount++;
player.SendInfo("Success");
}
catch
{
player.SendError("Unable to max!");
return false;
}
return true;
}
}
Goto Db>descriptors.cs and find this:
Code:
public ushort ObjectType { get; private set; }
Code:
public int MaxHitPoints { get; private set; }
public int MaxMagicPoints { get; private set; }
public int MaxAttack { get; private set; }
public int MaxDefense { get; private set; }
public int MaxSpeed { get; private set; }
public int MaxDexterity { get; private set; }
public int MaxHpRegen { get; private set; }
public int MaxMpRegen { get; private set; }
Code:
if ((n = elem.Element("Terrain")) != null)
Terrain = n.Value;
Code:
if ((n = elem.Element("MaxHitPoints")) != null)
MaxHP = Utils.FromString(n.Value);
if ((n = elem.Element("Defense")) != null)
Defense = Utils.FromString(n.Value);
Code:
StasisImmune = elem.Element("StasisImmune") != null;
Oryx = elem.Element("Oryx") != null;
Hero = elem.Element("Hero") != null;
Code:
if ((n = elem.Element("MaxHitPoints")) != null)
{
MaxHitPoints = n.Attribute("max") != null ? Utils.FromString(n.Attribute("max").Value) : -1;
MaxHP = Utils.FromString(n.Value);
}
if ((n = elem.Element("MaxMagicPoints")) != null)
MaxMagicPoints = n.Attribute("max") != null ? Utils.FromString(n.Attribute("max").Value) : -1;
if ((n = elem.Element("Attack")) != null)
MaxAttack = n.Attribute("max") != null ? Utils.FromString(n.Attribute("max").Value) : -1;
if ((n = elem.Element("Dexterity")) != null)
MaxDexterity = n.Attribute("max") != null ? Utils.FromString(n.Attribute("max").Value) : -1;
if ((n = elem.Element("Speed")) != null)
MaxSpeed = n.Attribute("max") != null ? Utils.FromString(n.Attribute("max").Value) : -1;
if ((n = elem.Element("HpRegen")) != null)
MaxHpRegen = n.Attribute("max") != null ? Utils.FromString(n.Attribute("max").Value) : -1;
if ((n = elem.Element("MpRegen")) != null)
MaxMpRegen = n.Attribute("max") != null ? Utils.FromString(n.Attribute("max").Value) : -1;
if ((n = elem.Element("Defense")) != null)
{
Defense = Utils.FromString(n.Value);
MaxDefense = n.Attribute("max") != null ? Utils.FromString(n.Attribute("max").Value) : -1;
}







