Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server > Shaiya PServer Development
You last visited: Today at 14:48

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


How To Update Char Online Status When Char Is Offline

Discussion on How To Update Char Online Status When Char Is Offline within the Shaiya PServer Development forum part of the Shaiya Private Server category.

Old   #1
elite*gold: 0
Join Date: Feb 2013
Posts: 99
Received Thanks: 7
How To Update Char Online Status When Char Is Offline

Just a quick question of which SP to edit so that when a player leaves the game, that their Status=0 instead of staying at 1. Thinking that there should be a script that checks the char leavedate against the current servertime and sets the Status=1 to Status=0 instead of having to edit the db when you close for maint because someone didn't get logged out properly.
oasis1984 is offline  
Old 12/09/2013, 15:21   #2
nubness's Avatar
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,439
I don't remember how exactly the LoginStatus value is set to 1 when the char is logged in, using RebeccaBlack's script as I remember, but I assume it's usp_Read_Char_Info_R or something like that, not sure. By reading the procedure name we can understand that the character information is being read from the Chars table and sent to the ps_game.exe for using. Such a thing is needed only when a character is starting the game. Now, there's a procedure triggered for a specific char when the character logs off, which is usp_Save_Char_Info_E. In the usp_Save_Char_Info_E procedure you should add a little detail:
SET [Level] = @Level, StatPoint = @StatPoint, SkillPoint = @SkillPoint,
[Str] = @Str, dex = @Dex, Rec = @Rec, [int] = @Int, Wis = @Wis, Luc = @Luc,
HP = @Hp, Mp = @Mp, Sp = @Sp,
Map = @Map, dir = @Dir, [exp] = @Exp, [money] = @Money,
PosX = @Posx, PosY = @PosY, PosZ = @PosZ, hg = @Hg, vg = @Vg, cg = @Cg, og = @Og, ig = @Ig, 
KillLevel=@KillLevel, DeadLevel=@DeadLevel, LeaveDate=GETDATE(), [B][I][U]LoginStatus = 0[/U][/I][/B]
WHERE CharID = @CharID
The bold, italic and underlined text is what you need to add in order for the LoginStatus value to go back to 0 when the character logs off.
nubness is offline  
1 User
Old 12/10/2013, 21:23   #3
elite*gold: 0
Join Date: Feb 2013
Posts: 99
Received Thanks: 7
For others that may need this, the SP is PS_GameData.dbo.usp.Read_chars_Detail2_R.
oasis1984 is offline  

Similar Threads Similar Threads
Char Online Status
06/12/2010 - Metin2 Private Server - 31 Replies
Hallo, ich will für meine HP eine Online anzeige welche Chars grade on sind. Wie kann ich das auslesen ?
[CHAR]Richtig SKILLEN+STATUS & was für BONIS für euren CHAR braucht
05/21/2010 - Metin2 - 8 Replies
Hallo Elitepvp..! Heute zeige ich euch wie ihr euren Charackter eure skills verteilt und euren Status verteilt... Gilt auch für So ich fange mal an als erstes erstellt ihr euch einen account das ist ja pipi^^ Als nächstes wählt ihr euren account bzw. Schamane/Ninja/Krieger/Sura Dann loggt ihr euch ein und lvlt bis wie viel ihr wollt (das kann extrem lange dauern) so ich erkläre mit schritweise mal weiter... 1.Wenn ihr euren account bzw. Char habt holt ihr euch skills ich fange mal bei...
[HELP]Server Status Total acc/char players online code
02/13/2010 - CO2 Private Server - 7 Replies
HELP I need a Server Status, Total account, Total Character and Total Players Online code for 5165 using appserver NON-HAMACHI HELP!

All times are GMT +2. The time now is 14:48.

Powered by vBulletin®
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2023 elitepvpers All Rights Reserved.