Jump to content

Recommended Posts

Posted

 

Delete characters with level 20(or less) and 2 months of inactive

DELETE FROM character_friends WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(51840000))*1000) and accesslevel<=0 and level<=20);
DELETE FROM character_subclasses WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(51840000))*1000) and accesslevel<=0 and level<=20);
DELETE FROM character_hennas WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(51840000))*1000) and accesslevel<=0 and level<=20);
DELETE FROM character_macroses WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(51840000))*1000) and accesslevel<=0 and level<=20);
DELETE FROM character_quests WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(51840000))*1000) and accesslevel<=0 and level<=20);
DELETE FROM character_recipebook WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(51840000))*1000) and accesslevel<=0 and level<=20);
DELETE FROM character_shortcuts WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(51840000))*1000) and accesslevel<=0 and level<=20);
DELETE FROM character_skills WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(51840000))*1000) and accesslevel<=0 and level<=20);
DELETE FROM character_skills_save WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(51840000))*1000) and accesslevel<=0 and level<=20);
DELETE FROM character_subclasses WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(51840000))*1000) and accesslevel<=0 and level<=20);
DELETE FROM items WHERE owner_id in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(51840000))*1000) and accesslevel<=0 and level<=20);
DELETE FROM characters WHERE lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(51840000))*1000) and accesslevel<=0 and level<=20;

 

Delete banned accounts

UPDATE characters SET `accesslevel` = '-99' where account_name in (select login from accounts WHERE `accessLevel` < 0) AND account_name NOT IN (SELECT `account` FROM `l2_bannedontime`);
DELETE FROM character_friends WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(30*24*3600))*1000) and accesslevel < 0);
DELETE FROM character_subclasses WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(30*24*3600))*1000) and accesslevel<0);
DELETE FROM character_hennas WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(30*24*3600))*1000) and accesslevel<0);
DELETE FROM character_macroses WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(30*24*3600))*1000) and accesslevel<0);
DELETE FROM character_quests WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(30*24*3600))*1000) and accesslevel<0);
DELETE FROM character_recipebook WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(30*24*3600))*1000) and accesslevel<0);
DELETE FROM character_shortcuts WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(30*24*3600))*1000) and accesslevel<0);
DELETE FROM character_skills WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(30*24*3600))*1000) and accesslevel<0);
DELETE FROM character_skills_save WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(30*24*3600))*1000) and accesslevel<0);
DELETE FROM character_subclasses WHERE charId in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(30*24*3600))*1000) and accesslevel<0);
DELETE FROM items WHERE owner_id in (select charId from characters where lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(30*24*3600))*1000) and accesslevel<0);
DELETE FROM characters WHERE lastaccess<((UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-(30*24*3600))*1000) and accesslevel<0;

Posted

Thanks for share, but I'll pass.

only the first is good. the second is useless . why? because maybe you want to give second chance to banned members or they pay to get unbanned ..!

anyway thnx

 

+

  • 3 months later...
Posted

This is ok but I think there will be errors with the items. I mean these characters that are deleted own some items so there will be errors in the gameserver (i think).

 

The same happens if you delete NPC's without deleting their spawns.

Posted

This is ok but I think there will be errors with the items. I mean these characters that are deleted own some items so there will be errors in the gameserver (i think).

 

The same happens if you delete NPC's without deleting their spawns.

 

Wrong, when you delete a character from the database everything associated with it will be deleted from the database next time you reboot the server. L2j cores were written to check the player ID's against the other tables, when it does not find an active one it removes it from the database.

 

On some if you watch the server starting up you will see something like "X Items cleaned from database." or something like that.

 

Deleting NPC's is not the same as deleting characters, NPC's have set ID's that the server needs when loading. If you delete an NPC from the NPC table then yes, you will have problems as many NPC's have their own skill lists, drops, html texts, etc.

 

As for the script to delete banned character I think it a bad idea as a players can once again create the same character. However if you do this and then restart the server then anything associated with the deleted character(s) will be deleted upon server load so even if they make the same character they will start from scratch (or however you have your server set).

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • I did not want to, but I will tell a few things (just because of other members that might understand something wrong): 1. Nothing held as hostage some kinda customer of yours. I think even now could find your donate panel code at my source code. So, stop spreading a lie because of your head progressive diseases. 2. Don't use my old customer's post as counterargument. We all had the worst customers which think they are the righest ones no matter what. He was one of them. He caused a lot of problems to me. Also, he was rude and disrespectful. 3. You're just simply hater. No matter what good I'm gonna say you gonna say in reverse. Smarter people sees the truth. 4. Look, you don't like me, I don't like you, but it's unnecessary to comment all post about my project and write everything worst just because you hate me. 😉
    • I've seen this many times, to be honest, let's hope that this time it will actually happen. I would suggest building something that helps develop trust within the community's sales. It could be something similar to FunPay, for example, which ensures secure trades for both the seller and the buyer, along with a rating system for both parties. I would also recommend doing something about the voting site, which has been paused for I don't know how many years since the Fiverr failure. Last but not least, I’d suggest creating an open blog or at least publishing weekly articles that can attract more people to the forum or encourage members to return and read them. The topics of these articles could include overviews and opinions on L2 or GTA V servers, PUBG, Fortnite, tech news, coding updates, or even general news that the author finds interesting.   How could you know such an information? 🤔 And yeah I agree on the part about the poor management
    • ➡ Discount for your purchase: JUNE2025 (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • there are extenders that already have all that included ingame 🙂 for example GX-EXT
    • ➡ Discount for your purchase: JUNE2025 (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock