GodMode 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;
}
}
Star Command
internal class StarCommand : Command
{
public StarCommand()
: base("star", 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!");
}
}
catch
{
player.SendError("Error!");
}
return true;
}
}