Usage_1 :: /tosseff <playername> <Effectname or Effectnumber>
Usage_2 :: /remtosseff <playername> <Effectname or Effectnumber>
Example_1 :: /tosseff TheFirstSin Bleed
This will make me bleed forever...
Example_2 :: /remtosseff TheFirstSin Bleed
This will stop the bleeding effect...
CODE
Code:
internal class TossEffCommand : Command { public TossEffCommand() : base("tosseff", 1) { } protected override bool Process(Player player, RealmTime time, string[] args) { if (args.Length != 2) { player.SendHelp("Usage: /tosseff <PlayerName> <Effectname or Effectnumber>"); return false; } try { foreach (KeyValuePair<string, Client> i in player.Manager.Clients.Where(i => i.Value.Player.Name.EqualsIgnoreCase(args[0]))) { i.Value.Player.ApplyConditionEffect(new ConditionEffect { Effect = (ConditionEffectIndex) Enum.Parse(typeof (ConditionEffectIndex), args[1].Trim(), true), DurationMS = -1 }); player.SendInfo("Success!"); } } catch { player.SendError("Invalid effect or player name! "); return false; } return true; } }
CODE2
Code:
internal class RemoveTossEffCommand : Command { public RemoveTossEffCommand() : base("remtosseff", 1) { } protected override bool Process(Player player, RealmTime time, string[] args) { if (args.Length != 2) { player.SendHelp("Usage: /tosseff <PlayerName> <Effectname or Effectnumber>"); return false; } try { foreach (KeyValuePair<string, Client> i in player.Manager.Clients.Where(i => i.Value.Player.Name.EqualsIgnoreCase(args[0]))) { i.Value.Player.ApplyConditionEffect(new ConditionEffect { Effect = (ConditionEffectIndex) Enum.Parse(typeof (ConditionEffectIndex), args[1].Trim(), true), DurationMS = 0 }); player.SendInfo("Success!"); } } catch { player.SendError("Invalid effect or player name! "); return false; } return true; } }
Any Questions or Concerns PM me @</The First Sin/>
- - - Updated - - -
@Joe @Luis close it, anyone wanting to speak with me just pm.