Jump to content

Question

3 answers to this question

Recommended Posts

  • 0
Posted

 

there must be another way to do this, but this one is simpler than I currently thought.
try
in UserExCommand.cpp
Bind(L".delevel", UserExDelevelCommand); //add bind command

//add function
bool UserExDelevelCommand(User *pUser, wstring params)
{
    guard;

        if(pUser->ValidUser()){
            
            pUser->SetLevel(40); //use setlevel for delevel.
            pUser->SocialAction(SocialActionLevelUp);
        }
    unguard;
    return false;
}


and UserExCommand.h
bool UserExDelevelCommand(User *pUser, wstring params);


for bypass  you can use the same paramter.

EX:
 

void CVIPSystem::OnDelevel(User *pUser)
{
    guard;

    if(m_Enabled)
    {
        if(pUser->ValidUser())

        {
            pUser->SetLevel(40);
            pUser->SocialAction(SocialActionLevelUp);
        }
    }

    unguard;
}

added to bypass:
else if(wBypass.find(L"user_delevel") == 0)
        {
            g_VIPSystem.OnDelevel(pUser);
            return true;
        }

you can use this example for add to your bypass.

  • 0
Posted (edited)

I'm not sure if it will work but you can try,

pUser->SetLevel(pUser->pSD->nLevel - 1);

forgive my lack of certainty, it's been a while since I messed with these files.

Edited by Roe2
  • Upvote 1
Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and 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..