Visitante
Ingresar
Registrarse
Bienvenido(a),
Visitante
. Por favor,
ingresa
o
regístrate
.
1 Hora
1 Día
1 Semana
1 Mes
Siempre
Ingresar con nombre de usuario, contraseña y duración de la sesión
Menu
Inicio
Ayuda
Ingresar
Registrarse
Creando Mu Online
/
MuOnline
/
Modulos & Scripts
/
Scripts / querys
/
SCRIPTS
How to remove inactive guilds
Imprimir
Páginas: [
1
]
Autor
Tema: How to remove inactive guilds (Leído 1235 veces)
Febrero 06, 2025, 02:48:50 pm
Louis
1267
178
25981
Louis Emulator
+55 15 997401274
louisemulator
How to remove inactive guilds
For those who have had a server for a long time, it is a good idea to clean up the guilds from time to time, so I made a query for you to check how long a guild GM has not logged in.
Remember to do this with the server OFFLINE, with the dataserver closed and make a backup first.
This selects all the guilds whose GM has not logged in for more than 365 days (you can change the time):
SELECT G_Name,MEMB_STAT.ConnectTM from Guild INNER JOIN Character on Guild.G_Master = Character.Name INNER JOIN MEMB_STAT on Character.AccountID = MEMB_STAT.memb___id where MEMB_STAT.ConnectTM < (GetDate()-365)
In this case you change to DELETE to delete all these guilds:
DELETE G from Guild G INNER JOIN Character on G.G_Master = Character.Name INNER JOIN MEMB_STAT on Character.AccountID = MEMB_STAT.memb___id where MEMB_STAT.ConnectTM < (GetDate()-365)
Finally, to delete the guilds you need to delete all members of the guilds that no longer exist:
DELETE from GuildMember where not exists (select Name from Guild where Guild.G_Name = GuildMember.G_Name)
Credits
louis
En línea
Update 44 ready
www.jogandomu.com.br
Discord: louisemulator
Gracias:
lucasvieiragames
,
kathaleya
,
judocas11
Para este mensaje,
3
Miembros Han dado un gracias!
Imprimir
Páginas: [
1
]
Creando Mu Online
/
MuOnline
/
Modulos & Scripts
/
Scripts / querys
/
SCRIPTS
How to remove inactive guilds
.