Jump to content
Araştır
  • Diğer seçenekler ...
Sonuçları bul ...
Sonuçları bul ...

we1982

Çalışkan Üye
  • İçerik sayısı

    320
  • Katılım

  • Son ziyaret

  • Puan

    7,420 [ Bağış Yap ]

İletiler : we1982


  1. Merhaba npc lere bastığımda id leri örülmekte... aşağıdaki kodda kırmızı ile yazılan yerde görünmemesi için kodu kapatıyorum gameserver patlıyor.. yardımlarınızı rica ederim..


    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.
    ");
    printf("FILE: %s
    ", szPath.c_str());
    printf("USER: %s
    ", pUser->GetName().c_str());
    printf("ZONE: %d
    ", pUser->GetZoneID());
    printf("NPC ID: %d
    ", pNpc->m_sSid);
    printf("-
    ");
    return false;
    }

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

    // Add the script to our map
    m_scriptMap[filename] = bytecode;

    // 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();
    }

    //std::string EventMessage;
    //EventMessage = string_format("NpcID = %d - EventID = %d - Lua = %s", pNpc->m_sSid, nEventID, filename);
    //Packet EventNotice(WIZ_CHAT, uint8(PUBLIC_CHAT));
    //EventNotice GetNation() GetSocketID() //pUser->Send(&EventNotice);


    return result;
    }


  2. oğww oğww sen bu işin başındasın daha ben,im bu olayı çözmem 1 haftamı aldıı....
    -- mesaja ek olarak --
    KiraAmora61 in paylaştığı metinleri sırası ile uygulaman lazım.... yoksa zor yaparsınn
    -- mesaja ek olarak --
    Başlangış için şunu sormak istiyorum sana AppServ'i kurdunmu ?


  3. merhaba arkadşlar trina upradesi 100/100 ben bunu değiştirmek istiyorum olmuyor.... item uprade prosedürü aşağıdaki gibi... yardımınızı rica ederim..

    USE [kn_online]
    
    GO
    /****** Object: StoredProcedure [dbo].[INSERT_UPGRADE] Script Date: 18.04.2018 22:02:52 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[INSERT_UPGRADE]
    @itemname varchar(50), -- NAME OF ITEM TO UPGRADE
    @index int, -- RANDOMNUMBER as indexNumber
    @reqmon int, -- Required Money for upgrades (240K for unique's 0 for Normal Items)
    @TYPE tinyint -- Type 1 Only Bus Upgrade, Type 2 only Trina Upgrade, Type 3 Trina + Bus Upgrades at once.
    AS

    DECLARE @origitem varchar(4),@giveitem varchar(4), @give int, @otype int, @rate smallint, @reqitem int,@reqitem2 int
    set @otype = -1
    IF @TYPE = 1 or @TYPE = 3
    BEGIN
    set @rate=10000 -- Random rate for now. Can be editted lateron
    set @reqitem=379021000 -- Required Item for Upgrading.
    set @reqitem2=0

    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and num like '%001)' and strname like '%1)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and num like '%002)' and strname like '%2)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int)
    insert into item_upgrade_new select @index+2241, 5001, @itemname, '+1 To +2', @otype, CAST(@origitem AS smallint), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 0, @rate, @give
    --+2 to +3 code

    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%2)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%3)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int )
    insert into item_upgrade_new select @index+355, 5001, @itemname, '+2 To +3', @otype, CAST(@origitem AS smallint ), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 0, @rate, @give
    --+3 to +4 code

    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%3)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%4)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int)
    insert into item_upgrade_new select @index+461, 5001, @itemname, '+3 To +4 ', @otype, CAST(@origitem AS smallint ), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 3, @rate, @give
    --+4 to +5 code

    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%4)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%5)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int )
    insert into item_upgrade_new select @index+521, 5001, @itemname, '+4 To +5', @otype, CAST(@origitem AS smallint ), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 5, @rate, @give
    --+5 to +6 code

    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%5)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%6)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int)
    insert into item_upgrade_new select @index+6521, 5001, @itemname, '+5 To +6', @otype, CAST(@origitem AS smallint), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 8, @rate, @give
    --+6 to +7 code

    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%6)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%7)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int)
    insert into item_upgrade_new select @index+722, 5001, @itemname, '+6 To +7', @otype, CAST(@origitem AS smallint ), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 10, @rate, @give
    --+7 to +8 code

    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%7)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%8)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int )
    insert into item_upgrade_new select @index+81, 5001, @itemname, '+7 To +8', @otype, CAST(@origitem AS smallint ), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 11 ,@rate, @give
    --+8 to +9 code

    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%8)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%9)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int)
    insert into item_upgrade_new select @index+933, 5001, @itemname, '+8 To +9', @otype, CAST(@origitem AS smallint ), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 12, @rate, @give
    --+9 to +10 code

    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%9)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%10)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int)
    insert into item_upgrade_new select @index+101, 5001, @itemname, '+9 To +10', @otype, CAST(@origitem AS smallint ), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 13, @rate, @give
    END

    IF @TYPE = 2 or @TYPE = 3
    BEGIN
    set @rate=10000
    set @reqitem=700002000
    set @reqitem2=379021000

    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%1)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%2)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int)
    insert into item_upgrade_new select @index+2, 5001, @itemname, '1to2', @otype, CAST(@origitem AS smallint), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 0, @rate, @give
    --+2 to +3 code

    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%2)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%3)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int )
    insert into item_upgrade_new select @index+3, 5001, @itemname, '2to3', @otype, CAST(@origitem AS smallint ), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 0, @rate, @give
    --+3 to +4 code

    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%3)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%4)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int)
    insert into item_upgrade_new select @index+4, 5001, @itemname, '3to4', @otype, CAST(@origitem AS smallint ), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 3, @rate, @give
    --+4 to +5 code

    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%4)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%5)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int )
    insert into item_upgrade_new select @index+5, 5001, @itemname, '4to5', @otype, CAST(@origitem AS smallint ), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 5, @rate, @give
    --+5 to +6 code

    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%5)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%6)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int)
    insert into item_upgrade_new select @index+6, 5001, @itemname, '5to6', @otype, CAST(@origitem AS smallint), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 8, @rate, @give
    --+6 to +7 code

    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%6)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%7)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int)
    insert into item_upgrade_new select @index+7, 5001, @itemname, '6to7', @otype, CAST(@origitem AS smallint ), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 10, @rate, @give
    --+7 to +8 code


    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%7)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%8)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int )
    insert into item_upgrade_new select @index+8, 5001, @itemname, '7to8', @otype, CAST(@origitem AS smallint ), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 11, @rate, @give
    --+8 to +9 code

    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%8)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%9)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int)
    insert into item_upgrade_new select @index+9, 5001, @itemname, '8to9', @otype, CAST(@origitem AS smallint ), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 12, @rate, @give
    --+9 to +10 code

    select top 1 @origitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%9)%'
    select top 1 @giveitem= SUBSTRING(CAST ( num AS varchar ( 9)), 7,10) from item where strname like '%'+@itemname+'%' and strname like '%10)%'
    set @give=CAST(@giveitem AS int)-CAST(@origitem AS int)
    insert into item_upgrade_new select @index+10, 5001, @itemname, '9to10', @otype, CAST(@origitem AS smallint ), @reqitem, @reqitem2, 0, 0, 0, 0, 0, 0, @reqmon, 13, @rate, @give
    END
    select * from item_upgrade_new where strname=@itemname


  4. Merhaba lua daGetMaxExp (a nil value) hatası alıyorum..... bir bakabilirmisiniz.... şimdiden teşekkürler...

    A1lB3v.jpg

    Lua Kod Aşağıdaki gibi......

    if (EVENT == 211) then
    bLevel = GetLevel(UID);
    bRebLevel = GetRebLevel(UID);
    bMaxExp = GetMaxExp(UID);
    iExp = GetExp(UID);
    if (bLevel 4) then
    SelectMsg(UID, 2, -1, 7116, NPC, 10, 151);
    elseif (bLevel == 83 and iExp SelectMsg(UID, 2, -1, 7116, NPC, 10, 151);


  5. Merhaba arkadaşlar...

    SelectMsg(UID, 18, -1, -1, NPC); bu koddaki 18 sayısı resimdeki pencereyi açmakta aynı şekilde .

    9mBVXQ.jpg

    SelectMsg(UID, 24, -1, -1, NPC); bu koddaki 24 sayısı da alttaki resimdeki pencereyi açmakta

    OoXRJQ.jpg

    Benim sorun Şu olacak bu pencerelerin çekildiği yer neresi, bu kodların gösterildiği bir tablo varmı nasıl öğrene bilirim..Yardımlarınız için teşekkürler...

    Client ' mi? Source'mi?

×
×
  • Yeni Oluştur...