Jump to content

Aveline™

Inactive Member
  • Posts

    190
  • Joined

  • Last visited

  • Days Won

    6
  • Feedback

    0%

Everything posted by Aveline™

  1. It's work. But you don't get gr2,dds another extensions. Because Metin2 say "pyc,py,txt". But you're change these extensions. (Not change txt extension) or i don't know how to do this. Just try crank program. Regards.
  2. function isLongName(name) return string.len(name) < 16 end local readMe = input() if(isLongName(tostring(readMe)) == false) then print("Your name is very long !...") else print("Your name is not very long.. ") end Regards.
  3. SYSERR: Feb 20 16:37:45 :: DoRefineWithScroll: REFINE : Unknown refine scroll item. Value0: 1 This stuation associated with item_proto file. Your object value not exist in item_proto. Check item_proto SYSERR: Feb 20 01:57:28 :: Start: TABLE_POSTFIX not configured use default It's not an error. Don't worry every server-files write this in syserr
  4. I've seen this error, this error there in game. If you're use to public 40250 game, already you're always live this error . I can say "You're try compile again." Regards.
  5. Again you remember. MySQL Function doesn't write with lua. That's write with c++ and your function with my function result same just different codes. And pc.setqf,pc.setf,pc.getqf,pc.setf use to mysql function so result samesame. your function is successful but everyone choose easy way. Best regards.
  6. Someone want to show rank system on web-page. And your function doesn't work in this situation How to get lang_status with php? You're wrong a little understand me Best regards.
  7. Hello to everyone. I'm share my multi-language system with you. I hope you're like it. Step 1. - Open questlua_pc.cpp and add these. int pc_get_lang(lua_State* L) { char szQuery[QUERY_MAX_LEN]; LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); snprintf(szQuery,sizeof(szQuery),"select lang from player%s where id = '%u'",get_table_postfix(),ch->GetPlayerID()); SQLMsg * pMsg = DBManager::instance().DirectQuery(szQuery); MYSQL_ROW row; for(int i = 0; (row = mysql_fetch_row(pMsg->Get()->pSQLResult)) != NULL; ++i) { lua_pushstring(L,row[0]); } return 1; } int pc_set_lang(lua_State* L) { char szQuery[QUERY_MAX_LEN]; if(!lua_isstring(L,1)) { return 0; } LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); snprintf(szQuery,sizeof(szQuery),"update player%s set lang = '%s' where id = '%u'",get_table_postfix(),lua_tostring(L,1),ch->GetPlayerID()); std::auto_ptr<SQLMsg> pmsg(DBManager::instance().DirectQuery(szQuery)); if(pmsg->Get()->uiInsertID == 0) { return 0; } return 1; } - After add these. { "get_lang", pc_get_lang}, { "set_lang", pc_set_lang}, Step 2. - Player.sql CREATE TABLE `NewTable` ( `id` int(11) NOT NULL AUTO_INCREMENT , `account_id` int(11) NOT NULL DEFAULT 0 , `name` varchar(24) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'NONAME' , `job` tinyint(2) UNSIGNED NOT NULL DEFAULT 0 , `voice` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 , `dir` tinyint(2) NOT NULL DEFAULT 0 , `x` int(11) NOT NULL DEFAULT 0 , `y` int(11) NOT NULL DEFAULT 0 , `z` int(11) NOT NULL DEFAULT 0 , `map_index` int(11) NOT NULL DEFAULT 0 , `exit_x` int(11) NOT NULL DEFAULT 0 , `exit_y` int(11) NOT NULL DEFAULT 0 , `exit_map_index` int(11) NOT NULL DEFAULT 0 , `hp` smallint(4) NOT NULL DEFAULT 0 , `mp` smallint(4) NOT NULL DEFAULT 0 , `stamina` smallint(6) NOT NULL DEFAULT 0 , `random_hp` smallint(5) UNSIGNED NOT NULL DEFAULT 0 , `random_sp` smallint(5) UNSIGNED NOT NULL DEFAULT 0 , `playtime` int(11) NOT NULL DEFAULT 0 , `level` tinyint(2) UNSIGNED NOT NULL DEFAULT 1 , `level_step` tinyint(1) NOT NULL DEFAULT 0 , `st` smallint(3) NOT NULL DEFAULT 0 , `ht` smallint(3) NOT NULL DEFAULT 0 , `dx` smallint(3) NOT NULL DEFAULT 0 , `iq` smallint(3) NOT NULL DEFAULT 0 , `exp` int(11) NOT NULL DEFAULT 0 , `gold` int(11) NOT NULL DEFAULT 0 , `stat_point` smallint(3) NOT NULL DEFAULT 0 , `skill_point` smallint(3) NOT NULL DEFAULT 0 , `quickslot` tinyblob NULL , `ip` varchar(15) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT '0.0.0.0' , `part_main` int(7) NOT NULL DEFAULT 0 , `part_base` tinyint(4) NOT NULL DEFAULT 0 , `part_hair` smallint(4) NOT NULL DEFAULT 0 , `skill_group` tinyint(4) NOT NULL DEFAULT 0 , `skill_level` blob NULL , `alignment` int(11) NOT NULL DEFAULT 0 , `last_play` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' , `change_name` tinyint(1) NOT NULL DEFAULT 0 , `mobile` varchar(24) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL , `sub_skill_point` smallint(3) NOT NULL DEFAULT 0 , `stat_reset_count` tinyint(4) NOT NULL DEFAULT 0 , `horse_hp` smallint(4) NOT NULL DEFAULT 0 , `horse_stamina` smallint(4) NOT NULL DEFAULT 0 , `horse_level` tinyint(2) UNSIGNED NOT NULL DEFAULT 0 , `horse_hp_droptime` int(10) UNSIGNED NOT NULL DEFAULT 0 , `horse_riding` tinyint(1) NOT NULL DEFAULT 0 , `horse_skill_point` smallint(3) NOT NULL DEFAULT 0 , `lang` varchar(5) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL , PRIMARY KEY (`id`), INDEX `account_id_idx` USING BTREE (`account_id`), INDEX `name_idx` USING BTREE (`name`) ) ENGINE=MyISAM DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci AUTO_INCREMENT=321434631 CHECKSUM=0 ROW_FORMAT=DYNAMIC DELAY_KEY_WRITE=0 ; Step 3. - How to use to this system in my game? I'll share example with you. quest mLanguage begin state start begin function load_setting() local data = { ["extension"] = {"tr","en"}, ["en"] = { ["letter"] = "Change Language" ["language"] = {"Turkish","English","Close"}, ["dialog"] = {"Please select a language... ", "No longer your language is %s. "}, }, ["tr"] = { ["letter"] = "Dilini Değiştir", ["language"] = {"Türkçe","Ingilizce","Kapat"}, ["dialog"] = {"Lütfen bir dil seçiniz.. ","Artık diliniz %s oldu. "}, }, } return data end when letter begin if(pc.get_lang() == 0) then send_letter("Select language") else send_letter(mLanguage.load_setting()[pc.get_lang()]["letter"]) end end when button or info begin local data = mLanguage.load_setting() if(pc.get_lang() != 0) then say(data[pc.get_lang()]["dialog"][1]) say("") local s = select_table(data[pc.get_lang()]["language"]) if(s >= table.getn(data[pc.get_lang()]["language"])) then return else pc.set_lang(data["extension"][s]) say(string.format(data[pc.get_lang()]["dialog"][2],data[pc.get_lang()]["language"][s])) end else say(data["en"]["dialog"][1]) say("") local s = select_table(data["en"]["language"]) if(s >= table.getn(data["en"]["language"])) then return else pc.set_lang(data["extension"][s]) say(string.format(data[pc.get_lang()]["dialog"][2],data[pc.get_lang()]["language"][s])) end end end end end This system just supported turkish and english language. Regards.
  8. I've never seen this error. Sometimes there are many error but you can fixed these error but slowly..
  9. Your mob proto file may wrong. Some program doesn't convert truth. SYSERR: Feb 7 21:10:17.299976 :: ChildLoop: AsyncSQL: query failed: Table 'account.string' doesn't exist (query: SELECT name, text FROM string errno: 1146) This error ; If string table not exist in your mysql account database, you're must be install it.
×
×
  • 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.