hi im pete,
this is not a release just a question , and i dont even know if this code works never tested ( ye its for LOTF , if you have a problem dont post xD )
any simplier way to write this?
what im trying to do here is check if im dead and if i am dead it will revive me, but if i want to revive someoen else < such as @revive hairybob , it will revive them.. any help?
this is not a release just a question , and i dont even know if this code works never tested ( ye its for LOTF , if you have a problem dont post xD )
Code:
if (Splitter[0] == "@revive")
{
foreach (DictionaryEntry DE in World.AllChars)
{
if (MyChar.Alive = false)
Char.CurHP = Char.MaxHP;
Char.Alive = true;
Char.MyClient.SendPacket(General.MyPackets.Status1(Char.UID, 0));
Char.MyClient.SendPacket(General.MyPackets.Status3(Char.UID));
Char.MyClient.SendPacket(General.MyPackets.Vital(Char.UID, 26, Char.GetStat()));
Char.MyClient.SendPacket(General.MyPackets.CharacterInfo(Char));
Char.SendEquips(false);
Char.BlueName = false;
Char.MyClient.SendPacket(General.MyPackets.Vital(Char.UID, 26, Char.GetStat()));
Char.Stamina = 100;
Char.MyClient.SendPacket(General.MyPackets.Vital(Char.UID, 9, Char.Stamina));
World.UpdateSpawn(Char);
Character Char = (Character)DE.Value;
if (Splitter[1] == Char.Name)
{
Char.CurHP = Char.MaxHP;
Char.Alive = true;
Char.MyClient.SendPacket(General.MyPackets.Status1(Char.UID, 0));
Char.MyClient.SendPacket(General.MyPackets.Status3(Char.UID));
Char.MyClient.SendPacket(General.MyPackets.Vital(Char.UID, 26, Char.GetStat()));
Char.MyClient.SendPacket(General.MyPackets.CharacterInfo(Char));
Char.SendEquips(false);
Char.BlueName = false;
Char.MyClient.SendPacket(General.MyPackets.Vital(Char.UID, 26, Char.GetStat()));
Char.Stamina = 100;
Char.MyClient.SendPacket(General.MyPackets.Vital(Char.UID, 9, Char.Stamina));
World.UpdateSpawn(Char);
}
}
}
what im trying to do here is check if im dead and if i am dead it will revive me, but if i want to revive someoen else < such as @revive hairybob , it will revive them.. any help?