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
Krutzo 1
Krutzo
shrpnl 1
shrpnl
Hikaye Ekle
Reklam vermek için turkmmo@gmail.com

MaviAyGames | [C++, LUA] Quest ile istediğin haritaya mob spawn etmek

MaviAy44

Emre Kırıcı
Telefon Numarası Onaylanmış Üye TC Kimlik Numarası Doğrulanmış Üye
Yönetici
Katılım
16 Tem 2019
Konular
715
Mesajlar
3,551
Çözüm
47
Online süresi
6mo 20d
Reaksiyon Skoru
2,109
Altın Konu
34
Başarım Puanı
309
MmoLira
19,556
DevLira
122
Ticaret - 100%
7   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!

Bu sistemle istediğin haritada orda olmasan bile mob spawn edebiliyorsun.

Kanıt:


Ben göstermek için aynı haritada bulundum. Denedim farklı haritada olsan bile mobu spawn ediyor.

Kod:
questlua_global.cpp

void RegisterGlobalFunctionTable(lua_State* L)

// ARAT ÜSTÜNE EKLE

int mob_spawn_ext(lua_State* L)
    {
        if(false == lua_isnumber(L, 1) || false == lua_isnumber(L, 2) || false == lua_isnumber(L, 3)
            || false == lua_isnumber(L, 4) || false == lua_isnumber(L, 5) || false == lua_isboolean(L, 6) )
        {
            lua_pushnumber(L, 0);
            return 0;
        }

        const DWORD mobVnum = static_cast<DWORD>(lua_tonumber(L, 1));
        const long mapIndex = static_cast<long>(lua_tonumber(L, 2));
        const int x = static_cast<int>(lua_tonumber(L, 3));
        const int y = static_cast<int>(lua_tonumber(L, 4));
        const size_t count = MINMAX(1, static_cast<size_t>(lua_tonumber(L, 5)), 10);
        const bool isAggresive = static_cast<bool>(lua_toboolean(L, 6));


        size_t SpawnCount = 0;

        const CMob* pMonster = CMobManager::instance().Get( mobVnum );

        if( NULL != pMonster )
        {
            //const LPCHARACTER pChar = CQuestManager::instance().GetCurrentCharacterPtr();
            for( size_t i=0 ; i < count ; ++i )
            {
                const LPCHARACTER pSpawnMonster = CHARACTER_MANAGER::instance().SpawnMobRange( mobVnum,
                        mapIndex,
                        x - number(100, 200),
                        y - number(100, 200),
                        x + number(100, 200),
                        y + number(100, 200),
                        true,
                        pMonster->m_table.bType == CHAR_TYPE_STONE,
                        isAggresive );

                if( NULL != pSpawnMonster )
                {
                    ++SpawnCount;
                }
            }

            sys_log(0, "QUEST Spawn Monstster: VNUM(%u) COUNT(%u) isAggresive(%b)", mobVnum, SpawnCount, isAggresive);
        }

        lua_pushnumber(L, SpawnCount);

        return 1;
    }
//#########################################################
{    "spawn_mob",                    _spawn_mob                        },
// ARAT ALTINA EKLE
{    "spawn_mob_ext",                    mob_spawn_ext                        },


Kod:
// quest_functions ekle
spawn_mob_ext

NOT: Kordinatlar oyuncuya ışınlandığında çıkanlar.

Kod:
quest mapengeli begin
    state start begin
        when login begin
            send_letter("Deneme")
        end-- when
        when info or button begin

            spawn_mob_ext(MOB_KODU,MAP_INDEX,KORDINAT_X,KORDINAT_Y,MOB_SAYISI,AGRASIFMI)
            spawn_mob_ext(101,43,873200,241800,1,false)
            -- notice("Hey")
            -- spawn_mob(104,5,true)
            send_letter("Deneme")
        end -- when
    end -- State
end -- quest
 
Son düzenleme:

En Çok Reaksiyon Alan Mesajlar

Paylaşım için teşekkürler :)
 
Paylaşılan asıl sitedede sormuştum sizede sorayım farklı 3 4 haritaya aynı anda farklı farklı atmak istesek questi nasıl olması gerekir
 
Paylaşılan asıl sitedede sormuştum sizede sorayım farklı 3 4 haritaya aynı anda farklı farklı atmak istesek questi nasıl olması gerekir

spawn_mob_ext(MOB_KODU,MAP_INDEX,KORDINAT_X,KORDINAT_Y,MOB_SAYISI,AGRASIFMI)
spawn_mob_ext(101,43,873200,241800,1,false)

Bu kısmı arttırabilirsiniz.
 
Sadece bulunduğunuz kanal ve core için geçerli. Orada yazan mapindex, o an bulunduğunuz core'da değilse çalışmaz.
 

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

Geri
Üst