logout revive

10/08/2008 22:30 yourworstnightmare#1
ok if u have the lotf source or many others for that matter wen u log out while dead and log back in you have 0 health and still in the same place how do you make it so it revs wen u disconnect or you client is dropped

Code:
public void GameDisconnectionHandler(object Sender, HybridSocket Socket, string Debug)
        {
            try
            {
                Client Cli = (Client)Socket.Wrapper;
                if (Cli != null && Cli.Online)
                    Cli.Drop();
                }
            catch (Exception Exc) { WriteLine(Exc.ToString()); }
        }
im thinkin it has somethin to do with this line of code...
10/08/2008 22:44 tanelipe#2
Just check at login whether their HP is 0 or not, if it is 0 then revive the player. (However you do it in that source.)
10/09/2008 01:20 kinshi88#3
Yeah, if (!Alive)
Then do the revive stuff.
10/09/2008 01:47 yourworstnightmare#4
Quote:
Originally Posted by tanelipe View Post
Just check at login whether their HP is 0 or not, if it is 0 then revive the player. (However you do it in that source.)
wen wen i put it to like



Code:
   if (MyChar.CurHP == 0)
                        {
                            MyChar.Revive(false);
                            }
it just revives them like the revive skill and doesnt send to nearest rev point how do i make it revive like when you press the button
10/09/2008 04:37 tao4229#5
MyChar.Revive(true);

That sends them to the revpoint on the map(if there is one in the database class).
10/09/2008 17:07 felipeboladao#6
is mychar.alive not revive *_*
10/10/2008 00:20 yourworstnightmare#7
Quote:
Originally Posted by felipeboladao View Post
is mychar.alive not revive *_*
lol i already figured it out b 4 i looked at ur post but yes this is how it goes

Code:
 if (MyChar.CurHP == 0)
                                    {
                                        MyChar.Alive = false;
                                    }
10/10/2008 00:32 scottdavey#8
Quote:
Originally Posted by yourworstnightmare View Post
lol i already figured it out b 4 i looked at ur post but yes this is how it goes

Code:
 if (MyChar.CurHP == 0)
                                    {
                                        MyChar.Alive = false;
                                    }
Your telling the script to not respawn the player if the persons hp is zero.

Change it to true.
10/10/2008 20:00 kinshi88#9
Can put this in public void Drop()

Code:
                    if (!MyChar.Alive)
                    {
                        MyChar.Revive(true);
                    }
And this in public static void DoStuff()

Code:
                foreach (DictionaryEntry DE in World.AllChars)
                {
                    Character Char = (Character)DE.Value;
                    DataBase.ChangeOnlineStatus(Char.MyClient.Account, 0);
                    //Logout Rev
                    if (!Char.Alive)
                    {
                        Char.Revive(true);
                    }
                }
10/11/2008 05:21 taguro#10
Quote:
Originally Posted by kinshi88 View Post
Can put this in public void Drop()

Code:
                    if (!MyChar.Alive)
                    {
                        MyChar.Revive(true);
                    }
And this in public static void DoStuff()

Code:
                foreach (DictionaryEntry DE in World.AllChars)
                {
                    Character Char = (Character)DE.Value;
                    DataBase.ChangeOnlineStatus(Char.MyClient.Account, 0);
                    //Logout Rev
                    if (!Char.Alive)
                    {
                        Char.Revive(true);
                    }
                }
Lol, once again, Kinshi to the rescue!
10/11/2008 06:47 kinshi88#11
Quote:
Originally Posted by taguro View Post
Lol, once again, Kinshi to the rescue!
lol, I just did that in 3 secs, hope it works for him =P