Allakhazam Item Parser

A forum for development and discussion on third party tools such as the Quest Designer

Moderator: Project Admin

Allakhazam Item Parser

Postby geshi » Tue Mar 23, 2010 9:10 pm

Here is version 1.0..

Some stats may not work (if so then please tell me which!) and also tell me any other bugs :)

Make sure you copy from the right hand side just above the item picture to above the item picture to the top of the item name then paste it into the big textBox and click the TO SQL! button and then it will put the SQL in the huge textBox AND create a .txt file containing all the sql so far:)
Attachments
Allakazham Converter.rar
source
(137.49 KiB) Downloaded 113 times
Last edited by geshi on Sun Jun 27, 2010 6:08 pm, edited 1 time in total.
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: Allakhazam Item Parser

Postby Graveen » Tue Mar 23, 2010 9:30 pm

Yes, you have to parse it now.
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Allakhazam Item Parser

Postby bluraven » Tue Mar 23, 2010 9:36 pm

For a good reference, try the google translate script. It uses a webclient, and parses the result.
Image
bluraven
Support Team
 
Posts: 1484
Joined: Mon Mar 19, 2007 8:18 am
Location: Las Vegas, NV

Re: Allakhazam Item Parser

Postby geshi » Tue Mar 23, 2010 11:17 pm

ah nice thanks..

Code: Select all
            string url = "http://www.google.com";
            WebClient webClient = new WebClient();
            webClient.Encoding = System.Text.Encoding.UTF8;
            try
            {
                string result = webClient.DownloadString(url);
                //find the translation result and cut off everything before it.
                result = result.Substring(result.IndexOf("result_box dir=") + 21, 500);
                //find the end of the translation and cut off everything after it.
                result = result.Substring(0, result.IndexOf("</div>"));
                //what you should have left is the pure translation result.
                MessageBox.Show(result);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }


that is my code now but it says "Length cannot be less then zero", it seems its this line "result = result.Substring(0, result.IndexOf("</div>"));"

anyone know ? :( sry guys
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: Allakhazam Item Parser

Postby Graveen » Wed Mar 24, 2010 9:44 am

Geshi. PM inc.
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Allakhazam Item Parser

Postby Roozzz » Wed Mar 24, 2010 3:19 pm

Question,

After toying around some things raised questions:
Code: Select all
REPLACE INTO `mobxloottemplate` (`MobXLootTemplate_ID`, `MobName`,`LootTemplateName`, `DropCount`) VALUES ('Gjalpinulva12686','Gjalpinulva','Gjalpinulva','2');

REPLACE INTO `loottemplate` (`LootTemplate_ID`, `TemplateName`, `ItemTemplateID`, `Chance`) VALUES ('Gjalpinulva12686','Gjalpinulva','TWOHAND_Sword_Dragonfury','25');


I was wondering where the LootTemplate_ID comes from?
I suppose this is randomly generated, or is there any logic behind it? And a way to prevent duplicates? (Since you use the Replace into this could go quite unnoticed).

And another small thing, instructions in a readme or inside the program would be nice, apart from the one in this thread ofcourse. Just to make things more clear.

Further then this, it seems to work fine :)
Quidquid latine dictum sit, altum videtur
Roozzz
Database Team
 
Posts: 1943
Joined: Wed Dec 06, 2006 11:00 am

Re: Allakhazam Item Parser

Postby geshi » Wed Mar 24, 2010 3:26 pm

Code: Select all
MobName + Random.ToString()

thats for LootTemplate_ID !
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: Allakhazam Item Parser

Postby Tolakram » Wed Mar 24, 2010 4:08 pm

Use GUID instead of a simple random number for the key field.

System.Guid.NewGuid().ToString()
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: Allakhazam Item Parser

Postby Merec » Thu Mar 25, 2010 1:10 am

A long time ago, I've created a parser for Items based on PHP. Currently it supports only German items (http://items.bruderschaft-des-chaos.de).
U delve an Item into a chatlog and upload it, the rest is done by the parser. Maybe ... I can do smth. like this for English Items.

Gretings,
Merec
Merec
Developer
 
Posts: 428
Joined: Thu Mar 08, 2007 8:58 am
Website: http://www.merec.org
Location: NRW, Germany

Re: Allakhazam Item Parser

Postby stephenxpimentel » Tue Mar 30, 2010 12:21 am

The only thing that sucks is that it has to be done with items IN your inventory =/
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm


Return to “%s” Third Party Tools

Who is online

Users browsing this forum: No registered users and 1 guest