[Guide] Stamina Bug fix

09/24/2008 03:07 stephanyd#1
Hi.. here is a guide to help u fix stamina bug

Open Character.cs and find
Quote:
public void Revive(bool Tele)
Inside that code, you'll see
Quote:
Teleport(revp[1], revp[2], revp[3]);
Above that add
Quote:
Stamina = 100;
A few lines down and you'll see
Quote:
World.UpdateSpawn(this);
Above that add
Quote:
Stamina = 100;
MyClient.SendPacket(General.MyPackets.Vital(UID, 9, Stamina));
Now open up 'Client.cs' and find
Quote:
case 94:
Under
Quote:
MyChar.Revive(true);
Add
Quote:
MyChar.Stamina = 100;
You now have the stamina bug fixed ;) Just Thanks for my contribution!
09/24/2008 04:43 vietkidd510#2
lovely thanks
09/24/2008 06:11 reborn666#3
thx so much :p
09/24/2008 09:52 Rechocto#4
why would you want full stamina on revive?

ctrl+f for "xpcircle +=" until you get to the function where it actually adds to xpcircle (should be called ADDXPC), there, add
if (Stamina < 100) Stamina += 3;
if (Stamina > 100) Stamina == 100;

then follow up with:
MyClient.SendPacket(General.MyPackets.Vital(UID, 9, Stamina));
09/24/2008 09:59 ~Yuki~#5
If your server laggs it would have no effect :P
01/24/2009 16:06 stratos93#6
can u upload these files coz it didnt work for me
01/31/2009 03:38 Rofa300#7
idk , i think i did everything right, but it didnt work , So look at what i did and c if there is some thing wrong

Code:
 public void Revive(bool Tele)
        {
            if (Alive)
                return;

            if (Tele)
            {
                foreach (ushort[] revp in DataBase.RevPoints)
                {
                    if (revp[0] == LocMap)
                    {
                        Stamina = 100; 
                        Teleport(revp[1], revp[2], revp[3]);
                        break;
                    }
                }
            }
and . . . .
Code:
 }

            CurHP = MaxHP;
            Alive = true;

            MyClient.SendPacket(General.MyPackets.Status1(UID, 0));
            MyClient.SendPacket(General.MyPackets.Status3(UID));
            MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));

            MyClient.SendPacket(General.MyPackets.CharacterInfo(this));
            SendEquips(false);
            BlueName = false;

            MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
            Stamina = 100;
            MyClient.SendPacket(General.MyPackets.Vital(UID, 9, Stamina)); 
            World.UpdateSpawn(this);
            DeathSent = false;

        }
and . . . .

Code:
case 94:
                                    {
                                        MyChar.Revive(true);
                                        MyChar.Stamina = 100; 
                                        break;
                                    }
am w8ing the answer
04/20/2009 01:41 auraboreal#8
PERFECT!!! WORKED
07/10/2009 07:01 Jay1029#9
Fucking useless release...K first of all RETARD the very first thing you said doesn't even work...YOU CAN'T FIND public void Revive(bool Tele) because it doesn't exist you dumb shit
07/10/2009 07:04 Pete1990#10
Quote:
Originally Posted by Jay1029 View Post
Fucking useless release...K first of all RETARD the very first thing you said doesn't even work...YOU CAN'T FIND public void Revive(bool Tele) because it doesn't exist you dumb shit
Reported?
07/10/2009 07:14 n0mansland#11
Quote:
Originally Posted by Pete1990 View Post
Reported?
Yes,

Please do not flame.. This is for LOTF and is a very old post.. Actually it does work.. I used it back then..
07/18/2009 05:13 Jay1029#12
Well...When i search the first thing she wants us to find It doesn't come up...looked everywhere lol, even tried few other sources to prove myself right.
07/18/2009 05:14 raidenx123#13
You looking in right .cs file?
07/18/2009 05:23 Jay1029#14
Respect! Got this done. I was more noob before resulting in my failure to add this code. But i did it :o meaning? I R l3ss n00p!

//edit: Last time I was searching there was always a space after the line I was looking for. There was this time too but I noticed. That's why it wasn't showing up before.
07/20/2009 17:20 kratod#15
+k thx alot