Jump to content
  • 0

Sql query/script that will delete item to everyone.


Meister

Question


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

Hi i'm certain that there was a requested topic that deletes one particular item in the server.

 

example I want to delete 16774 to every player including on their storage.. how will I do it on my sql?

or any script? 

 

Thank you!

Link to comment
Share on other sites

15 answers to this question

Recommended Posts


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

shutdown server...and

try run these in your SQL Machine..

 

DELETE FROM `auction` WHERE `nameid` = '16774'
DELETE FROM `cart_inventory` WHERE `nameid` = '16774'
DELETE FROM `guild_storage` WHERE `nameid` = '16774'
DELETE FROM `inventory` WHERE `nameid` = '16774'
DELETE FROM `mail` WHERE `nameid` = '16774'
DELETE FROM `storage` WHERE `nameid` = '16774'

 

 

do a backup before try it.

Link to comment
Share on other sites


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

shutdown server...and

try run these in your SQL Machine..

 

DELETE FROM `auction` WHERE `nameid` = '16774'
DELETE FROM `cart_inventory` WHERE `nameid` = '16774'
DELETE FROM `guild_storage` WHERE `nameid` = '16774'
DELETE FROM `inventory` WHERE `nameid` = '16774'
DELETE FROM `mail` WHERE `nameid` = '16774'
DELETE FROM `storage` WHERE `nameid` = '16774'

 

 

do a backup before try it.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  2
  • Reputation:   0
  • Joined:  06/17/16
  • Last Seen:  

On 9/7/2013 at 4:40 PM, Capuche said:

Make an update instead of delete to change the id

Could you make an example, please? SQL is messy and dont want to fuck it up...

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  2
  • Reputation:   0
  • Joined:  06/17/16
  • Last Seen:  

On 9/7/2013 at 4:40 PM, Capuche said:

Make an update instead of delete to change the id

Could you post an example? Im sorry but trying isnt my thing, im afraid of fucking things up

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  95
  • Reputation:   2
  • Joined:  08/23/12
  • Last Seen:  

I guess he's looking for a script?

Try to insert this one :

 

Try this in your test server first :

 

 

 

Mes "Input Item ID";
input .@delitem$;
if(.@delitem$ == " ") goto failed;
next;
Mes "Deleting Items!";
query_sql(DELETE FROM `auction` WHERE `nameid` = "+.@delitem$+");
query_sql(DELETE FROM `cart_inventory` WHERE `nameid` = "+.@delitem$+");
query_sql(DELETE FROM `guild_storage` WHERE `nameid` = "+.@delitem$+");
query_sql(DELETE FROM `inventory` WHERE `nameid` = "+.@delitem$+");
query_sql(DELETE FROM `mail` WHERE `nameid` = "+.@delitem$+");
query_sql(DELETE FROM `storage` WHERE `nameid` = "+.@delitem$+");
next;
Mes "Successful!";
close;

failed:
Mes "Invalid Item ID!";
close;
}
 

 


 

 

I dunno if this code will work but try this first, and tell me the errors, or post some screenshots.

Edited by Lugia
Link to comment
Share on other sites


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

it's better to do this during the server is offline or the SQL will temporary stop update the database.

it will be a problems if the deleted item still exist in the player account since sometime the database will re-update the database with the items info .

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  95
  • Reputation:   2
  • Joined:  08/23/12
  • Last Seen:  

yes of course, and try this one :

 

 

 

x,x,x,x script sample 915,{
mes "Hello";
mes "Want to delete items?";
next;
mes "Please input item id";
input .@delitem$;
if(.@delitem$ == "") goto fail;
next;
query_sql(DELETE FROM `auction` WHERE `nameid` = '"+.@delitem$+"');
query_sql(DELETE FROM `cart_inventory` WHERE `nameid` = '"+.@delitem$+"');
query_sql(DELETE FROM `guild_storage` WHERE `nameid` =   '"+.@delitem$+"');
query_sql(DELETE FROM `inventory` WHERE `nameid` =  '"+.@delitem$+"');
query_sql(DELETE FROM `mail` WHERE `nameid` =  '"+.@delitem$+"');
query_sql(DELETE FROM `storage` WHERE `nameid` =   '"+.@delitem$+"');
next;
Mes "Successful!";
close;

fail:
mes "Invalid Item ID!";
close;
}
 

 

 

try this script if still not working just message me or comment here asap.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

yes of course, and try this one :

Your re-post of the script does not address what Emistry said in post #4. /hmm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  172
  • Reputation:   0
  • Joined:  07/07/12
  • Last Seen:  

Script of Lugia not active, please fix :(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  187
  • Reputation:   7
  • Joined:  09/04/12
  • Last Seen:  

shutdown server...and

try run these in your SQL Machine..

 

DELETE FROM `auction` WHERE `nameid` = '16774'
DELETE FROM `cart_inventory` WHERE `nameid` = '16774'
DELETE FROM `guild_storage` WHERE `nameid` = '16774'
DELETE FROM `inventory` WHERE `nameid` = '16774'
DELETE FROM `mail` WHERE `nameid` = '16774'
DELETE FROM `storage` WHERE `nameid` = '16774'

 

 

do a backup before try it.

Thanks!

but how about delete multi items?

Link to comment
Share on other sites


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


DELETE FROM `table` WHERE `nameid` IN ( 607,608,512 );

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  84
  • Reputation:   0
  • Joined:  03/29/12
  • Last Seen:  

shutdown server...and

try run these in your SQL Machine..

 

DELETE FROM `auction` WHERE `nameid` = '16774'
DELETE FROM `cart_inventory` WHERE `nameid` = '16774'
DELETE FROM `guild_storage` WHERE `nameid` = '16774'
DELETE FROM `inventory` WHERE `nameid` = '16774'
DELETE FROM `mail` WHERE `nameid` = '16774'
DELETE FROM `storage` WHERE `nameid` = '16774'

 

 

do a backup before try it.

 do you just save this as .sql file and click on database and import this? 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

do you just save this as .sql file and click on database and import this?

Yes, that's one way to do it.

Or you can copy-paste those queries directly in the "SQL Query" window, then click Execute.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  72
  • Reputation:   0
  • Joined:  10/28/12
  • Last Seen:  

is there a way to remove an armor[2] from inventory and storage, while simultaneously giving back an armor[1] plus whatever 2 cards that were socketed in the previous armor? need help with this :(

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Make an update instead of delete to change the id

  • Upvote 1
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...