Jump to content
  • 0

pets in minimap


Ropen
Go to solution Solved by Chookez,

Question

7 answers to this question

Recommended Posts

  • 0
  • 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 post
  • 0

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.

  • Lmao 1
  • Sad 1
Link to post
  • 0
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 post
  • 0

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 post
  • 0
11 hours ago, Ropen said:

 

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[]  ?

Yes.

Link to post
  • 0
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

Link to post
  • 0
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 post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



Shoutbox

Shoutbox

Chatroom Rules

 

Join our Discord

A request for help = Shoutbox Ban

Be respectful & Respect the rules

 

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