Jump to content
Forgot your email address? ×
×
×
  • Create New...
  • 0

Quest Problem


Fr3zy94

Question

4 answers to this question

Recommended Posts

  • 0

That don't work for me but i fiind this

    int pc_is_trade(lua_State* L)
    {
        LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
        lua_pushboolean(L, (ch->GetExchange() || ch->GetMyShop() || ch->GetShopOwner() || ch->IsOpenSafebox() || ch->IsCubeOpen()));
        return 1;
    }

Quest exemple:

quest test begin
    state start begin  
        when 27802.use begin
            if pc.is_trade() then
                syschat("Open.")
            else
                syschat("Close.")
            end
        end
    end -- state
end    -- quest
Link to comment
  • 0
int pc_is_trade(lua_State* L)
{
     LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();

     if (NULL != ch)
     {
           lua_pushboolean(L, (ch->GetExchange() != NULL) ? true : false);
     }
     else
     {
           lua_pushboolean(L, false);
     }

     return 1;
 }
Use like this:
if pc.is_trade == true then
Edited by Grudge
  • Love 1
Link to comment
  • 0

don't work if exchange is open will return Close if is close will return close.

 

quest test begin
    state start begin  
        when 27802.use begin
            if pc.is_trade == true then
                syschat("Open.")
            else
                syschat("Close.")
            end
        end
    end -- state
end    -- quest

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Announcements

  • -15% Discount in Metin2 Dev Store (01/10/2021 => 31/12/2021) => Code => 15_PCT_OCT_TO_DEC_2021


  • Read our Rules
  • Activity

    1. 1

      [HELP] Costume bonusing with item not working

    2. 10

      Fix Taskbar Highlight Python

    3. 13

      Reduce server memory usage

    4. 87

      How To Enchant & Transform Costume

    5. 2

      Old m2 function

  • Recently Browsing

    • No registered users viewing this page.

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.