Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


mkhzaleh last won the day on June 7

mkhzaleh had the most liked content!

Recent Profile Visitors

380 profile views

mkhzaleh's Achievements


Vizor (2/13)

  • One Year In
  • Dedicated
  • Great Content Rare
  • Conversation Starter Rare
  • Week One Done

Recent Badges



  1. hello there! this small optimizing for _evtGameOptionFormMouseDown normal code will run every functions in the list even if its same previous value example: so what we do small optimize to call changed values in system options only " this helpful if you are using hide effects/apps etc" the modification: open UISystemForm.cpp and search for : void CSystemMgr::_evtGameOptionFormMouseDown(CCompent* pSender, int nMsgType, int x, int y, DWORD dwKey) for example we change it to now repeat same steps for the rest options pGroup = g_stUISystem.cbxHelpMode; if (pGroup) { bool bHelpMode = pGroup->GetActiveIndex() == 1 ? true : false; if (g_stUISystem.m_sysProp.m_gameOption.bHelpMode != bHelpMode) { g_stUISystem.m_sysProp.m_gameOption.bHelpMode = bHelpMode; if (!bHelpMode) g_stUIStart.ShowLevelUpHelpButton(bHelpMode); g_stUIStart.ShowInfoCenterButton(bHelpMode); ::WritePrivateProfileString("gameOption", "helpMode", bHelpMode ? "1" : "0", "./user/system.ini"); } }
  2. Hello there! as all you know all top client has this bug exist you edit music volume >close client> reopen music still playing as max volume until open/apply music edits again so this small fix for that! open: PacketCMD_CS.CPP on header add : #include "UIsystemform.h" :search for: void CS_BeginPlay(const char *cha) add inside it : g_stUISystem.m_sysProp.ApplyAudio(); done: rebuild . :if you have some cool ideas to make for top type them here! some of codes been done lately :
  3. not sure who care for your list? when ever i bought something from you? lol? if not "and its not" just can stfu? when i ever sold you anything? " which is also never done" so stfu?
  4. mentioning my name while i never sold u anyshit or bought from you means you are totally dumb person? but talking about scams everyone who contact with you and bought your"mount fix" was totally my code with 1 line of edits? so its means you are a dumb person and scammer for other people works? and you still standing there to comment about this guy work with no sense and doing shits in this community? so can you just stfu and quit as u did before?
  5. its happen if you use ship.. and i see people still keep such stupid bugs like this for their own
  6. you have to check player stall/trade action as well if IsChaStall(role) == LUA_TRUE and IsChaLocked(role) == LUA_TRUE then return LUA_FALSE end to fix in src just replace to this BOOL CCharacter::SafeBuy( WORD wItemID, BYTE byCount, BYTE byIndex, DWORD& dwMoney ) {T_B if(GetPlyMainCha()->m_CKitbag.IsPwdLocked()) { //SystemNotice("Item bar is locked!"); SystemNotice(RES_STRING(GM_CHARACTER_CPP_00002)); return FALSE; } ///stall/trade dupe fix [ mothannakh 15/8/2019]/ //check if trade mode if (GetPlyMainCha()->GetTradeData()) { SystemNotice(RES_STRING(GM_CHARSTALL_CPP_00029)); return FALSE; } //check if player stalling if (GetPlyMainCha()->GetStallData()) { //character.SystemNotice( "Stalling, not trading" ); SystemNotice(RES_STRING(GM_CHARTRADE_CPP_00003)); return FALSE; } //add by ALLEN 2007-10-16 if(GetPlyMainCha()->IsReadBook()) { //SystemNotice("Reading, not trading!"); SystemNotice(RES_STRING(GM_CHARACTER_CPP_00003)); return FALSE; } CItemRecord* pItem = GetItemRecordInfo( wItemID ); if( pItem == NULL ) { //SystemNotice( "The item ID is wrong, the item information cannot be found!ID = %d", wItemID ); SystemNotice( RES_STRING(GM_CHARACTER_CPP_00005), wItemID ); return FALSE; } if(byCount <= 0) { //SystemNotice("Data error, purchase failed!"); SystemNotice(RES_STRING(GM_CHARACTER_CPP_00015)); return FALSE; } //mothannakh fix the npc exploit in src , if (byCount > pItem->nPileMax) { BickerNotice("%s comes in Stacks of %d Only", pItem->szName, pItem->nPileMax); return FALSE; } dwMoney = pItem->lPrice * byCount; USHORT sSize = m_CKitbag.GetCapacity(); if( byIndex >= sSize ) { //SystemNotice( "Item field index (% d) is invalid!", By Index ); SystemNotice( RES_STRING(GM_CHARACTER_CPP_00016), byIndex ); return FALSE; } if( m_CKitbag.GetID( byIndex ) == wItemID ) { if( !pItem->GetIsPile() ) { //SystemNotice( "This item"% s "cannot be stacked!", pItem->szName ); SystemNotice( RES_STRING(GM_CHARACTER_CPP_00017), pItem->szName ); return FALSE; } } DWORD dwCharMoney = (long)getAttr( ATTR_GD ); if( dwCharMoney < dwMoney ) { //SystemNotice( "Your money (% d) is not enough to purchase% d items "% s"! Unit price (% d)", dwCharMoney,byCount, pItem->szName, pItem->lPrice ); SystemNotice( RES_STRING(GM_CHARACTER_CPP_00018), dwCharMoney,byCount, pItem->szName, pItem->lPrice ); return FALSE; } //fix money npc exploit >mothannakh< if (dwMoney >= 2000000000 && dwCharMoney != 0) { if (dwMoney > 2000000000) { BickerNotice("Total cost cannot exceed 2b..."); return FALSE; } } USHORT sNum = byCount; SItemGrid SGridCont; SGridCont.sID = wItemID; SGridCont.sNum = byCount; ItemInstance( enumITEM_INST_BUY, &SGridCont ); m_CKitbag.SetChangeFlag(false); m_CChaAttr.ResetChangeFlag(); SetBoatAttrChangeFlag(false); // Deposit instantiated items Short sPushPos = defKITBAG_DEFPUSH_POS; Short sPushRet = KbPushItem( true, false, &SGridCont, sPushPos ); SynKitbagNew( enumSYN_KITBAG_FROM_NPC ); if( sPushRet == enumKBACT_ERROR_LOCK ) // Item bar is locked { ItemOprateFailed( enumITEMOPT_ERROR_KBLOCK ); return FALSE; } else if( sPushRet == enumKBACT_ERROR_PUSHITEMID ) // Item does not exist { ItemOprateFailed( enumITEMOPT_ERROR_NONE ); return FALSE; } else if( sPushRet == enumKBACT_ERROR_FULL ) // Item bar is full, reducing purchases { // Get item trigger event sNum = sNum - SGridCont.sNum; if( sNum == 0 ) { //SystemNotice( "Your inventory is full and you cannot buy items!" ); SystemNotice( RES_STRING(GM_CHARACTER_CPP_00019) ); return TRUE; } // Get item trigger event AfterPeekItem( wItemID, sNum ); } else if( sPushRet == enumKBACT_SUCCESS ) { // Get item trigger event AfterPeekItem( wItemID, sNum ); } dwMoney = sNum * pItem->lPrice; dwCharMoney -= dwMoney; setAttr( ATTR_GD, dwCharMoney ); SynAttr( enumATTRSYN_TRADE ); SyncBoatAttr(enumATTRSYN_TRADE); //SystemNotice( "You have purchased% d "% s" and spent (% d) money! Balance (%d)", sNum, pItem->szName, dwMoney, dwCharMoney ); SystemNotice( RES_STRING(GM_CHARACTER_CPP_00020), sNum, pItem->szName, dwMoney, dwCharMoney ); char szLog[128] = ""; sprintf( szLog, "%d��%s", sNum, pItem->szName ); TL( CHA_BUY, GetName(), "", szLog ); // Database save SaveAssets(); LogAssets(enumLASSETS_TRADE); return TRUE; T_E}
  7. there is few bugs if someone willing to spend some of his time and fix them Title: GM Login function what is does ? after you use gm login you won't be able to create any character until restart groupserver how to avoid that ? just stop using that function and stop using auto login in gm accounts ---------------------------- fast panel switch lag the client : using >tab< will make client heavey until press tab once again how to fix? so far i just went to the easier solution disabled tab function & +/- buttons -----------------
  8. yea its always back how people use the code in my case its used in item so i had to use that way
  9. BOOL CTableCha::ChangePlayerChatColor(CPlayer* pPlayer, DWORD color) { T_B if (!pPlayer || !pPlayer->IsValid()) { return false; } CCharacter* pCha = pPlayer->GetMainCha(); DWORD cha_id = pPlayer->GetDBChaId(); if (cha_id == 0) { return false; } sprintf(g_sql, "Update %s set chatColour = '%d' where cha_id = %d;", _get_table(), color, cha_id); short l_sqlret = exec_sql_direct(g_sql); if (!DBOK(l_sqlret) || get_affected_rows() == 0) { pCha->PopupNotice(" Change Chat Color Failed! Something Wrong happened, try again "); return false; } LG("Player Change Chat Color", "Player '%s' Changed his Chat color to '%d'\n", pCha->GetName(), color); pCha->SetPChatColor(color); //send to groupserver WPACKET wpk = GETWPACKET(); WRITE_CMD(wpk, CMD_MP_PlayerChatColor); WRITE_LONG(wpk, color); pCha->ReflectINFof(pCha, wpk); return true; T_E } here small example how i used to do it , you have to create new cmd packet inside groupserver to update color after changes inline int lua_ChangePlayerChatColor(lua_State* L) { T_B BOOL bValid = (lua_gettop(L) == 2 && lua_islightuserdata(L, 1) && lua_isnumber(L, 2)); if (!bValid) { PARAM_ERROR return 0; } CCharacter* pCha = (CCharacter*)lua_touserdata(L, 1); const DWORD color = lua_tonumber(L, 2); if (pCha) { game_db.ChangePlayerChatColor(pCha->GetPlayer(), color); return 1; } return 0; T_E } no changes needed on db side lua side ChangePlayercColor(role,0xFFff3399)
  10. just replace Receiver.cpp from both client and gate to clean "Receiver.cpp" will fix the issue there is another fix but not a big deal
  11. this small code for people who have problem with "angle " when add npcs simply open "GameAppMsg.cpp" go to "void CGameApp::HandleKeyDown(DWORD dwKey)" add the following code : "you can add it above if(IsEnableSuperKey())" else if (IsKeyDown(DIK_K) && IsCtrlPress() && CGameScene::GetMainCha()->getGMLv()) { CCharacter* pMain = CGameScene::GetMainCha(); if (pMain) { char buf[128] = { 0 }; sprintf(buf, "Cord :(%d,%d) Angle :%d Pitch : %d Roll %d", pMain->GetCurX(), pMain->GetCurY(), pMain->getYaw(), pMain->getPitch(),pMain->getRoll()); g_pGameApp->SysInfo(buf); } } rebuild client and done ingame click ctrl+k and the result will be like this

Board Life Status

Board startup date: May 27, 2020 20:35:04
  • Create New...