Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Releases
ARC Nitro SQL & FurnitureData Generators.
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Morohara" data-source="post: 477468" data-attributes="member: 93970"><p>Releasing both a FurnitureData and SQL generator for Arcturus DB.</p><p></p><p>Make sure to have python 3.11.3 installed both are scripts so will need to be ran in console.</p><p></p><p>SQL Generator:</p><p>import os</p><p></p><p>try:</p><p> with open("test.txt", "a") as f:</p><p> pass</p><p>except FileNotFoundError:</p><p> with open("test.txt", "w") as f:</p><p> pass</p><p>finally:</p><p> with open("test.txt", "a") as f:</p><p> for path, subdirs, files in os.walk(r'INPUT DIRECTORY IN HERE.'):</p><p> n = 47151</p><p> page_id = 783</p><p> for furni_name in files:</p><p> name_for_insert = furni_name.split(".")[0]</p><p> f.write(f"INSERT INTO [ICODE]items_base[/ICODE] (id, sprite_id, public_name, item_name) VALUES ('{n}', '{n}', '{name_for_insert}', '{name_for_insert}');\n")</p><p> f.write(f"INSERT INTO [ICODE]catalog_items[/ICODE] (id, item_ids, page_id, catalog_name) VALUES ('{n}', '{n}', '{page_id}', '{name_for_insert}');\n")</p><p> n += 1</p><p>This will just generate a file and inside will have sql change "n = 47151" to largest id in items_base.</p><p>Edit "page_id" to the page you want the furni to be added to and create the catalog page with the id you've chosen.</p><p></p><p>FurnitureData generator:</p><p>import os</p><p>import json</p><p>import random</p><p>import glob</p><p></p><p></p><p>canlayon = ('false')</p><p>ydim = random.randint(1, 1)</p><p>xdim = random.randint(1, 1)</p><p>defaultdir = random.randint(0, 0)</p><p>rentofferid = random.randint(-1, -1,)</p><p>revision = random.randint(59005, 59005)</p><p>specialtype = random.randint(0, 0)</p><p></p><p>with open("output.txt", "a") as w:</p><p> for path, subdirs, files in os.walk(r'INPUT DIRECTORY IN HERE'):</p><p> n = 47151</p><p> for filename in files:</p><p> f = os.path.splitext(filename)[0]</p><p> x = {</p><p> "id":"",</p><p> "classname":"",</p><p> "revision":"",</p><p> "category":"unknown",</p><p> "defaultdir":"",</p><p> "xdim":"",</p><p> "ydim":"1",</p><p> "partcolors":{"color":[]},</p><p> "name":"",</p><p> "description":"",</p><p> "adUrl":"",</p><p> "offerid":"",</p><p> "buyout":"",</p><p> "rentofferid":"-1",</p><p> "rentbuyout":"false",</p><p> "bc":"false",</p><p> "excludeddynamic":"false",</p><p> "customparams":"",</p><p> "specialtype":"0",</p><p> "canstandon":"false",</p><p> "cansiton":"false",</p><p> "canlayon":"false",</p><p> "furniline":"",</p><p> "environment":"",</p><p> "rare":"false"</p><p> }</p><p> x["id"] = n</p><p> x["classname"] = f</p><p> x["name"] = f</p><p> x["offerid"] = n</p><p> x["xdim"] = xdim</p><p> x["ydim"] = ydim</p><p> x["defaultdir"] = defaultdir</p><p> x["rentofferid"] = rentofferid</p><p> x["revision"] = revision</p><p> x["specialtype"] = specialtype</p><p> y = json.dumps(x)</p><p> print(y.replace('"false"', "false",).replace(" ", "").replace('"unkown"', "unknown").replace('"rare":false}', '"rare":false},'))</p><p></p><p> n += 1</p><p></p><p></p><p>IMPORTANT</p><p></p><p>This will generate in console copy+paste all code and replace "rare":false} with "rare":false},</p><p></p><p>Please change "n = 47151" to latest ID or mimic the SQL generator.</p><p></p><p>Eventually planning to update and fix but for now this will do as I haven't been able to find one released by someone else.</p><p></p><p>Happy to offer support.</p><p></p><p>Edit: Fixed the ending of each furnitiredata entry to contain "," as was blank previously.</p><p></p><p></p><p></p><p>Credits to Tim for the Sql Generator. <3</p></blockquote><p></p>
[QUOTE="Morohara, post: 477468, member: 93970"] Releasing both a FurnitureData and SQL generator for Arcturus DB. Make sure to have python 3.11.3 installed both are scripts so will need to be ran in console. SQL Generator: import os try: with open("test.txt", "a") as f: pass except FileNotFoundError: with open("test.txt", "w") as f: pass finally: with open("test.txt", "a") as f: for path, subdirs, files in os.walk(r'INPUT DIRECTORY IN HERE.'): n = 47151 page_id = 783 for furni_name in files: name_for_insert = furni_name.split(".")[0] f.write(f"INSERT INTO [ICODE]items_base[/ICODE] (id, sprite_id, public_name, item_name) VALUES ('{n}', '{n}', '{name_for_insert}', '{name_for_insert}');\n") f.write(f"INSERT INTO [ICODE]catalog_items[/ICODE] (id, item_ids, page_id, catalog_name) VALUES ('{n}', '{n}', '{page_id}', '{name_for_insert}');\n") n += 1 This will just generate a file and inside will have sql change "n = 47151" to largest id in items_base. Edit "page_id" to the page you want the furni to be added to and create the catalog page with the id you've chosen. FurnitureData generator: import os import json import random import glob canlayon = ('false') ydim = random.randint(1, 1) xdim = random.randint(1, 1) defaultdir = random.randint(0, 0) rentofferid = random.randint(-1, -1,) revision = random.randint(59005, 59005) specialtype = random.randint(0, 0) with open("output.txt", "a") as w: for path, subdirs, files in os.walk(r'INPUT DIRECTORY IN HERE'): n = 47151 for filename in files: f = os.path.splitext(filename)[0] x = { "id":"", "classname":"", "revision":"", "category":"unknown", "defaultdir":"", "xdim":"", "ydim":"1", "partcolors":{"color":[]}, "name":"", "description":"", "adUrl":"", "offerid":"", "buyout":"", "rentofferid":"-1", "rentbuyout":"false", "bc":"false", "excludeddynamic":"false", "customparams":"", "specialtype":"0", "canstandon":"false", "cansiton":"false", "canlayon":"false", "furniline":"", "environment":"", "rare":"false" } x["id"] = n x["classname"] = f x["name"] = f x["offerid"] = n x["xdim"] = xdim x["ydim"] = ydim x["defaultdir"] = defaultdir x["rentofferid"] = rentofferid x["revision"] = revision x["specialtype"] = specialtype y = json.dumps(x) print(y.replace('"false"', "false",).replace(" ", "").replace('"unkown"', "unknown").replace('"rare":false}', '"rare":false},')) n += 1 IMPORTANT This will generate in console copy+paste all code and replace "rare":false} with "rare":false}, Please change "n = 47151" to latest ID or mimic the SQL generator. Eventually planning to update and fix but for now this will do as I haven't been able to find one released by someone else. Happy to offer support. Edit: Fixed the ending of each furnitiredata entry to contain "," as was blank previously. Credits to Tim for the Sql Generator. <3 [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
ARC Nitro SQL & FurnitureData Generators.
Top