Metin2 - Metin ve Patron Gaya Sistemi

Amiral

Üye
Üye
Mesaj
6
Beğeni
7
Puan
40
Ticaret Puanı
0
23089_b6cb882e14150361e5ada8aeda170c52.png



Linkleri görebilmek için giriş yap veya kayıt ol.


questlua_pc.cpp // güncellemesi​


C++:
Arat:
    int pc_get_another_quest_flag(lua_State* L)

Üstüne ekle:

#ifdef ENABLE_GEM_SYSTEM
    int pc_open_gem_shop(lua_State * L)
    {
        LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();

        if (ch->IsOpenSafebox() || ch->GetExchange() || ch->GetMyShop() || ch->IsCubeOpen() || ch->isSashOpened(true) || ch->isSashOpened(false) || ch->isChangeLookOpened() || ch->isAuraOpened(true) || ch->isAuraOpened(false))
        {
            ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("?? ???? ??????? ????? ?? ? ????."));
            return 0;
        }

#ifdef ENABLE_BOSS_GEM_SYSTEM
        int gemShopType = (int)lua_tonumber(L, 1);
        ch->OpenGemShop(gemShopType);
#else
        ch->OpenGemShop();
#endif
        return 0;
    }

    int pc_create_gaya(lua_State * L)
    {
        if (!lua_isnumber(L, 1))
        {
            lua_pushboolean(L, 0);
            return 1;
        }

        int cost = (int)lua_tonumber(L, 1);
        int pct = (int)lua_tonumber(L, 2);
        int metinstone_cell = (int)lua_tonumber(L, 3);
        int glimmerstone_count = (int)lua_tonumber(L, 4);

        LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();

        LPITEM metinstone_item = ch->GetStoneInventoryItem(metinstone_cell);

        if (metinstone_item)
            lua_pushboolean(L, ch->CreateGaya(glimmerstone_count, metinstone_item, cost, pct));
        else
            lua_pushboolean(L, 0);

        return 1;
    }
#endif


Arat:
            { NULL,            NULL            }

Üstüne ekle:

#ifdef ENABLE_GEM_SYSTEM
            {"open_gem_shop", pc_open_gem_shop},
            {"create_gaya", pc_create_gaya},
            // {"open_gem_shops", pc_open_gem_shops},
#endif
 

Dosya Eklentileri

  • gem ve patron gaya sistemi.rar
    28,9 KB · Gösterim: 106
Geri
Üst