VegaS
Banned-
Posts
363 -
Joined
-
Last visited
-
Days Won
40 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Everything posted by VegaS
-
Example: LPITEM item ; if (IS_SET (item ->GetAntiFlag(), ITEM_ANTIFLAG_GIVE | ITEM_ANTIFLAG_PKDROP | ITEM_ANTIFLAG_SELL)) return ; enum EItemAntiFlag { ITEM_ANTIFLAG_FEMALE = ( 1 << 0 ), ITEM_ANTIFLAG_MALE = ( 1 << 1 ), ITEM_ANTIFLAG_WARRIOR = ( 1 << 2 ), ITEM_ANTIFLAG_ASSASSIN = ( 1 << 3 ), ITEM_ANTIFLAG_SURA = ( 1 << 4 ), ITEM_ANTIFLAG_SHAMAN = ( 1 << 5 ), ITEM_ANTIFLAG_GET = ( 1 << 6 ), ITEM_ANTIFLAG_DROP = ( 1 << 7 ), ITEM_ANTIFLAG_SELL = ( 1 << 8 ), ITEM_ANTIFLAG_EMPIRE_A = ( 1 << 9 ), ITEM_ANTIFLAG_EMPIRE_B = ( 1 << 10 ), ITEM_ANTIFLAG_EMPIRE_C = ( 1 << 11 ), ITEM_ANTIFLAG_SAVE = ( 1 << 12 ), ITEM_ANTIFLAG_GIVE = ( 1 << 13 ), ITEM_ANTIFLAG_PKDROP = ( 1 << 14 ), ITEM_ANTIFLAG_STACK = ( 1 << 15 ), ITEM_ANTIFLAG_MYSHOP = ( 1 << 16 ), ITEM_ANTIFLAG_SAFEBOX = ( 1 << 17 ), };
-
-
[Hidden Content]
-
root/uiInventory.py //Delete this: self.wndMoneySlot.SetEvent(ui.__mem_func__(self.OpenPickMoneyDialog))
-
Check private message.
-
Fuck code, but need to work. --[[ ############################ # Author: VegaS # # Date: 28/07/2016 | 05:18 # # Quest: Shop # ############################ ]] quest shop begin state start begin function pTable(self, pArg) for x = 1, table.getn(self) do if self[x] == pArg then return true end end return false end function pError(arg1, arg2) if arg1 == "err_acces" then syschat(string.format("<Shop> You're in the Kingdom [%s] you can not create a shop in own kingdom.", arg2)) if arg1 == "err_riding" then syschat("<Shop> You can not open a shop while riding!") if arg1 == "err_polymorph" then syschat("<Shop> You can not open a shop while being transformed!") end end end end when 50200.use begin local pEmpire = {1, 2, 3} local pMaps_1 = {1, 3} local pMaps_2 = {21, 23} local pMaps_3 = {41, 43} if pc.get_empire() == 1 and shop.pTable(pMaps_1, pc.get_map_index()) then shop.pError("err_acces", "Shinsoo") return elseif pc.get_empire() == 2 and shop.pTable(pMaps_2, pc.get_map_index()) then shop.pError("err_acces", "Chunjo") return elseif pc.get_empire() == 3 and shop.pTable(pMaps_3, pc.get_map_index()) then shop.pError("err_acces", "Jinno") return elseif pc.is_mount() or pc.is_riding() then shop.pError("err_riding") return elseif pc.is_polymorphed() then shop.pError("err_polymorph") return elseif pc.count_item(item.get_vnum()) >= 1 then pc.remove_item(item.get_vnum(), 1) cmdchat("OpenPrivateShop") end end end end [File: src/Server/game/src/game/char.cpp] //Delete this: else if (CountSpecifyItem(50200)) RemoveSpecifyItem(50200, 1); else return; Go in navicat in player.item_proto and search vnum 50200 and change Type = 18 and SubType = 0.
-
-
-
How can I remove Help window in client
VegaS replied to glubara's topic in Community Support - Questions & Answers
root/uiGameButton.py: //Search: if 0 == player.GetPlayTime(): helpButton.Show() else: helpButton.Hide() //Replace with: import constInfo if (constInfo.TableFunc(1)) == "Enable": if player.GetPlayTime() == (constInfo.TableFunc(2)): helpButton.Show() else: helpButton.Hide() elif (constInfo.TableFunc(1)) == "Disable": helpButton.Hide() root/constInfo.py: def TableFunc(o): i = { 1 : "Disable", # Enable or Disable for check function 2 : 0} # The time for check if u have time 0 show you button if i.has_key(o): return i[o] I hope this is what you wanted, or did not understand well. My English is shit, sorry. -
PythonPlayer.cpp s_dwNextTCPTime=dwCurTime + 500;
-
ClientManagerBoot.cpp bool CClientManager::InitializeItemTable() { char query[4096]; snprintf(query, sizeof(query), "SELECT vnum, name, %s, type, subtype, gold, shop_buy_price, weight, size, flag, wearflag, " "antiflag, immuneflag+0, refined_vnum, refine_set, magic_pct, socket_pct, addon_type, " "limittype0, limitvalue0, limittype1, limitvalue1, " "applytype0, applyvalue0, applytype1, applyvalue1, applytype2, applyvalue2, " "value0, value1, value2, value3, value4, value5, vnum_range " "FROM item_proto%s ORDER BY vnum", g_stLocaleNameColumn.c_str(), GetTablePostfix()); std::auto_ptr<SQLMsg> pkMsg(CDBManager::instance().DirectQuery(query)); SQLResult * pRes = pkMsg->Get(); if (!pRes->uiNumRows) { sys_err("Could not load item_proto. No results!"); return false; } sys_log(0, "ITEM_PROTO loading..."); if (!m_vec_itemTable.empty()) { sys_log(0, "RELOAD: item_proto"); m_vec_itemTable.clear(); m_map_itemTableByVnum.clear(); } m_vec_itemTable.resize(pRes->uiNumRows); memset(&m_vec_itemTable[0], 0, sizeof(TItemTable) * m_vec_itemTable.size()); TItemTable * item_table = &m_vec_itemTable[0]; MYSQL_ROW data; int col; while ((data = mysql_fetch_row(pRes->pSQLResult))) { col = 0; str_to_number(item_table->dwVnum, data[col++]); strlcpy(item_table->szName, data[col++], sizeof(item_table->szName)); strlcpy(item_table->szLocaleName, data[col++], sizeof(item_table->szLocaleName)); str_to_number(item_table->bType, data[col++]); str_to_number(item_table->bSubType, data[col++]); str_to_number(item_table->dwGold, data[col++]); str_to_number(item_table->dwShopBuyPrice, data[col++]); str_to_number(item_table->bWeight, data[col++]); str_to_number(item_table->bSize, data[col++]); str_to_number(item_table->dwFlags, data[col++]); str_to_number(item_table->dwWearFlags, data[col++]); str_to_number(item_table->dwAntiFlags, data[col++]); str_to_number(item_table->dwImmuneFlag, data[col++]); str_to_number(item_table->dwRefinedVnum, data[col++]); str_to_number(item_table->wRefineSet, data[col++]); str_to_number(item_table->bAlterToMagicItemPct, data[col++]); str_to_number(item_table->bGainSocketPct, data[col++]); str_to_number(item_table->sAddonType, data[col++]); item_table->cLimitRealTimeFirstUseIndex = -1; item_table->cLimitTimerBasedOnWearIndex = -1; int i; for (i = 0; i < ITEM_LIMIT_MAX_NUM; ++i) { str_to_number(item_table->aLimits[i].bType, data[col++]); str_to_number(item_table->aLimits[i].lValue, data[col++]); if (LIMIT_REAL_TIME_START_FIRST_USE == item_table->aLimits[i].bType) item_table->cLimitRealTimeFirstUseIndex = (char)i; if (LIMIT_TIMER_BASED_ON_WEAR == item_table->aLimits[i].bType) item_table->cLimitTimerBasedOnWearIndex = (char)i; } for (i = 0; i < ITEM_APPLY_MAX_NUM; ++i) { str_to_number(item_table->aApplies[i].bType, data[col++]); str_to_number(item_table->aApplies[i].lValue, data[col++]); } for (i = 0; i < ITEM_VALUES_MAX_NUM; ++i) str_to_number(item_table->alValues[i], data[col++]); sys_log(1, "ITEM: #%-5lu %-24s %-24s VAL: %ld %ld %ld %ld %ld %ld WEAR %lu ANTI %lu IMMUNE %lu REFINE %lu REFINE_SET %u MAGIC_PCT %u", item_table->dwVnum,item_table->szName,item_table->szLocaleName, item_table->alValues[0],item_table->alValues[1],item_table->alValues[2], item_table->alValues[3],item_table->alValues[4],item_table->alValues[5], item_table->dwWearFlags,item_table->dwAntiFlags,item_table->dwImmuneFlag, item_table->dwRefinedVnum,item_table->wRefineSet,item_table->bAlterToMagicItemPct); m_map_itemTableByVnum.insert(std::map<DWORD, TItemTable *>::value_type(item_table->dwVnum, item_table)); ++item_table; } sort(m_vec_itemTable.begin(), m_vec_itemTable.end(), FCompareVnum()); sys_log(0, "CClientManager::InitializeMobTable:: %d items loaded.\n", m_vec_itemTable.size()); fprintf(stderr,"Database load complete! %d items loaded.\r\n", m_vec_itemTable.size()); const char* sMessage_1 = "Database -----"; const char* sMessage_2 = "rev. perforce 40250"; fprintf(stderr,"-- %s || %s --\r\n", sMessage_1, sMessage_2); return true; }
-
-
Help erro LoadMonsterAreaInfo
VegaS replied to MORTE's topic in Community Support - Questions & Answers
Those 2 files and causes an error in the client exactly are useless, can solve this and the only source client to wait to replace and delete those files. But you can do and without it: 1018 00:03:52166 :: CMapOutdoor::Load - LoadMonsterAreaInfo ERROR Open the folder metin2_map_c1 / a1 / b1 etc..(Example: pack/OutdoorC1/metin2_map_c1) and delete files : -monsterareainfo.txt -monsterarrange.txt And replaced this file: [Hidden Content] "''The WorldEditor reads regen.txt, not monsterareainfo.txt. Old map folders have these files, but those are totally useless, if not trash."'' Next time use function search pls. -
Here is a small check: s_Color = [0xffFFC700, 0xffFFC700] if (12010 <= itemVnum and itemVnum <= 12019): # 12010 | 12011 | 12012 | 12013 | 12014 | 12015 | 12016 | 12017 | 12018 | 12019 self.AppendTextLine("Description for item 12019 <= 12019!", s_Color[0]) if (1 <= itemVnum and itemVnum <= 20009): # 1 | 2 | 3 | 4 | 5 etc etc...max 20009 self.AppendTextLine("Description for all items!", s_Color[1]) And if u want to add extented line simple: if itemVnum in (50011, 50012, 50013): pItem_list = { 50011 : ["[i]", "Item description 1!", "ServerName: %s" % "|cFF6af200" + localeInfo.APP_TITLE], 50012 : ["[i]", "Item description 2!", "ServerName: %s" % "|cFF6af200" + localeInfo.APP_TITLE], 50013 : ["[i]", "Item description 3!", "ServerName: %s" % "|cFF6af200" + localeInfo.APP_TITLE]} self.AppendSpace(5) for i in xrange(len(pItem_list[itemVnum])): self.AppendTextLine(pItem_list[itemVnum][i], self.SPECIAL_POSITIVE_COLOR)
-
Player's Alignment logic
VegaS replied to Mind Rapist's topic in Community Support - Questions & Answers
Already i say that noob, next time read carefully the information and code..so please stop to make spam xD -
Player's Alignment logic
VegaS replied to Mind Rapist's topic in Community Support - Questions & Answers
Oh ya ya , i forgot, sorry again. m_iRealAlignment = MINMAX(-200000, m_iRealAlignment + iAmount, 200000); Replace with: m_iRealAlignment = MINMAX(-20000, m_iRealAlignment + iAmount, 20000); Haste makes waste, haha. xD -
Player's Alignment logic
VegaS replied to Mind Rapist's topic in Community Support - Questions & Answers
Ohh and i forgot this: [File: /Src/server/game/src/questlua_pc.cpp] //1.) Search: int pc_get_real_alignment(lua_State* L) { lua_pushnumber(L, CQuestManager::instance().GetCurrentCharacterPtr()->GetRealAlignment()/10); return 1; } int pc_get_alignment(lua_State* L) { lua_pushnumber(L, CQuestManager::instance().GetCurrentCharacterPtr()->GetAlignment()/10); return 1; } int pc_change_alignment(lua_State * L) { int alignment = (int)(lua_tonumber(L, 1)*10); LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); ch->UpdateAlignment(alignment); return 0; } //2.) Replace with: int pc_get_real_alignment(lua_State* L) { lua_pushnumber(L, CQuestManager::instance().GetCurrentCharacterPtr()->GetRealAlignment()); return 1; } int pc_get_alignment(lua_State* L) { lua_pushnumber(L, CQuestManager::instance().GetCurrentCharacterPtr()->GetAlignment()); return 1; } int pc_change_alignment(lua_State * L) { int alignment = (int)(lua_tonumber(L, 1)); LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); ch->UpdateAlignment(alignment); return 0; } -
Player's Alignment logic
VegaS replied to Mind Rapist's topic in Community Support - Questions & Answers
[File: /Src/server/game/src/char.cpp] //1.) Search: addPacket.sAlignment = m_iAlignment / 10; //2.) Replace with: addPacket.sAlignment = m_iAlignment; //1.) Search: pack.sAlignment = m_iAlignment / 10; //2.) Replace with: pack.sAlignment = m_iAlignment; [File: /Src/server/game/src/char_battle.cpp] //1.) Search: void CHARACTER::UpdateAlignment(int iAmount) { bool bShow = false; if (m_iAlignment == m_iRealAlignment) bShow = true; int i = m_iAlignment / 10; m_iRealAlignment = MINMAX(-200000, m_iRealAlignment + iAmount, 200000); if (bShow) { m_iAlignment = m_iRealAlignment; if (i != m_iAlignment / 10) UpdatePacket(); } } //2.) Replace with: void CHARACTER::UpdateAlignment(int iAmount) { bool bShow = false; if (m_iAlignment == m_iRealAlignment) bShow = true; int i = m_iAlignment; m_iRealAlignment = MINMAX(-20000, m_iRealAlignment + iAmount, 20000); if (bShow) { m_iAlignment = m_iRealAlignment; if (i != m_iAlignment) UpdatePacket(); } } Now you'll get the real values, for example if your align in the game is 17214 in the database will show 17214 work good, before to make that he show multiplied by *10 equals with 172 140 in database. Now this is a check what you want: if (GetRealAlignment() > 3999 && GetRealAlignment() < 8001) { ChatPacket(CHAT_TYPE_INFO, "<Debug> Alignment loaded: %u", GetRealAlignment()); } -
Quest python comunication
VegaS replied to kimameixede's topic in Community Support - Questions & Answers
Small example here: i = int(number) x = [0,1,2,3,4,5,6,7,8,9,10] if i == x[1] and i != x[0]: chat.AppendChat(chat.CHAT_TYPE_INFO, "print number_vegas: [%s]" % int(i)) pass elif i == x[2] and i != x[0]: chat.AppendChat(chat.CHAT_TYPE_INFO, "print number_vegas: [%s]" % int(i)) pass -
LPCHARACTER ch; ch->DoRefine(item);
-
Hide time function with this code
VegaS replied to ReFresh's topic in Community Support - Questions & Answers
#requestremovereplyshit -
Hide time function with this code
VegaS replied to ReFresh's topic in Community Support - Questions & Answers
-
Hide time function with this code
VegaS replied to ReFresh's topic in Community Support - Questions & Answers
#requestremovereplyshit -
Hide time function with this code
VegaS replied to ReFresh's topic in Community Support - Questions & Answers
#requestremovereplyshit -
Hide time function with this code
VegaS replied to ReFresh's topic in Community Support - Questions & Answers
#requestremovereplyshit