Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/28/16 in all areas

  1. M2 Download Center Download Here ( Internal ) Hi there devs, I made some new reload commands about 2 weeks ago and published a tutorial about it on our Hungarian forum (you may saw them in the samurai core) and today I had some time to make the translation. What can I reload now? refine_proto (this is the only one which is not mine, its @xP3NG3Rx's, and already public here, but I added it, because I think this package has to contain it ) command: /reload p shop_item table (npc's shops) command: /reload p item_attr && item_attr_rare table; command: /reload p etc_drop_item.txt, mob_drop_item.txt, special_item_group.txt; command: /reload drop group.txt, group_group.txt; command: /reload group regen.txt, npc.txt, boss.txt, stone.txt (only on the current map) command: /reload regen because of the new "reload regen" command, I had to write a new purge command that destroys all mobs, npcs, stones (and so on...) on the current map, so I added a new /p map command to the "/p" commands that are already exists (no, the "/p all" only destroys the mobs on the current sectree (current block)) also I had to create a new command that stops all the regens (and ofc. deletes them from the memory) on the current map, so I added a new "/free_regens" command (because why not ) Its only deletes the loaded regens, and prevents the mobs from respawning (its not necessary to use this before the /reload regen) Known bug Well its not a serious problem, but for some unknown reason, when I'm debugging the core on windows server (no, not debug mode, but vs 13's debugger) and I try to do /reload regen, the core starts to consume ~40% cpu, and doesn't want to do anything (so stops working, but doesn't crash). It has no affect on FreeBSD and release or debug mode (without visual studio's debugger) on windows. game/src cmd.cpp cmd_gm.cpp input_db.cpp shop_manager.cpp refine.cpp char_manager.cpp char_manager.h item_manager.h item_manager_read_tables.cpp mob_manager.h mob_manager.cpp char.cpp sectree_manager.cpp regen.h regen.cpp shop.h shop.cpp db/src ClientManager.cpp And finally let me wish you all good luck for the setup If you have further question(s), remark(s), or anything that you want to ask or suggest, feel free to post it here, or send it in PM. If you get error(s) please upload the affected (and edited) file to [Hidden Content] and link it in your post, to make my work easier and probably I will be able to help you only in one post, so please spare me from asking basic requests like "Could you upload...". Thank you Have a nice day, ~masodikbela
    1 point
  2. open introselect.py Search: self.destGauge = [ float(valueHTH) / 380, float(valueINT) / 380, float(valueSTR) / 380, float(valueDEX) / 380 ] Change: self.destGauge = [ float(valueHTH) / 90, # max stat float(valueINT) / 90, # max stat float(valueSTR) / 90, # max stat float(valueDEX) / 90 # max stat ] open introcreate.py Search: float(self.stat[0])/float(statSummary), float(self.stat[1])/float(statSummary), float(self.stat[2])/float(statSummary), float(self.stat[3])/float(statSummary), Change: float(self.stat[0])/90, #max stat float(self.stat[1])/90, #max stat float(self.stat[2])/90, #max stat float(self.stat[3])/90, #max stat [Hidden Content] [Hidden Content] Best Regards Rideas
    1 point
  3. M2 Download Center Download Here ( Internal ) Hello. Yesterday I have to measure exp table on server, so I decidet to move exp table from array to mysql to avoid recompile every time. Go to constant.cpp and delete: 2. Go to constants.h and delete 3. Go to constants.cpp and add on last line or whatever you want in file #include "db.h" #include "dev_log.h" exp_vec exp_vector; bool LoadExpTableFromMYSQL(void) { char szCountQuery[64]; char szExp[64]; sprintf(szCountQuery, "%s", "SELECT COUNT(level) FROM common.exp_table"); sprintf(szExp, "%s", "SELECT exp FROM common.exp_table"); std::auto_ptr<SQLMsg> pCountQuery(DBManager::Instance().DirectQuery(szCountQuery)); if (pCountQuery.get() == NULL) { sys_err("Failed to fetch level count from mysql! Check table or database."); pCountQuery.release(); pCountQuery.reset(); return false; } std::auto_ptr<SQLResult> pRes(pCountQuery.get()->Get()); if (pRes->uiNumRows > 0) { MYSQL_ROW row = mysql_fetch_row(pRes.get()->pSQLResult); int level = 0; str_to_number(level, row[0]); exp_vector.reserve(level); sys_log(0, "ExpTable reserved for %d levels", level); pCountQuery.release(); pRes.release(); pCountQuery.reset(); pRes.reset(); } std::auto_ptr<SQLMsg> pExp(DBManager::Instance().DirectQuery(szExp)); if (pExp.get() == NULL) { sys_err("Failed to fetch level count from mysql! Check table or database."); pExp.release(); pExp.reset(); return false; } std::auto_ptr<SQLResult> pRes2(pExp.get()->Get()); if (pRes2->uiNumRows > 0) { for (uint uiRow = 0; uiRow != pRes2->uiNumRows; ++uiRow) { MYSQL_ROW row = mysql_fetch_row(pRes2->pSQLResult); long long exp = 0; str_to_number(exp, row[0]); exp_vector.push_back(exp); sys_log(0, "Pushing exp %d to exp_vector", exp); } pExp.release(); pExp.reset(); pRes2.release(); pRes2.reset(); return true; } return false; } 4. Go to static void __LocaleService_Init_Korea() in locale_service.cpp and delete exp_table = exp_table_euckr; static void __LocaleService_Init_YMIR() delete exp_table = exp_table_euckr; static void __LocaleService_Init_Singapore() delete exp_table = exp_table_newcibn; static void __LocaleService_Init_Vietnam() delete exp_table = exp_table_newcibn; void LocaleService_TransferDefaultSetting() change if (!exp_table) exp_table = exp_table_common; to if(!LoadExpTableFromMYSQL()) { sys_err("Failed to load exp table from mysql!"); exit(1); } char.cpp CHARACTER::GetNextExp() const change exp_table to exp_vector questlua_pc.cpp int pc_give_exp_perc(lua_State* L) change exp_table to exp_vector and int pc_get_exp_perc(lua_State* L) change exp_table to exp_vector Thats all. Code can be refactored. Written in 10min
    1 point
  4. Still a small check, which does not hurt. Words can block them from insult.txt def GetTitle(self): vegas = self.inputValue.GetText() #vegas_len = len(vegas) #if vegas_len > 0: if net.IsInsultIn(vegas): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.CHAT_INSULT_STRING) return #titan2_block = self.inputValue.GetText() #vegas_lista = ["%s","%","etc0","etc1","etc2"] #for x in xrange(len(vegas_lista)): #if titan2_block == vegas_lista[x]: #chat.AppendChat(chat.CHAT_TYPE_INFO, "[Offline Shop] Store name contains forbidden words.") #return else: return self.inputValue.GetText()
    1 point
  5. Hello, I've found solution for my problem. And I'd like to share it with you (probably will be useful for someone) The problem was in d.purge_area() , somehow when this function triggered in quest-file and if player used skills at same time, the core allows to use skills on nonexistent (already purged) characters. So I've changed just one row in questlua_dungeon.cpp in struct FPurgeArea and now all works well. This topic could be closed. #SOLVED
    1 point
  6. Well imma do it for you how to make 1 kingdom for this dont need sv side just client since they wont be able to create more: first in " introempire.py seek for this EMPIRE_DESCRIPTION_TEXT_FILE_NAME = { net.EMPIRE_A : uiScriptLocale.EMPIREDESC_A, net.EMPIRE_B : uiScriptLocale.EMPIREDESC_B, net.EMPIRE_C : uiScriptLocale.EMPIREDESC_C, } and remove the lines and keep the kingdom you want i will pick A [ RED ] EMPIRE_DESCRIPTION_TEXT_FILE_NAME = { net.EMPIRE_A : uiScriptLocale.EMPIREDESC_A, } then seek for self.empireAreaCurAlpha = { net.EMPIRE_A:0.0, net.EMPIRE_B:0.0, net.EMPIRE_C:0.0 } self.empireAreaDestAlpha = { net.EMPIRE_A:0.0, net.EMPIRE_B:0.0, net.EMPIRE_C:0.0 } self.empireAreaFlagCurAlpha = { net.EMPIRE_A:0.0, net.EMPIRE_B:0.0, net.EMPIRE_C:0.0 } self.empireAreaFlagDestAlpha = { net.EMPIRE_A:0.0, net.EMPIRE_B:0.0, net.EMPIRE_C:0.0 } self.empireFlagCurAlpha = { net.EMPIRE_A:0.0, net.EMPIRE_B:0.0, net.EMPIRE_C:0.0 } self.empireFlagDestAlpha = { net.EMPIRE_A:0.0, net.EMPIRE_B:0.0, net.EMPIRE_C:0.0 } and replace with this self.empireAreaCurAlpha = { net.EMPIRE_A:0.0 } self.empireAreaDestAlpha = { net.EMPIRE_A:0.0 } self.empireAreaFlagCurAlpha = { net.EMPIRE_A:0.0 } self.empireAreaFlagDestAlpha = { net.EMPIRE_A:0.0 } self.empireFlagCurAlpha = { net.EMPIRE_A:0.0 } self.empireFlagDestAlpha = { net.EMPIRE_A:0.0 } then seek for this self.empireArea[net.EMPIRE_A] = GetObject("EmpireArea_A") self.empireArea[net.EMPIRE_B] = GetObject("EmpireArea_B") self.empireArea[net.EMPIRE_C] = GetObject("EmpireArea_C") self.empireAreaFlag[net.EMPIRE_A] = GetObject("EmpireAreaFlag_A") self.empireAreaFlag[net.EMPIRE_B] = GetObject("EmpireAreaFlag_B") self.empireAreaFlag[net.EMPIRE_C] = GetObject("EmpireAreaFlag_C") self.empireFlag[net.EMPIRE_A] = GetObject("EmpireFlag_A") self.empireFlag[net.EMPIRE_B] = GetObject("EmpireFlag_B") self.empireFlag[net.EMPIRE_C] = GetObject("EmpireFlag_C") replace with this self.empireArea[net.EMPIRE_A] = GetObject("EmpireArea_A") self.empireAreaFlag[net.EMPIRE_A] = GetObject("EmpireAreaFlag_A") self.empireFlag[net.EMPIRE_A] = GetObject("EmpireFlag_A") then seek for this def ClickLeftButton(self): self.empireID-=1 if self.empireID<1: self.empireID=3 self.OnSelectEmpire(self.empireID) def ClickRightButton(self): self.empireID+=1 if self.empireID>3: self.empireID=1 replace with this def ClickLeftButton(self): self.empireID-=1 if self.empireID<1: self.empireID=1 self.OnSelectEmpire(self.empireID) def ClickRightButton(self): self.empireID+=1 if self.empireID>1: self.empireID=1 then seek for this self.empireID=app.GetRandom(1, 3) and replace with this self.empireID=app.GetRandom(1, 1) that was with root now we goo to uiscript at " selectempirewindow.py " and we seek for this ## Empire Flag { "name" : "EmpireFlag_A", "type" : "expanded_image", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "image" : "d:/ymir work/ui/intro/empire/empireflag_a.sub" }, { "name" : "EmpireFlag_B", "type" : "expanded_image", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "image" : "d:/ymir work/ui/intro/empire/empireflag_b.sub" }, { "name" : "EmpireFlag_C", "type" : "expanded_image", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "image" : "d:/ymir work/ui/intro/empire/empireflag_c.sub" }, and we remove last 2 kingdoms should look this ## Empire Flag { "name" : "EmpireFlag_A", "type" : "expanded_image", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "image" : "d:/ymir work/ui/intro/empire/empireflag_a.sub" }, watch it with the " } " or you will end up f****** it xD This will alow players to pick one of the kingdoms the one you want so there is no need of any sv side modifications! Hope will work xD i have 2 Kingdoms and work like a charm!
    1 point
×
×
  • 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.