@revive command

02/07/2009 01:22 PeTe Ninja#1
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 )

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);
                                                    }
                                                }
                                            }
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?
02/07/2009 01:31 TasteofChaos#2
I can help you but i need a favor in return.. xD do you have teamview?
add me on msn: [Only registered and activated users can see links. Click Here To Register...]
02/07/2009 01:42 PeTe Ninja#3
lol its not like i deadly need it... just post here and ask for a favor, i help anyone.. everyone knows that
02/07/2009 01:45 Hoven#4
PeTe sign on msn :D

u been posting here all day n i wanted 2 talk 2 ya haha
02/07/2009 01:46 TasteofChaos#5
Quote:
Originally Posted by PeTe Ninja View Post
lol its not like i deadly need it... just post here and ask for a favor, i help anyone.. everyone knows that
I don't usually use a LOTF source, but I'm working on something atm and don't wanna screw up my main source, but I'm having a problem to start debugging.. (not giving me the option) I just thought you might know more about this than I do. Thanks.

[Only registered and activated users can see links. Click Here To Register...]
02/07/2009 02:02 tao4229#6
The character class has a revive(bool) already coded for you.
MyChar.Revive(false);//false means no rev point, true will teleport you.
02/07/2009 02:04 damianpesta#7
Quote:
Originally Posted by tao4229 View Post
The character class has a revive(bool) already coded for you.
MyChar.Revive(false);//false means no rev point, true will teleport you.
True its easier way, but It teleports you to Nearest Rev point.This one is not bad tho... But you always can have 2 of em? rite? I c no prob in that =o
02/07/2009 02:28 tao4229#8
Quote:
Originally Posted by damianpesta View Post
True its easier way, but It teleports you to Nearest Rev point.This one is not bad tho... But you always can have 2 of em? rite? I c no prob in that =o
Read what I said.

If you pass the first(and only) parameter as false, it won't teleport you to the nearest rev point, if you specify it as true, it will.
Look at the pray code(pray as in the water tao revive skill, not luckytime).
02/07/2009 02:28 damianpesta#9
Quote:
Originally Posted by tao4229 View Post
Read what I said.

If you pass the first(and only) parameter as false, it won't teleport you to the nearest rev point, if you specify it as true, it will.
Look at the pray code(pray as in the water tao revive skill, not luckytime).
#true , ur rite :P
02/07/2009 02:41 Exia13#10
Quote:
Originally Posted by TasteofChaos View Post
I can help you but i need a favor in return.. xD do you have teamview?
add me on msn: [Only registered and activated users can see links. Click Here To Register...]
Just letting you know. Nobody really knows who you are. You just made your account last month. Don't go asking people if they have team viewer. Im not flaming you, but seriously, no one's gonna trust you so easily.
02/07/2009 02:54 tao4229#11
Code:
[color=black]
[color=blue]if [/color](Splitter[0] == [color=darkred]"@revive"[/color])
{
    [color=blue]if[/color] (Splitter.Length == 1)
        MyChar.Revive([color=blue]false[/color]);
    [color=blue]else[/color]
    {
         [color=blue]string[/color] Name = Splitter[1];
         [color=blue]foreach[/color] ([Color=mediumturquoise]DictionaryEntry[/color] DE [color=blue]in[/color] [color=mediumturquoise]World[/color].AllChars)
         {
             [Color=MediumTurquoise]Character[/color] Revived = ([Color=MediumTurquoise]Character[/color])DE.Value;
            [color=blue] if [/color](Revived.Name == Name) Revived.Revive([color=blue]false[/color]);
         }
    }
}
[/color]
02/07/2009 03:36 TasteofChaos#12
this is my second account exia.. i was originally "stiggydude" since jan 2006 =P
02/07/2009 14:00 Beta Limit#13
Quote:
Originally Posted by Exia13 View Post
Just letting you know. Nobody really knows who you are. You just made your account last month. Don't go asking people if they have team viewer. Im not flaming you, but seriously, no one's gonna trust you so easily.
I know who he is thanks very much and he is trust worthy.