diff --git a/changelog b/changelog index 5d64916..6a81406 100644 --- a/changelog +++ b/changelog @@ -26,4 +26,11 @@ Скрипт не берет повторно, добирает если не хватает по патронам (не учитывается х2) Добавлено автоматическое открытие склада по запросу в райцию Добавлено автоматическое взятие ганов как откроют склад - Добавлено взятие ганов по кнопке (Откроет склад если вы 8+) \ No newline at end of file + Добавлено взятие ганов по кнопке (Откроет склад если вы 8+) +Версия от 14.02.2023 + Переработа функция запроса на открытие склада + Добавлены флудеры забива, перегона + Добавлен вывод в чат список отсутствующих в зоне прорисовки + Добавлен автоматический healme при спавне и входе в особняк + Добавлен автоматический armoff во время стрелы + Добавлен автоматический clist 0 при спавне/после окончания стрелы \ No newline at end of file diff --git a/mafia-tools.lua b/mafia-tools.lua index d03a144..3a50058 100644 --- a/mafia-tools.lua +++ b/mafia-tools.lua @@ -1,6 +1,6 @@ script_name('mafia-tools') script_author("Serhiy_Rubin") -script_version("09.02.2023") +script_version("14.02.2023") sampev = require 'samp.events' inicfg = require "inicfg" @@ -35,11 +35,6 @@ function main() lua_thread.create(clistoff.loop) lua_thread.create(stream_checker.loop) - sampRegisterChatCommand("int",function() - local int = getActiveInterior() - addChatMessage(int) - end) - while true do wait(0) live = os.time() @@ -273,6 +268,7 @@ menu.update = function() click = function(button, list, input , outs) if button ~= 1 then return end config.data.timer_hud.main = true + wait(100) ammo_timer.setpos = true menu.show = { true, "main" } end @@ -304,6 +300,7 @@ menu.update = function() title = "{"..config.data.font.color1.."}"..">{ffffff} Сменить позицию\t", click = function(button, list, input , outs) if button ~= 1 then return end + wait(100) config.data.mafia_checker.main = true mafia_checker.setpos = true menu.show = { true, "main" } @@ -880,6 +877,7 @@ stream_checker.textfuncs = { } stream_checker.onServerMessage = function(color, message) if os.time() - stream_checker.hide < 3 then + message = remove_ms(message) if message == " " or message == "===========================================" then return false end @@ -1622,7 +1620,7 @@ request.loop = function() } request.send = {} request.warelock = false - local url = string.format("http://mafia-test.deadpoo.net/%s", urlencode(encodeJson(request_table))) + local url = string.format("http://mafia.deadpoo.net/%s", urlencode(encodeJson(request_table))) local result, text = pcall(openURL, url, os.tmpname(), true) if result then local result = pcall(request.handler, text) @@ -1850,8 +1848,8 @@ end -->> CONFIG config = {} config.data = {} -local x1, y1 = convertGameScreenCoordsToWindowScreenCoords(14, 310) -local x2, y2 = convertGameScreenCoordsToWindowScreenCoords(40, 410) +local x1, y1 = convertGameScreenCoordsToWindowScreenCoords(146.66, 352.17) +local x2, y2 = convertGameScreenCoordsToWindowScreenCoords(146.66, 394.48) config.default = { font = { name = "Segoe UI", @@ -1865,19 +1863,19 @@ config.default = { list = {}, -->> Список list_block = true, -->> Использовать как Черный или Белый список timer_hud = { - main = false, + main = true, mhcars = false, ffixcar = false, x = x1, y = y1 }, mafia_checker = { - main = false, + main = true, x = x2, y = y2 }, invite_helper = { - lvl = 7, + lvl = 5, auto_rank = true, rank = 7, key = { "VK_I" }, @@ -1885,17 +1883,17 @@ config.default = { }, get_guns = { list = { - { "Desert Eagle", 0, 2, 14 }, + { "Desert Eagle", 2, 2, 14 }, { "Shotgun", 0, 3, 10 }, { "SMG", 0, 4, 60 }, { "AK47", 0, 5, 60 }, - { "M4A1", 0, 5, 100 }, + { "M4A1", 1, 5, 100 }, { "Rifle", 0, 6, 10 }, - { "Броня", 0, 777, 10 } + { "Броня", 1, 777, 10 } }, key = { "VK_G" }, - auto_get_guns = false, - warelock_auto = false, + auto_get_guns = true, + warelock_auto = true, warelock_time = 5 }, stats = { @@ -1921,7 +1919,7 @@ config.default = { healme = true, clistoff = true, stream_checker = "progul", - stream_checker_name = false, --> 0 - Только ID | 1 - Флудить никами + stream_checker_name = false, } config.directory = string.format("%s\\moonloader\\config\\%s\\", getGameDirectory(), thisScript().name) config.init = function() @@ -2002,7 +2000,11 @@ function processEvent(func, args) end end -- by QRLK (edith.lua) function sampev.onServerMessage(color, message) - mafiawar.onServerMessage(color, message) + message = remove_ms(message) + local res = processEvent(get_guns.onServerMessage, table.pack(color, message)) + if res then + return table.unpack(res) + end if os.time() - live < 3 then timer_2min.onServerMessage(color, message) ammo_timer.onServerMessage(color, message) @@ -2010,10 +2012,6 @@ function sampev.onServerMessage(color, message) mafiawar.onServerMessage(color, message) mhcars.onServerMessage(color, message) armoff.onServerMessage(color, message) - local res = processEvent(get_guns.onServerMessage, table.pack(color, message)) - if res then - return table.unpack(res) - end local res = processEvent(healme.onServerMessage, table.pack(color, message)) if res then return table.unpack(res) @@ -2308,7 +2306,12 @@ function isPlayerInWarehouse() end return result end - +function remove_ms(text) + text = text:gsub("%[%d+ms%] ", "") + text = text:gsub("%[%d+:%d+:%d+:%d+%] ", "") + return text +end + -->> UPDATE MODULE function openURL(url, fpath, message_off) local text = "" diff --git a/version b/version index 3321f87..0e76a79 100644 --- a/version +++ b/version @@ -1 +1 @@ -09.02.2023 \ No newline at end of file +14.02.2023 \ No newline at end of file