Jump to content
  • 0

Need myphpadmin help...


Peopleperson49

Question


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

My knowledge with myphpadmin and sql in general is weak. I'm slowly learning. I know there is a program out there somewhere to convert txt -> sql. Once I get it converted how do I add my custom item_db2 table to the myphpadmin so that I can be seen in the CP?

Peopleperson49

Link to comment
Share on other sites

16 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  234
  • Reputation:   19
  • Joined:  06/15/12
  • Last Seen:  

Why don´t you insert it directly into the item_db2 sql table?

IMHO its the easiest way to go.

Just get MySql Workbench and make a connection to your sql server. Then edit them directly in workbench.

But if you wanna do it your way just make a sql script like the official ones:

#
# Table structure for table `item_db2`
#
DROP TABLE IF EXISTS `item_db2`;
CREATE TABLE `item_db2` (
 `id` smallint(5) unsigned NOT NULL default '0',
 `name_english` varchar(50) NOT NULL default '',
 `name_japanese` varchar(50) NOT NULL default '',
 `type` tinyint(2) unsigned NOT NULL default '0',
 `price_buy` mediumint(10) unsigned default NULL,
 `price_sell` mediumint(10) unsigned default NULL,
 `weight` smallint(5) unsigned NOT NULL default '0',
 `attack` smallint(3) unsigned default NULL,
 `defence` tinyint(3) unsigned default NULL,
 `range` tinyint(2) unsigned default NULL,
 `slots` tinyint(2) unsigned default NULL,
 `equip_jobs` int(12) unsigned default NULL,
 `equip_upper` tinyint(8) unsigned default NULL,
 `equip_genders` tinyint(2) unsigned default NULL,
 `equip_locations` smallint(4) unsigned default NULL,
 `weapon_level` tinyint(2) unsigned default NULL,
 `equip_level` tinyint(3) unsigned default NULL,
 `refineable` tinyint(1) unsigned default NULL,
 `view` smallint(3) unsigned default NULL,
 `script` text,
 `equip_script` text,
 `unequip_script` text,
 PRIMARY KEY  (`id`)
) ENGINE=MyISAM;
#  Items Additional Database - Custom Items go here
#
#  Structure of Database:
#REPLACE INTO `item_db2` VALUES ('ID','Name','Name','Type','Price','Sell','Weight','ATK','DEF','Range','Slot','Job','Upper','Gender','Loc','wLV','eLV','Refineable','View','Script','OnEquip_Script','OnUnequip_Script');
#
#  THQ Quest Items
# =============================================================
# REPLACE INTO `item_db2` VALUES (7950,'THG_Membership','THG Membership',3,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

And execute it in myphpadmin. (without the "#" in front of the items ofc)

Look at this thread from Mooka about PvP Master Ultimate: http://rathena.org/board/topic/53391-pvp-master-ultimate-v130/

There is a video of the script + execute method.

Edited by Ainna
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Mainly because I have around 8,000 custom items. Just the 3,500 custom skill scrolls would take me forever! I need to find a good converter program, which I have yet to do. I have found a few, but they seem to have errors when converting.

Peopleperson49

Edited by peopleperson49
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   28
  • Joined:  01/16/12
  • Last Seen:  

Mainly because I have around 8,000 custom items. Just the 3,500 custom skill scrolls would take me forever! I need to find a good converter program, which I have yet to do. I have found a few, but they seem to have errors when converting.

Peopleperson49

8,000? Mother of god.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  243
  • Reputation:   206
  • Joined:  11/28/11
  • Last Seen:  

Are you looking for a converter or steps on how to upload the query to PMA? o_o;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Yes I have around 8,000 custom items. I have over 3,500 custom skill scrolls, 300+ custom potions, various other useable items, custom elemental armor (every single armor of every element, do the math there), etc... I have so many that I actually don't have them all added to my server, but my item_db2 is massive! Anyways, I had a lot of time of my hands for a sad eight months when my wife was away... Also this is my second server and I make custom items for pretty much any player that asks if they are reasionalble. Over time you add up a lot of them. Back to myphpadmin... Sorry, but I don't really know what you talking about Zantara. Basically I want to take my item_db2.txt and convert it to item_db2.sql and then upload that to myphpadmin so anybody on my control panel can see what items are in there inventory, instead of saying unknown item. I hope thats more clear. Thanks for replying.

Peopleperson49

After rereading your question Zantara I understand what your asking. I guess I had a stupid moment. Both actually. I am looking for a relaiable converter which I havn't been able to find. With the one I'm trying to use your file size has to be under a certain size. Maybe if I split my item_db2 into several files and then convert them seperately. I can just add them back to one document in a table format. I think anyway. If you have a good one please share. I also need to know how to actually add that to myphpadmin also. Thanks again!

Peopleperson49

Edited by peopleperson49
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  243
  • Reputation:   206
  • Joined:  11/28/11
  • Last Seen:  

You can try using this TXT2SQL Converter program: [Xantara]_rA_text2sql_v1.2.0.zip

If you have a lot of commented lines in your TXT file, you might get an error when importing it to your PMA:

- http://rathena.org/b..._db +phpmyadmin

Edited by Xantara
Updated text2sql for v1.2.0 download link for rAthena SVN r16639. Use v1.1.0 if using previous revision.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

I will try this when I get home, thanks. I can just use word to sort my items and then remove all commented lines before I convert. Would that help any?

Peopleperson49

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

Hi, I took this as a challenge for myself. And alas, I made my own version of converting item_db.txt into a SQL version. It generates a sql file.

Requirement:

PHP (tested on XAMPP)

PS: I tested it on stock rAthena item_db.txt and found no problems generating the sql file. Imported the SQL file using phpmyadmin without any errors. So i think this works :)

parser2.php

Edited by clydelion
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Thanks I will give it a try later when I get home. Is it an actual program that you install and run?

Peopleperson49

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

step 1

Upload it to your PHP enable webserver(mine's XAMPP)

step 2

21411ye.jpg

step 3

v4o3ds.jpg

step 4

11vt8gk.jpg

input: item_db.txt

output: converted_item_db.sql

It is pretty easy man :)

Edited by clydelion
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  707
  • Reputation:   168
  • Joined:  01/26/12
  • Last Seen:  

Hi peopleperson49,

Once you convert the item_db2.txt to SQL-format; you can upload the .sql file onto your VPS and do the following command. I will be assuming that you are going to upload the file in '/root'.

cd /root
mysql -u USERNAME -p, --password=PASSWORD DATABASE_NAME < FILE_NAME.sql

You would have to replace all the capitalized words with the proper values.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  243
  • Reputation:   206
  • Joined:  11/28/11
  • Last Seen:  

I will try this when I get home, thanks. I can just use word to sort my items and then remove all commented lines before I convert. Would that help any?

Peopleperson49

Yes, that would help. You may not even need too if you do not have a lot of commented lines. Anyways, if you have used my tool and produced errors, please let me know so I can fix it in the next revision. Thanks~

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Xantara your version gives me lots of errors. I even removed all the // first. I put one example below. I got another error, I think it was #1056(not 100% sure). A large majority of my custom items errored if they had a { or } in it. Clydelion yours converts but when you client to view new file I get a 404 error.

SQL query:
REPLACEINTO`item_db2`
VALUES ( 28434,'Purple_Healthshroom','Purple Healthshroom', 0, 40,NULL , 70,NULL ,NULL ,NULL ,NULL , 0xFFFFFFFF, 7, 2,NULL ,NULL ,NULL ,NULL ,NULL ,'set @inchpheal,(readparam(bVit)*1); set @incspheal,(readparam(bInt)*1); for( set @healtime,0; @healtime < 30; set @healtime,@healtime+1 ) { itemheal @inchpheal,@incspheal; sleep2 2000; } dispbottom \"Your healing item has run out.\"; end;'},NULL ,NULL) ;
MySQL said:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '},NULL,NULL)' at line 1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  243
  • Reputation:   206
  • Joined:  11/28/11
  • Last Seen:  

Thanks for letting me know. Unfortunately, I cannot reproduce that error. The program created a converted file and I ran the query without any errors. May I see that item in regular TXT format? Did your txt version run without problems? Perhaps you have an extra closing bracket in yours?

I used this to test...

6299,Worn_Fabric,Worn Fabric,3,0,,0,,,,,,,,,,,,,{ set @inchpheal,(readparam(bVit)*1); set @incspheal,(readparam(bInt)*1); for( set @healtime,0; @healtime < 30; set @healtime,@healtime+1 ) { itemheal @inchpheal,@incspheal; sleep2 2000; } dispbottom "Your healing item has run out."; end; },{},{}

And this is what my program spit out...

REPLACE INTO `item_db2` VALUES (6299,'Worn_Fabric','Worn Fabric',3,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'set @inchpheal,(readparam(bVit)*1); set @incspheal,(readparam(bInt)*1); for( set @healtime,0; @healtime < 30; set @healtime,@healtime+1 ) { itemheal @inchpheal,@incspheal; sleep2 2000; } dispbottom \"Your healing item has run out.\"; end;',NULL,NULL);

Edited by Xantara
omo, so many typos x_x
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

@peopleperson49

As miss xantara said, please give us your txt file. So that we can reproduce the error.

@xantara

I tried your program, and it really rocks! Really amazing /no1

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  243
  • Reputation:   206
  • Joined:  11/28/11
  • Last Seen:  

...

@xantara

I tried your program, and it really rocks! Really amazing /no1

Thanks~ I love your source modifications by the way. =D ( Sorry for the late reply, too busy ><;; )

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