Jump to content

Shisui

Former Staff
  • Posts

    977
  • Joined

  • Last visited

  • Days Won

    15
  • Feedback

    0%

Posts posted by Shisui

  1. Before doing all the changes I had this error.

    0417 19:41:07615 :: GRANNY: File has run-time type tag of 0x80000010, which doesn't match this version of Granny (0x80000037).  Automatic conversion will be attempted.

    After compiling I receive this errors.

    0417 19:41:07613 :: GRANNY: File is file format revision 6 (current version is 7)
    
    PLUS
    
    0417 19:41:07615 :: GRANNY: File has run-time type tag of 0x80000010, which doesn't match this version of Granny (0x80000037).  Automatic conversion will be attempted.
    Why's that?
  2. go to userinterface.cpp

     

    and change this

    #ifdef _DISTRIBUTE 
            stRegisterDebugFlag = "__DEBUG__ = 0";
    #else
            stRegisterDebugFlag = "__DEBUG__ = 1";
    #endif
    with this

    #ifdef _DISTRIBUTE 
            stRegisterDebugFlag = "__DEBUG__ = 0";
    #elif _DEBUG
            stRegisterDebugFlag = "__DEBUG__ = 1";
    #else
            stRegisterDebugFlag = "__DEBUG__ = 0";
    #endif

  3. * Item module:
        - get_attribute | Return: Table1  | Args: byte AttrIndex[0..4]
        - set_attribute | Return: Boolean | Args: byte AttrIndex[0..4], byte AttrType[1..94], short AttrValue[-32768..32767]
    
     

    questlua_item.cpp

    Be carefull, in the code you can find a global config-variable!

    "g_iItemStackCount" replace with 200 or 250 or what you want.

     

    int item_get_attribute(lua_State* L)
    {
    LPITEM item = CQuestManager::instance().GetCurrentItem();
     
    if (!item) return 0;
     
    if (!lua_isnumber(L, 1))
    {
    sys_err("Wrong argument, need a number from range(0..%d)!", ITEM_ATTRIBUTE_MAX_NUM-2);
    lua_pushnumber(L, 0);
    return 1;
    }
     
    int iAttrIndex = (int)lua_tonumber(L, 1);
    if (iAttrIndex < 0 || iAttrIndex >= ITEM_ATTRIBUTE_MAX_NUM-2)
    {
    sys_err("Invalid index %d. Index out of range(0..%d)", iAttrIndex, ITEM_ATTRIBUTE_MAX_NUM-2);
    lua_pushnumber(L, 0);
    return 1;
    }
     
    const TPlayerItemAttribute& AttrItem = item->GetAttribute(iAttrIndex);
     
    lua_newtable(L);
     
    lua_pushnumber(L, AttrItem.bType);
    lua_rawseti(L, -2, 1);
     
    lua_pushnumber(L, AttrItem.sValue);
    lua_rawseti(L, -2, 2);
    return 1;
    }
     
    int item_set_attribute(lua_State* L)
    {
    LPITEM item = CQuestManager::instance().GetCurrentItem();
     
    if (!item) return 0;
    if (item->GetType() == ITEM_COSTUME)
    {
    lua_pushboolean(L, false);
    return 1;
    }
     
    if (!lua_isnumber(L, 1))
    {
    sys_err("Wrong argument[AttrIdx] #1.");
    lua_pushboolean(L, false);
    return 1;
    }
    else if (!lua_isnumber(L, 2))
    {
    sys_err("Wrong argument[AttrType] #2.");
    lua_pushboolean(L, false);
    return 1;
    }
    else if (!lua_isnumber(L, 3))
    {
    sys_err("Wrong argument[AttrValue] #3.");
    lua_pushboolean(L, false);
    return 1;
    }
     
    int bAttrIndex = (int)lua_tonumber(L, 1);
    if (bAttrIndex < 0 || bAttrIndex >= ITEM_ATTRIBUTE_MAX_NUM-2)
    {
    sys_err("Invalid AttrIndex %d. AttrIndex out of range(0..4)", bAttrIndex);
    lua_pushboolean(L, false);
    return 1;
    }
     
    int bAttrType = (int)lua_tonumber(L, 2);
    if (bAttrType < 1 || bAttrType >= MAX_APPLY_NUM)
    {
    sys_err("Invalid AttrType %d. AttrType out of range(1..%d)", MAX_APPLY_NUM);
    lua_pushboolean(L, false);
    return 1;
    }
     
    if (item->HasAttr(bAttrType) && (item->GetAttribute(bAttrIndex).bType != bAttrType))
    {
    sys_err("AttrType[%d] multiplicated.", bAttrType);
    lua_pushboolean(L, false);
    return 1;
    }
     
    int bAttrValue = (int)lua_tonumber(L, 3);
    if (bAttrValue < 1 || bAttrValue >= 32768)
    {
    sys_err("Invalid AttrValue %d. AttrValue should be between 1 and 32767!", bAttrValue);
    lua_pushboolean(L, false);
    return 1;
    }
     
    bool bRet = TRUE;
    int bAttrCount = item->GetAttributeCount();
    if (bAttrCount <= 4 && bAttrCount >= 0)
    {
    if (bAttrCount < bAttrIndex)
    bAttrIndex = bAttrCount;
     
    item->SetForceAttribute(bAttrIndex, bAttrType, bAttrValue);
    }
    else
    bRet = FALSE;
     
    lua_pushboolean(L, bRet);
    return 1;
    }
     
     
    { "get_attribute", item_get_attribute },
    { "set_attribute",                 item_set_attribute },
    

    pc.give_item2_select(VNUMITEM,COUNT)
    item.set_attribute(bonus, bonus_id, percentage)
     
    For example, give item 17009 with 3000 hp.
     
    pc.give_item2_select(17009,1)
    item.set_attribute(0, 1, 3000)
    • Scream 1
    • Love 1

  4. go to userinterface.cpp
     
    and change this
    #ifdef _DISTRIBUTE 
            stRegisterDebugFlag = "__DEBUG__ = 0";
    #else
            stRegisterDebugFlag = "__DEBUG__ = 1";
    #endif
    with this
    #ifdef _DISTRIBUTE 
            stRegisterDebugFlag = "__DEBUG__ = 0";
    #elif _DEBUG
            stRegisterDebugFlag = "__DEBUG__ = 1";
    #else
            stRegisterDebugFlag = "__DEBUG__ = 0";
    #endif
  5. When I'm compiling game or db, wtv, this is always showing

    ../../../Extern/include/cryptopp/cryptlib.h: In member function 'bool CryptoPP::NameValuePairs::GetValue(const char*, T&) const [with T = std::string]':
    ../../../Extern/include/cryptopp/cryptlib.h:277:   instantiated from here
    ../../../Extern/include/cryptopp/cryptlib.h:264: warning: dereferencing type-punned pointer will break strict-aliasing rules
    ../../../Extern/include/cryptopp/cryptlib.h: In member function 'bool CryptoPP::NameValuePairs::GetValue(const char*, T&) const [with T = int]':
    ../../../Extern/include/cryptopp/cryptlib.h:283:   instantiated from here
    ../../../Extern/include/cryptopp/cryptlib.h:264: warning: dereferencing type-punned pointer will break strict-aliasing rules

    Like for ex:

    compile xxxx.cpp
    ../../../Extern/include/cryptopp/cryptlib.h: In member function 'bool CryptoPP::NameValuePairs::GetValue(const char*, T&) const [with T = std::string]':
    ../../../Extern/include/cryptopp/cryptlib.h:277:   instantiated from here
    ../../../Extern/include/cryptopp/cryptlib.h:264: warning: dereferencing type-punned pointer will break strict-aliasing rules
    ../../../Extern/include/cryptopp/cryptlib.h: In member function 'bool CryptoPP::NameValuePairs::GetValue(const char*, T&) const [with T = int]':
    ../../../Extern/include/cryptopp/cryptlib.h:283:   instantiated from here
    ../../../Extern/include/cryptopp/cryptlib.h:264: warning: dereferencing type-punned pointer will break strict-aliasing rules
    compile xxxx.cpp
    compile xxxx.cpp
    compile xxxx.cpp
    ../../../Extern/include/cryptopp/cryptlib.h: In member function 'bool CryptoPP::NameValuePairs::GetValue(const char*, T&) const [with T = std::string]':
    ../../../Extern/include/cryptopp/cryptlib.h:277:   instantiated from here
    ../../../Extern/include/cryptopp/cryptlib.h:264: warning: dereferencing type-punned pointer will break strict-aliasing rules
    ../../../Extern/include/cryptopp/cryptlib.h: In member function 'bool CryptoPP::NameValuePairs::GetValue(const char*, T&) const [with T = int]':
    ../../../Extern/include/cryptopp/cryptlib.h:283:   instantiated from here
    ../../../Extern/include/cryptopp/cryptlib.h:264: warning: dereferencing type-punned pointer will break strict-aliasing rules

    How can I fix this annoying thing?

    If you want to help and not sell ofc.

  6. Apparently both companies are recruiting people to work for them.
    Ymir seems to be more into it, since they're lack of programers.

    As I read, they only have, like, 25 people and only 3 programers, atm working on Metin2.


    I don't know if this is true, or if you guys already know this,

    but I see lots of potential here in this forum, and why not share with you.

    Maybe, who knows, they could chose you to work for them and gain lots of money, because that's the definition of Metin2.

    This can be your chance/time to shine.
     
    GameForge
    Webzen Ymir


    Goodluck.
    And please let know if this is true, if not just delete this.

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