Jump to content
  • 0

Custom items using mysql item_db


xtiand

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  02/06/13
  • Last Seen:  

Hi,

 

I want to start using mysql for my item_db (as well as mob_db), so I was wondering if anyone can tell me how to add custom items to my mysql, or if there's a guide somewhere (i tried searching for it, but I can't find it..). I mean, do I just add another row for my custom item? and what about the description, drop-sprite, number of slots, and all those other stuff? Thanks! :)

 

EDIT: also, i have the "item_db", "item_db_re", "item_db2" schemas; in which one do I add the custom item? :)

Edited by xtiand
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  764
  • Reputation:   220
  • Joined:  11/14/11
  • Last Seen:  

Have a look at the sql-files folder an check the files related to item databases. You'll see how it works I think.

(item_db2 and item_db2_re are tables which should be used to add custom items.)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  02/06/13
  • Last Seen:  

Thanks for the reply. :)

 

There's nothing else in my sql-files folder, though.. I tried to check the sql file's script itself for comments, but it just says notes about the database structure and some other note about atk...

 

So I just have to add another row in either the item_db_re or item_db2 schema? What about the description, etc, etc?

post-14898-0-92129600-1360752352_thumb.jpg

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  764
  • Reputation:   220
  • Joined:  11/14/11
  • Last Seen:  

Example from item_db.sql

REPLACE INTO `item_db` VALUES (1231,'Bazerald','Bazerald',4,20,NULL,500,70,NULL,1,NULL,0x028F5EEE,7,2,2,4,36,1,1,'bonus bAtkEle,Ele_Fire; bonus bInt,5; bonus bMatkRate,10;',NULL,NULL);

Example from item_db_re.sql

REPLACE INTO `item_db_re` VALUES (1231,'Bazerald','Bazerald',4,20,NULL,500,'70:105',NULL,1,NULL,0x028F5EEE,7,2,2,4,'36',1,1,'bonus bAtkEle,Ele_Fire; bonus bInt,5;',NULL,NULL);

 

Of course you have to replace the values with your desired values and the table name with item_db2 or item_db2_re.

Field explanation can be found here: http://rathena.org/wiki/Custom_Items

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  02/06/13
  • Last Seen:  

I don't have an item_db2_re schema, just the three I mentioned in my first post.. but I can still just add the custom item in a new row in item_db2, right?

 

As for the description and the other stuff, should I just follow the instructions under the "Item Placement on Data Folder" section on the wiki page? What about the lua/lub (accname and accessoryid) files, should I edit those, too?

 

Thanks! :)

Edited by xtiand
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  806
  • Reputation:   220
  • Joined:  03/13/12
  • Last Seen:  

ok first off i believe you have enabled the server to read from sql database for your item db
To add custom items, you can add them in any of the following tables
1) item_db (only for pre renewal mode)
2) item_db_re (only for renewal mode)
3) item_db2
Generally i prefer to add stuff in item_db2 - since its blank initially and you won't mix up customs with originals

EDIT: As for the description and other stuff they are client related. If you are adding headgears you need to edit accname and accessoryid files

Also depending on your client's date you might need to edit iteminfo.lub inside system folder instead of those table txt files mentioned under 

"Item Placement on Data Folder"

Edited by mindstream
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  02/06/13
  • Last Seen:  

Awesome. Thanks!  :)

I'm thinking that I will have to edit the idnum2...txt files and the itemslot...txt.. Cause there's no other way to add a description to the item.

But what about the accname.lua and accessoryid.lua? Should I still edit those, as well?


I'm using 2012-04-10aRagexeRE.exe. Should I still edit the iteminfo.lub instead of the txt files?..

 

In case someone else needs the info: from what I've found and read, clients 2012-04-18 and above uses iteminfo.lub and clients 2012-04-10 and below uses the old table txt files. (Correct me if I'm wrong, though :))

 

And thanks, Kenpachi and MStream, for the replies! :)

Edited by xtiand
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...