Fethi Polat 1
Fethi Polat
kralhakan2009 1
kralhakan2009
Vahsi Uzman 1
Vahsi Uzman
Best Studio 1
Best Studio
Agora Metin2 1
Agora Metin2
raderde 1
raderde
Cannn6161 1
Cannn6161
noisiv 1
noisiv
Manwe Work 1
Manwe Work
Mt2Hizmet 1
Mt2Hizmet
melankolıa18 1
melankolıa18
romegames 1
romegames
Hikaye Ekle
Reklam vermek için turkmmo@gmail.com

Source Otomatik Oyun İçi Lua Okuma Kodu

  • Konuyu başlatan Konuyu başlatan CoderPia
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 33

CoderPia

localhost
Telefon Numarası Onaylanmış Üye
Yönetici
Admin
VIP Üye
Paylaşım
Katılım
20 Kas 2025
Konular
131
Mesajlar
845
Çözüm
4
Online süresi
14d 15h
Reaksiyon Skoru
878
Altın Konu
19
Başarım Puanı
163
Yaş
32
MmoLira
9,312
DevLira
3
Ticaret - 0%
0   0   0

ROHAN2 WORLD 1-120 TR TİPİ OFFICIAL YOHARA, BALATHOR VE AMON! 80. GÜNÜNDE! +10.000 ONLİNE! HİLE VE BOT %100 ENGELLİ HEMEN TIKLA!

Selamlar,



Merhaba arkadaşlar,
Source İçersinde CTRL F Yapıp Aratin Bu kodu
( bool CLuaEngine::ExecuteScript)
Verdigim Kod ile Değiştirdikten sonra oyun için lua değişişligi otomatık çalışacaktır. Oyunu kapatıp acmanıza gerek kalmadın.




Kod:
bool CLuaEngine::ExecuteScript(CUser * pUser, CNpc * pNpc, int32 nEventID, int8 bSelectedReward, const char * filename)
{
    ScriptBytecodeMap::iterator itr;
    bool result = false;

    m_lock->AcquireReadLock();
    itr = m_scriptMap.find(filename);
    if (itr == m_scriptMap.end())
    {
        // Build full path to script
        std::string szPath = LUA_SCRIPT_DIRECTORY;
        szPath += filename;

        // Release the read lock (we're not reading anymore)
        m_lock->ReleaseReadLock();

        // Attempt to compile
        BytecodeBuffer bytecode;
        bytecode.reserve(LUA_SCRIPT_BUFFER_SIZE);
        if (!SelectAvailableScript()->CompileScript(szPath.c_str(), bytecode))
        {
            printf("ERROR: Could not compile Lua script.\n");
            printf("FILE: %s\n", szPath.c_str());
            printf("USER: %s\n", pUser->GetName().c_str());
            printf("ZONE: %d\n", pUser->GetZoneID());
            printf("NPC ID: %d\n", pNpc->m_sSid);
            printf("-\n");
            return false;
        }

        // Acquire the write lock (we're adding the compiled script)
        m_lock->AcquireWriteLock();

#if !defined(LUA_SCRIPT_CACHE_DISABLED)
        // Add the script to our map
        m_scriptMap[filename] = bytecode;
#endif

        // Now that we have the bytecode, we can use it.
        result = SelectAvailableScript()->ExecuteScript(pUser, pNpc, nEventID, bSelectedReward,
            filename, bytecode);

        // Done using the lock.
        m_lock->ReleaseWriteLock();
    }
    else
    {
        // Already have the bytecode, so now we need to use it.
        result = SelectAvailableScript()->ExecuteScript(pUser, pNpc, nEventID, bSelectedReward,
            filename, itr->second);

        // Done using the lock.
        m_lock->ReleaseReadLock();
    }

    return result;
}
 
  • Beğeni
Reactions: sh4

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst