Fix for multiple logging in at one time

04/09/2010 02:58 kamote#46
Quote:
Originally Posted by Paralyzer[GM] View Post
But then lets say someone was hacking your account they could get stright in I prefer it so they don't get to login 2x erm I would do lets say 1 character logged someone else trys to login BUT FROM A DIFF IP and it will alert the character that is trying to be logged saying something like "Somebody is trying to login to your account from the IP: x.xxx.xxx.xx if you do not know them please change your password before logging out, and alert the ServerCo staff otherwise the person could comprimise your account"
then add some codes for that... i would suggest u to use New Dawn algo (have some delay before the disconnection of the first client)... put your notice message somewhere in here:

Code:
                                        new Thread(new ThreadStart(
                                        delegate()
                                        {
                                           [COLOR="Red"] GC.AddSend(Packets.PopUpMessage(GC.MessageID, "This account has been loggedIn from different machine! you are advice to change you password immediately!")); [/COLOR]
                                             Thread.Sleep(200);
                                             Old.MyClient.Disconnect();
                                             Game.World.H_Chars.Remove(Old.EntityID);
                                            Thread.Sleep(200);
                                        }
                                        )).Start();
04/09/2010 03:13 -NewDawn-#47
Quote:
Originally Posted by kamote View Post
then add some codes for that... i would suggest u to use New Dawn algo... put your notice message somewhere in here:

Code:
                                        new Thread(new ThreadStart(
                                        delegate()
                                        {
                                           [COLOR="Red"] GC.AddSend(Packets.PopUpMessage(GC.MessageID, "This account has been loggedIn from different machine! you are advice to change you password immediately!")); [/COLOR]
                                             Thread.Sleep(200);
                                             Old.MyClient.Disconnect();
                                             Game.World.H_Chars.Remove(Old.EntityID);
                                            Thread.Sleep(200);
                                        }
                                        )).Start();
Don't change the thread's parameters!
Keep the Thread as is.

Plus, that pop up message won't work.
It should look like this ... which I'll implement into my code so there is no confusion.
Code:
delegate()
                                        {
                                            Thread.Sleep(200);
                                            Game.World.H_Chars.Remove(Old.EntityID);
                                            Thread.Sleep(200);
                                            GC.LocalMessage(2000, "This account has been logged in from different client! You are advised to change you password immediately!"); 

                                        }
Thanks =]
+k for the idea!
04/09/2010 08:21 -impulse-#48
Quote:
Originally Posted by -NewDawn- View Post
Code:
delegate()
                                        {
                                            GC.AddSend(Packets.PopUpMessage(GC.MessageID, "This account has been loggedIn from different machine! you are advice to change you password immediately!")); 
                                            [B][COLOR="Red"]GC.EndSend();[/COLOR][/B]
                                            Thread.Sleep(200);
                                            Game.World.H_Chars.Remove(Old.EntityID);
                                            Thread.Sleep(200);}
...now the message will be seen.
04/09/2010 08:50 -NewDawn-#49
Quote:
Originally Posted by -impulse- View Post
...now the message will be seen.
That still won't work. I'm not even sure what the pop up message command does. Can someone send me a screenshot? I think the method in use right now is correct.
04/09/2010 09:22 -impulse-#50
Quote:
Originally Posted by -NewDawn- View Post
That still won't work. I'm not even sure what the pop up message command does. Can someone send me a screenshot? I think the method in use right now is correct.
If PopUpMessage wouldn't work then you wouldn't be able to connect on your serve.
04/09/2010 23:29 .Kob#51
I can log 2 times with the same acc :S. Just login very fast the both.
Can anyone post the fix one ... -.-
04/10/2010 02:43 yes5090#52
Quote:
Originally Posted by kamote View Post
try this code.. i tested it, and it worked fine! It look similar with the first one, but i added one single code(in color blue) to fix the bug. It will disconnect the first loggedIn client and let the later one get in.

Code:
                                    if (Game.World.H_Chars.Contains(GC.MyChar.EntityID))
                                    {
                                        Game.Character Old = (Game.Character)Game.World.H_Chars[GC.MyChar.EntityID];
                                        Old.MyClient.Disconnect();
                                        [COLOR="Blue"] Game.World.H_Chars.Remove(Old.EntityID);[/COLOR]
                                        if (!Game.World.H_Chars.Contains(GC.MyChar.EntityID))
                                            Game.World.H_Chars.Add(GC.MyChar.EntityID, GC.MyChar);
                                        GC.MyChar = Database.LoadCharacter(GC.AuthInfo.Character, ref Acc);
                                        GC.MyChar.MyClient = GC;
                                        GC.AddSend(Packets.SystemMessage(GC.MessageID, "ANSWER_OK"));
                                        GC.AddSend(Packets.CharacterInfo(GC.MyChar));
                                        GC.AddSend(Packets.Status(GC.MyChar.EntityID, Game.Status.VIPLevel, GC.MyChar.VipLevel));
                                        GC.AddSend(Packets.Time());
                                        GC.AddSend(Packets.Donators(GC.MyChar));
                                        GC.AddSend(Packets.Packet1012(GC.MyChar.EntityID));
                                        GC.AddSend(Packets.Status(GC.MyChar.EntityID, Game.Status.Effect, 0));
                                    }
                                    else
                                    {
                                        [COLOR="#ff0000"]Game.World.H_Chars.Add(GC.MyChar.EntityID, GC.MyChar);[/COLOR]
                                        GC.AddSend(Packets.SystemMessage(GC.MessageID, "ANSWER_OK"));
                                        GC.AddSend(Packets.CharacterInfo(GC.MyChar));
                                        GC.AddSend(Packets.Status(GC.MyChar.EntityID, Game.Status.VIPLevel, GC.MyChar.VipLevel));
                                        GC.AddSend(Packets.Time());
                                        GC.AddSend(Packets.Donators(GC.MyChar));
                                        GC.AddSend(Packets.Packet1012(GC.MyChar.EntityID));
                                        GC.AddSend(Packets.Status(GC.MyChar.EntityID, Game.Status.Effect, 0));
                                    }
this works fine with me
but still have erorr in consul
04/10/2010 11:08 -NewDawn-#53
If you want help from me, MSN me.
I'm not posting any more releases.
#request close
04/10/2010 13:12 Korvacs#54
Quote:
Originally Posted by -NewDawn- View Post
If you want help from me, MSN me.
I'm not posting any more releases.
#request close
Its not your thread, so you cant request that it be closed.
03/18/2011 21:15 snow118#55
Lol all these codes are rubbish. Non of them work... The character laods before the npcs.
03/18/2011 21:19 nTL3fTy#56
Quote:
Originally Posted by snow118 View Post
Lol all these codes are rubbish. Non of them work... The character laods before the npcs.
That's what you get for bumping a nearly year-old thread.
03/19/2011 03:33 snow118#57
nTL3fTy when it comes to 5165.. Im far more advanced than impulse or Arco... I will even release the code they couldnt...

PHP Code:
                                    GC.MyChar.AccountName Acc;
                                    if (!
Game.World.H_Chars.Contains(GC.MyChar.EntityID))
                                    {
                                        
Game.Character Old = (Game.Character)Game.World.H_Chars[GC.MyChar.EntityID];
                                        
GC.AddSend(Packets.SystemMessage(GC.MessageID"ANSWER_OK"));
                                        
GC.AddSend(Packets.CharacterInfo(GC.MyChar));
                                        
GC.AddSend(Packets.Status(GC.MyChar.EntityIDGame.Status.VIPLevelGC.MyChar.VipLevel));
                                        
GC.AddSend(Packets.Time());
                                        
GC.AddSend(Packets.Donators(GC.MyChar));
                                        
GC.AddSend(Packets.Packet1012(GC.MyChar.EntityID));
                                        
GC.AddSend(Packets.Status(GC.MyChar.EntityIDGame.Status.Effect0));
                                    }
                                    else
                                    {
                                        
Game.Character Old = (Game.Character)Game.World.H_Chars[GC.MyChar.EntityID];
                                        
Old.MyClient.Disconnect();
                                        
GC.AddSend(Packets.SystemMessage(GC.MessageID"ANSWER_OK"));
                                        
GC.AddSend(Packets.CharacterInfo(GC.MyChar));
                                        
GC.AddSend(Packets.Status(GC.MyChar.EntityIDGame.Status.VIPLevelGC.MyChar.VipLevel));
                                        
GC.AddSend(Packets.Time());
                                        
GC.AddSend(Packets.Donators(GC.MyChar));
                                        
GC.AddSend(Packets.Packet1012(GC.MyChar.EntityID));
                                        
GC.AddSend(Packets.Status(GC.MyChar.EntityIDGame.Status.Effect0));
                                    }
                                    
Program.WriteLine(GC.MyChar.Name " has logged on.");
                                }
                                
GC.EndSend(); 

This will make the old client disconnect, stoppin rollbacks and cheats... The new client will login and will load after NPCS... so you dont have to jump on an offscreen. First time this has been released, so i hope you guys like it. Click thanks.
03/19/2011 12:12 _DreadNought_#58
Quote:
Originally Posted by snow118 View Post
nTL3fTy when it comes to 5165.. Im far more advanced than impulse or Arco... I will even release the code they couldnt...

PHP Code:
                                    GC.MyChar.AccountName Acc;
                                    if (!
Game.World.H_Chars.Contains(GC.MyChar.EntityID))
                                    {
                                        
Game.Character Old = (Game.Character)Game.World.H_Chars[GC.MyChar.EntityID];
                                        
GC.AddSend(Packets.SystemMessage(GC.MessageID"ANSWER_OK"));
                                        
GC.AddSend(Packets.CharacterInfo(GC.MyChar));
                                        
GC.AddSend(Packets.Status(GC.MyChar.EntityIDGame.Status.VIPLevelGC.MyChar.VipLevel));
                                        
GC.AddSend(Packets.Time());
                                        
GC.AddSend(Packets.Donators(GC.MyChar));
                                        
GC.AddSend(Packets.Packet1012(GC.MyChar.EntityID));
                                        
GC.AddSend(Packets.Status(GC.MyChar.EntityIDGame.Status.Effect0));
                                    }
                                    else
                                    {
                                        
Game.Character Old = (Game.Character)Game.World.H_Chars[GC.MyChar.EntityID];
                                        
Old.MyClient.Disconnect();
                                        
GC.AddSend(Packets.SystemMessage(GC.MessageID"ANSWER_OK"));
                                        
GC.AddSend(Packets.CharacterInfo(GC.MyChar));
                                        
GC.AddSend(Packets.Status(GC.MyChar.EntityIDGame.Status.VIPLevelGC.MyChar.VipLevel));
                                        
GC.AddSend(Packets.Time());
                                        
GC.AddSend(Packets.Donators(GC.MyChar));
                                        
GC.AddSend(Packets.Packet1012(GC.MyChar.EntityID));
                                        
GC.AddSend(Packets.Status(GC.MyChar.EntityIDGame.Status.Effect0));
                                    }
                                    
Program.WriteLine(GC.MyChar.Name " has logged on.");
                                }
                                
GC.EndSend(); 

This will make the old client disconnect, stoppin rollbacks and cheats... The new client will login and will load after NPCS... so you dont have to jump on an offscreen. First time this has been released, so i hope you guys like it. Click thanks.
Oh really? They could've made that with their eyes shut.

Least they dont use php tags around there code...

Now seriously, Stop being so arrogant.

--
First post for 2 months :)
03/19/2011 12:24 Syst3m_W1z4rd#59
Quote:
Originally Posted by snow118 View Post
nTL3fTy when it comes to 5165.. Im far more advanced than impulse or Arco... I will even release the code they couldnt...
You're retarted. Do you really think you're better than Impulse and Arco?
I think my shoes are falling off.

#Edit
This is how pro you are.
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

I believe you failed hard, when you said you were better.
03/19/2011 13:21 iStefan#60
He can't Make Simple NPCs, and he's FAR MORE ADVANCED LMFAO!!!!!!!!!!!!!!!!!!!!!!!!
I laughed my ass off when John Showed me what he said rofl.