Jump to content
  • 0

(Fixed)Changing all refine of items of all accounts in phpmyadmin.


louigui0224

Question


  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  139
  • Reputation:   0
  • Joined:  06/22/14
  • Last Seen:  

is there anyway to change all the refine of all the items of all the accounts in mysql or phpmyadmin?

Edited by louigui0224
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

UPDATE inventory 
INNER JOIN item_db_re ON inventory.nameid = item_db_re.id
SET inventory.refine={CHANGE THIS VALUE TO DESIRED REFINE}
WHERE item_db_re.type IN ({PUT ALL ITEM TYPES SEPARATED BY COMMAS});

https://github.com/rathena/rathena/wiki/Custom_Items

refer to the link on item types.

this method will only work if the person who owns the item is offline.

Edited by Ninja
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  139
  • Reputation:   0
  • Joined:  06/22/14
  • Last Seen:  

so for example since the armor is type 4 i should put

UPDATE inventory 
INNER JOIN item_db_re ON inventory.nameid = item_db_re.id
SET inventory.refine=0
WHERE item_db_re.type IN ({4);

 

is this correct??

 

by the way im using pre-re...should i use item_db_pre??? @Ninja

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  249
  • Reputation:   72
  • Joined:  10/20/12
  • Last Seen:  

I'd like to suggest to do these database updates when the server is offline. Don't forget to make a backup before you apply your changes. And test them on a local copy.

You can write all your UPDATE-Statements in a sql-file like refineupdate.sql and apply them at once with the command mysql -u user -p database < refineupdate.sql

And yes you can also use the item_db_pre. Don't forget there are multiple tables for items: storage, cart_inventory, inventory, etc.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  139
  • Reputation:   0
  • Joined:  06/22/14
  • Last Seen:  

what do you mean by "

And yes you can also use the item_db_pre. Don't forget there are multiple tables for items: storage, cart_inventory, inventory, etc.

" @Jey
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  139
  • Reputation:   0
  • Joined:  06/22/14
  • Last Seen:  

so before changing eerything.

UPDATE inventory 
INNER JOIN item_db_re ON inventory.nameid = item_db_re.id(So just change item_db_re to item_db_pre?) and everything is ok beside from changing the cartinventory and storage?
SET inventory.refine=0
WHERE item_db_re.type IN ({4);
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

Yes. For more info. Please look at some SQL basics cheatsheet. https://www.w3schools.com/sql/

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  139
  • Reputation:   0
  • Joined:  06/22/14
  • Last Seen:  

This is what i put...and it says 0 row affected...and when i tried to search there are still +20 items in the inventory...and when i logged ingame the items still hase refines.

UPDATE inventory 
INNER JOIN item_db ON inventory.nameid = item_db.id
SET inventory.refine=0
WHERE item_db.type IN (256,32,2,1,64,16,512);

 

Bump.

 

already done i type just a very simple code..

UPDATE inventory 
SET inventory.refine=0



UPDATE cart_inventory 
SET cart_inventory.refine=0

UPDATE storage
SET storage.refine=0

 

Edited by louigui0224
Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

He means that you will be using item_db_pre instead of item_db_re and that you have to think about how to modify the sql command that I gave you to also update item refines which are located in other tables such as storage, cart_inventory, etc. :)

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