Here Are Gold / Fame / Character Fame / Tokens/ God / Stars / Berserker Effect / Invunerable Effect / Stasis Immune Effect / Invisible Effect
Gold Command:
internal class SetGoldCommand : Command
{
public SetGoldCommand() : base ("gold", 1) { }
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (string.IsNullOrEmpty(args[0]))
{
player.SendHelp("Usage: /gold <gold>");
return false;
}
player.Manager.Database.DoActionAsync(db =>
{
var cmd = db.CreateQuery();
cmd.CommandText = "UPDATE `stats` SET `credits`=@cre WHERE accId=@accId";
cmd.Parameters.AddWithValue("@cre", args[0]);
cmd.Parameters.AddWithValue("@accId", player.AccountId);
if (cmd.ExecuteNonQuery() == 0)
{
player.SendError("Error setting gold!");
}
else
{
player.SendInfo("Success!");
}
});
return true;
}
}
Fame Command:
internal class SetFameCommand : Command
{
public SetFameCommand() : base("fame", 1) { }
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (string.IsNullOrEmpty(args[0]))
{
player.SendHelp("Usage: /fame <fame ammount>");
return false;
}
player.Manager.Database.DoActionAsync(db =>
{
var cmd = db.CreateQuery();
cmd.CommandText = "UPDATE `stats` SET `fame`=@cre WHERE accId=@accId";
cmd.Parameters.AddWithValue("@cre", args[0]);
cmd.Parameters.AddWithValue("@accId", player.AccountId);
if (cmd.ExecuteNonQuery() == 0)
{
player.SendError("Error setting fame!");
}
else
{
player.SendInfo("Success!");
}
});
return true;
}
}
Tokens Command:
internal class SetTokensCommand : Command
{
public SetTokensCommand() : base("tokens", 1) { }
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (string.IsNullOrEmpty(args[0]))
{
player.SendHelp("Usage: /tokens <tokens ammount>");
return false;
}
player.Manager.Database.DoActionAsync(db =>
{
var cmd = db.CreateQuery();
cmd.CommandText = "UPDATE `stats` SET `fortunetokens`=@cre WHERE accId=@accId";
cmd.Parameters.AddWithValue("@cre", args[0]);
cmd.Parameters.AddWithValue("@accId", player.AccountId);
if (cmd.ExecuteNonQuery() == 0)
{
player.SendError("Error setting tokens!");
}
else
{
player.SendInfo("Success!");
}
});
return true;
}
}
God Command:
internal class GodCommand : Command
{
public GodCommand()
: base("god", 1)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (player.HasConditionEffect(ConditionEffectIndex.In vincible))
{
player.ApplyConditionEffect(new ConditionEffect
{
Effect = ConditionEffectIndex.Invincible,
DurationMS = 0
});
player.SendInfo("Godmode Off");
}
else
{
player.ApplyConditionEffect(new ConditionEffect
{
Effect = ConditionEffectIndex.Invincible,
DurationMS = -1
});
player.SendInfo("Godmode On");
}
return true;
}
}
Stars Command:
internal class StarsCommand : Command
{
public StarsCommand()
: base("stars", 1)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
try
{
if (args.Length == 0)
{
player.SendHelp("Use /stars <ammount>");
}
else if (args.Length == 1)
{
player.Client.Player.Stars = int.Parse(args[0]);
player.UpdateCount++;
player.SendInfo("Success Setting Stars!");
}
}
catch
{
player.SendError("Error!");
}
return true;
}
}
Berserker Effect:
internal class BerserkerCommand : Command
{
public BerserkerCommand()
: base("berserker", 1)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (player.HasConditionEffect(ConditionEffectIndex.Be rserk))
{
player.ApplyConditionEffect(new ConditionEffect
{
Effect = ConditionEffectIndex.Berserk,
DurationMS = 0
});
player.SendInfo("Berserk Mode Off");
}
else
{
player.ApplyConditionEffect(new ConditionEffect
{
Effect = ConditionEffectIndex.Berserk,
DurationMS = -1
});
player.SendInfo("Berserk Mode On");
}
return true;
}
}
Invunerable Effect:
internal class InvulnerableCommand : Command
{
public InvulnerableCommand()
: base("invulnerable", 1)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (player.HasConditionEffect(ConditionEffectIndex.In vulnerable))
{
player.ApplyConditionEffect(new ConditionEffect
{
Effect = ConditionEffectIndex.Invulnerable,
DurationMS = 0
});
player.SendInfo("Invulnerable Mode Off");
}
else
{
player.ApplyConditionEffect(new ConditionEffect
{
Effect = ConditionEffectIndex.Invulnerable,
DurationMS = -1
});
player.SendInfo("Invulnerable Mode On");
}
return true;
}
}
Stasis Immune Effect:
internal class StasisCommand : Command
{
public StasisCommand()
: base("stasis", 1)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (player.HasConditionEffect(ConditionEffectIndex.St asisImmune))
{
player.ApplyConditionEffect(new ConditionEffect
{
Effect = ConditionEffectIndex.StasisImmune,
DurationMS = 0
});
player.SendInfo("Stasis Immune Mode Off");
}
else
{
player.ApplyConditionEffect(new ConditionEffect
{
Effect = ConditionEffectIndex.StasisImmune,
DurationMS = -1
});
player.SendInfo("Stasis Immune Mode On");
}
return true;
}
}
Invisible Effect:
internal class InvisibleCommand : Command
{
public InvisibleCommand()
: base("invisible", 1)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (player.HasConditionEffect(ConditionEffectIndex.In visible))
{
player.ApplyConditionEffect(new ConditionEffect
{
Effect = ConditionEffectIndex.Invisible,
DurationMS = 0
});
player.SendInfo("Invisible Mode Off");
}
else
{
player.ApplyConditionEffect(new ConditionEffect
{
Effect = ConditionEffectIndex.Invisible,
DurationMS = -1
});
player.SendInfo("Invisible Mode On");
}
return true;
}
}
Character Fame Command:
internal class CFameCommand : Command
{
public CFameCommand()
: base("cfame", 1)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (args[0] == "")
{
player.SendHelp("Usage: /cfame <Fame Amount>");
return false;
}
try
{
int newFame = Convert.ToInt32(args[0]);
int newXP = Convert.ToInt32(newFame.ToString() + "000");
player.Fame = newFame;
player.Experience = newXP;
player.SaveToCharacter();
player.Client.Save();
player.UpdateCount++;
player.SendInfo("Updated Character Fame To: " + newFame);
}
catch
{
player.SendInfo("Error Setting Fame");
return false;
}
return true;
}
}