yepp Posted June 7, 2016 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 26 Reputation: 2 Joined: 05/29/16 Last Seen: July 19, 2016 Share Posted June 7, 2016 (edited) ADD ITEMS EASILY Requirements:- PHP version 5.4 and up is required to run this script.- JSON File of your item (examples at the end)Instructions:- Open up a terminal- Type in "php item_script.php" (without the quotes)Creating JSON File:The format should be like this (The ordering: https://rathena.org/....28Database.29)[26007,"Pink_Fluffy_Valkyrie_Helm","Pink Fluffy Valkyrie Helm",4,1,null,0,null,0,null,1,"0xFFFFFFFF",3,2,256,null,0,1,907,null,null,null]NOTES:- If the value is NULL, type it in small letters- Use quotes on string values.- Do not add comma on each line. Download: https://rathena.org/board/files/file/3453-tool-item-db-automation/ Any questions regarding my script are welcome. I'll try to add more features soon including editing and deleting if I'll have the time. Hope you like my tool! As this make it easier for me. Changelog Version 1 - First release. Version 1.1 - Added prompt in case you changed your mind. - Improved checking of empty line in JSON file. Version 2 - Added function to generate client-side resource files from the same JSON file (idnum2itemdisplaynametable, idnum2itemresnametable, etc.) - It will either create a new file or append your current file if present. Note: accname.lub and accessoryid.lub is not yet added. Edited June 10, 2016 by yepp 1 Quote Link to comment Share on other sites More sharing options...
Akkarin Posted June 7, 2016 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3143 Reputation: 1626 Joined: 03/26/12 Last Seen: 11 hours ago Share Posted June 7, 2016 NOTES: - If the value is NULL, type it in small letters - Use quotes on string values. You could parse the values where NULL could be expected through strtolower(); (if ($string === "NULL"){$string = strtolower($string);} ) and use string check functions (or regex if you like) to ensure strings are encased in quotes. 1 Quote Link to comment Share on other sites More sharing options...
yepp Posted June 7, 2016 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 26 Reputation: 2 Joined: 05/29/16 Last Seen: July 19, 2016 Author Share Posted June 7, 2016 NOTES: - If the value is NULL, type it in small letters - Use quotes on string values. You could parse the values where NULL could be expected through strtolower(); (if ($string === "NULL"){$string = strtolower($string);} ) and use string check functions (or regex if you like) to ensure strings are encased in quotes. I may try that one time. Cool. Thanks for the suggestion! Currently not in the mood for some mod xD Quote Link to comment Share on other sites More sharing options...
yepp Posted June 7, 2016 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 26 Reputation: 2 Joined: 05/29/16 Last Seen: July 19, 2016 Author Share Posted June 7, 2016 Still waiting to get approved Share your experience or problems with my tool Quote Link to comment Share on other sites More sharing options...
yepp Posted June 10, 2016 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 26 Reputation: 2 Joined: 05/29/16 Last Seen: July 19, 2016 Author Share Posted June 10, 2016 New version uploaded! It can now generate client-side files (accname.lub and accessoryid.lub are not included tho). Enjoy! Quote Link to comment Share on other sites More sharing options...
jawbreaker Posted June 13, 2016 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 68 Reputation: 1 Joined: 06/21/14 Last Seen: August 8, 2022 Share Posted June 13, 2016 New version uploaded! It can now generate client-side files (accname.lub and accessoryid.lub are not included tho). Enjoy! why i cant download the file? any other link? Quote Link to comment Share on other sites More sharing options...
yepp Posted June 13, 2016 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 26 Reputation: 2 Joined: 05/29/16 Last Seen: July 19, 2016 Author Share Posted June 13, 2016 New version uploaded! It can now generate client-side files (accname.lub and accessoryid.lub are not included tho). Enjoy! why i cant download the file? any other link? What error did you got? It must be something with rathena's server. If you still can't download from here I will just upload a mirror from somewhere. Try downloading from here again first. Quote Link to comment Share on other sites More sharing options...
Akkarin Posted June 13, 2016 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3143 Reputation: 1626 Joined: 03/26/12 Last Seen: 11 hours ago Share Posted June 13, 2016 He can't download it because your latest version hasn't been approved yet. 1 Quote Link to comment Share on other sites More sharing options...
Radian Posted June 13, 2016 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24 Share Posted June 13, 2016 cool thanks for this! Quote Link to comment Share on other sites More sharing options...
yepp Posted June 13, 2016 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 26 Reputation: 2 Joined: 05/29/16 Last Seen: July 19, 2016 Author Share Posted June 13, 2016 cool thanks for this! No problem Just tell me what can make this better if you have something in your mind. Quote Link to comment Share on other sites More sharing options...
Akkarin Posted June 14, 2016 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3143 Reputation: 1626 Joined: 03/26/12 Last Seen: 11 hours ago Share Posted June 14, 2016 You could parse the values where NULL could be expected through strtolower(); (if ($string === "NULL"){$string = strtolower($string);} ) and use string check functions (or regex if you like) to ensure strings are encased in quotes. Also, when you upload a new version, remove the previous one otherwise you get presented with all previous versions to download. Previous are already stored on the forums by default, so you can remove the others in the list when uploading a new file. Quote Link to comment Share on other sites More sharing options...
REKT Posted June 14, 2016 Group: Members Topic Count: 24 Topics Per Day: 0.01 Content Count: 206 Reputation: 11 Joined: 12/06/11 Last Seen: September 13 Share Posted June 14, 2016 Can you just provide attachment for it with the latest update? Quote Link to comment Share on other sites More sharing options...
yepp Posted July 15, 2016 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 26 Reputation: 2 Joined: 05/29/16 Last Seen: July 19, 2016 Author Share Posted July 15, 2016 File Name: [TOOL] Item DB Automation File Submitter: yepp File Submitted: 07 Jun 2016 File Category: Server Managers/Editors Content Author: yepp Requirements: - PHP version 5.4 and up is required to run this script. - JSON File of your item (examples at the end) Instructions: - Open up a terminal - Type in "php item_script.php" (without the quotes) Creating JSON File: The format should be like this (The ordering: https://rathena.org/wiki/Custom_Items#Structure_.28Database.29) [26007,"Pink_Fluffy_Valkyrie_Helm","Pink Fluffy Valkyrie Helm",4,1,null,0,null,0,null,1,"0xFFFFFFFF",3,2,256,null,0,1,907,null,null,null] NOTES: - If the value is NULL, type it in small letters. - Use quotes on string values. - Do not add commas on each line. Questions? Ask here: https://rathena.org/board/topic/106186-tool-add-items-to-database-easily/ Click here to download this file Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.