Jump to content

peakzinho

Banned
  • Posts

    41
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by peakzinho

  1. 1 hour ago, edwardcrkz said:

    Você poderia compartilhar characterwidown.py e cpp relacionado? se eu tiver um tempo livre vou olhar

    😃

     

    Eu não olhei para o seu problema, mas se tiver algo a ver com o arquivo cpp, você pode jogá-lo fora.

    https://mega.nz/file/0LhgASBT#3oX-Q1ABaC7GdP1c7d9lWEy8nwj6gR8Zgz_jrjK1UO4

    I sent the files here. My problem is that when I increase the status of the sugnma it increases but in the window it remains 0.

  2. 15 minutes ago, Kafa said:

    You forget something try search for substate, sub, sungma keywords check if you have everything

    can you add me in discord please? Kaylee#3362

    39 minutes ago, Kafa said:

    You forget something try search for substate, sub, sungma keywords check if you have everything

    I'm just remove in contants.cpp  // POINT_CONQUEROR_POINT  because if I leave it gives error to compile

    #ifdef ENABLE_CONQUEROR_LEVEL
        { POINT_SUNGMA_STR,                    },
        { POINT_SUNGMA_HP,                    },
        { POINT_SUNGMA_MOVE,                },
        { POINT_SUNGMA_INMUNE,                },
        //{ POINT_CONQUEROR_POINT,            },
    #endif

    • Metin2 Dev 3
    • Love 2
  3. 3 minutes ago, Kafa said:

    O nome do jogador é preto porque você colocou a condição if para a cor do nome no lugar errado. (Tutorial i errado) na mesma função na parte inferior existem alguns if ... return name shit, você precisa colocar a condição lá. Em seguida, o nome do jogador preto é fixo bro im no smartphone.

     

    editar: estou falando sobre InstanceBaseEffect

    cpp

     

    GetNameColorIndex

    okay, I go test thank you

    33 minutes ago, Kafa said:

    The players name is black because you put the if condition for the name color in the wrong place. (Tutorial i wrong) in the same function at the bottom there are a couple of if ... return name shit you need to put the condition there. Then the black player name is fixed bro im on smartphone.

     

    edit: im talking about InstanceBaseEffect

    cpp

     

    GetNameColorIndex

    https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

    Do you have fix?

    • Metin2 Dev 3
    • Dislove 1
    • Angry 1
    • Good 1
    • Love 2
  4. 0128 02:29:16508 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/plechito/weapons/steampunkarmor/armor.mse) Error
    0128 02:29:16508 :: CInstanceBase::RegisterEffect(eEftType=259, c_szEftAttachBone=Bip01, c_szEftName=d:/ymir work/effect/plechito/weapons/steampunkarmor/armor.mse, isCache=0) - Error

    • Lmao 1
  5. When I add something that has an effect, the system is functional but the effect is not. It does not report any error.

     

    I give an example, I installed the item buffs system, it was functional, but the effect didn't show.

     

    I don't know what can make this happen, please, I appreciate everyone's help.

  6. 6 hours ago, Finnis said:
    
    Replace:
    	if (GuildID != 0)
                _snprintf(szBufName, sizeof(szBufName), "Name: %s - Guild: %s", CPythonPlayer::Instance().GetName(), &GuildName);
            else
                _snprintf(szBufName, sizeof(szBufName), "Name: %s", CPythonPlayer::Instance().GetName());
    With this:
    	if (GuildID != 0)
                _snprintf(szBufName, sizeof(szBufName), "Name: %s - Guild: %s", CPythonPlayer::Instance().GetName(), GuildName.c_str());
            else
                _snprintf(szBufName, sizeof(szBufName), "Name: %s", CPythonPlayer::Instance().GetName());
            
    	char szLevel[256];
    	_snprintf(szLevel, sizeof(szLevel), "Level: %u", CPythonPlayer::Instance().GetStatus(POINT_LEVEL));
    		
    	strcat(szBufName, szLevel);

     

    Thank you :)

  7. 12 hours ago, Finnis said:

    Regarding the discord RPC,  you could try something like this:

     

    
    #include "InstanceBase.h"
    #include "PythonCharacterManager.h"
      
    CInstanceBase* pkMainInstance = CPythonCharacterManager::Instance().GetMainInstancePtr();
    char info[32 + 1];
    snprintf(info, sizeof(info), "Level: %u", pkMainInstance->GetLevel());
    activity.SetDetails(info);
    
    /*
    You can get other player's informations such as player name, empire id, duel state, alignment, race, etc using the same object 'pkMainInstance', you can get a list of these functions from InstanceBase.h.
    */
     

     

     

    252709OrangeWarning.png'activity' is an object of type 'discord::Activity', you should adapt it to your source.

     

     

    #ifdef ENABLE_DISCORD_RPC
    #include "discord_rpc.h"
    #ifdef _DEBUG
    #pragma comment(lib, "discord_rpc_d.lib")
    #else
    #pragma comment(lib, "discord_rpc_r.lib")
    #endif
    static int64_t StartTime;
    static constexpr auto DiscordClientID = "758991963747516459";
    auto szSiteName = "Website: <Em Construção>";
    auto szIconName = "image1";
    void CPythonNetworkStream::Discord_Start()
    {
        StartTime = time(0);
        DiscordEventHandlers handlers;
        memset(&handlers, 0, sizeof(handlers));
        Discord_Initialize(DiscordClientID, &handlers, 1, nullptr);
        Discord_Update(true, false, false);
    }
    void CPythonNetworkStream::Discord_Update(const bool login, const bool select, const bool loading)
    {
        DiscordRichPresence discordPresence;
        memset(&discordPresence, 0, sizeof(discordPresence));
        char szBufName[256+1];
        char szBufWarp[256+1];
        char szEmpireId[256+1];
        char szEmpireName[256+1];
        char szRaceName[256+1];
        CInstanceBase* pInstance = CPythonCharacterManager::Instance().GetMainInstancePtr();
        
        if (login)
        {
            discordPresence.details = "On Login";
            discordPresence.state = szSiteName;
            discordPresence.largeImageKey = szIconName;
            discordPresence.largeImageText = szSiteName;
        }
        else if (select)
        {
            discordPresence.details = "On Select";
            discordPresence.state = szSiteName;
            discordPresence.largeImageKey = szIconName;
            discordPresence.largeImageText = szSiteName;
        }
        else if (loading)
        {
            discordPresence.details = "On Loading";
            discordPresence.state = szSiteName;
            discordPresence.largeImageKey = szIconName;
            discordPresence.largeImageText = szSiteName;
        }
        else
        {
            std::string GuildName;
            DWORD GuildID = CPythonPlayer::Instance().GetGuildID();
            CPythonGuild::Instance().GetGuildName(GuildID, &GuildName);
            
            if (GuildID != 0)
                _snprintf(szBufName, sizeof(szBufName), "Name: %s - Guild: %s", CPythonPlayer::Instance().GetName(), &GuildName);
            else
                _snprintf(szBufName, sizeof(szBufName), "Name: %s", CPythonPlayer::Instance().GetName());
            
            _snprintf(szBufWarp, sizeof(szBufWarp), "Location: %s", CPythonBackground::Instance().GetMapName());
            _snprintf(szEmpireId, sizeof(szEmpireId), "%s", GetEmpireIcon());
            _snprintf(szEmpireName, sizeof(szEmpireName), "Empire: %s", GetEmpireName());
            _snprintf(szRaceName, sizeof(szRaceName), "Race: %s", GetRaceName());
            std::string szName = pInstance->GetNameString();
            
            if (pInstance->IsGameMaster())
            {
                discordPresence.details = GetStaffRank();
                discordPresence.state = szBufName;
            }
            else if (szName.find("[VET]") != std::string::npos)
            {
                discordPresence.details = "Rank: Veteran";
                discordPresence.state = szBufName;
            }
            else if (szName.find("[GFX]") != std::string::npos)
            {
                discordPresence.details = "Rank: Graphic Designer";
                discordPresence.state = szBufName;
            }
            else if (szName.find("[PM]") != std::string::npos)
            {
                discordPresence.details = "Rank: Promoter";
                discordPresence.state = szBufName;
            }
            else
            {
                discordPresence.details = szBufName;
                discordPresence.state = szBufWarp;
            }
            
            discordPresence.largeImageKey = GetRaceIcon();
            discordPresence.largeImageText = szRaceName;
            discordPresence.smallImageKey = GetEmpireIcon();
            discordPresence.smallImageText = szEmpireName;
        }
        
        discordPresence.startTimestamp = StartTime;
        Discord_UpdatePresence(&discordPresence);
    }
    void CPythonNetworkStream::Discord_Close()
    {
        Discord_Shutdown();
    }

    const char * CPythonNetworkStream::GetStaffRank()
    {
        CInstanceBase* pInstance = CPythonCharacterManager::Instance().GetMainInstancePtr();
        std::string szName = pInstance->GetNameString();
        
        if (szName.find("[SA]") != std::string::npos)
            return "Rank: Server Admin";
        else if (szName.find("[TM]") != std::string::npos)
            return "Rank: Team Manager";
        else if (szName.find("[GA]") != std::string::npos)
            return "Rank: Game Admin";
        else if (szName.find("[GM]") != std::string::npos)
            return "Rank: Game Master";
        else if (szName.find("[H]") != std::string::npos)
            return "Rank: Helper";
        else if (szName.find("[MID]") != std::string::npos)
            return "Rank: Middleman";
        else
            return szSiteName;
    }

    const char * CPythonNetworkStream::GetRaceIcon()
    {
        CInstanceBase* pInstance = CPythonCharacterManager::Instance().GetMainInstancePtr();
        int raceId = pInstance->GetRace();
        
        if (raceId == 0)
            return "warrior_m";
        else if (raceId == 1)
            return "ninja_w";
        else if (raceId == 2)
            return "sura_m";
        else if (raceId == 3)
            return "shaman_w";
        else if (raceId == 4)
            return "warrior_w";
        else if (raceId == 5)
            return "ninja_m";
        else if (raceId == 6)
            return "sura_w";
        else if (raceId == 7)
            return "shaman_m";
        else
            return szIconName;
    }

    const char * CPythonNetworkStream::GetRaceName()
    {
        CInstanceBase* pInstance = CPythonCharacterManager::Instance().GetMainInstancePtr();
        int raceId = pInstance->GetRace();
        
        if (raceId == 0 || raceId == 4)
            return "Warrior";
        else if (raceId == 1 || raceId == 5)
            return "Ninja";
        else if (raceId == 2 || raceId == 6)
            return "Sura";
        else if (raceId == 3 || raceId == 7)
            return "Shaman";
        else
            return szSiteName;
    }

    const char * CPythonNetworkStream::GetEmpireIcon()
    {
        CInstanceBase* pInstance = CPythonCharacterManager::Instance().GetMainInstancePtr();
        int empireId = pInstance->GetEmpireID();
        
        if (empireId == 1)
            return "empire_a";
        else if (empireId == 2)
            return "empire_b";
        else if (empireId == 3)
            return "empire_c";
        else
            return szIconName;
    }

    const char * CPythonNetworkStream::GetEmpireName()
    {
        CInstanceBase* pInstance = CPythonCharacterManager::Instance().GetMainInstancePtr();
        int empireId = pInstance->GetEmpireID();
        
        if (empireId == 1)
            return "Shinsoo (Red)";
        else if (empireId == 2)
            return "Chunjo (Yellow)";
        else if (empireId == 3)
            return "Jinno (Blue)";
        else
            return szSiteName;
    }
    #endif

    Can help bro?

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