Jump to content
×
×
  • 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
Share on other sites

  • 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
Share on other sites

  • 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
Share on other sites

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
  • Recently Browsing   0 members

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