Go-piratia Posted October 30 Share Posted October 30 Открываем npcsdk.lua Ищем function Buy и заменяем все на это function Buy( character, npc, trade, itemtype, index1, index2, count ) local antibuy = GetChaStateLv ( character , 5 ) if antibuy == 0 then PRINT( "Buy" ) itemtype = itemtype + 1 index1 = index1 + 1 if trade[itemtype] == nil or trade[itemtype].item == nil or trade[itemtype].item[index1] == nil then PRINT( "Buy: Function error." ) SystemNotice( character, "Buy: Функция ошибочна. " ) return LUA_FALSE end local itemid = trade[itemtype].item[index1] local statelv = 1 local statetime = 3 --Задержка (в секундах) SafeBuy( character, itemid, index2, count ) AddState ( character, character, 5, statelv, statetime ) return LUA_TRUE else SystemNotice(character, "Покупать можно каждые 3 секунды. ") return LUA_FALSE end end Чуть выше находим function sale и также все заменяем function Sale( character, npc, index, count ) local antisale = GetChaStateLv ( character , 5 ) if antisale == 0 then PRINT( "Sale" ) if index == nil or count == nil then PRINT( "Sale:Function parameter error!" ) SystemNotice( character, "Sale: Функция ошибочна. " ) return LUA_FALSE end local statelv = 1 local statetime = 3 --Задержка (в секундах) SafeSale( character, index, count ) AddState ( character, character, 5, statelv, statetime ) return LUA_TRUE else SystemNotice(character, "Продавать можно каждые 3 секунды. ") return LUA_FALSE end end Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.