Small SQL command to fix 0's in inventory.(Doesn't Delete Stars)

Status
Not open for further replies.
Junior Spellweaver
Joined
Feb 24, 2008
Messages
175
Reaction score
3
Some people don't know how to do this so...

First run this
Code:
update inventoryitems
SET quantity = 1
where itemid = 2070006
and 2070005
and 2070016
and 2070004
and 2070007

Then run this,

Code:
delete from inventoryitems 
where quantity = 0;


Mainly for gm's or servers with !item command, if a gm or a player enters a wrong code for Use/Set-up/ETC/cash it bugs and this will fix it



Edit: Flame me all you want as far as I care Ive talked to server owners who don't know this.


Important Edit: I added the star fix, if you want to add stars feel free to I added the basic,

Ilbi
Cilbi
Tobi
Steely
Hwabi.

if you want to add more just add the line

and <staridhere>
 
Last edited:
Re: Small SQL command to fix 0's in inventory.

Thanks, just figured id help some people with that problem. Sorry I couldn't figure out an actual source fix.
 
Re: Small SQL command to fix 0's in inventory.

No problem guys, RMZERO just tell your players to keep star quantity at 1? Idk better to fix one major bug and have only a minor problem occur.
 
Re: Small SQL command to fix 0's in inventory.

By using this, you will also being deleting peoples stars btw, just a little tip.
 
Re: Small SQL command to fix 0's in inventory.

Then exclude the stars item codes?
 
Re: [Release] Small SQL command to fix 0's in inventory.

Big deal? Just return the stars I will edit it later to change the id's of stars to 1
 
Re: [Release] Small SQL command to fix 0's in inventory.(now it keeps the stars!)

nice thanks for this release, but i think i deleted a lot of chars items lmao
 
Re: [Release] Small SQL command to fix 0's in inventory.(now it keeps the stars!)

aha yea this is a good release, my GM had like half of his inventory like this and he asked me to fix it i was like ... UHHH LOL YOU'RE FUNNY xD
 
Re: [Release] Small SQL command to fix 0's in inventory.(now it keeps the stars!)

Lulz.. i have this problem alot on my server.

Don't use quantity. Use Inventorytype. Its alot easier.
I have a whole list of crap that people can do in a sql query that my website runs periodically.
Might release it when i get home.
 
Status
Not open for further replies.
Back