Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server
You last visited: Today at 00:14

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

Advertisement



Quit Current Guild Script

Discussion on Quit Current Guild Script within the Shaiya Private Server forum part of the Shaiya category.

Reply
 
Old   #1
 
[GM]Precious's Avatar
 
elite*gold: 0
Join Date: Jan 2015
Posts: 65
Received Thanks: 7
Quit Current Guild Script

Hi guys,

Anyone can point me where to quit the current guild of the account using Script?

I formulated a procedure it will update it as Del from the guild but when I login still the guild not removed.

here is my simple procedure.

BEGIN
--update del = 1 and set leave date
UPDATE PS_GameData.dbo.GuildChars SET Del = 1, LeaveDate = GETDATE()
WHERE CharID IN (SELECT CharID FROM PS_GameData.dbo.Chars WHERE UserID=@UserID)
AND LeaveDate IS NULL
--update total guild members
UPDATE PS_GameData.dbo.Guilds SET TotalCount=TotalCount-1
WHERE GuildID IN (Select GuildID From PS_GameData.dbo.GuildChars where CharID IN (SELECT CharID FROM PS_GameData.dbo.Chars WHERE UserID=@UserID))
END
[GM]Precious is offline  
Old 07/24/2015, 18:42   #2
 
elite*gold: 260
Join Date: Sep 2011
Posts: 487
Received Thanks: 360
Code:
UPDATE PS_GameData.dbo.GuildChars SET Del = 1, JoinDate=2014-05-03 19:25:23.500
where CharID IN (SELECT CharID FROM PS_GameData.dbo.Chars WHERE UserID=@UserID) and LeaveDate is not null
SnickQ is offline  
Old 07/24/2015, 19:22   #3
 
[GM]Precious's Avatar
 
elite*gold: 0
Join Date: Jan 2015
Posts: 65
Received Thanks: 7
Thank you for pointing in LeaveDate is not null, but it should be LeaveDate IS NULL

Anyway it doesnt fix quit the guild when I login the character. But in database it is already deleted in GuildChars as Del = 1




This is for SnickQ.

If I use LeaveDate IS NOT NULL as what you pointed out. All the previous quitted guild LeaveDate will be updated as well.

So I use LeaveDate IS NULL so that It will update only the current date that Del = 1 was set.

RowID GuildID CharID GuildLevel Del JoinDate LeaveDate
2208 4 5697 9 1 2014-11-24 19:45:43.883 2015-07-25 01:17:00.850
27782 28 5697 9 1 2014-12-15 03:59:14.730 2015-07-25 01:17:00.850
31866 5 5697 9 1 2014-12-18 20:25:41.257 2015-07-25 01:17:00.850
44814 35 5697 6 1 2014-12-27 16:17:37.723 2015-07-25 01:17:00.850
101051 124 5697 7 0 2015-01-29 21:37:39.643 NULL
[GM]Precious is offline  
Old 07/24/2015, 19:41   #4
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,456
Everything guild related is executed and stored in the ps_game memory, then saved in the database, therefore this SQL query requires a restart in order to be effective.
nubness is offline  
Old 07/24/2015, 19:44   #5
 
elite*gold: 260
Join Date: Sep 2011
Posts: 487
Received Thanks: 360
That should work after log out, because to update database you need relog
And thad should be IS NOT NULL because if will be null player in db is not leave guild
SnickQ is offline  
Old 07/24/2015, 20:05   #6
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,456
Quote:
Originally Posted by SnickQ View Post
That should work after log out, because to update database you need relog
It won't work. The server memory reads that information from the database only when the server starts, and after that it only updates the database, but never reads again.
nubness is offline  
Old 07/24/2015, 20:22   #7
 
[GM]Precious's Avatar
 
elite*gold: 0
Join Date: Jan 2015
Posts: 65
Received Thanks: 7
Thank you Nubness.

When you say everything guild related, Does it mean we cannot create an sql script to kick a character from the guild?


Is there a storedprocedure we can exec and send an ActoinType 179 to Quit/Leave from Guild?
[GM]Precious is offline  
Old 07/24/2015, 22:36   #8
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,456
Quote:
Originally Posted by [GM]Precious View Post
Thank you Nubness.

When you say everything guild related, Does it mean we cannot create an sql script to kick a character from the guild?


Is there a storedprocedure we can exec and send an ActoinType 179 to Quit/Leave from Guild?
That's right, such things cannot be handled from the database, unless you're restarting the server after the changes. You can do these things only directly by injecting the ps_game.exe.
nubness is offline  
Thanks
1 User
Old 07/24/2015, 23:10   #9
 
[GM]Precious's Avatar
 
elite*gold: 0
Join Date: Jan 2015
Posts: 65
Received Thanks: 7
Again thank you.
I need to do a lot of search and will be learning on how manipulate/write/injecting the ps_game.exe

Quote:
Originally Posted by SnickQ View Post
That should work after log out, because to update database you need relog
And thad should be IS NOT NULL because if will be null player in db is not leave guild
If I use LeaveDate IS NOT NULL as what you pointed out. All the previous quitted guild LeaveDate will be updated as well.

So I use LeaveDate IS NULL so that It will update only the current date that Del = 1 was set.

RowID GuildID CharID GuildLevel Del JoinDate LeaveDate
2208 4 5697 9 1 2014-11-24 19:45:43.883 2015-07-25 01:17:00.850
27782 28 5697 9 1 2014-12-15 03:59:14.730 2015-07-25 01:17:00.850
31866 5 5697 9 1 2014-12-18 20:25:41.257 2015-07-25 01:17:00.850
44814 35 5697 6 1 2014-12-27 16:17:37.723 2015-07-25 01:17:00.850
101051 124 5697 7 0 2015-01-29 21:37:39.643 NULL
[GM]Precious is offline  
Reply


Similar Threads Similar Threads
[Required] Script Guild
03/04/2012 - Rappelz Private Server - 8 Replies
Hello , i want Script Guild For New Source Can Any One Give us It?
[S]Top Guild Script ?
10/31/2011 - Metin2 Private Server - 0 Replies
How Add Top Guild To Web Site ? Give Me Script
Can't Quit the guild !
02/27/2011 - Grand Chase Philippines - 9 Replies
For some reason, i can't quit my guild . everytime i click " Leave Guild " it will only close the list of members.. but im still in the guild. Sooo need your help guys >_<
I Quit this Forum And I Quit My Server. [Flaming on emme and tao ;)]
10/19/2008 - CO2 Private Server - 36 Replies
Hey bitches (emme, tao) wtf did you guys wanted? that i quited this forum? you guys are destroying this forum! the only thing that you guys can do is flaming on all server that are new! but where are the servers from you guys? i dont see a server that is made by emme or tao. the only thing that i wanted is a server, that was the only fucking thing that i wanted!:mad::D btw a forum is to help ppl and to talk about games i think, when did you guys helped people or talked nice about games...



All times are GMT +1. The time now is 00:14.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.