Jump to content
  • 0

How to keep chars on specific map and delete the rest?


Gouki

Question


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.06
  • Content Count:  241
  • Reputation:   11
  • Joined:  08/12/20
  • Last Seen:  

Hi,

Is it possible to run a SQL script to delete all characters  except for a specific map?

EX:
Keep all characters inside Prontera, rest of Ragnarok delete.

Edited by Almond Snicker
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.01
  • Content Count:  68
  • Reputation:   7
  • Joined:  02/21/19
  • Last Seen:  

This request is kind of confusing. Do you want the player's characters to be deleted(outside Prontera)? Or do you just want all the NPCs?

There is a way to do both. You may want a way to automate it if you're deleting a lot of characters. But there's a column named "last_map" within your char table. You could hit the last_map button above it and it'll sort the rows then manually delete every character that isn't on "prontera"

Edited by TheKingDino
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.06
  • Content Count:  241
  • Reputation:   11
  • Joined:  08/12/20
  • Last Seen:  

18 hours ago, TheKingDino said:

This request is kind of confusing. Do you want the player's characters to be deleted(outside Prontera)? Or do you just want all the NPCs?

There is a way to do both. You may want a way to automate it if you're deleting a lot of characters. But there's a column named "last_map" within your char table. You could hit the last_map button above it and it'll sort the rows then manually delete every character that isn't on "prontera"

yup characters, ahh yea, that's a way by sorting the database. okay thank you so much!

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

shut down the server and run the SQL query

DELETE FROM `char` WHERE `last_map` <> 'prontera'

if you want a cleaner database, then you should remove records that stored in other table, whichever that are related with char info. (mostly consists of the char_id column in it)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   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.

×
×
  • Create New...