Logo
live-news-icon

Noticias

Mostrar Mensajes

Esta sección te permite ver todos los posts escritos por este usuario. Ten en cuenta que sólo puedes ver los posts escritos en zonas a las que tienes acceso en este momento.


Mensajes - Applayo

Páginas: [1] 2 3
1
Fonte para Main 1.04e (Muemu)

Antes:


Depois:


Código: [Seleccionar]
__declspec(naked) void OffButtonQuestInStats()
{
    static DWORD ButtonAddress = 0x0077EBB5;
    _asm{jmp ButtonAddress}
}

__declspec(naked) void OffButtonPetsInStats()
{
    static DWORD ButtonAddress = 0x0077EC5E;
    _asm{jmp ButtonAddress}
}

__declspec(naked) void OffButtonSkillMasterInStats()
{
    static DWORD ButtonAddress = 0x0077ECE7;
    _asm{jmp ButtonAddress}
}

__declspec(naked) void OffButtonInventoryExp()
{
    static DWORD ButtonAddress = 0x00836A28;
    _asm{jmp ButtonAddress}
}

__declspec(naked) void OffButtonOpenStore()
{
    static DWORD ButtonAddress = 0x008369B4;
    _asm{jmp ButtonAddress}
}
__declspec(naked) void OffButtonRepeirInInventory()
{
    static DWORD ButtonAddress = 0x00836941;
    _asm{jmp ButtonAddress}
}


//===================================
//Primera forma

    SetOp((LPVOID)0x0083693C, (LPVOID) OffButtonRepeirInInventory, ASM::CALL);
    SetOp((LPVOID)0x008369AF, (LPVOID) OffButtonOpenStore, ASM::CALL);
    SetOp((LPVOID)0x00836A23, (LPVOID) OffButtonInventoryExp, ASM::CALL);
    SetOp((LPVOID)0x0077EBB0, (LPVOID) OffButtonQuestInStats, ASM::CALL);
    SetOp((LPVOID)0x0077EC59, (LPVOID) OffButtonPetsInStats, ASM::CALL);
    SetOp((LPVOID)0x0077ECE2, (LPVOID) OffButtonSkillMasterInStats, ASM::CALL);


//===================================
//Segunda forma

    SetCompleteHook(0xE9, 0x0083693C, &OffButtonRepeirInInventory);
    SetCompleteHook(0xE9, 0x008369AF, &OffButtonOpenStore);
    SetCompleteHook(0xE9, 0x00836A23, &OffButtonInventoryExp);
    SetCompleteHook(0xE9, 0x0077EBB0, &OffButtonQuestInStats);
    SetCompleteHook(0xE9, 0x0077EC59, &OffButtonPetsInStats);
    SetCompleteHook(0xE9, 0x0077ECE2, &OffButtonSkillMasterInStats);

Credito:
Yalc

2
Sources / Change Character Delete Level
« en: Abril 25, 2021, 12:50:53 am »


Código: [Seleccionar]
SetWord(0x00405B7A+2,(WORD)100);
SetWord(0x0040CC3F+1,(WORD)100);

Créditos:
louis

3
Sources / Adicionar um Dialogo no NPC
« en: Abril 25, 2021, 12:46:43 am »
    GameServer / NpcTalk.cpp

    Com isso, você pode fazer (um dialogo) falar com qualquer Npc declarado noNpcTalk.cpp


    Exemplo
    Código:
Código: [Seleccionar]
    //=========================================================
    void CNpcTalk::NpcWarehouse(LPOBJ lpNpc,LPOBJ lpObj) // OK
    //=========================================================
    {
       lpObj->Interface.use = 1;
       lpObj->Interface.type = INTERFACE_WAREHOUSE;
       lpObj->Interface.state = 0;

       gWarehouse.GDWarehouseItemSend(lpObj->Index,lpObj->Account);

           // Dialogo
       GCChatTargetSend(lpObj,lpNpc->Index,"Deixe seus itens comigo, eu os protegerei com a minha vida.");
    }

Créditos: NasLy

4
Sources / Posição de informação da skill
« en: Abril 25, 2021, 12:43:36 am »
posição das informações sobre ferramentas de Skill, isso acontece muito na interface S8 pois em alguns caso quando posicionamos o cursor em cima as informações ficam muito escondidas.

Não corrigido


Corrigido


Código: [Seleccionar]
SetCompleteHook(0xE9, 0x00813C11, &ToolTipSkill);

Código: [Seleccionar]
__declspec(naked) void ToolTipSkill()
{
   static DWORD SkillRavenClicDraw_buff = 0x00813C25;

   _asm
   {
   PUSH ECX
   MOV EDX,DWORD PTR SS:[EBP-0x04]
   MOV EAX,DWORD PTR DS:[EDX+0x4C]
   SUB EAX,0x1B
   PUSH EAX
   MOV ECX,DWORD PTR SS:[EBP-0x04]
   MOV EDX,DWORD PTR DS:[ECX+0x48]
   ADD EDX,0x0F
   jmp [SkillRavenClicDraw_buff]
   }
}


Créditos: RafhaelSouza

5
Sources / Comando /addpk
« en: Abril 25, 2021, 12:40:19 am »
Olá novamente!

Bom, agora venho disponibilizar um comando que me pediram, ele é para adicionar pk em usuários (sem a necessidade de ser ADM)

No es una dirección de gifv válida
CommandManager.cpp

Em bool CCommandManager::ManagementCore(LPOBJ lpObj, char * message, int Npc) procure pela case COMMAND_PK_CLEAR e no final do break; colocar:

Código: [Seleccionar]
case COMMAND_ADDPK:
Result = CommandAddPK(lpObj,argument,Npc);
break;

logo depois, encontre a função bool CCommandManager::CommandPKClear(LPOBJ lpObj, char * arg, int Npc) e coloque esta função abaixo:


Código: [Seleccionar]
bool CCommandManager::CommandAddPK(LPOBJ lpObj,char* arg, int Npc) // OK
{
if(lpObj->PKLevel >= 6)
{
gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,gMessage.GetMessage(871));


if (Npc >= 0)
{
GCChatTargetNewSend(lpObj,Npc,gMessage.GetMessage( 871));
}
return 0;
}


lpObj->PKLevel = 6;


GCPKLevelSend(lpObj->Index,lpObj->PKLevel);


gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,gMessage.GetMessage(872));


if (Npc >= 0)
{
GCChatTargetNewSend(lpObj,Npc,gMessage.GetMessage( 872));
}


gLog.Output(LOG_COMMAND,"[CommandAddPK][%s][%s] - (PKLevel: %d)",lpObj->Account,lpObj->Name,lpObj->PKLevel);


return 1;
}


CommandManager.h


aumente a definição #define MAX_COMMAND 82 para:


#define MAX_COMMAND 83
OBS.: Se você adicionou comandos ao seu emulador, saberá como esta parte funciona no cabeçalho.

Command.txt

[82 "/addpk" 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 //addpk

Message.txt

Código: [Seleccionar]
871 "You're already PK!"
872 "Increased PK level!"


Créditos: Denis Alves

6
Sources / Post Free e Vip
« en: Abril 25, 2021, 12:34:53 am »
Bom como eu ando fazendo 2 projetos quase solo as vezes a cabeça esquenta e vou brincar um pouco na source de mu tals.. no meio dessa brincadeira eu acabei fazendo um sistema antigo de post vip.

OBS: ESSA NÃO É A MELHOR FORMA DE SE FAZER ISSO, USE ESSA BASE PARA APRIMORAR O MESMO.


CommandManager.cpp

Código: [Seleccionar]
bool CCommandManager::CommandPost(LPOBJ lpObj,char* arg) // OK{


    gFilter.CheckSyntax(arg);


    if (gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 0)
    {
        GDGlobalPostSend(gMapServerManager.GetMapServerGroup(),0,lpObj->Name,arg);
       
     }


      if (gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 1)
    {
        PostMessage2(lpObj->Name,gMessage.GetMessage(1534),arg);
       
     }
    if(gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 2)
    {
        PostMessage3(lpObj->Name,gMessage.GetMessage(1535),arg);
       
    }


      if(gServerInfo.m_CommandPostVIP[lpObj->AccountLevel] == 3)
    {
        PostMessage4(lpObj->Name,gMessage.GetMessage(1536),arg);
       
    }


    gLog.Output(LOG_COMMAND,"[CommandPost][%s][%s] - (Message: %s)",lpObj->Account,lpObj->Name,arg);


    return 1;

}

ServerInfo.H


Código: [Seleccionar]
int m_CommandPostVIP[MAX_ACCOUNT_LEVEL];



ServerInfo.CPP


Código: [Seleccionar]
    this->m_CommandPostVIP[0] = GetPrivateProfileInt(section,"CommandPostVIP_AL0",0,path);

    this->m_CommandPostVIP[1] = GetPrivateProfileInt(section,"CommandPostVIP_AL1",1,path);


    this->m_CommandPostVIP[2] = GetPrivateProfileInt(section,"CommandPostVIP_AL2",2,path);



    this->m_CommandPostVIP[3] = GetPrivateProfileInt(section,"CommandPostVIP_AL3",3,path);



Message.txt

Código: [Seleccionar]
1534        "[FREE] %s"
1535        "[VIP1] %s"
1536        "[VIP2] %s"


LEMBRANDO USE ISSO COMO BASE PARA FAZER ALGO MELHOR!!

7
Sources / Premiar com Coins por tempo online - MUEMU
« en: Abril 25, 2021, 12:28:49 am »
Opa!

    Resolvi postar esse código que será de boa utilidade para muitos, tem ele na internet porém fiz pequenas modificações para deixar o código com uma funcionalidade melhor.

    Bom, no seu projeto GameServer, abra o arquivo CashShop.cpp, procure pela função void CCashShop::MainProc e dentro da função pesquise por:

Código: [Seleccionar]
    if((GetTickCount()-lpObj->CashShopGoblinPointTime) >= ((DWORD)gServerInfo.m_CashShopCoinsDelay*60000))   
Selecione essa linha e substitua por:


Código: [Seleccionar]
    if(gServerInfo.m_CashShopCoinsDelay >= 1)
    {
    if((GetTickCount()-lpObj->CashShopGoblinPointTime) >= ((DWORD)gServerInfo.m_CashShopCoinsDelay*60000))
    {


    lpObj->CashShopGoblinPointTime = GetTickCount();
    this->GDCashShopAddPointSaveSend(lpObj->Index,0,gBonusManager.GetBonusValue(lpObj,BONUS_I NDEX_GLOBIN_POINT,gServerInfo.m_CashShopWCoinCValu e[lpObj->AccountLevel],-1,-1,-1,-1),
    gBonusManager.GetBonusValue(lpObj,BONUS_INDEX_GLOB IN_POINT,gServerInfo.m_CashShopWCoinPValue[lpObj->AccountLevel],-1,-1,-1,-1),
    gBonusManager.GetBonusValue(lpObj,BONUS_INDEX_GLOB IN_POINT,gServerInfo.m_CashShopGoblinPointValue[lpObj->AccountLevel],-1,-1,-1,-1));
    this->CGCashShopPointRecv(lpObj->Index);


    if(gServerInfo.m_CashShopWCoinCValue[lpObj->AccountLevel] >= 1)
    {
    gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,gMessage.GetMessage(862),gServe rInfo.m_CashShopWCoinCValue[lpObj->AccountLevel]);
    }


    if(gServerInfo.m_CashShopWCoinPValue[lpObj->AccountLevel] >= 1)
    {
    gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,gMessage.GetMessage(863),gServe rInfo.m_CashShopWCoinPValue[lpObj->AccountLevel]);
    }

    if(gServerInfo.m_CashShopGoblinPointValue[lpObj->AccountLevel] >= 1)
    {
    gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,gMessage.GetMessage(864),gServe rInfo.m_CashShopGoblinPointValue[lpObj->AccountLevel]);
    }
    }

    }


    em ServerInfo.h, em public, adicione as seguintes linhas:


Código: [Seleccionar]
    int m_CashShopCoinsDelay;
    int m_CashShopWCoinCValue[MAX_ACCOUNT_LEVEL];
    int m_CashShopWCoinPValue[MAX_ACCOUNT_LEVEL];
    int m_CashShopGoblinPointValue[MAX_ACCOUNT_LEVEL];


    em ServerInfo.cpp procure por CServerInfo::ReadCashShopInfo(char* section,char* path) e adicione as linhas:


Código: [Seleccionar]
    this->m_CashShopCoinsDelay = GetPrivateProfileInt(section,"CashShopCoinsDelay", 0,path);


    this->m_CashShopWCoinCValue[0] = GetPrivateProfileInt(section,"CashShopWCoinCValue_ AL0",0,path);


    this->m_CashShopWCoinCValue[1] = GetPrivateProfileInt(section,"CashShopWCoinCValue_ AL1",0,path);


    this->m_CashShopWCoinCValue[2] = GetPrivateProfileInt(section,"CashShopWCoinCValue_ AL2",0,path);


    this->m_CashShopWCoinCValue[3] = GetPrivateProfileInt(section,"CashShopWCoinCValue_ AL3",0,path);


    this->m_CashShopWCoinPValue[0] = GetPrivateProfileInt(section,"CashShopWCoinPValue_ AL0",0,path);


    this->m_CashShopWCoinPValue[1] = GetPrivateProfileInt(section,"CashShopWCoinPValue_ AL1",0,path);


    this->m_CashShopWCoinPValue[2] = GetPrivateProfileInt(section,"CashShopWCoinPValue_ AL2",0,path);


    this->m_CashShopWCoinPValue[3] = GetPrivateProfileInt(section,"CashShopWCoinPValue_ AL3",0,path);


    this->m_CashShopGoblinPointValue[0] = GetPrivateProfileInt(section,"CashShopGoblinPointV alue_AL0",0,path);


    this->m_CashShopGoblinPointValue[1] = GetPrivateProfileInt(section,"CashShopGoblinPointV alue_AL1",0,path);


    this->m_CashShopGoblinPointValue[2] = GetPrivateProfileInt(section,"CashShopGoblinPointV alue_AL2",0,path);


    this->m_CashShopGoblinPointValue[3] = GetPrivateProfileInt(section,"CashShopGoblinPointV alue_AL3",0,path);

    No arquivo GameServerInfo.dat - Common.dat, procure por Cash Shop Settings e substitua todas as linhas por:

Código: [Seleccionar]
    CashShopSwitch = 1
    CashShopScriptVersion1 = 512
    CashShopScriptVersion2 = 2011
    CashShopScriptVersion3 = 6
    CashShopBannerVersion1 = 583
    CashShopBannerVersion2 = 2010
    CashShopBannerVersion3 = 5
    CashShopCoinsDelay = 2 // Tempo (em minutos) para ser premiado
    CashShopWCoinCValue_AL0 = 0
    CashShopWCoinCValue_AL1 = 0
    CashShopWCoinCValue_AL2 = 0
    CashShopWCoinCValue_AL3 = 0
    CashShopWCoinPValue_AL0 = 0
    CashShopWCoinPValue_AL1 = 0
    CashShopWCoinPValue_AL2 = 0
    CashShopWCoinPValue_AL3 = 0
    CashShopGoblinPointValue_AL0 = 0
    CashShopGoblinPointValue_AL1 = 0
    CashShopGoblinPointValue_AL2 = 0
    CashShopGoblinPointValue_AL3 = 0


    No seu arquivo Message.txt, adicione as linhas:

Código: [Seleccionar]
    862 "[Online Reward Coin] Você ganhou WC: %d"
    863 "[Online Reward Coin] Você ganhou WP: %d"
    864 "[Online Reward Coin] Você ganhou GP: %d"


    E fim!

    Explicando melhor esse código:

    Se o usuário quiser premiar só com GoblinPoints, basta ele colocar qualquer valor igual ou acima de 1 nas linhas CashShopGoblinPointValue e deixar nas outras 0 (outras: CashShopWCoinPValue e CashShopWCoinCValue que nem a mensagem aparece e nem o usuário será premiado. E vice-versa
    Qualquer dúvida pode postar que responderei

Créditos: Almdar (código original), Denis (modificações básicas)

8
Sources / Fix DL Summon Party Skill (PK)
« en: Abril 25, 2021, 12:20:24 am »
Mas um fix ae galera xD

Código: [Seleccionar]
Adicione isso em [b]MoveSummon.h[/b] dentro de struct MOVE_SUMMON_INFO
Código:

int PkMove;


en [b]MoveSummon.cpp[/b] dentro da função [b]void CMoveSummon::Load(char* path[/b])

[b]info.PkMove = lpMemScript->GetAsNumber();[/b]

Em [b]MoveSummon.cpp[/b] dentro da função [b]bool CMoveSummon::CheckMoveSummon(LPOBJ lpObj,int map,int x,int y)[/b] // OK adicione:

[code]//- Fix DL Summon Party Skill (PK)
if(it->PkMove == 0 && lpObj->PKLevel >= 5)
{
gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,gMessage.GetMessage(862));
return 0;
}
//--

A estrutura do arquivo é alterada para adicionar nova coluna PkMove no MuServer Data / Move / MoveSummon.txt
0 não se move / 1 se move

Código: [Seleccionar]
//Map  X      Y      TX      TY      MinLevel  MaxLevel  MinReset  MaxReset  AccountLevel PkMove
0      1      1      255    255    1          400        *          *          0 0
1      1      1      255    255    1          400        *          *          0 1
2      1      1      255    255    1          400        *          *          0 0
3      1      1      255    255    1          400        *          *          0 0
4      1      1      255    255    1          400        *          *          0 0
6      1      1      255    255    1          400        *          *          0 0
7      1      1      255    255    1          400        *          *          0 0
8      1      1      255    255    1          400        *          *          0 0
10      1      1      255    255    1          400        *          *          0 0
30      1      1      255    255    1          400        *          *          0 0
33      1      1      255    255    1          400        *          *          0 0
34      1      1      255    255    1          400        *          *          0 0
37      1      1      255    255    1          400        *          *          0 0
38      1      1      255    255    1          400        *          *          0 0
41      1      1      255    255    1          400        *          *          0 0
42      1      1      255    255    1          400        *          *          0 0
51      1      1      255    255    1          400        *          *          0 0
56      1      1      255    255    1          400        *          *          0 0
57      1      1      255    255    1          400        *          *          0 0
80      1      1      255    255    1          400        *          *          0 0
81      1      1      255    255    1          400        *          *          0 0
end


Adicione essa nova linha em Message.txt do MuServer
Código PHP:
Código: [Seleccionar]
862    "The character is pk and can not use" [/code]


Créditos:
Emershow

9
Sources / Get File Atributes - All Seasons Muemu
« en: Abril 25, 2021, 12:16:28 am »
Código: [Seleccionar]
extern "C" _declspec(dllexport) void EntryProc() // OK

WIN32_FILE_ATTRIBUTE_DATA wfad;


if(GetFileAttributesEx(".\\ArquivoQualquer.exe",Ge tFileExInfoStandard,&wfad) == 0)
{
//ExitProcess(0);
}
}

10
Sources / Custom Monsters without NPC Animation BUG 1.04e
« en: Abril 25, 2021, 12:15:42 am »
Copiando e colando


Este código foi usado nos arquivos do meu servidor por cerca de 1 ano e não tem bugs.
Tenha um bom dia =)


Código: [Seleccionar]
#define sub_969C50_Addr        ((int(__thiscall*)(int This, signed int a2)) 0x969C50)
#define pOpenMonsterModel        ((void(__cdecl*)(int MonsterID)) 0x61FDE0)
#define pLoadModel                ((void(__cdecl*)(int ResourceID, char * Path, char * File, int Arg4)) 0x614D10)
#define pLoadTexture            ((void(__cdecl*)(int TextureID, char * Folder, int GLREPEAT, int GLNEAREST, int GLTRUE)) 0x614710)
#define pGetViewStruct            ((lpViewObj(__cdecl*)(int a1, signed int a2, unsigned __int8 a3, unsigned __int8 a4, float a5)) 0x57EEC0)
#define pShowMonster            ((lpViewObj(__cdecl*)(int MonsterID, int X, int Y, int a4)) 0x580FC0)

lpViewObj cCustomMonsters::ShowMonster(int MonsterID, int a2, int a3, int a4)
{
    CUSTOMMONSTERS_DATA* lpInfo = gCustomMonsters.GetInfoByMonsterID(MonsterID);

    if (lpInfo == nullptr)
    {
        return pShowMonster(MonsterID, a2, a3, a4);
    }

    if (lpInfo->Type == 0)
    {
        int ModelID = MonsterID + MONSTER_MODEL;
        int BMD = sub_969C50_Addr(sub_4CDA10_Addr(), ModelID);

        pLoadModel(ModelID, lpInfo->Dir, lpInfo->BMDFile, -1);
        pLoadTexture(ModelID, lpInfo->Folder, 0x2901, 0x2600, 1);

        for ( int m = 0; ; ++m )
        {
            if ( m >= *(signed __int16 *)(BMD + 38) )
                break;
            *(float *)(*(DWORD *)(BMD + 48) + 16 * m + 4) = 0.25;
        }
    }
    else
    {
        pOpenMonsterModel(MonsterID);
    }

    lpViewObj Object = pGetViewStruct(a4, MonsterID + MONSTER_MODEL, a2, a3, 0.0);

    if ( Object == nullptr )
    {
        return pShowMonster(MonsterID, a2, a3, a4);
    }
    // ----
    memcpy(Object->Name, lpInfo->Name, sizeof(lpInfo->Name));
    // ----
    if(lpInfo->Type == 0)
    {
        Object->m_Model.ObjectType = emNPC;
    }
    else
    {
        Object->m_Model.ObjectType = emMonster;
    }

    Object->m_Model.Scale = lpInfo->Size;
    Object->ID = MonsterID;

    cCustomMonsters::SetMainAttribute(Object, MonsterID);

    return Object;
}



Créditos: LTP Team

11
Sources / Remove You are connected to the server - 1.04e
« en: Abril 25, 2021, 12:13:54 am »

Código: [Seleccionar]
    MemorySet(0x0063CD76,0x90,0x5); //->You are connected to the server
    MemorySet(0x0063CD69,0x90,0x5); //->You are connected to the server



Créditos:
Denis Alves
   Ravoc

12
Sources / Remove our rename Msg Direct Sound Failed - S6
« en: Abril 25, 2021, 12:12:50 am »
Função básica para remover ou renomear a Msg Direct Sound Failed!


Código: [Seleccionar]
    MemorySet(0x004D2AA7,0x90,0x05); // --> Direct Sound Failed ; 004D2AA7 ; Remove MSG

    SetDword(0x004D2AA7+1,(DWORD)"Nenhuma placa de som encontrada"); // --> Direct Sound Failed ; 004D2AA7 ; Rename



Créditos: Ravoc

13
Bom... Eu fiz esse código baseado na função original que vem nos Main. Naturalmente, ao executar o Main direto, um arquivo "Mu.exe" (talvez seja o Launcher de quem fez o código) deveria ser executado no lugar dele, no entanto, nada acontece, mesmo que vc renomeie seu Launcher para "Mu.exe".

Então fiz esse código que deve ser executado no inicio desta função para corrigir isso. Não está muito bom, mas é funcional e bem simples, quem quiser pode estar melhorando a sua maneira, como por exemplo, colocar para iniciar um arquivo que faz update do cliente, ou ainda usar a função CreateProcess. Enfim.

O que o código faz?
Ao abrir o Main diretamente, ele iniciará o Launcher automaticamente e encerrará o processo do Main. Forçando o usuário a abrir o jogo pelo Launcher.

Caso o Launcher não seja encontrado no diretório, ao invés de não fazer nada, ele emite um alerta avisando que o jogo não pode ser iniciado pq o Launcher está faltando.



É um código simples, mas bem util e bem melhor do que usar um JMP como já vi em várias sources.

Código:
Código: [Seleccionar]
bool ReadyLauncher()
{
    FILE* FileCheck = NULL;

    if ((FileCheck = fopen("Launcher.exe", "rb")) == NULL)
    {
        MessageBoxA(NULL, "O jogo não pode iniciar por que o Launcher não foi encontrado", "Error!", MB_OK | MB_ICONSTOP);
        ExitProcess(NULL);
        return FALSE;
    }

    WinExec("Launcher.exe", SW_SHOW);

    return TRUE;
}

Créditos: Romário Leite

14
Sources / Permitir apenas 1 Main.exe aberto
« en: Abril 25, 2021, 12:08:58 am »
Código simples, mas funcional, para o que eu precisava...


Código: [Seleccionar]
    if( pMUIsLoaded == 1 ){
        CreateMutex(0, 1, "MuOnline");


        if( GetLastError() == 183 )
    {
         ExitProcess(0);
    }
    }


    Só colocar no Main.cpp e ser feliz.

Creditos: Ravoc

15
Sources / Command Set Level para MuEMU
« en: Abril 22, 2021, 12:28:17 am »
CommandManager.h
Dentro de enum eCommandNumber

Código: [Seleccionar]
COMMAND_SETLVL = 109,

Dentro de class CCommandManager

Código: [Seleccionar]
bool CCommandManager::CommandSetLevel(LPOBJ lpObj,char* arg);

CommandManager.cpp


Código: [Seleccionar]
        case COMMAND_SETLVL:
            Result = CommandSetLevel(lpObj,argument);
            break;

Código: [Seleccionar]
bool CCommandManager::CommandSetLevel(LPOBJ lpObj,char* arg) // OK
{
char name[11] = {0};

this->GetString(arg,name,sizeof(name),0);

LPOBJ lpTarget = gObjFind(name);

if(lpTarget == 0)
{
gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,"O personagem não existe ou não está online.");
return 0;
}

int level = this->GetNumber(arg,1);

if(level >= 401)
{
gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,"O valor que você entrou é invalido.");
return 0;
}

lpTarget->Level = level;

GCLevelUpSend(lpTarget);

gLog.Output(LOG_COMMAND,"[CommandSetLevel][%s][%s] - (Name: %s, Level: %d)",lpObj->Account,lpObj->Name,name,level);
}

Command.txt

Código: [Seleccionar]
108 "/setlvl" 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 //setlvl <player> <nivel> - Editar nivel
Creditos:
SaintZeus
Emershow

Páginas: [1] 2 3