Thread Tools Display Modes
12-11-05, 10:15 AM   #1
Deli
A Defias Bandit
 
Deli's Avatar
Join Date: Dec 2005
Posts: 3
Export SavedVariables

Hi,

in our Guild we use GuildAds, so when a member needs something
he asked via guidads.

But what is when I am not in the game, for example when I'm on work?

So I want export the SavedVariables\Guildads.lua in an format, which I
can easy parse with php and generate an page where I link the Items
to an german wow-database.

Has anybody tried something in this direction? The lua savedvariables has
in the most plugins the same format as shown below.

Regards,
Deli

Code:
			["Global"] = {
				["GuildAdsDasOrionbündnis"] = {
					[1] = {
						[1] = {
		 		 	["creationtime"] = 376633,
		 		 	["itemName"] = "Arkanitrute",
		 		 	["id"] = 8,
		 		 	["text"] = "",
		 		 	["itemRef"] = "item:16206:0:0:0",
		 		 	["count"] = 1,
		 		 	["itemColor"] = "ffffffff",
		 		 	["owner"] = "Valbala",
		 		 	["texture"] = "Interface\\Icons\\INV_Staff_19",
						},
						[2] = {
		 		 	["creationtime"] = 365683,
		 		 	["itemName"] = "Dunkeleisenerz",
		 		 	["id"] = 7,
		 		 	["text"] = "",
		 		 	["itemRef"] = "item:11370:0:0:0",
		 		 	["count"] = 11,
		 		 	["itemColor"] = "ffffffff",
		 		 	["owner"] = "Valbala",
		 		 	["texture"] = "Interface\\Icons\\INV_Ore_Mithril_01",
						},
						[3] = {
		 		 	["creationtime"] = 345252,
		 		 	["itemName"] = "Geisterpilz",
		 		 	["id"] = 1,
		 		 	["text"] = "",
		 		 	["itemRef"] = "item:8845:0:0:0",
		 		 	["count"] = 30,
		 		 	["itemColor"] = "ffffffff",
		 		 	["owner"] = "Dilumielle",
		 		 	["texture"] = "Interface\\Icons\\INV_Mushroom_08",
						},
						[4] = {
		 		 	["creationtime"] = 420555,
		 		 	["itemName"] = "Grober Faden",
		 		 	["id"] = 2,
		 		 	["text"] = "",
		 		 	["itemRef"] = "item:2320:0:0:0",
		 		 	["itemColor"] = "ffffffff",
		 		 	["owner"] = "Milbona",
		 		 	["texture"] = "Interface\\Icons\\INV_Fabric_Linen_03",
						},
						[5] = {
		 		 	["creationtime"] = 420555,
		 		 	["itemName"] = "Grober Faden",
		 		 	["id"] = 4,
		 		 	["text"] = "",
		 		 	["itemRef"] = "item:2320:0:0:0",
		 		 	["itemColor"] = "ffffffff",
		 		 	["owner"] = "Milbona",
		 		 	["texture"] = "Interface\\Icons\\INV_Fabric_Linen_03",
						},
						[6] = {
		 		 	["creationtime"] = 375669,
		 		 	["itemName"] = "Kupferbarren",
		 		 	["id"] = 0,
		 		 	["text"] = "",
		 		 	["itemRef"] = "item:2840:0:0:0",
		 		 	["itemColor"] = "ffffffff",
		 		 	["owner"] = "Deakon",
		 		 	["texture"] = "Interface\\Icons\\INV_Ingot_02",
						},
						[7] = {
		 		 	["creationtime"] = 428590,
		 		 	["itemName"] = "Leinenstoff",
		 		 	["id"] = 0,
		 		 	["owner"] = "Arâgôn",
		 		 	["itemRef"] = "item:2589:0:0:0",
		 		 	["itemColor"] = "ffffffff",
		 		 	["text"] = "",
		 		 	["texture"] = "Interface\\Icons\\INV_Fabric_Linen_01",
						},
						[8] = {
		 		 	["creationtime"] = 428590,
		 		 	["itemName"] = "Leinenstoff",
		 		 	["id"] = 1,
		 		 	["owner"] = "Arâgôn",
		 		 	["itemRef"] = "item:2589:0:0:0",
		 		 	["itemColor"] = "ffffffff",
		 		 	["text"] = "",
		 		 	["texture"] = "Interface\\Icons\\INV_Fabric_Linen_01",
						},
						[9] = {
		 		 	["creationtime"] = 428590,
		 		 	["itemName"] = "Leinenstoff",
		 		 	["id"] = 2,
		 		 	["owner"] = "Arâgôn",
		 		 	["itemRef"] = "item:2589:0:0:0",
		 		 	["itemColor"] = "ffffffff",
		 		 	["text"] = "",
		 		 	["texture"] = "Interface\\Icons\\INV_Fabric_Linen_01",
						},
						[10] = {
		 		 	["creationtime"] = 428590,
		 		 	["itemName"] = "Leinenstoff",
		 		 	["id"] = 3,
		 		 	["owner"] = "Arâgôn",
		 		 	["itemRef"] = "item:2589:0:0:0",
		 		 	["itemColor"] = "ffffffff",
		 		 	["text"] = "",
		 		 	["texture"] = "Interface\\Icons\\INV_Fabric_Linen_01",
						},

Last edited by Deli : 12-11-05 at 10:18 AM.
  Reply With Quote
12-11-05, 02:15 PM   #2
Esamynn
Featured Artist
Premium Member
Featured
Join Date: Jan 2005
Posts: 395
You don't really have any control over the format of the SavedVariables file beyond the table structure. I'm afraid you'll have to parse it as is.
  Reply With Quote
12-11-05, 05:43 PM   #3
Deli
A Defias Bandit
 
Deli's Avatar
Join Date: Dec 2005
Posts: 3
Hi,

ok that we can not control the format I had supposed, but I had hope for an solution with an external script. PHP, VB, Java, C, C++, etc.

Regards,
Marco
  Reply With Quote
12-26-05, 01:56 PM   #4
Geometrix
A Kobold Labourer
Join Date: Dec 2005
Posts: 1
if you look at the WoW Profilers project, I know their luaparse.php/wowdb.php pair is rather flexible, I used it when I wrote my bookworm parser, but that never realy got off the ground.

Attatched are 3 files
LUAParse.php
-- the LUA Partser function
wowdb.php
-- a database abstration layer tailored for use with LUAParse.php
update.php
-- an example of how to implement the above 2 files


all of these files are ripped right out of WoWProfiler, I just know in the past I have found them easy enough to tweak to my own needs. I did not write them.
Attached Files
File Type: zip LUAParse.zip (9.9 KB, 827 views)
  Reply With Quote
12-26-05, 04:30 PM   #5
Deli
A Defias Bandit
 
Deli's Avatar
Join Date: Dec 2005
Posts: 3
Thx,

I will try it.

Regards,
Marco
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Export SavedVariables


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off