[MU] Học Hỏi Source zTeam HoanMaster - Trang 47
Hello & Welcome to our community. Is this your first visit? Đăng Ký
Follow us on
Follow us on Facebook Follow us on Twitter Linked In Flickr Watch us on YouTube My Space Blogger
 
Trang 47 của 50 Đầu tiênĐầu tiên ... 37 45 46 47 48 49 ... CuốiCuối
Kết quả 461 đến 470 của 497
  1. #461
    Moderator YouTobe's Avatar
    Ngày tham gia
    Jul 2012
    Đang ở
    https://t.me*********
    Bài viết
    976
    Thanks
    520
    Thanked 469 Times in 280 Posts

    Ðề: Học Hỏi Source zTeam HoanMaster

    Anh em chú ý ngôn từ kẻo ăn thẻ thì lại kêu.
    Khách viếng thăm hãy cùng YouTobe xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  2. #462
    Thành Viên nampinn's Avatar
    Ngày tham gia
    Jan 2016
    Bài viết
    625
    Thanks
    239
    Thanked 52 Times in 43 Posts

    Ðề: Học Hỏi Source zTeam HoanMaster

    Top pic này lập ra để chia sẽ và học hỏi.
    Nhưng chia sẽ chả thấy đâu, hỏi mõi cả mồm chẳng ai chỉ.

    Code danh hiệu check Lv: Mình lấy được từ Scoure của Trọng chia sẽ cho anh em sau này còn biết.

    interface.cpp
    PHP Code:
    pLoadImage("Custom\\RankHornor\\tanbinhhoangkim.tga"32600GL_LINEARGL_CLAMP10);
        
    pLoadImage("Custom\\RankHornor\\hasihoangkim.tga"32601GL_LINEARGL_CLAMP10);
        
    pLoadImage("Custom\\RankHornor\\trunguyhoangkim.tga"32602GL_LINEARGL_CLAMP10);
        
    pLoadImage("Custom\\RankHornor\\thuongtahoangkim.tga"32603GL_LINEARGL_CLAMP10);
        
    pLoadImage("Custom\\RankHornor\\caothutuyetdinh.tga"32604GL_LINEARGL_CLAMP10);
        
    pLoadImage("Custom\\RankHornor\\daituonghoangkim.tga"32605GL_LINEARGL_CLAMP10);
        
    pLoadImage("Custom\\RankHornor\\nguyensoaihoangkim.tga"32606GL_LINEARGL_CLAMP10);
        
    pLoadImage("Custom\\RankHornor\\chienthanvosong.tga"32607GL_LINEARGL_CLAMP10);
        
    pLoadImage("Custom\\RankHornor\\khongaidonoi.tga"32608GL_LINEARGL_CLAMP10);
        
    pLoadImage("Custom\\RankHornor\\devuongquyennang.tga"32609GL_LINEARGL_CLAMP10); 
    use.cpp
    PHP Code:
    #include "stdafx.h"
    #include "Import.h"
    #include "User.h"
    #include "TMemory.h"
    #include "TDebugLog.h"
    #include "Interface.h"
    #include "Protocol.h"
    #include "TrayMode.h"
    #include "ConnectEx.h"
    #include "VisualFix.h"
    #include "array.h"

    // ----------------------------------------------------------------------------------------------

    struct sMonsterBar
    {
        
    DWORD GetTime;
        
    int aIndex;
        
    int Life;
        
    int MaxLife;
        
    short Level;
        
    int ViewID;
    };

    array<
    sMonsterBarMonsterBar;

    struct sPlayerBar sMonsterBar
    {
        
    int SD;
        
    int MaxSD;
        
    short Reset;
        
    short GReset;
        
    short ExpProc;
        
    bool ChatShowed;
    };

    array<
    sPlayerBarPlayerBar;

    bool lifebar true;

    bool RankHornor;

    bool AgiBugFix;
    bool AgiBugWizard;
    bool AgiBugKnight;
    bool AgiBugElf;
    bool AgiBugGladiator;
    bool AgiBugLord;
    bool AgiBugSummon;
    bool AgiBugMonk;

    User    gObjUser;

    DWORD LastTime 0;

    // ----------------------------------------------------------------------------------------------

    void User::Load()
    {
        
    ZeroMemory(&this->lpPlayersizeof(this->lpPlayer));
        
    ZeroMemory(&this->lpViewPlayersizeof(this->lpViewPlayer));
        
    ZeroMemory(&this->lpViewTargetsizeof(this->lpViewTarget));
        
    ZeroMemory(this->m_BattleZoneListsizeof(this->m_BattleZoneList));
        
    ZeroMemory(this->m_ResetItemChecksizeof(this->m_ResetItemCheck));
        
    // ----
        
    this->m_TargetUpdateTick    0;
        
    this->m_TargetType            false;
        
    this->m_CursorX                = -1;
        
    this->m_CursorY                = -1;
        
    this->m_MapNumber            = -1;
        
    this->m_MasterLevel            0;
        
    this->m_MasterPoint            0;
        
    this->m_MasterExp            0;
        
    this->m_MasterNextExp        0;
        
    this->m_Reset                0;
        
    this->m_GrandReset            0;
    #ifdef __NOVUS__
        
    this->m_TargetLifePercent    0.0f;
        
    this->m_CraftLevel            0;
        
    this->m_CraftStage            0;
        
    this->m_CraftQuest            0;
        
    ZeroMemory(this->m_CraftItemChecksizeof(this->m_CraftItemCheck));
    #endif
        // ----
        //SetOp((LPVOID)oIsBattleServer_Call1, (LPVOID)this->IsBattleServer, ASM::CALL);
        //SetOp((LPVOID)oIsBattleServer_Call2, (LPVOID)this->IsBattleServer, ASM::CALL);
        // ----
        
    SetOp((LPVOID)0x0047FE31, (LPVOID)this->IsBattleZoneASM::CALL);
        
    SetOp((LPVOID)0x0059890D, (LPVOID)this->IsBattleZoneASM::CALL);
        
    SetOp((LPVOID)0x0059A399, (LPVOID)this->IsBattleZoneASM::CALL);
        
    SetOp((LPVOID)0x0059A93C, (LPVOID)this->IsBattleZoneASM::CALL);
        
    SetOp((LPVOID)0x0059B13B, (LPVOID)this->IsBattleZoneASM::CALL);
        
    SetOp((LPVOID)0x005A4261, (LPVOID)this->IsBattleZoneASM::CALL);
        
    SetOp((LPVOID)0x005A4D52, (LPVOID)this->IsBattleZoneASM::CALL);
        
    SetOp((LPVOID)0x005B6117, (LPVOID)this->IsBattleZoneASM::CALL);
        
    SetOp((LPVOID)0x0065A6CE, (LPVOID)this->IsBattleZoneASM::CALL);
        
    SetOp((LPVOID)0x00727837, (LPVOID)this->IsBattleZoneASM::CALL);
        
    SetOp((LPVOID)0x007860A1, (LPVOID)this->IsBattleZoneASM::CALL);
        
    SetOp((LPVOID)0x007D31AA, (LPVOID)this->IsBattleZoneASM::CALL);
        
    SetOp((LPVOID)0x007D39BD, (LPVOID)this->IsBattleZoneASM::CALL);
        
    // ----
        
    SetOp((LPVOID)0x0077F9A9, (LPVOID)this->IsMasterClassASM::CALL);
        
    SetOp((LPVOID)0x0064A85F, (LPVOID)this->IsMasterClassASM::CALL);
        
    SetOp((LPVOID)0x0064AC02, (LPVOID)this->IsMasterClassASM::CALL);
        
    SetOp((LPVOID)0x0063DDF2, (LPVOID)this->IsMasterClassASM::CALL);
        
    SetOp((LPVOID)0x0063DF89, (LPVOID)this->IsMasterClassASM::CALL);
        
    SetOp((LPVOID)0x0063EA4C, (LPVOID)this->IsMasterClassASM::CALL);
        
    SetOp((LPVOID)0x0064A79A, (LPVOID)this->IsMasterClassASM::CALL);
        
    SetOp((LPVOID)0x0064AB3D, (LPVOID)this->IsMasterClassASM::CALL);
        
    SetOp((LPVOID)0x008105CB, (LPVOID)this->IsMasterClassASM::CALL);
        
    SetOp((LPVOID)0x0081064B, (LPVOID)this->IsMasterClassASM::CALL);
        
    // ----
        
    SetOp((LPVOID)0x005B96E8, (LPVOID)this->DrawSomeASM::CALL);
        
    //---Code danh hieu check Lv
        
    RankHornor GetPrivateProfileIntA("MainConfig""Main_RankHornor"1".\\Config.ini");
        if (
    RankHornor == TRUE
            
    WritePrivateProfileStringA("MainConfig""Main_RankHornor""1"".\\Config.ini");
        else
            
    WritePrivateProfileStringA("MainConfig""Main_RankHornor""0"".\\Config.ini");
        
        
    AgiBugFix GetPrivateProfileIntA("MainConfig""Main_AgiBugFix"1".\\Config.ini");
        if (
    AgiBugFix == TRUE) {
            
    AgiBugWizard TRUE;
            
    AgiBugKnight TRUE;
            
    AgiBugElf TRUE;
            
    AgiBugGladiator TRUE;
            
    AgiBugLord TRUE;
            
    AgiBugSummon TRUE;
            
    AgiBugMonk TRUE;
            
    WritePrivateProfileStringA("MainConfig""Main_AgiBugFix""1"".\\Config.ini");
        }
        else
            
    WritePrivateProfileStringA("MainConfig""Main_AgiBugFix""0"".\\Config.ini");
        
    // ----End code danh hieu check Lv
    #ifdef __NOVUS__
        
    SetOp((LPVOID)0x00588511, (LPVOID)this->SetEventEffectASM::CALL);
    #endif
    }
    // ----------------------------------------------------------------------------------------------

    void User::Refresh()
    {
        
    this->lpPlayer            = &*(ObjectCharacter*)oUserObjectStruct;
        
    this->lpViewPlayer        = &*(ObjectPreview*)oUserPreviewStruct;
        
    this->GetTarget();
        
    // ----
        
    this->m_CursorX            pCursorX;
        
    this->m_CursorY            pCursorY;
        
    this->m_MapNumber        pMapNumber;
        
    this->m_MasterLevel        pMasterLevel;
        
    this->m_MasterPoint        pMasterPoint;
        
    this->m_MasterExp        pMasterExp;
        
    this->m_MasterNextExp    pMasterNextExp;
        
    // ----
        
    if ((gObjUser.lpPlayer->Class 7) == DarkWizard)
        {
            if (
    AgiBugWizard == TRUE)
                
    SetByte((PVOID)(0x00556C32 6), 2);
            else
                
    SetByte((PVOID)(0x00556C32 6), 15);
        }
        else if ((
    gObjUser.lpPlayer->Class 7) == DarkKnight)
        {
            if (
    AgiBugKnight == TRUE)
                
    SetByte((PVOID)(0x00556C32 6), 2);
            else
                
    SetByte((PVOID)(0x00556C32 6), 15);
        }
        else if ((
    gObjUser.lpPlayer->Class 7) == Elf)
        {
            if (
    AgiBugElf == TRUE)
                
    SetByte((PVOID)(0x00556C32 6), 2);
            else
                
    SetByte((PVOID)(0x00556C32 6), 15);
        }
        else if ((
    gObjUser.lpPlayer->Class 7) == MagicGladiator)
        {
            if (
    AgiBugGladiator == TRUE)
                
    SetByte((PVOID)(0x00556C32 6), 2);
            else
                
    SetByte((PVOID)(0x00556C32 6), 15);
        }
        else if ((
    gObjUser.lpPlayer->Class 7) == DarkLord)
        {
            if (
    AgiBugLord == TRUE)
                
    SetByte((PVOID)(0x00556C32 6), 2);
            else
                
    SetByte((PVOID)(0x00556C32 6), 15);
        }
        else if ((
    gObjUser.lpPlayer->Class 7) == Summoner)
        {
            if (
    AgiBugSummon == TRUE)
                
    SetByte((PVOID)(0x00556C32 6), 2);
            else
                
    SetByte((PVOID)(0x00556C32 6), 15);
        }
        else if ((
    gObjUser.lpPlayer->Class 7) == Monk)
        {
            if (
    AgiBugMonk == TRUE)
                
    SetByte((PVOID)(0x00556C32 6), 2);
            else
                
    SetByte((PVOID)(0x00556C32 6), 15);
        }

        
    // ----
        
    if( gTrayMode.InTray )
        {
            if( !
    this->lpViewPlayer->m_Model.Unknown4 && gConnectEx.m_ConnectState == )
            {
                
    gTrayMode.ShowMessage(NIIF_WARNING"MU Online""Your character has been killed");
            }
        }
    }
    // ----------------------------------------------------------------------------------------------

    bool User::GetTarget()
    {
        if( 
    pViewNPCTargetID != -)
        {
            
    this->lpViewTarget    = &*(ObjectPreview*)pGetPreviewStruct(pPreviewThis(), pViewNPCTargetID);
            
    this->m_TargetType    1;
            return 
    true;
        }
        else if( 
    pViewAttackTargetID != -)
        {
            
    this->lpViewTarget    = &*(ObjectPreview*)pGetPreviewStruct(pPreviewThis(), pViewAttackTargetID);
            
    this->m_TargetType    2;
            return 
    true;
        }
        
    // ----
        
    if( this->lpViewTarget != )
        {
            
    ZeroMemory(&this->lpViewTargetsizeof(this->lpViewTarget));
        }
        
    // ----
        
    this->m_TargetType 0;
        return 
    false;
    }
    // ----------------------------------------------------------------------------------------------

    int User::GetActiveSkill()
    {
        return 
    this->lpPlayer->pMagicList[this->lpViewPlayer->ActiveMagic];
    }
    // ----------------------------------------------------------------------------------------------

    void User::UpdateCharInfo(CHAR_UPDATEINFO aRecv)
    {
        
    this->lpPlayer->Strength aRecv->Strength;
        
    this->lpPlayer->Dexterity aRecv->Dexterity;
        
    this->lpPlayer->Vitality aRecv->Vitality;
        
    this->lpPlayer->Energy aRecv->Energy;
        
    this->lpPlayer->Leadership aRecv->Leadership;
        
    this->lpPlayer->LevelPoint aRecv->LevelUpPoint;
        
    gVisualFix.UpPoint aRecv->LevelUpPoint;

        
    this->lpPlayer->Level aRecv->Level;
        
    this->lpPlayer->Experience aRecv->Experience;
        
    this->lpPlayer->NextExperience aRecv->NextExperience;
        
    this->lpPlayer->Life aRecv->Life;
        
    this->lpPlayer->MaxLife aRecv->MaxLife;
        
    this->lpPlayer->Shield aRecv->Shield;
        
    this->lpPlayer->MaxShield aRecv->MaxShield;
        
    this->lpPlayer->Resets aRecv->Resets/* Object.h 258 */
        
    gObjUser.m_Reset aRecv->Resets;

    }
    // ----------------------------------------------------------------------------------------------

    void User::SetBattleMapData(PMSG_BATTLE_LIST aRecv)
    {
        
    /*
        SetByte((PVOID)pMaxBattleZoneCount, MAX_BATTLE_LIST);
        // ----
        for( int i = 0; i < MAX_BATTLE_LIST; i++ )
        {
            SetByte((PVOID)((oBattleMapStart + 7 * i) + 3), aRecv->BattleMapList[i]);
        }
        // ----
        for( int i = 0; i < MAX_BATTLE_LIST; i++ )
        {
            this->m_BattleZoneList[i] = aRecv->BattleZoneList[i];
        }*/
    }
    // ----------------------------------------------------------------------------------------------

    bool User::IsBattleZone(int MapNumber)
    {
        
    /*
        if( gObjUser.IsBattleServer() )
        {
            for( int i = 0; i < MAX_BATTLE_LIST; i++ )
            {
                if( gObjUser.m_BattleZoneList[i] == MapNumber )
                {
                    return true;
                }
            }
        }
        */
        // ----
        
    return false;
    }
    // ----------------------------------------------------------------------------------------------

    void User::SetTargetData(PMSG_TARGETDATA_ANS aRecv)
    {
        if (
    aRecv->isMonster)
        {
            
    sMonsterBar *tempBar NULL;
            for (
    int i 0MonsterBar.size(); ++i)
            {
                if (
    MonsterBar[i].aIndex == aRecv->aIndex)
                {
                    
    tempBar = &MonsterBar[i];
                    break;
                }
            }

            if (
    tempBar == NULL)
            {
                
    sMonsterBar Temp;
                
    int ID MonsterBar.add(Temp);
                
    tempBar = &MonsterBar[ID];
                
    tempBar->aIndex aRecv->aIndex;
            }

            
    PMSG_TARGET_MONSTER_DATA *pRecv = (PMSG_TARGET_MONSTER_DATA*)aRecv;

            
    tempBar->Level pRecv->Level;
            
    tempBar->Life pRecv->Life;
            
    tempBar->MaxLife pRecv->MaxLife;

            if (
    tempBar->Life tempBar->MaxLife)
                
    tempBar->Life tempBar->MaxLife;

            
    tempBar->ViewID = -1;
            
    tempBar->GetTime GetTickCount();
        }
        else
        {
            
    sPlayerBar *tempBar NULL;
            for (
    int i 0PlayerBar.size(); ++i)
            {
                if (
    PlayerBar[i].aIndex == aRecv->aIndex)
                {
                    
    tempBar = &PlayerBar[i];
                    break;
                }
            }

            if (
    tempBar == NULL)
            {
                
    sPlayerBar Temp;
                
    int ID PlayerBar.add(Temp);
                
    tempBar = &PlayerBar[ID];
                
    tempBar->aIndex aRecv->aIndex;
            }

            
    PMSG_TARGET_PLAYER_DATA *pRecv = (PMSG_TARGET_PLAYER_DATA*)aRecv;

            
    tempBar->Level pRecv->Level;
            
    tempBar->Reset pRecv->Resets;
            
    tempBar->GReset pRecv->GReset;
            
    tempBar->ExpProc pRecv->ExpProc;

            if (
    tempBar->ExpProc 100)
                
    tempBar->ExpProc 100;
            if (
    tempBar->ExpProc 0)
                
    tempBar->ExpProc 0;

            
    tempBar->Life pRecv->Life;
            
    tempBar->MaxLife pRecv->MaxLife;
            
    tempBar->SD pRecv->SD;
            
    tempBar->MaxSD pRecv->MaxSD;

            if (
    tempBar->Life tempBar->MaxLife)
                
    tempBar->Life tempBar->MaxLife;
            if (
    tempBar->SD tempBar->MaxSD)
                
    tempBar->SD tempBar->MaxSD;

            
    tempBar->ViewID = -1;
            
    tempBar->ChatShowed false;
            
    tempBar->GetTime GetTickCount();
        }
    }
    // ----------------------------------------------------------------------------------------------

    void User::SetEventEffect(int PreviewStruct)
    {
        
    //SetByte((PVOID)(0x004EFF0D + 2), 3);    //Min event effect number
        // ----
        
    lpViewObj lpPreview = &*(ObjectPreview*)PreviewStruct;
        
    // ----
        
        
    if( lpPreview->CtlCode == 32 )
        {
            if( *(
    DWORD*)(PreviewStruct 672) && lpPreview->Unknown23 != )
            {
                
    pInitEventStatus(PreviewStruct);
            }
            
    // ----
            
    lpPreview->Unknown23 5;
        }
        
        
    // ----
        
    if( *(DWORD*)(PreviewStruct 672) != || !lpPreview->Unknown23 )
        {
            return;
        }
        
    // ----
        
    switch(lpPreview->Unknown23)
        {
        case 
    5:    //-> GM
            
    {
                if( 
    pEventEffectThis(668) )
                {
                    
    DWORD ModelID 349;
                    
    // ----
                    
    if( !strncmp(lpPreview->Name"[GM]"4) )
                    {
                        
    ModelID 406;
                    }
                    else if( !
    strncmp(lpPreview->Name"[EM]"4) )
                    {
                        
    ModelID 407;
                    }
                    else if( !
    strcmp(lpPreview->Name"Admin") )
                    {
                        
    ModelID 408;
                    }
                    
    // ----
                    
    *(LPVOID*)(PreviewStruct 672) = pAddEventEffect(pEventEffectThis(668), ModelID20170.0, -5.00.00.00.045.0);
                }
            }
            break;
            
    // --
        
    case 6:
            {
                if( 
    pEventEffectThis(668) )
                {
                    *(
    LPVOID*)(PreviewStruct 672) = pAddEventEffect2(pEventEffectThis(668), 32241020120.00.00.0);
                }
            }
            break;
            
    // --
        
    case 7:
            {
                if( 
    pEventEffectThis(668) )
                {
                    *(
    LPVOID*)(PreviewStruct 672) = pAddEventEffect2(pEventEffectThis(668), 32241120120.00.00.0);
                }
            }
            break;
            
    // --
        
    case 8:
            {
                if( 
    pEventEffectThis(668) )
                {
                    *(
    LPVOID*)(PreviewStruct 672) = pAddEventEffect2(pEventEffectThis(668), 32241220120.00.00.0);
                }
            }
            break;
            
    // --
        
    case 9:
            {
                if( 
    pEventEffectThis(668) )
                {
                    *(
    LPVOID*)(PreviewStruct 672) = pAddEventEffect2(pEventEffectThis(668), 32241320120.00.00.0);
                }
            }
            break;
            
    // --
        
    case 10:
            {
                if( 
    pEventEffectThis(668) )
                {
                    *(
    LPVOID*)(PreviewStruct 672) = pAddEventEffect2(pEventEffectThis(668), 32241420120.00.00.0);
                }
            }
            break;
            
    // --
        
    case 11:
            {
                if( 
    pEventEffectThis(668) )
                {
                    *(
    LPVOID*)(PreviewStruct 672) = pAddEventEffect2(pEventEffectThis(668), 32241520120.00.00.0);
                }
            }
            break;
            
    // --
        
    case 12:
            {
                if( 
    pEventEffectThis(668) )
                {
                    *(
    LPVOID*)(PreviewStruct 672) = pAddEventEffect2(pEventEffectThis(668), 32241620120.00.00.0);
                }
            }
            break;
            
    // --
        
    case 13:
            {
                if( 
    pEventEffectThis(668) )
                {
                    *(
    LPVOID*)(PreviewStruct 672) = pAddEventEffect2(pEventEffectThis(668), 32241720120.00.00.0);
                }
            }
            break;
            
    // --
        
    default:
            {
                
    lpPreview->Unknown23 0;
            }
            break;
        }
    }
    // ----------------------------------------------------------------------------------------------

    bool User::IsMasterClass(BYTE Class)
    {
        
    gObjUser.Refresh();
        
    // ----
        
    if( pIsMaster(Class) && gObjUser.lpPlayer->Level >= 400 )
        {
            return 
    true;
        }
        
    // ----
        
    return false;
    }

    charUser::ParsingHP(DWORD Num)
    {
        
    char Text[50];
        if (
    Num >= 10000000000)
            
    sprintf(Text"%ldkkk"Num 1000000000);
        else if (
    Num >= 10000000)
            
    sprintf(Text"%ldkk"Num 1000000);
        else if (
    Num >= 10000)
            
    sprintf(Text"%ldk"Num 1000);
        else
            
    sprintf(Text"%ld"Num);

        return 
    strdup(Text);
    }
    // ----------------------------------------------------------------------------------------------
    void User::DrawSome()
    {
        
    //if (!lifebar) return;

        
    VAngle Angle;
        
    int PosXPosY;
        
    int XPosYPos;

        
    bool MonsterTarget false;
        
    bool PlayerTarget false;

        
    // let's have fun with comments :DDD

        // first of all we check all Viewport and if server send monster/player HP it insert ViewPortID to our structure
        
    for (int ViewPortID 0ViewPortID 120ViewPortID++)
        {
            
    lpViewObj lpObj = (ObjectPreview*)pGetPreviewStruct(pPreviewThis(), ViewPortID);

            
    // check if it exist and it is player or monster
            
    if (!lpObj || (lpObj->m_Model.ObjectType != emMonster && lpObj->m_Model.ObjectType != emPlayer) || !lpObj->m_Model.Unknown4)
            {
                
    // check if we have same ViewportID monster in our array and delete it
                
    for (int i 0MonsterBar.size(); i++)
                {
                    if (
    ViewPortID == MonsterBar[i].ViewID)
                    {
                        
    MonsterBar.remove_index_fast(i);
                        break;
                    }
                }

                
    // check if we have same ViewportID Player in our array and delete it
                
    for (int i 0PlayerBar.size(); i++)
                {
                    if (
    ViewPortID == PlayerBar[i].ViewID)
                    {
                        
    PlayerBar.remove_index_fast(i);
                        break;
                    }
                }
                continue;
            }

            if (
    lpObj->m_Model.ObjectType == emMonster)
            {
                
    // goes throw all monsterbars (that server send to us)
                
    for (int i 0MonsterBar.size(); ++i)
                {
                    
    // check if it needs to be deleted by life decrees or lifetime (too old)
                    
    if (MonsterBar[i].Life <= || GetTickCount() - MonsterBar[i].GetTime 10000)
                    {
                        
    MonsterBar.remove_index_fast(i--);    // i--, so we could parse new item by same index in array
                        
    continue;
                    }

                    
    // if monster exist in array, add ViewID so we could render it later
                    
    if (MonsterBar[i].aIndex == lpObj->aIndex)
                    {
                        
    MonsterBar[i].ViewID ViewPortID;

                        
    // if monster is targeted by user, make it latest in array (so it would be rendered latest and on the top of all)
                        
    if (gObjUser.m_TargetType && gObjUser.lpViewTarget != NULL && gObjUser.lpViewTarget->aIndex == lpObj->aIndex)
                        {
                            
    MonsterBar.make_latest(i);
                            
    MonsterTarget true;
                        }
                        break;
                    }
                }
            }
            else
            {
                
    // goes  throw all playerbars (that server send to us)
                
    for (int i 0PlayerBar.size(); ++i)
                {
                    
    // check if it needs to be deleted by life decrees or lifetime (too old)
                    
    if (PlayerBar[i].Life <= || GetTickCount() - PlayerBar[i].GetTime 10000)
                    {
                        
    PlayerBar.remove_index_fast(i--);    // i--, so we could parse new item by same index in array
                        
    continue;
                    }

                    
    // check if it is our player with hpbar
                    
    if (PlayerBar[i].aIndex == lpObj->aIndex)
                    {
                        
    PlayerBar[i].ViewID ViewPortID;

                        
    // check player for chat window and player target
                        
    for (int j 0120j++)
                        {
                            
    // search throw all structure of chat messages (or something)
                            
    BYTE *pChatMember = (BYTE*)(pChatStructure 700 j);

                            
    char TName[10];
                            
    strncpy(TName, (char*)pChatMember10);

                            
    // if it's not our player, goes next
                            
    if (strcmp(TNamelpObj->Name))
                                continue;

                            
    // Check if guys is chating
                            
    if (*(DWORD*)(pChatMember 660) > 0)
                            {
                                
    PlayerBar[i].ChatShowed true;
                                break;                            
    // break to prevent targeting
                            
    }
                            else
                            {
                                
    PlayerBar[i].ChatShowed false;
                            }

                            
    // if player target him, make it latest so we could render it on top later
                            
    if (*(DWORD*)(pChatMember 144) > 0)
                            {
                                
    PlayerTarget true;
                                
    PlayerBar.make_latest(i);
                            }

                            break;
                        }

                        break;
                    }
                }
            }
        }

    //-->Code danh hieu check Lv
    if (RankHornor == TRUE
    {
            
    // taking it's structure
            
    lpViewObj lpObjVP gObjUser.lpViewPlayer;
                    
    // to prevent that player doesn't exist
            //if (lpObjVP && lpObjVP->m_Model.ObjectType != emMonster && lpObjVP->m_Model.ObjectType == emPlayer)
            
    if (lpObjVP && lpObjVP->m_Model.ObjectType == emPlayer && lpObjVP->m_Model.ObjectType != emMonster)
            {
            
    // taking it's coordinates
            
    Angle.lpObjVP->m_Model.VecPosX;
            
    Angle.lpObjVP->m_Model.VecPosY;
            
    Angle.lpObjVP->m_Model.VecPosZ lpObjVP->m_Model.Unknown216.100.0;
            
    pGetPosFromAngle(&Angle, &PosX, &PosY);
            
    short pLevel gObjUser.lpPlayer->Level;
            if (
    pLevel >= 900)
                
    pDrawGUI(32609, (float)PosX-48, (float)PosY 09612);
            else if (
    pLevel >= 800
                
    pDrawGUI(32608, (float)PosX-38, (float)PosY 07712);
            else if (
    pLevel >= 700
                
    pDrawGUI(32607, (float)PosX-48, (float)PosY 09616);
            else if (
    pLevel >= 600
                
    pDrawGUI(32606, (float)PosX-56, (float)PosY 011516);
            else if (
    pLevel >= 500
                
    pDrawGUI(32605, (float)PosX-52, (float)PosY 010616);
            else if (
    pLevel >= 400
                
    pDrawGUI(32604, (float)PosX-46, (float)PosY 09212);
            else if (
    pLevel >= 300
                
    pDrawGUI(32603, (float)PosX-52, (float)PosY 010716);
            else if (
    pLevel >= 200
                
    pDrawGUI(32602, (float)PosX-50, (float)PosY 010018);
            else if (
    pLevel >= 100
                
    pDrawGUI(32601, (float)PosX-40, (float)PosY 08116);
            else 
                
    pDrawGUI(32600, (float)PosX-50, (float)PosY 09916);
            }
    }
    //-->End Code danh hieu check Lv
        // Render time !!!
        // Take real line height for using it later
        
    float lineHeight 10.0f * (pWinHeightReal 0.6f);

        
    // monsters, so players would be always on top

        
    for (int i 0MonsterBar.size(); ++i)
        {
            
    // check if it's not an error
            
    if (MonsterBar[i].ViewID == -1)
                continue;

            
    // taking it's structure
            
    lpViewObj lpObj = (ObjectPreview*)pGetPreviewStruct(pPreviewThis(), MonsterBar[i].ViewID);

            
    // to prevent that player doesn't exist
            
    if (!lpObj || (lpObj->m_Model.ObjectType != emMonster && lpObj->m_Model.ObjectType != emPlayer) || !lpObj->m_Model.Unknown4)
            {
                
    MonsterBar.remove_index(i--);    // i--, so we could parse new item by same index in array
                
    continue;
            }

            
    // taking it's coordinates
            
    Angle.lpObj->m_Model.VecPosX;
            
    Angle.lpObj->m_Model.VecPosY;
            
    Angle.lpObj->m_Model.VecPosZ lpObj->m_Model.Unknown216.100.0;

            
    pGetPosFromAngle(&Angle, &PosX, &PosY);

            
    // calculating some width and pos shit
            
    float BarWidth 78.1f * (MonsterBar[i].Life / (MonsterBar[i].MaxLife 1.0f));
            
    PosX -= 40;

            
    // taking this bool for more easier way to use it
            
    bool MouseOver MonsterTarget && (== MonsterBar.size() - 1);

            
    // For blend fix
            
    pSetBlend(true);

            
    // making needed color (if it is targeting, make it fully visible, others = 100/255 blank)
            
    DWORD Color Color4f(255255255100);
            
    //if (MouseOver)
            //    Color = Color4f(255, 255, 255, 255);
            
            
    if (MouseOver)
            {
                
    Color Color4f(255255255255);
                
                
    glColor4f(0.0f0.0f0.0f0.40f);
                
    pDrawBarForm((float)PosX, (float)PosY 1080150.00);
                
    // draw first line - Name
                
    pDrawColorText(lpObj->NamePosXPosY 9801Color93);
            
            
    // render this background and life meter
            
    pDrawColorButton(32514, (float)PosX, (float)PosY 1805.000Color);
            
    pDrawColorButton(32513, (float)PosX 1, (float)PosY 2BarWidth3.000Color);
            
            } else { }

            
    pGLSwitchBlend();
        }
        
        
    // the sweetest part about players :DD
        
    for (int i 0PlayerBar.size(); ++i)
        {

            
    // check if it's not an error or chat showed
            
    if (PlayerBar[i].ViewID == -|| PlayerBar[i].ChatShowed)
                continue;

            
    // taking it's structure
            
    lpViewObj lpObj = (ObjectPreview*)pGetPreviewStruct(pPreviewThis(), PlayerBar[i].ViewID);

            
    // to prevent that player doesn't exist
            
    if (!lpObj || (lpObj->m_Model.ObjectType != emMonster && lpObj->m_Model.ObjectType != emPlayer) || !lpObj->m_Model.Unknown4)
            {
                
    PlayerBar.remove_index(i--);    // i--, so we could parse new item by same index in array
                
    continue;
            }
            


            
    // taking it's coordinates
            
    Angle.lpObj->m_Model.VecPosX;
            
    Angle.lpObj->m_Model.VecPosY;
            
    Angle.lpObj->m_Model.VecPosZ lpObj->m_Model.Unknown216.100.0;
            
    pGetPosFromAngle(&Angle, &PosX, &PosY);

            
    short pLevel PlayerBar[i].Level;

            
    // calculating some width and pos shit
            
    float LifeBarWidth 78.1f * (PlayerBar[i].Life / (PlayerBar[i].MaxLife 1.0f));
            
    PosX -= 40;
            
    PosY += lineHeight;            // taking 1 line down (with resolution fix problem) not to be collision with nickname
            
    XPos PosX;
            
    YPos PosY 24;
            
    // taking this bool for more easier way to use it
            
    bool MouseOver PlayerTarget && (== PlayerBar.size() - 1);

            
    // For blend fix
            
    pSetBlend(true);
            
            
    // making needed color (if it is targeting, make it fully visible, others = 150/255 blank)
            
    DWORD Color Color4f(255255255150);
            if (
    MouseOver)
                
    Color Color4f(255255255255);
            

            
            
    // goes throw partylist
            
    if (pPartyMemberCount 0)
            {
                
    // temp variable for preverting double sd bar
                
    bool isShowed false;

                for (
    int PartySlot 0PartySlot pPartyMemberCountPartySlot++)
                {
                    
    PartyList PartyMember = *(PartyList*)((char*)&pPartyListStruct sizeof(PartyList)* PartySlot);
                    
    lpViewObj lpPartyObj = &*(ObjectPreview*)pGetPreviewStruct(pPreviewThis(), PartyMember.ViewportID);

                    
    // if it's not our partyman, goes to next
                    
    if (!lpPartyObj || PartyMember.ViewportID != PlayerBar[i].ViewID)
                        continue;

                    
    // if that guy is our target
                    
                    
    if (MouseOver)
                    {
    //-->Code danh hieu check Lv                    
    if (RankHornor == TRUE
    {
                if (
    pLevel >= 900)
                    
    pDrawGUI(32609, (float)XPos-(96-80)/2, (float)YPos 09612);// -48
                
    else if (pLevel >= 800
                    
    pDrawGUI(32608, (float)XPos-(77-80)/2, (float)YPos 07712);// -38
                
    else if (pLevel >= 700
                    
    pDrawGUI(32607, (float)XPos-(96-80)/2, (float)YPos 09616);// -48
                
    else if (pLevel >= 600
                    
    pDrawGUI(32606, (float)XPos-(115-80)/2, (float)YPos 011516);// -56
                
    else if (pLevel >= 500
                    
    pDrawGUI(32605, (float)XPos-(106-80)/2, (float)YPos 010616);// -52
                
    else if (pLevel >= 400
                    
    pDrawGUI(32604, (float)XPos-(92-80)/2, (float)YPos 09212);// -46
                
    else if (pLevel >= 300
                    
    pDrawGUI(32603, (float)XPos-(107-80)/2, (float)YPos 010716);// -52
                
    else if (pLevel >= 200
                    
    pDrawGUI(32602, (float)XPos-(100-80)/2, (float)YPos 010018);// -50
                
    else if (pLevel >= 100
                    
    pDrawGUI(32601, (float)XPos-(81-80)/2, (float)YPos 08116);// -40
                
    else 
                    
    pDrawGUI(32600, (float)XPos-(99-80)/2, (float)YPos 09916);// -50
    }
    //-->End Code danh hieu check Lv            
                        
                        
                        
    glColor3f(1.01.01.0);

                        
    // draw background and some extra info 
                        
    glColor4f(0.0f0.5f0.0f0.65f);
                        
    pDrawBarForm((float)PosX, (float)PosY 1080150.00);

                        
    char Text[50];
                        
    sprintf(Text"HP %s, Rs %d"ParsingHP(PlayerBar[i].MaxLife), PlayerBar[i].Reset);
                        
    pDrawColorText(TextPosXPosY 9801eWhite93);
                        
                        
    // Shows expbar insteed of SD
                        // doesn't use Color, cos it's target and shows fully visible
                        
    glColor3f(0.39f0.66f1.0f);
                        
    float ExpBarWidth 78.1f PlayerBar[i].ExpProc 100.0f;
                        
    pDrawGUI(32514, (float)PosX, (float)PosY 1805.0);
                        
    pDrawGUI(32515, (float)PosX 1, (float)PosY 2ExpBarWidth3.0);
                    }
                    else
                    {
                        
                        
    // if it's not our target but in party
                        // shows sd with some info
                        // with 190/255 blank visible

                        
    Color Color4f(255255255190);

                        
    // draw background and extra stuff
                        
    glColor4f(0.0f0.5f0.0f0.45f);
                        
    pDrawBarForm((float)PosX, (float)PosY 1080150.00);
                        
    //pDrawColorText(lpObj->Name, PosX, PosY - 14, 80, 1, Color, 9, 3);
                        
                        
    char Text[50];
                        
    sprintf(Text"%s - Lv %d"lpObj->NamePlayerBar[i].Level);
                        
    pDrawColorText(TextPosXPosY 9801Color93);
                        
                        
    float SDBarWidth 78.1f * (PlayerBar[i].SD / (PlayerBar[i].MaxSD 1.0f));
                        
    pDrawColorButton(32514, (float)PosX, (float)PosY 1805.000Color);
                        
    pDrawColorButton(32515, (float)PosX 1, (float)PosY 2SDBarWidth3.000Color);

                    }

                    
    // if we get's here, so we showed up all that we want
                    
    isShowed true;
                    break;
                }
                
    // and we just leave from this player to next
                
    if (isShowed)
                    continue;
            }

            
    // if we get's here, so this is not partyman
            // and we just shows sd, and if targeting - some extra info 
            
            
    if (MouseOver)
            {
    if (
    RankHornor == TRUE
    {
                if (
    pLevel >= 900)
                    
    pDrawGUI(32609, (float)XPos-(96-80)/2, (float)YPos 09612);// -48
                
    else if (pLevel >= 800
                    
    pDrawGUI(32608, (float)XPos-(77-80)/2, (float)YPos 07712);// -38
                
    else if (pLevel >= 700
                    
    pDrawGUI(32607, (float)XPos-(96-80)/2, (float)YPos 09616);// -48
                
    else if (pLevel >= 600
                    
    pDrawGUI(32606, (float)XPos-(115-80)/2, (float)YPos 011516);// -56
                
    else if (pLevel >= 500
                    
    pDrawGUI(32605, (float)XPos-(106-80)/2, (float)YPos 010616);// -52
                
    else if (pLevel >= 400
                    
    pDrawGUI(32604, (float)XPos-(92-80)/2, (float)YPos 09212);// -46
                
    else if (pLevel >= 300
                    
    pDrawGUI(32603, (float)XPos-(107-80)/2, (float)YPos 010716);// -52
                
    else if (pLevel >= 200
                    
    pDrawGUI(32602, (float)XPos-(100-80)/2, (float)YPos 010018);// -50
                
    else if (pLevel >= 100
                    
    pDrawGUI(32601, (float)XPos-(81-80)/2, (float)YPos 08116);// -40
                
    else 
                    
    pDrawGUI(32600, (float)XPos-(99-80)/2, (float)YPos 09916);// -50
    }
                
                
                
    // draw background and name
                
    glColor4f(0.0f0.0f0.0f0.58f);
                
    pDrawBarForm((float)PosX, (float)PosY 980210.00);

                
    //pDrawColorText(lpObj->Name, PosX, PosY - 9, 80, 1, Color, 9, 3);
                    
    char Text[50];
                    
    sprintf(Text"Lv %d, Rs %d"PlayerBar[i].LevelPlayerBar[i].Reset);
                    
    pDrawColorText(TextPosXPosY 8801Color93);
                    
                
    // render this background and life meter
                
    pDrawColorButton(32514, (float)PosX, (float)PosY 3804.000Color);
                
    pDrawColorButton(32514, (float)PosX, (float)PosY 7804.000Color);
                
                
    float SDBarWidth 78.1f * (PlayerBar[i].SD / (PlayerBar[i].MaxSD 1.0f));
                
                
    pDrawColorButton(32513, (float)PosX 1, (float)PosY 4LifeBarWidth3.000Color);
                
    pDrawColorButton(32515, (float)PosX 1, (float)PosY 8SDBarWidth3.000Color);
                
            } else { }

            
    pGLSwitchBlend();    // for blend objects
        
    }

        
    pGLSwitchBlend();    // for blend objects
        
    glColor3f(1.01.01.0);

    Có gì mới mình sẽ chia sẽ tiếp, mình đang tìm hiểu code danh hiệu check reset, được mình lại chia sẽ.
    Khách viếng thăm hãy cùng nampinn xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  3. #463
    Thành Viên
    Ngày tham gia
    Jul 2015
    Bài viết
    190
    Thanks
    44
    Thanked 21 Times in 16 Posts

    Ðề: Học Hỏi Source zTeam HoanMaster

    Trích dẫn Gửi bởi nampinn [Only registered and activated users can see links. ]
    Top pic này lập ra để chia sẽ và học hỏi.
    Nhưng chia sẽ chả thấy đâu, hỏi mõi cả mồm chẳng ai chỉ.

    Code danh hiệu check Lv: Mình lấy được từ Scoure của Trọng chia sẽ cho anh em sau này còn biết.



    Có gì mới mình sẽ chia sẽ tiếp, mình đang tìm hiểu code danh hiệu check reset, được mình lại chia sẽ.
    check reset thì thay LV = reset ............................
    Khách viếng thăm hãy cùng viethung91 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  4. #464
    Thành Viên nampinn's Avatar
    Ngày tham gia
    Jan 2016
    Bài viết
    625
    Thanks
    239
    Thanked 52 Times in 43 Posts

    Ðề: Học Hỏi Source zTeam HoanMaster

    Trích dẫn Gửi bởi viethung91 [Only registered and activated users can see links. ]
    check reset thì thay LV = reset ............................
    Đoạn này à cậu?
    PHP Code:
    (pLevel >= 100
    Thay bằng
    PHP Code:
    (pResets >= 100
    phải ko cậu?

    Thay như vậy rồi mà không được?

    1>User.cpp(858): error C2065: 'pResets' : undeclared identifier
    1>User.cpp(852): error C2065: 'pResets' : undeclared identifier
    1>User.cpp(854): error C2065: 'pResets' : undeclared identifier
    1>User.cpp(856): error C2065: 'pResets' : undeclared identifier
    1>User.cpp(858): error C2065: 'pResets' : undeclared identifier
    1>User.cpp(923): error C2065: 'pResets' : undeclared identifier
    1>User.cpp(925): error C2065: 'pResets' : undeclared identifier
    1>User.cpp(927): error C2065: 'pResets' : undeclared identifier
    1>User.cpp(929): error C2065: 'pResets' : undeclared identifier
    1>User.cpp(931): error C2065: 'pResets' : undeclared identifier
    Lần sửa cuối bởi nampinn, ngày 04-09-16 lúc 09:37 PM.
    Khách viếng thăm hãy cùng nampinn xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  5. #465
    Thành Viên
    Ngày tham gia
    Mar 2013
    Bài viết
    217
    Thanks
    81
    Thanked 27 Times in 14 Posts

    Ðề: Topic Phân Tích Học Hỏi Source zTeam Và Source HoanMaster Share

    Ai còn links client này không cho mình xin với, ham của lạ
    Trích dẫn Gửi bởi Trong [Only registered and activated users can see links. ]
    hóng cao nhân, gặp lỗi này nản quá:
    [Only registered and activated users can see links. ]

    Bác nào nói cho em 1 câu là nó ko phải bug đi,
    là SCF nó thế
    vì thế nó mới có câu thông báo thay thế khi đăng nhập game!
    Khách viếng thăm hãy cùng khainqps01237 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  6. #466
    Vi phạm quy định hoangtu_eck94's Avatar
    Ngày tham gia
    Jan 2010
    Bài viết
    1,371
    Thanks
    392
    Thanked 935 Times in 348 Posts

    Ðề: Học Hỏi Source zTeam HoanMaster

    tải source của ikennylee về có nhiều cái để vọc hơn đó
    Server SCF Full Customs Wing, HP, SD, Antihack, Post Item, Fix Bug.......
    Skype: hoangtu_eck94

  7. #467
    Thành Viên nampinn's Avatar
    Ngày tham gia
    Jan 2016
    Bài viết
    625
    Thanks
    239
    Thanked 52 Times in 43 Posts

    Ðề: Học Hỏi Source zTeam HoanMaster

    Trích dẫn Gửi bởi hoangtu_eck94 [Only registered and activated users can see links. ]
    tải source của ikennylee về có nhiều cái để vọc hơn đó
    Bác share cho em xin đoạn Scoure danh hiệu check reset đi bác.
    Khách viếng thăm hãy cùng nampinn xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  8. #468
    Thành Viên
    Ngày tham gia
    Mar 2013
    Bài viết
    217
    Thanks
    81
    Thanked 27 Times in 14 Posts

    Ðề: Học Hỏi Source zTeam HoanMaster

    Trích dẫn Gửi bởi hoangtu_eck94 [Only registered and activated users can see links. ]
    tải source của ikennylee về có nhiều cái để vọc hơn đó
    Thời đại MU open source bắt đầu
    Khách viếng thăm hãy cùng khainqps01237 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  9. #469
    Vi phạm quy định hoangtu_eck94's Avatar
    Ngày tham gia
    Jan 2010
    Bài viết
    1,371
    Thanks
    392
    Thanked 935 Times in 348 Posts

    Ðề: Học Hỏi Source zTeam HoanMaster

    Trích dẫn Gửi bởi nampinn [Only registered and activated users can see links. ]
    Bác share cho em xin đoạn Scoure danh hiệu check reset đi bác.
    Của ikennylee có rồi còn share gì nữa bạn. Cả check theo colum hẳn hoi chịu khó tải về vọc đi b
    Server SCF Full Customs Wing, HP, SD, Antihack, Post Item, Fix Bug.......
    Skype: hoangtu_eck94

  10. #470
    Thành Viên
    Ngày tham gia
    Jul 2015
    Bài viết
    175
    Thanks
    40
    Thanked 10 Times in 10 Posts

    Ðề: Học Hỏi Source zTeam HoanMaster

    Trích dẫn Gửi bởi hoangtu_eck94 [Only registered and activated users can see links. ]
    Của ikennylee có rồi còn share gì nữa bạn. Cả check theo colum hẳn hoi chịu khó tải về vọc đi b
    có hết rồi mà ko chịu mò cứ đi hỏi share
    Khách viếng thăm hãy cùng blockcc xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

 

 
Trang 47 của 50 Đầu tiênĐầu tiên ... 37 45 46 47 48 49 ... CuốiCuối

Các Chủ đề tương tự

  1. [MU] zTeam source load hình ảnh
    Bởi herovn1994 trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 9
    Bài viết cuối: 10-02-16, 06:24 AM
  2. [MU] Hỏi về source zteam
    Bởi herovn1994 trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 14
    Bài viết cuối: 18-12-15, 06:22 PM

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •  
Múi giờ GMT +7. Bây giờ là 06:02 PM.
vBulletin®, Copyright ©2000-2011, Jelsoft Enterprises Ltd.
CLBGamesVN không chịu trách nhiệm về Luật Bản Quyền của các tài liệu, bài viết v.v...được đăng tải trên diễn đàn này.
Diễn đàn phát triển dưới sự đóng góp của tất cả thành viên. BQT chỉ là những người thành lập ra sân chơi, quản lý và duy trì về mặt kỹ thuật, nội dung khi hợp lệ.