Jump to content

pets in minimap


Go to solution Solved by Chookez,

Recommended Posts

Try this:

 

Open PythonMiniMap and search this:

 

Spoiler

        float fDistanceFromCenter = sqrtf(fDistanceFromCenterX * fDistanceFromCenterX + fDistanceFromCenterY * fDistanceFromCenterY );
        if ( fDistanceFromCenter >= m_fMiniMapRadius )
            continue;

        TMarkPosition aMarkPosition;

 

Then, after this add:

 

Spoiler

        int blockID[] = {101, 102};
        
        for (int i = 0; i < _countof(blockID); i++)
        {
            if (pkInstEach->GetRace() != blockID[i])
                return;
         }

 

Just insert your ID in array blockID.

  • Sad 1
  • Lmao 1
Link to comment
Share on other sites

13 hours ago, Zoom said:

Try this:

 

Open PythonMiniMap and search this:

 

  Reveal hidden contents

        float fDistanceFromCenter = sqrtf(fDistanceFromCenterX * fDistanceFromCenterX + fDistanceFromCenterY * fDistanceFromCenterY );
        if ( fDistanceFromCenter >= m_fMiniMapRadius )
            continue;

        TMarkPosition aMarkPosition;

 

Then, after this add:

 

  Hide contents

        int blockID[] = {101, 102};
        
        for (int i = 0; i < _countof(blockID); i++)
        {
            if (pkInstEach->GetRace() != blockID[i])
                return;
         }

 

Just insert your ID in array blockID.

 

Sorry , but do u mean that any pet or mount that I want to hide I will have to put his Vnum in  the blockID[]  ?

Link to comment
Share on other sites

Open: PythonMinimap.cpp

 

Search: 

else if (pkInstEach->IsNPC() && !pkInstEach->IsInvisibility())

Add this:

            if (pkInstEach->IsPet() || pkInstEach->IsMount())
                continue;

Like this:

081953Nevtelen.png

 

It hides them all.

Edited by Chookez
  • Metin2 Dev 1
Link to comment
Share on other sites

On 2/8/2021 at 9:20 AM, Chookez said:

Open: PythonMinimap.cpp

 

Search: 


else if (pkInstEach->IsNPC() && !pkInstEach->IsInvisibility())

Add this:


            if (pkInstEach->IsPet() || pkInstEach->IsMount())
                continue;

Like this:

081953Nevtelen.png

 

It hides them all.

 

 

 

thnx bro but how can i solve that error ?

spacer.png

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Solution

I was a little confused yesterday, it seems.

PythonMinimap.cpp

 

Search this:

else if (pkInstEach->IsNPC()

Change to:

else if (pkInstEach->IsNPC() && !pkInstEach->IsInvisibility())

And then add this to this function:

            if (pkInstEach->IsPet() || pkInstEach->IsMount())
                continue;

Like this:

081953Nevtelen.png

Its done. Now open InstanceBase.cpp

 

Search this function:

void CInstanceBase::GetBoundBox(D3DXVECTOR3 * vtMin, D3DXVECTOR3 * vtMax)

After this function add this:

BOOL CInstanceBase::IsPet()
{
    if (GetRace() >= 34001 && GetRace() <= 34021)
        return true;

    return false;
}

BOOL CInstanceBase::IsMount()
{
    if (GetRace() >= 20101 && GetRace() <= 20109)
        return true;

    return false;
}

 

Here you can change how long they are hidden, by ID.

 

Now open: InstanceBase.h

 

Search this:

void                    SetDuelMode(DWORD type);

Add after:

        BOOL IsPet();
        BOOL IsMount();

 

Edited by Chookez
  • Love 1
Link to comment
Share on other sites

16 hours ago, Chookez said:

I was a little confused yesterday, it seems.

PythonMinimap.cpp

 

Search this:


else if (pkInstEach->IsNPC()

Change to:


else if (pkInstEach->IsNPC() && !pkInstEach->IsInvisibility())

And then add this to this function:


            if (pkInstEach->IsPet() || pkInstEach->IsMount())
                continue;

Like this:

081953Nevtelen.png

Its done. Now open InstanceBase.cpp

 

Search this function:


void CInstanceBase::GetBoundBox(D3DXVECTOR3 * vtMin, D3DXVECTOR3 * vtMax)

After this function add this:


BOOL CInstanceBase::IsPet()
{
    if (GetRace() >= 34001 && GetRace() <= 34021)
        return true;

    return false;
}

BOOL CInstanceBase::IsMount()
{
    if (GetRace() >= 20101 && GetRace() <= 20109)
        return true;

    return false;
}

 

Here you can change how long they are hidden, by ID.

 

Now open: InstanceBase.h

 

Search this:


void                    SetDuelMode(DWORD type);

Add after:


        BOOL IsPet();
        BOOL IsMount();

 

 

thnx bro , done .

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.