Jump to content

DB + No TXT


Recommended Posts

7+1.) New item_proto_table.sql:

DROP TABLE IF EXISTS `item_proto`;
CREATE TABLE `item_proto` (
  `vnum` int(11) unsigned NOT NULL DEFAULT '0',
  `vnum_range` int(11) unsigned NOT NULL DEFAULT '0',
  `name` varbinary(200) NOT NULL DEFAULT 'Noname                  ',
  `locale_name` varbinary(24) NOT NULL DEFAULT 'Noname                  ',
  `type` tinyint(2) NOT NULL DEFAULT '0',
  `subtype` tinyint(2) NOT NULL DEFAULT '0',
  `weight` tinyint(3) DEFAULT '0',
  `size` tinyint(3) DEFAULT '0',
  `antiflag` int(11) DEFAULT '0',
  `flag` int(11) DEFAULT '0',
  `wearflag` int(11) DEFAULT '0',
  `immuneflag` set('PARA','CURSE','STUN','SLEEP','SLOW','POISON','TERROR') CHARACTER SET big5 NOT NULL DEFAULT '',
  `gold` int(11) DEFAULT '0',
  `shop_buy_price` int(10) unsigned NOT NULL DEFAULT '0',
  `refined_vnum` int(10) unsigned NOT NULL DEFAULT '0',
  `refine_set` smallint(11) unsigned NOT NULL DEFAULT '0',
  `refine_set2` smallint(5) unsigned NOT NULL DEFAULT '0',
  `magic_pct` tinyint(4) NOT NULL DEFAULT '0',
  `limittype0` tinyint(4) DEFAULT '0',
  `limitvalue0` int(11) DEFAULT '0',
  `limittype1` tinyint(4) DEFAULT '0',
  `limitvalue1` int(11) DEFAULT '0',
  `applytype0` tinyint(4) DEFAULT '0',
  `applyvalue0` int(11) DEFAULT '0',
  `applytype1` tinyint(4) DEFAULT '0',
  `applyvalue1` int(11) DEFAULT '0',
  `applytype2` tinyint(4) DEFAULT '0',
  `applyvalue2` int(11) DEFAULT '0',
  `value0` int(11) DEFAULT '0',
  `value1` int(11) DEFAULT '0',
  `value2` int(11) DEFAULT '0',
  `value3` int(11) DEFAULT '0',
  `value4` int(11) DEFAULT '0',
  `value5` int(11) DEFAULT '0',
  `socket0` tinyint(4) DEFAULT '-1',
  `socket1` tinyint(4) DEFAULT '-1',
  `socket2` tinyint(4) DEFAULT '-1',
  `socket3` tinyint(4) DEFAULT '-1',
  `socket4` tinyint(4) DEFAULT '-1',
  `socket5` tinyint(4) DEFAULT '-1',
  `specular` tinyint(4) NOT NULL DEFAULT '0',
  `socket_pct` tinyint(4) NOT NULL DEFAULT '0',
  `addon_type` smallint(6) NOT NULL DEFAULT '0',
  PRIMARY KEY (`vnum`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
But you can modify your item_proto with "Design table" option in navicat, just make the vnum_range column to the second column after the vnum, as you can see in the query.

conf.txt:

NO_TXT                     = 1
0: TXT

1: SQL


Special thanks to:

- iMer, Zonni for the snippets ^^

Changelog:

 - "0"


 

If you find any errors or problems just post a message into this thread.

I tested on win.

I hope you like it. :lol:

With regards,

P3NG3R.

 

 

 

can you explain this step !

Link to comment
Share on other sites

  • 5 weeks later...
  • 3 weeks later...

i have a error 

he does not read the db

 

errror db sysrr

 

 

SYSERR: Jul  1 17:29:12 :: pid_init: 
Start of pid: 817

SYSERR: Jul  1 17:29:12 :: Start: TABLE_POSTFIX not configured use default
SYSERR: Jul  1 17:29:12 :: Load:  DirectQuery failed(SELECT IP_FROM, IP_TO, COUNTRY_NAME FROM iptocountry)
SYSERR: Jul  1 17:29:24 :: Process: FDWATCH: peer null in event: ident 21
SYSERR: Jul  1 17:29:29 :: Process: FDWATCH: peer null in event: ident 21

Edited by Chris90909090909090
Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...
  • 2 weeks later...

This is great but I would not recommend people nowdays to use NoTXT because most of item_proto and mob_proto compilers works with txt and these packers are more updaterd (ex. bleeding and wolfman bonus). Also many people may have used to recognize flags, antiflags, types and subtypes by words not numbers so it may be harder for them. But for you who choose to make your db like this good luck with this :) You can trust @xP3NG3Rx and his work. I did and I do not regret :) Keep up the good work @xP3NG3Rx you have more fans than you think ;)

Link to comment
Share on other sites

1 hour ago, Cyxer said:

SYSERR: Jul  1 17:29:24 :: Process: FDWATCH: peer null in event: ident 21
SYSERR: Jul  1 17:29:29 :: Process: FDWATCH: peer null in event: ident 21

This is the code from source with this 'syserr problem':

Spoiler

for (idx = 0; idx < num_events; ++idx) // 인풋
    {
        peer = (CPeer *) fdwatch_get_client_data(m_fdWatcher, idx);

        if (!peer)
        {
            if (fdwatch_check_event(m_fdWatcher, m_fdAccept, idx) == FDW_READ)
            {
                AddPeer(m_fdAccept);
                fdwatch_clear_event(m_fdWatcher, m_fdAccept, idx);
            }
            else
            {
                sys_err("FDWATCH: peer null in event: ident %d", fdwatch_get_ident(m_fdWatcher, idx));
            }

            continue;
        }

Good, if you saw there 'sys_err("FDWATCH: peer null in event: ident %d", fdwatch_get_ident(m_fdWatcher, idx));' then you'll see that the whole function is int CClientManager::Process().

Good, now take a look on item_proto if there's a problem and solve it. There are lines with mistakes(item_proto server)

"Don't be a scammer. Don't be a hacker. Don't be a motherfucker. Karma is a bitch"

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 1 month later...
  • 3 weeks later...

Excellent guide it works good ... 
but i have problem with converting item proto using convertproto.py 
if any1 can correct it will be good 
 

Error while converting

Spoiler

  File "convert_proto.py", line 857, in item_proto
    item_proto_line = "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % (row[0], "\"" + row[1] + "\"", "\""  + get_item_type(row[3], row[0]) + "\"" , "\""  + get_item_subtype(row[3], row[4], row[0]) + "\"", row[6] , get_antiflag(row[7], row[0]), get_flag(row[8], row[0]), get_wearflag(row[9], row[0]), get_immuneflag(row[10]), row[11], row[12], row[13], row[14], row[16], get_limittype(row[17]), row[18], get_limittype(row[19]), row[20], get_apply(row[21]), row[22], get_apply(row[23]), row[24], get_apply(row[25]), row[26], row[27], row[28], row[29], row[30], row[31], row[32], row[39], row[40], row[41])
TypeError: cannot concatenate 'str' and 'long' objects
 


I tell you why it is happening normal convert proto the vnum_range will be last so it wont make problem but here we added vnum_range next to vnum that is row 2... so its making problem So any one who correct this will be helpful i tried but it says 

" TypeError: not enough arguments for format string " 

Here is my Convert proto.py 

Error section 
 

Spoiler

    out_file_itemproto = open("item_proto.txt", "w")
    out_file_itemnames = open("item_names.txt", "w")
    print "Converting item_proto..."
    for row in rows:
        item_proto_line = "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % (row[0], "\"" + row[1] + "\"", "\""  + get_item_type(row[3], row[0]) + "\"" , "\""  + get_item_subtype(row[3], row[4], row[0]) + "\"", row[6] , get_antiflag(row[7], row[0]), get_flag(row[8], row[0]), get_wearflag(row[9], row[0]), get_immuneflag(row[10]), row[11], row[12], row[13], row[14], row[16], get_limittype(row[17]), row[18], get_limittype(row[19]), row[20], get_apply(row[21]), row[22], get_apply(row[23]), row[24], get_apply(row[25]), row[26], row[27], row[28], row[29], row[30], row[31], row[32], row[39], row[40], row[41])
        item_names_line = "%s\t%s" % (row[0], row[2])
        out_file_itemproto.write(item_proto_line + "\r\n")
        out_file_itemnames.write(item_names_line + "\r\n")
    out_file_itemproto.close()


Thanks in Advance 

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.