Jump to content
Sign in to follow this  
alexander0195

Sistema gaya

Recommended Posts

 

questlua_pc.cpp // actualización

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
 

IMG_20210530_021829.png

Debes iniciar sesión para ver el contenido del enlace en esta publicación.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...