ElDubya Posted January 3, 2015 Report Share Posted January 3, 2015 Hi, Can anyone show me how I can run a query on the database to remove all instances of : M136 RPG18 JAVELIN Strela Igla STINGER please? Link to comment Share on other sites More sharing options...
0 Mr. Snatchit Posted January 3, 2015 Report Share Posted January 3, 2015 Delete from traders or from the inventory's of objects like cars/sheds/safes? Link to comment Share on other sites More sharing options...
0 ElDubya Posted January 3, 2015 Author Report Share Posted January 3, 2015 From inventory of character_data and object_data I did have a couple of tries myself, but my SQL is weak and I didn't want to break anything. Thanks man, I appreciate it Link to comment Share on other sites More sharing options...
0 Mr. Snatchit Posted January 3, 2015 Report Share Posted January 3, 2015 Only one thing I can think of for that, and its mostly manual work not Sql, Also make sure your server is off during this 1. Export Character_data into a sql file 2. Open your Character_data in Notepad++ 3. Hit Ctrl+H 4. For The "Find What" Box Add -----> "M136", <------ With the quotes and comma 5. Then Blank out the "Replace With" Box, No space just blank 6. Then hit Replace All and Change -----> "M136", <----- With -----> "RPG18", <----- And repeat steps above withe the other items 7. Once done save then Import back to database As for Your Object_data I can't say because of how weapons are stored in object inventory's, its not just a simple "ItemMap", its a [m107], [1] Depending on how many weapons are in the object and what order they were placed in their the code for storing weapons in objects changes every time. You might have to search objects maually Link to comment Share on other sites More sharing options...
0 ElDubya Posted January 4, 2015 Author Report Share Posted January 4, 2015 Yeah, I had thought of doing it that way but wasn't sure if there was an SQL query that I could run to do the same thing. Nevermind, I'll do it that way then. Cheers :) Link to comment Share on other sites More sharing options...
0 cen Posted January 4, 2015 Report Share Posted January 4, 2015 UPDATE `Character_DATA` SET `Inventory` = REPLACE(`Inventory`, '"m107"', '"BAF_LRR_scoped"') WHERE `Inventory` LIKE '%"m107"%'; UPDATE `Character_DATA` SET `Inventory` = REPLACE(`Inventory`, '"10Rnd_127x99_m107"', '"5Rnd_86x70_L115A1"') WHERE `Inventory` LIKE '%"10Rnd_127x99_m107"%'; This is an example of replacing M107's. You can adapt it for anything. Mr. Snatchit and ElDubya 2 Link to comment Share on other sites More sharing options...
Question
ElDubya
Hi,
Can anyone show me how I can run a query on the database to remove all instances of :
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now