[Release] Revive Command

08/01/2010 22:31 Zkiller110#1
This is a perfect revive command to my knowledge I've tested it multiple times in my server and had no problems. I'm currently working on remaking all commands and releasing them sometime in the near future. This is for a 5165 source. Hope you guys like it :D

Command:
/revive
/revive (players name)

Code:
                        #region Revive

                        if (Cmd[0] == "/Revive" || Cmd[0] == "/revive")
                        {
                            if (Cmd.Length == 1)
                            {
                                if (!GC.MyChar.Alive)
                                {
                                    GC.MyChar.Ghost = false;
                                    GC.MyChar.BlueName = false;
                                    GC.MyChar.CurHP = (ushort)GC.MyChar.MaxHP;
                                    GC.MyChar.Alive = true;
                                    GC.MyChar.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.Dead);
                                    GC.MyChar.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.BlueName);
                                    GC.MyChar.Body = GC.MyChar.Body;
                                    GC.MyChar.Hair = GC.MyChar.Hair;
                                    GC.MyChar.Equips.Send(GC, false);
                                }
                                else
                                    GC.LocalMessage(2000, "Your not dead.");
                            }
                            Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                            if (C != null)
                            {
                                if (!C.Alive)
                                {
                                    C.Ghost = false;
                                    C.BlueName = false;
                                    C.CurHP = (ushort)GC.MyChar.MaxHP;
                                    C.Alive = true;
                                    C.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.Dead);
                                    C.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.BlueName);
                                    C.Body = GC.MyChar.Body;
                                    C.Hair = GC.MyChar.Hair;
                                    C.Equips.Send(GC, false);
                                    C.MyClient.LocalMessage(2000, GC.MyChar.Name + GC.AuthInfo.Status + " has revived you.");
                                }
                                else
                                    GC.LocalMessage(2000, C.Name + C.MyClient.AuthInfo.Status + " is not dead.");
                            }
                        }

                        #endregion
08/02/2010 09:49 Escapex#2
not bad <: are they for players and staff? o-o
or it for staff? or it for players?

well.. it good if u can make the command exist for staff. so when

e.g: ABC[PM] Has Been Killed By SoSo[GM] then ABC[PM]
will do /revive then u dont gotta wait for 20secs (for staff)
08/02/2010 15:53 Zkiller110#3
Quote:
Originally Posted by Escapex View Post
not bad <: are they for players and staff? o-o
or it for staff? or it for players?

well.. it good if u can make the command exist for staff. so when

e.g: ABC[PM] Has Been Killed By SoSo[GM] then ABC[PM]
will do /revive then u dont gotta wait for 20secs (for staff)
:p it if for GMs and PMs and they can intently revive anyone
you can make it work for all players if you want