SOL
SAĞ
METİN2 PVP Güvenli Efsun Bugunun Fixi
SİDEBAR REKLAMI

char_item.cpp eklentisini değiştir ( kilit vs engellerini kaldırdım kendinize göre düzenleyin )
 

Kod:

                                case USE_CHANGE_ATTRIBUTE3:
                                    {


                                        if ((GM_PLAYER == GetGMLevel()) && (false == test_server))
                                        {
                                            DWORD dwChangeItemAttrCycle = quest::CQuestManager::instance().GetEventFlag(msc_  szChangeItemAttrCycleFlag);
                                            if (dwChangeItemAttrCycle < msc_dwDefaultChangeItemAttrCycle)
                                                dwChangeItemAttrCycle = msc_dwDefaultChangeItemAttrCycle;
                            
                                            quest::PC* pPC = quest::CQuestManager::instance().GetPC(GetPlayerID  ());
                                            if (pPC)
                                            {
                                                DWORD dwNowMin = get_global_time() / 60;
                                                DWORD dwLastChangeItemAttrMin = pPC->GetFlag(msc_szLastChangeItemAttrFlag);
                                                if (dwLastChangeItemAttrMin + dwChangeItemAttrCycle > dwNowMin)
                                                {
                                                    ChatPacket(CHAT_TYPE_INFO, LC_TEXT("속성을 바꾼지 %d분 이내에는 다시 ë³€ê²½í•  수 없습니다.(%d 분 남음)"), dwChangeItemAttrCycle, dwChangeItemAttrCycle - (dwNowMin - dwLastChangeItemAttrMin));
                                                    return false;
                                                }
                                
                                                pPC->SetFlag(msc_szLastChangeItemAttrFlag, dwNowMin);
                                            }
                                        }
                        
                                        newEnchant_type1 = 0;
                                        newEnchant_value1 = 0;
                                        newEnchant_type2 = 1;
                                        newEnchant_value2 = 1;
                                        newEnchant_type3 = 2;
                                        newEnchant_value3 = 2;
                                        newEnchant_type4 = 3;
                                        newEnchant_value4 = 3;
                                        newEnchant_type5 = 4;
                                        newEnchant_value5 = 4;
                                        SetEnchantAttr(DestCell.cell);
                                        item2->PrepareAttribute();
                                        ChatPacket(CHAT_TYPE_COMMAND, "EnchantAttr_open #%d#%d#%d#%d#%d#%d#%d#%d#%d#%d#%d#", DestCell.cell, newEnchant_type1, newEnchant_value1, newEnchant_type2, newEnchant_value2, newEnchant_type3, newEnchant_value3, newEnchant_type4, newEnchant_value4, newEnchant_type5, newEnchant_value5);


                                        SetQuestFlag("efsunsystem.newEnchant_type1", newEnchant_type1);
                                        SetQuestFlag("efsunsystem.newEnchant_type2", newEnchant_type2);
                                        SetQuestFlag("efsunsystem.newEnchant_type3", newEnchant_type3);
                                        SetQuestFlag("efsunsystem.newEnchant_type4", newEnchant_type4);
                                        SetQuestFlag("efsunsystem.newEnchant_type5", newEnchant_type5);


                                        SetQuestFlag("efsunsystem.newEnchant_value1", newEnchant_value1);
                                        SetQuestFlag("efsunsystem.newEnchant_value2", newEnchant_value2);
                                        SetQuestFlag("efsunsystem.newEnchant_value3", newEnchant_value3);
                                        SetQuestFlag("efsunsystem.newEnchant_value4", newEnchant_value4);
                                        SetQuestFlag("efsunsystem.newEnchant_value5", newEnchant_value5);
                                        {
                                            char buf[128];
                                            snprintf(buf, sizeof(buf), "%u", item2->GetID());
                                            LogManager::instance().ItemLog(this, item, "CHANGE_ATTRIBUTE3 WAIT_PLAYER", buf);
                                        }
                        
                                        item2->Lock(true);
                                        item->SetCount(item->GetCount() - 1);
                                    }
                                    break;

item_attirubute eklentisini değiştir
 

Kod:

void CItem::SetNewEfsunAttribute(int newEnchant_type1,int newEnchant_type2,int newEnchant_type3,int newEnchant_type4,int newEnchant_type5)
{
    ClearAttribute();
    
    AddAttr(newEnchant_type1, 6);
    AddAttr(newEnchant_type2, 6);
    AddAttr(newEnchant_type3, 6);
    AddAttr(newEnchant_type4, 6);
    AddAttr(newEnchant_type5, 6);
    
    UpdatePacket();
    Save();
}

cmd_general.cpp new fonk değiştir
 

Kod:

ACMD(do_enchant_new)
{
    if (!ch)
        return;
    
    if (!ch->GetEnchantAttr())
        return;
    
    LPITEM itemTarget = ch->GetInventoryItem(ch->GetEnchantAttr());
    if (itemTarget == NULL)
        return;
    
    ch->SetEnchantAttr(0);
    itemTarget->SetForceAttribute(0,ch->GetQuestFlag("efsunsystem.newEnchant_type1"), ch->GetQuestFlag("efsunsystem.newEnchant_value1"));
    itemTarget->SetForceAttribute(1,ch->GetQuestFlag("efsunsystem.newEnchant_type2"), ch->GetQuestFlag("efsunsystem.newEnchant_value2"));
    itemTarget->SetForceAttribute(2,ch->GetQuestFlag("efsunsystem.newEnchant_type3"), ch->GetQuestFlag("efsunsystem.newEnchant_value3"));
    itemTarget->SetForceAttribute(3,ch->GetQuestFlag("efsunsystem.newEnchant_type4"), ch->GetQuestFlag("efsunsystem.newEnchant_value4"));
    itemTarget->SetForceAttribute(4,ch->GetQuestFlag("efsunsystem.newEnchant_type5"), ch->GetQuestFlag("efsunsystem.newEnchant_value5"));
    itemTarget->Lock(false);
    
    ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You choose to take the new bonuses."));
    {
        char buf[128];
        snprintf(buf, sizeof(buf), "%u", itemTarget->GetID());
        LogManager::instance().ItemLog(ch, itemTarget, "CHANGE_ATTRIBUTE3 ANSWER_YES", buf);
    }
    
    ch->Save();
}
YAZAR HAKKINDA;
arcface
Admin

Web Developer

KONU YORUMLARI
YORUM YAP
Image

C++ / C# / Python

METİN2 PVP Güvenli Efsun Bugunun Fixi

METİN2 PVP Güvenli Efsun Bugunun Fixi METİN2 PVP Güvenli Efsun Bugunun Fixi METİN2 PVP Güvenli Efsun Bugunun Fixi METİN2 PVP Güvenli Efsun Bugunun Fixi METİN2 PVP Güvenli Efsun Bugunun Fixi

EN ÇOK OKUNAN 5 MAKALELER
arcface
Admin Yazdı;

2 ay önce

Yarı insan denilince ne anlıyoruz önce ona bir bakalım. Yarı insan; bi..

arcface
Admin Yazdı;

2 ay önce

Rubinum2 Web Panel Rubinum2 Web Panel Rubinum2 Web PanelRubinum2 Web..

arcface
Admin Yazdı;

2 ay önce

Afro2 Web Panel Kodlaması Afro2 Web Panel Kodlaması Afro2 Web Pane..

arcface
Admin Yazdı;

2 ay önce

Discord Widget Discord Widget Discord Widget Discord Widget Di..

arcface
Admin Yazdı;

2 ay önce

Aegea2 Site Teması İndir Aegea2 Site Teması İndir Aegea2 Site Teması..