Register for your free account! | Forgot your password?

You last visited: Today at 03:07

  • Please register to post and access all features, it's quick, easy and FREE!


Fix for multiple logging in at one time

Reply
 
Old 04/07/2010, 09:10   #31
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,740
Received Thanks: 5,268
Quote:
Originally Posted by -impulse- View Post
Meh' you gotta add World.Spawns(GC.MyChar, false) somewhere and it will work just fine.
Tried that, didn't work.



Arcо is offline  
Old 04/07/2010, 11:38   #32
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
I see where you're getting at Impulse but that's not the problem. I've been busy coding the beginner's quest on my server (which is really complicated actually lol), but when I wake up tomorrow I'll take a deep look at this. It must be something we're deleting. Afk. Night all- good luck!


-NewDawn- is offline  
Old 04/07/2010, 15:09   #33
 
elite*gold: 0
Join Date: May 2006
Posts: 127
Received Thanks: 90
try this one ...
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(true);
                                        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
                                    {
                                        Game.World.H_Chars.Add(GC.MyChar.EntityID, GC.MyChar);
						    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));
                                    }
kamote is offline  
Old 04/07/2010, 15:26   #34
 
elite*gold: 0
Join Date: Oct 2009
Posts: 762
Received Thanks: 539
PHP Code:
if (Game.World.H_Chars.ContainsKey(GC.MyChar.EntityID))
                                {
                                    
Game.Character Old = (Game.Character)Game.World.H_Chars[GC.MyChar.EntityID];
                                    
Old.MyClient.Disconnect();
                                    if (
Game.World.H_Chars.ContainsKey(GC.MyChar.EntityID))
                                        
Game.World.H_Chars.Remove(GC.MyChar.EntityID);

                                    
GC.MyChar Database.LoadCharacter(GC.AuthInfo.Characterref Acc);
                                    
GC.MyChar.MyClient GC;
                                    
Game.World.H_Chars.Add(GC.MyChar.EntityIDGC.MyChar);
                                    
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.World.H_Chars.Add(GC.MyChar.EntityIDGC.MyChar);
                                    
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));
                                } 
Okay, made some tests and this is the perfect script. Works nice.

Quote:
Originally Posted by kamote View Post
try this one ...
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(true);
                                        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
                                    {
                                        Game.World.H_Chars.Add(GC.MyChar.EntityID, GC.MyChar);
						    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));
                                    }
Lol?
Copy machine.

Ah my bad actually no, you are not a copy machine... You was close...though.
Using your code you can't be seen by others.


-impulse- is offline  
Old 04/07/2010, 19:44   #35
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
Both of you are wrong.
You still get the same error.
Hold on, I'll look into it too.

#EDIT: There's a problem with the original code, but not as you described it.

The Problem:

The server sees that once the 2nd client tries to connect that both the 1st and 2nd Client disconnect; however, the 2nd Client is still logged on. As a result, the server starts not saving the character. That's the error that we're facing.



The first login is normal- the 1st Client.
The disconnect is normal- the 1st Client Disconnecting for the 2nd Client.
The 2nd Login is normal - the 2nd Client Logging in.
The 2nd disconnect is the problem.

Get it? =\
-NewDawn- is offline  
Old 04/07/2010, 23:08   #36
 
elite*gold: 0
Join Date: Oct 2009
Posts: 762
Received Thanks: 539
Quote:
Originally Posted by -NewDawn- View Post
Both of you are wrong.
You still get the same error.
Hold on, I'll look into it too.

#EDIT: There's a problem with the original code, but not as you described it.

The Problem:

The server sees that once the 2nd client tries to connect that both the 1st and 2nd Client disconnect; however, the 2nd Client is still logged on. As a result, the server starts not saving the character. That's the error that we're facing.



The first login is normal- the 1st Client.
The disconnect is normal- the 1st Client Disconnecting for the 2nd Client.
The 2nd Login is normal - the 2nd Client Logging in.
The 2nd disconnect is the problem.

Get it? =\
LOL. It works perfectly fine for me because I have switched to MySQL.
-impulse- is offline  
Old 04/07/2010, 23:19   #37
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 490
Quote:
Originally Posted by -impulse- View Post
LOL. It works perfectly fine for me because I have switched to MySQL.
OMFG GIVE ME UR PRETTY COLORS
PeTe Ninja is offline  
Old 04/07/2010, 23:56   #38
 
elite*gold: 0
Join Date: Oct 2009
Posts: 762
Received Thanks: 539
Quote:
Originally Posted by PeTe Ninja View Post
OMFG GIVE ME UR PRETTY COLORS
LOL?
-impulse- is offline  
Old 04/08/2010, 00:20   #39
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
I agree with impulse. rofl
my what?? o.O
-NewDawn- is offline  
Old 04/08/2010, 03:31   #40
 
elite*gold: 0
Join Date: May 2006
Posts: 127
Received Thanks: 90
Quote:
Originally Posted by -impulse- View Post
PHP Code:
if (Game.World.H_Chars.ContainsKey(GC.MyChar.EntityID))
                                {
                                    
Game.Character Old = (Game.Character)Game.World.H_Chars[GC.MyChar.EntityID];
                                    
Old.MyClient.Disconnect();
                                    if (
Game.World.H_Chars.ContainsKey(GC.MyChar.EntityID))
                                        
Game.World.H_Chars.Remove(GC.MyChar.EntityID);

                                    
GC.MyChar Database.LoadCharacter(GC.AuthInfo.Characterref Acc);
                                    
GC.MyChar.MyClient GC;
                                    
Game.World.H_Chars.Add(GC.MyChar.EntityIDGC.MyChar);
                                    
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.World.H_Chars.Add(GC.MyChar.EntityIDGC.MyChar);
                                    
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));
                                } 
Okay, made some tests and this is the perfect script. Works nice.



Lol?
Copy machine.

Ah my bad actually no, you are not a copy machine... You was close...though.
Using your code you can't be seen by others.
FYI, that was not my code... it came from the original one.. i only added some code which i believe are missing. I haven't tried it... if it wont work...then dont use it! SimplE!
kamote is offline  
Old 04/08/2010, 03:54   #41
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
Quote:
Originally Posted by kamote View Post
FYI, that was not my code... it came from the original one.. i only added some code which i believe are missing. I haven't tried it... if it wont work...then dont use it! SimplE!
There's no need to get emotional about it.
You tried at least.
-NewDawn- is offline  
Old 04/08/2010, 12:35   #42
 
elite*gold: 0
Join Date: May 2006
Posts: 127
Received Thanks: 90
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));
                                    }
kamote is offline  
Thanks
1 User
Old 04/08/2010, 13:00   #43
 
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
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.***.***.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"
Paralyzer[GM] is offline  
Old 04/08/2010, 19:37   #44
 
elite*gold: 0
Join Date: May 2006
Posts: 297
Received Thanks: 58
Ore u can just pop up the message to say:

U are Already logged in

--------------------------

I saw this many codes at the thead, wich 1 does fix the CP/item problem(trade, Dc, and still have items?(problem).)

pintser is offline  
Old 04/08/2010, 21:50   #45
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86


I figured it out.
Works over and over again.
As it shows in the picture, I logged in over the 1st client with the 2nd Client... then logged in AGAIN over the 2nd client with the 1st client. It works 100% of the time, over and over again.
All mobs and NPCs spawn correctly too!
The character saves correctly on transfer.

You're welcome. Lol
Don't forget to hit !

Here's the solution:
#Removed: Response to the community and how it thinks I don't help.


-NewDawn- is offline  
Thanks
3 Users
Reply



« Special 5165 LVL Source For Elitepvpers | [ConquerServer_v2_Auth] to work with latest Patch »

Similar Threads
Can run bot on multiple client at same time?
03/15/2010 - GW Bot Discussions / Questions - 2 Replies
Hi, sorry if this question is basic but I am a noob with computers. I have GW Multi Launch and have several accounts that I can bot on, but for some reason the bot and/or the injector only works for 1 client at a time. Is there any way to bot on 2...
Sibibot first time logging
05/24/2009 - SRO PServer Ask the Experts - 0 Replies
Hello!Can somebody explain me why i need to log to sjsro from the first time so that sibibot can hunt alone?I would be gratefull if somebody could tell me some ideas to fix this little annoying "bug" ... Thx in advance ! Your buddy, rockangel
Buy multiple db packs as first time buyer(Paypal only)
04/04/2008 - CO2 Guides & Templates - 8 Replies
If your in a hurry to buy multiple db packs but dont want to wait 3 days to buy again then this will help you. You will need 2 or more email accounts to do this and a paypal. Buy your dbs like normal then it should be emailed to you. Go to your...



All times are GMT +2. The time now is 03:07.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.