[Help] /hp command

07/06/2009 06:53 raidenx123#1
Ok im really new to c# and dont know much so would anyone be willing to hlep me with an /hp command (some sources might have it but the one i got doesnt)

This is what I got and I know something is missing so im not suprised that it doesnt work:
Code:
if (Splitter[0] == "/hp")
{
         MyChar.MaxHP = MyChar.BaseMaxHP();
         MyChar.CurHP = MyChar.MaxHP;
}
07/06/2009 07:21 kinshi88#2
With Co, you have to send Packets to the Client to know whats happening.
So you have to send the status packet for the Hp.
07/06/2009 17:28 raidenx123#3
Ok now im doing an internal database packet:
Code:
if (Splitter[0] == "/hp")
{
            InternalDatabase.GetStats(MyChar);
            MyChar.MaxHP = MyChar.BaseMaxHP();
            MyChar.CurHP = MyChar.MaxHP;
}
Like i said im new to c# and I cant get "GetCurHP" for the internal DB b/c it has no definition :/
07/06/2009 17:46 AmbiguousStatement#4
Rawr AlwaysOnDicks. Where'd you go.

Anyways, you should base the command off a HP pot because it's the same concept.

Code:
                                        if (Splitter[0] == "/hp")
                                        {
                                            MyChar.MaxHP = MyChar.BaseMaxHP();
                                            MyChar.CurHP = MyChar.MaxHP;
                                            SendPacket(General.MyPackets.Vital(MyChar.UID, 0, MyChar.CurHP));
                                        }
07/06/2009 17:56 raidenx123#5
Well ill try that in a bit but my command will work but fills up half HP, and reviving uses same concept,
Code:
CurHP = MaxHP;
         Alive = true;
And i still get half HP, but when I use /job XX i get full hp ???


EDIT: Woot it works now, I fixed the revive HP too. The working command is:
Code:
if (Splitter[0] == "/hp")
{
        MyChar.CurHP = MyChar.MaxHP;
        SendPacket(General.MyPackets.Vital((long)MyChar.UID, 0, MyChar.CurHP));
}
07/06/2009 18:04 AmbiguousStatement#6
Idk, I just made this up quickleh. Here joo goo mr. aod.

Code:
                                        if (Splitter[0] == "/revive")
                                        {
                                            MyChar.CurHP = MyChar.MaxHP;
                                            MyChar.Alive = true;
                                            MyChar.MyClient.SendPacket(General.MyPackets.Status1(MyChar.UID, 0));
                                            MyChar.MyClient.SendPacket(General.MyPackets.Status3(MyChar.UID));
                                            MyChar.MyClient.SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                            MyChar.MyClient.SendPacket(General.MyPackets.CharacterInfo(MyChar));
                                            MyChar.SendEquips(false);
                                            MyChar.BlueName = false;
                                            MyChar.MyClient.SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                            MyChar.Stamina = 100;
                                            MyChar.MyClient.SendPacket(General.MyPackets.Vital(MyChar.UID, 9, MyChar.Stamina));
                                            World.UpdateSpawn(MyChar);
                                        }
07/06/2009 18:15 raidenx123#7
They already had that command + someone released it:
This is the one most have:
Code:
if (Splitter[0] == "/rev")
                                        {
                                            MyChar.CurHP = MyChar.MaxHP;
                                            MyChar.Alive = true;
                                            MyChar.MyClient.SendPacket(General.MyPackets.Status1(MyChar.UID, 0));
                                            MyChar.MyClient.SendPacket(General.MyPackets.Status3(MyChar.UID));
                                            MyChar.MyClient.SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                            MyChar.MyClient.SendPacket(General.MyPackets.CharacterInfo(MyChar));
                                            MyChar.SendEquips(false);
                                            MyChar.BlueName = false;
                                            MyChar.MyClient.SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                            MyChar.Stamina = 100;
                                            MyChar.MyClient.SendPacket(General.MyPackets.Vital(MyChar.UID, 9, MyChar.Stamina));
                                            MyChar.MyClient.SendPacket(General.MyPackets.String(MyChar.UID, 10, "born3"));
                                            World.UpdateSpawn(MyChar);
                                        }
07/06/2009 18:20 Kiyono#8
Quote:
Originally Posted by AmbiguousStatement View Post
Idk, I just made this up quickleh. Here joo goo mr. aod.

Code:
                                        if (Splitter[0] == "/revive")
                                        {
                                            MyChar.CurHP = MyChar.MaxHP;
                                            MyChar.Alive = true;
                                            MyChar.MyClient.SendPacket(General.MyPackets.Status1(MyChar.UID, 0));
                                            MyChar.MyClient.SendPacket(General.MyPackets.Status3(MyChar.UID));
                                            MyChar.MyClient.SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                            MyChar.MyClient.SendPacket(General.MyPackets.CharacterInfo(MyChar));
                                            MyChar.SendEquips(false);
                                            MyChar.BlueName = false;
                                            MyChar.MyClient.SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                            MyChar.Stamina = 100;
                                            MyChar.MyClient.SendPacket(General.MyPackets.Vital(MyChar.UID, 9, MyChar.Stamina));
                                            World.UpdateSpawn(MyChar);
                                        }
Quote:
Originally Posted by raidenx123 View Post
They already had that command + someone released it:
This is the one most have:
Code:
if (Splitter[0] == "/rev")
                                        {
                                            MyChar.CurHP = MyChar.MaxHP;
                                            MyChar.Alive = true;
                                            MyChar.MyClient.SendPacket(General.MyPackets.Status1(MyChar.UID, 0));
                                            MyChar.MyClient.SendPacket(General.MyPackets.Status3(MyChar.UID));
                                            MyChar.MyClient.SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                            MyChar.MyClient.SendPacket(General.MyPackets.CharacterInfo(MyChar));
                                            MyChar.SendEquips(false);
                                            MyChar.BlueName = false;
                                            MyChar.MyClient.SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                            MyChar.Stamina = 100;
                                            MyChar.MyClient.SendPacket(General.MyPackets.Vital(MyChar.UID, 9, MyChar.Stamina));
                                            MyChar.MyClient.SendPacket(General.MyPackets.String(MyChar.UID, 10, "born3"));
                                            World.UpdateSpawn(MyChar);
                                        }
LOTF right? if so this one is better:
Code:
if (Splitter[0] == "/revive")
{
if (!MyChar.Alive)
MyChar.Revive(false);
}
07/06/2009 19:22 raidenx123#9
By the looks does that one just revive you?

/rev Charname is the one i use

Edit: Woot just finished new quest "The Darkness"
07/06/2009 19:58 AmbiguousStatement#10
Quote:
Originally Posted by raidenx123 View Post
By the looks does that one just revive you?

/rev Charname is the one i use

Edit: Woot just finished new quest "The Darkness"
w00t, just stoled your client makingzorsz with the ak.
07/06/2009 22:38 raidenx123#11
Lolz ur dumb, i said the AK was photoshopped b/c i was waiting for the thread to appear :)

And i never released my client with all the edits.
07/06/2009 23:19 AmbiguousStatement#12
Quote:
Originally Posted by raidenx123 View Post
Lolz ur dumb, i said the AK was photoshopped b/c i was waiting for the thread to appear :)

And i never released my client with all the edits.
Yesh yu deeeed fagpahgabag.

Yu gib me yestermorraw. Dnt yu think that FRIED BONER have gotten it and ditrubate it.
07/07/2009 00:33 raidenx123#13
:P i havent even made it a .rar yet and even if you somehow got it then its useless, it has no armors or headgear LOL
07/07/2009 00:37 AmbiguousStatement#14
Gtfo. I HACKED YOUR COMPUTER WITH GOOGLE AND WEED.
07/07/2009 05:35 PeTe Ninja#15
your revive command fails


here is saints...

Code:
                                        if (Splitter[0] == "/revive")
                                        {
                                            if (Splitter.Length == 1)
                                                MyChar.Revive(false);
                                            else
                                            {
                                                string Name = Splitter[1];
                                                foreach (DictionaryEntry DE in World.AllChars)
                                                {
                                                    Character Revived = (Character)DE.Value;
                                                    if (Revived.Name == Name) Revived.Revive(false);
                                                }
                                            }
                                        }
here is the hp command.
Code:
                                        if (Splitter[1] == "/hp")
                                        {
                                            MyChar.CurHP = MyChar.MaxHP;
                                            SendPacket(General.MyPackets.Vital((long)MyChar.UID, 0, MyChar.CurHP));
                                        }