3 mesaje
  • Mesaje: 11
  • Reacții: 2
  • Mesaje utile: 0
  • Status: Pierd vremea ^.^
  • Regat: Jinno
  • [ID Discord]
  • Contact:

    Medalii

    Hey everyone! I'm having an error while trying to install the new companion system. When I log into the game and try to open the companion egg, I get an error I don't understand; it gives me game.core.


    These are the functions referred to in the error that appeared.
    https://prnt.sc/jUKD0f2d4P7A

    #ifdef ENABLE_ASLAN_GROWTH_PET_SYSTEM
    void CInputMain::ReciveRequestBornPet(LPCHARACTER ch, const char* c_pData)
    {
    if (!ch->GetDesc()) { return; }
    int itemvnum = ch->GetEggVid();
    if (itemvnum == 0) { return; }

    TPacketCGBornPet* p = (TPacketCGBornPet*)c_pData;

    char szEscapeName[CHARACTER_NAME_MAX_LEN + 1];
    DBManager::instance().EscapeString(szEscapeName, sizeof(szEscapeName), p->petname, strlen(p->petname));

    if (check_name(szEscapeName) == 0) {
    ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ASLAN_GROWTH_PET_CANNOT_USE_THIS_NAME"));
    return;
    }

    if (ch->GetGold() < GROWTH_PET_BORN_COST)
    ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ASLAN_GROWTH_PET_COST_FOR_INCUBATION"), GROWTH_PET_BORN_COST);

    if (ch->CountSpecifyItem(itemvnum) > 0) {
    int randpet = number(0, 4);

    LPITEM PetItem = ITEM_MANAGER::instance().CreateItem(itemvnum + 300);

    if (PetItem)
    {
    int iEmptyPos = ch->GetEmptyInventory(PetItem->GetSize());

    if (iEmptyPos != -1)
    {
    ch->PointChange(POINT_GOLD, -GROWTH_PET_BORN_COST, true);
    ch->RemoveSpecifyItem(itemvnum, 1);

    int tmpslot = number(1, 3);
    int tmpskill[3] = { -1, -1, -1 };

    DWORD bornduration = 0;
    DWORD rand_hp = 0;
    DWORD rand_atk = 0;
    DWORD rand_def = 0;

    for (int i = 0; i < PET_MAX_NUM; ++i) {
    if (itemvnum == (PetListTable.dwEggVnum)) {
    bornduration = number(PetListTable.dwBornLifetime[0], PetListTable.dwBornLifetime[1]) * 60 * 60 * 24;
    rand_hp = number(PetListTable.dwBornAttr[0][0], PetListTable.dwBornAttr[0][1]);
    rand_atk = number(PetListTable.dwBornAttr[1][0], PetListTable.dwBornAttr[1][1]);
    rand_def = number(PetListTable.dwBornAttr[2][0], PetListTable.dwBornAttr[2][1]);
    }
    }

    DWORD pettype = 1;
    DWORD rand_typebonus0 = 0;
    DWORD rand_typebonus1 = 0;
    DWORD rand_typebonus2 = 0;

    // Type Chance: 2 3 4 5 6
    const int prob_type_table[] = { 30, 50, 70, 80, 90 };
    int rand = number(1, 100);

    for (int i = 0; i < 6; ++i) {
    if (rand > prob_type_table) {
    pettype += 1;
    }
    }

    if (pettype == 2 || pettype == 4 || pettype == 6 || pettype == 8) {
    rand_typebonus0 = number(PetTypeAttrTable[pettype].dwATK[0], PetTypeAttrTable[pettype].dwATK[1]);
    rand_typebonus1 = number(PetTypeAttrTable[pettype].dwHP[0], PetTypeAttrTable[pettype].dwHP[1]);
    rand_typebonus2 = number(PetTypeAttrTable[pettype].dwDEF[0], PetTypeAttrTable[pettype].dwDEF[1]);
    }

    int realtime_tmpdur = time(0) + bornduration;
    PetItem->SetSocket(1, realtime_tmpdur);
    PetItem->SetSocket(2, time(0)); // Borntime (UNIX)
    PetItem->SetSocket(3, bornduration); // Bornduration (UNIX)

    PetItem->SetForceAttribute(0, 1, 0); // Pet Level , Pet Evolution
    PetItem->SetForceAttribute(1, rand_hp, rand_atk);
    PetItem->SetForceAttribute(2, rand_def, 0);
    PetItem->SetForceAttribute(3, 0, -1);
    PetItem->SetForceAttribute(4, 0, -1);
    PetItem->SetForceAttribute(5, 0, -1);

    PetItem->StartCheckPetDeadEvent();

    PetItem->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos));

    ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ASLAN_GROWTH_PET_SUCCESS_CREATE_NEW_PET"));

    DBManager::instance().DirectQuery("INSERT INTO player_petsystem VALUES(%lu,'%s', 1, 0, 0, 0, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, NOW(), 0, 0, %d, %d, %d, %d)",
    PetItem->GetID(), szEscapeName, rand_hp, rand_atk, rand_def, tmpskill[0], 0, tmpskill[1], 0, tmpskill[2], 0, realtime_tmpdur, bornduration, pettype, rand_typebonus0, rand_typebonus1, rand_typebonus2);
    }
    else
    {
    M2_DESTROY_ITEM(PetItem);
    ch->ChatPacket(CHAT_TYPE_INFO, "Not enough inventory space.");
    }
    }
    else
    {
    ch->ChatPacket(CHAT_TYPE_INFO, "[PET] #%u item not exist by that vnum.", itemvnum);
    }
    }
    else
    ch->ChatPacket(CHAT_TYPE_INFO, "[PET] Failure create new pet.");
    }

    void CInputMain::ReciveRenewPetName(LPCHARACTER ch, const char* c_pData)
    {
    TPacketCGRenewPetName* p = (TPacketCGRenewPetName*)c_pData;

    char szEscapeName[CHARACTER_NAME_MAX_LEN + 1];
    DBManager::instance().EscapeString(szEscapeName, sizeof(szEscapeName), p->petname, strlen(p->petname));
    if (check_name(szEscapeName) == 0) {
    ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ASLAN_BUFF_NPC_CANNOT_USE_THIS_NAME"));
    return;
    }

    LPITEM item = ch->GetInventoryItem(p->itempos1);
    LPITEM item2 = ch->GetInventoryItem(p->itempos2);

    if (item != NULL && item2 != NULL && check_name(p->petname) != 0)
    {
    if (ch->GetGrowthPetSystem()->IsSummoned() && item->GetID() == ch->GetGrowthPetSystem()->GetSummonItemID())
    {
    ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ASLAN_GROWTH_PET_UNSUMMON_FIRST"));
    return;
    }
    else
    {
    item2->SetCount(item2->GetCount() - 1);
    DBManager::instance().DirectQuery ( "UPDATE player_petsystem SET name = '%s' WHERE id = %lu ", szEscapeName, item->GetID());
    ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ASLAN_GROWTH_PET_RENEW_PET_NAME"), szEscapeName);
    }
    }
    }
    #endif

    This is the system I'm trying to install.

    https://www.mediafire.com/file/lr5z9p09 ... m.zip/file

    If anyone has any idea what the reason behind this error is, please let me know. Thank you.

    I use Marty 5.8

    55401 원숭이 알 ITEM_PET PET_EGG 1 NONE ITEM_STACKABLE NONE NONE 15 0 0 0 0 REAL_TIME 604800 LIMIT_NONE 0 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 0 0 0 0 0 0
    55701 ????? ITEM_PET PET_SEAL 1 ANTI_SAFEBOX | ANTI_MYSHOP | ANTI_STACK | ANTI_GIVE | ANTI_SELL | ANTI_DROP LOG NONE NONE 0 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 0 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 34041 0 0 0 0 0 0 0

    This also contains the item proto data for the egg and the companion seal.

    🔥 Hai pe Discord! - Chat activ și support direct

    Te așteptăm și pe serverul de Discord - aici ne-am strâns toată comunitatea de Metin2 din România.

    Alătură-te acum!
    1300+ de membri activi!
    Robot Discord
    Roboțelu'
    Anunț
    Robot Robot
  • Mesaje: 133
  • Reacții: 0
  • Mesaje utile: 0
  • Status: Sunt doar un Bot :)
  • Regat: Shinsoo
  • Contact:

    Medalii

    Avatar utilizator
    Robot
    Robot

    Mesaj de Uriel »

    Salut, TenZ!

    Îți recomand câteva link-uri utile care te pot ajuta să rezolvi problema mai rapid:

    - Alte probleme rezolvate
    - Fixuri Metin2
    - Tutoriale
    - Cum resetez parola MySQL
    - Compilare sursă Metin2
    - Lista FreeBSD pentru compilare


    Și dacă vrei ajutor direct, te așteptăm pe serverul nostru de Discord — chat activ, suport live și o comunitate faină gata să te ajute! Pentru a intra pe serverul de Discord: Click aici
  • Mesaje: 11
  • Reacții: 2
  • Mesaje utile: 0
  • Status: Pierd vremea ^.^
  • Regat: Jinno
  • [ID Discord]
  • Contact:

    Medalii

    Mesaj de TenZ »

    up up up

    📢 Resurse Metin2 Premium!

    Zeci de resurse Metin2 Premium - exclusive și 100% funcționale începând cu 15.99€!.

    Vezi resursele Cumpără premium
    Premium
    Premium
    Anunț
    Scrie răspuns

    Creează-ți un cont sau autentifică-te pentru a participa la discuție

    Trebuie să fii membru pentru a răspunde

    Creează-ți un cont

    Membrii pot crea subiecte noi și pot descărca resurse Metin2 Gratuit!


    Te poți înregistra sau conecta rapid utilizând contul tău de Discord, Github sau Google.

    Înregistrare

    Autentifică-te

    Înapoi la “Support”

    Informații

    Utilizatori ce navighează pe acest forum: Niciun utilizator înregistrat și 3 vizitatori

    Discord ID copiat: