PDA

View Full Version : items db


dcosper
03-10-2013, 04:08 PM
I figured i would post this here as its a question maybe george can answer,
I cant seem to add a custom item to the item database, i mean i can add one via a mysql query, but when i do , and then i log into game, i have no items any longer, so its messing up the table somehow in game, when i try to add a custom item.

How i am testing adding a item is just copying the Cloth Shawl, changing the item id from 1005 (or 8) to 81005, is there a section of the new item i must set as different from all the others ?

Still not sure why i cant access any item in game when i add one this way.

Any help would be appreciated.

GeorgeS
03-11-2013, 04:35 PM
Possibly if you have >1 database, are you editing the one you play on?

GeorgeS

dcosper
03-11-2013, 05:19 PM
Yes i am trying to add items to the game while i am logged on, if i run a mysql query to add a item, then in game all my items dissapear, and the items db becomes corrupt, and i have to rerun the sql to get items back, i did not think about doing while it was running, i will try to add a item while its shut down see if the same thing happens.

dcosper
03-11-2013, 05:24 PM
Still corrupts the database, i gotta be doing something wrong ;p

Derision
03-11-2013, 05:26 PM
Still corrupts the database, i gotta be doing something wrong ;p

You should post the SQL query you are using that corrupts the database. I tried doing what you described a few days ago and it worked fine for me.

dcosper
03-11-2013, 05:34 PM
INSERT INTO `items` VALUES ('811005','0','Cloth Mart', '0' ,'1' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'7' ,'1' ,'0' ,'1' ,'0' ,'1' ,'0' ,'1' ,'0' ,'1' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'' ,'0' ,'65535' ,'0' ,'0' ,'0' ,'0' ,'180' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'' ,'-1' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'665' ,'IT63' ,'0' ,'10' ,'0' ,'0' ,'0' ,'0' ,'Cloth Mart' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'1' ,'1' ,'0' ,'0' ,'0' ,'62335' ,'0' ,'0' ,'0' ,'0' ,'1' ,'0' ,'1' ,'-1' ,'0' ,'64' ,'-1' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'2' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'20130311142011' ,'' ,'0' ,'0' ,'0' ,'0' ,'1' ,'0' ,'0' ,'' ,'0' ,'-1' ,'0' ,'0' ,'0' ,'0' ,'-1' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'-1' ,'0' ,'0' ,'0' ,'0' ,'20130311142011' ,'00010101000000' ,'' ,'13THFLOOR' ,'0' ,'' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'-1' ,'0' ,'0' ,'00000000000000000000' ,'0' ,'' ,'-1' ,'0' ,'0' ,'0' ,'0' ,'' ,'-1' ,'0' ,'0' ,'0' ,'0' ,'0' ,'' ,'-1' ,'0' ,'0' ,'0' ,'0' ,'0' ,'' ,'-1' ,'0' ,'0' ,'0' ,'0' ,'0' ,'' ,'-1' ,'0' ,'0' ,'0' ,'' ,'' ,'' ,'' ,'' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'2003-10-15 08:00:26' ,'0' ,'70' ,'0' ,'0' ,'0' ,'-1' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'' ,'-1' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'-1' ,'0' ,'-256' ,'255' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0');

All i did was copy Cloth Shawl item 1005, change the id to 811005 and the name and lore name, i also have tried an id of 200, this entry goes into mysql fine, no errors, but when i log on i am unable to access any items in game, and all chars are nude.

Only other thing i can think to look at now, is i had to convert the datetimes into something c# wants to use, maybe its a datetime error

Derision
03-11-2013, 05:44 PM
I ran that query while my server was running. As expected item was not available in game until the server was restarted (items are loaded into shared memory once when the server first starts). After server restart, all looked OK.


Only other thing i can think to look at now, is i had to convert the datetimes into something c# wants to use, maybe its a datetime error

How does C# figure into this issue ?

dcosper
03-11-2013, 05:50 PM
well if you ran the query fine and had all your items on restart, the c# datetimes are not the issue, when i run that query on my database, i can no longer access any items in the game lol, wierd

dcosper
03-11-2013, 05:55 PM
I have to run shared_memory.exe each time i add a item, otherwise it doesnt update the shared folder, its is in game now :D