require('lib.moonloader')
local samp = require('lib.samp.events')
local inicfg = require 'inicfg'
local imgui = require 'imgui'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8
local cfg = inicfg.load({
config = {
fraza = '',
act = 'workers',
smsPosle = false,
timeFraza = false,
style = false,
phone = false,
lock = false,
cc = false
}
}, "workerfam")
local act = imgui.ImBuffer(u8(cfg.config.act), 256)
local fraza = imgui.ImBuffer(u8(cfg.config.fraza), 256)
local smsPosle = imgui.ImBool(cfg.config.smsPosle)
local timeFraza = imgui.ImBool(cfg.config.timeFraza)
local style = imgui.ImBool(cfg.config.style)
local phone = imgui.ImBool(cfg.config.phone)
local lock = imgui.ImBool(cfg.config.lock)
local cc = imgui.ImBool(cfg.config.cc)
local window = imgui.ImBool(false)
local menu = 1
local time_captcha = ''
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(200) end
imgui.Process = false
inicfg.save(cfg, 'workerfam.ini')
sampAddChatMessage('[workersfamily] {FFFFFF}Активация - /'..u8:decode(act.v), 0x918390)
if cc.v then
sampRegisterChatCommand('cc', function()
for i = 1, 30 do
sampAddChatMessage('', -1)
end
end)
end
while true do wait(0)
imgui.Process = window.v
imgui.ShowCursor = window.v
if sampIsDialogActive() and sampGetDialogCaption():find('Проверка на робота') then
local time = os.clock()
while sampIsDialogActive() do wait(0) end
time_captcha = string.format("[%.3f]", os.clock() - time)
end
if not sampIsChatInputActive() and not sampIsDialogActive() and not isSampfuncsConsoleActive() and not isPauseMenuActive() then
if isKeyJustPressed(76) and lock.v then
sampSendChat('/lock')
end
if isKeyJustPressed(80) and phone.v then
sampSendChat('/phone')
end
if isKeyJustPressed(88) and style.v then
sampSendChat('/style')
end
end
end
end
function imgui.OnDrawFrame()
imgui.Begin('Test', window, imgui.WindowFlags.AlwaysAutoResize + imgui.WindowFlags.NoCollapse)
imgui.BeginChild('##left', imgui.ImVec2(150, 300), true)
if imgui.Button(u8('Общие настройки'), imgui.ImVec2(-1, 20)) then
menu = 1
end
if imgui.Button(u8('worker'), imgui.ImVec2(-1, 20)) then
menu = 2
end
if imgui.Button(u8('bindiokda'), imgui.ImVec2(-1, 20)) then
menu = 3
end
if imgui.Button(u8('k0PT4A'), imgui.ImVec2(-1, 20)) then
menu = 4
end
imgui.EndChild()
imgui.SameLine()
imgui.BeginChild('##right', imgui.ImVec2(400, 300), true)
if menu == 1 then
imgui.Text(u8('что ты будешь орать после ловли?:')); imgui.SameLine(); if imgui.InputText('##fraza', fraza) then cfg.config.fraza = u8:decode(fraza.v) save() end
imgui.Text(u8('активируй:')); imgui.SameLine(); if imgui.InputText('##act', act) then cfg.config.act = u8:decode(act.v) save() end
end
if menu == 2 then
if imgui.Checkbox(u8'кричать после ловли', smsPosle) then cfg.config.smsPosle = smsPosle.v save() end
if imgui.Checkbox(u8'время когда взял дом', timeFraza) then cfg.config.timeFraza = timeFraza.v save() end
end
if menu == 3 then
if imgui.Checkbox(u8'пошлен ахуй щегол (Буква - X)', style) then cfg.config.style = style.v save() end
if imgui.Checkbox(u8'тикток (Буква - P)', phone) then cfg.config.phone = phone.v save() end
if imgui.Checkbox(u8'обезопасить себя от бомжей (Буква - L)', lock) then cfg.config.lock = lock.v save() end
if imgui.Checkbox(u8'очисти чат нищий еблан (Команда - /cc)', cc) then cfg.config.cc = cc.v save() end
end
if menu == 4 then
if imgui.TreeNode(u8'Тренировка капчи: пососи мой член еблан тупой нахуй умри хуегоот!') then
imgui.Text(u8'Кнопка')
if imgui.InputText('##3', keybuff, imgui.SameLine()) then
HLcfg.main.key = string.format('%s', tostring(keybuff.v))
end
ShowHelpMarker(u8'Кнопка по которой будет открыватся капча.', imgui.SameLine())
if imgui.Checkbox(u8'Открывать капчу по кнопке', imgui.ImBool(HLcfg.main.onkey)) then
HLcfg.main.onkey = not HLcfg.main.onkey
end
if imgui.Button(u8'Открыть капчу') then showCaptcha() end
if imgui.Button(u8'Очистить текстдравы', imgui.SameLine()) then for i = 1, 400 do sampTextdrawDelete(i) end end
imgui.TreePop()
if imgui.Checkbox(u8'Флуд на N', imgui.ImBool(HLcfg.main.floodN)) then HLcfg.main.floodN = not HLcfg.main.floodN end
ShowHelpMarker(u8'Если нажать на N до PayDay, то Вам не будет писать "Не флуди",\nа также не будет кд на повторное нажатие', imgui.SameLine())'))
end
imgui.EndChild()
imgui.End()
end
function samp.onServerMessage(color, text)
if (text:find('Поздравляю! Теперь этот дом ваш!') or text:find('Поздравляю! Теперь этот бизнес ваш!')) and smsPosle.v then
lua_thread.create(function()
wait(50)
if timeFraza.v then
sampSendChat(u8:decode(fraza.v)..' '..time_captcha)
else
sampSendChat(u8:decode(fraza.v))
end
end)
end
end
function samp.onSendCommand(cmd)
if cmd == '/'..u8:decode(act.v) then
window.v = not window.v
menu = 1
return false
end
end
function save()
inicfg.save(cfg, 'HelperByLovec.ini')
end
function darkgreentheme()
imgui.SwitchContext()
local style = imgui.GetStyle()
local colors = style.Colors
local clr = imgui.Col
local ImVec4 = imgui.ImVec4
style.WindowPadding = imgui.ImVec2(8, 8)
style.WindowRounding = 6
style.ChildWindowRounding = 5
style.FramePadding = imgui.ImVec2(5, 3)
style.FrameRounding = 3.0
style.ItemSpacing = imgui.ImVec2(5, 4)
style.ItemInnerSpacing = imgui.ImVec2(4, 4)
style.IndentSpacing = 21
style.ScrollbarSize = 10.0
style.ScrollbarRounding = 13
style.GrabMinSize = 8
style.GrabRounding = 1
style.WindowTitleAlign = imgui.ImVec2(0.5, 0.5)
style.ButtonTextAlign = imgui.ImVec2(0.5, 0.5)
colors[clr.Text] = ImVec4(0.90, 0.90, 0.90, 1.00)
colors[clr.TextDisabled] = ImVec4(0.60, 0.60, 0.60, 1.00)
colors[clr.WindowBg] = ImVec4(0.08, 0.08, 0.08, 1.00)
colors[clr.ChildWindowBg] = ImVec4(0.10, 0.10, 0.10, 1.00)
colors[clr.PopupBg] = ImVec4(0.08, 0.08, 0.08, 1.00)
colors[clr.Border] = ImVec4(0.70, 0.70, 0.70, 0.40)
colors[clr.BorderShadow] = ImVec4(0.00, 0.00, 0.00, 0.00)
colors[clr.FrameBg] = ImVec4(0.15, 0.15, 0.15, 1.00)
colors[clr.FrameBgHovered] = ImVec4(0.19, 0.19, 0.19, 0.71)
colors[clr.FrameBgActive] = ImVec4(0.34, 0.34, 0.34, 0.79)
colors[clr.TitleBg] = ImVec4(0.00, 0.69, 0.33, 0.80)
colors[clr.TitleBgActive] = ImVec4(0.00, 0.74, 0.36, 1.00)
colors[clr.TitleBgCollapsed] = ImVec4(0.00, 0.69, 0.33, 0.50)
colors[clr.MenuBarBg] = ImVec4(0.00, 0.80, 0.38, 1.00)
colors[clr.ScrollbarBg] = ImVec4(0.16, 0.16, 0.16, 1.00)
colors[clr.ScrollbarGrab] = ImVec4(0.00, 0.69, 0.33, 1.00)
colors[clr.ScrollbarGrabHovered] = ImVec4(0.00, 0.82, 0.39, 1.00)
colors[clr.ScrollbarGrabActive] = ImVec4(0.00, 1.00, 0.48, 1.00)
colors[clr.ComboBg] = ImVec4(0.20, 0.20, 0.20, 0.99)
colors[clr.CheckMark] = ImVec4(0.00, 0.69, 0.33, 1.00)
colors[clr.SliderGrab] = ImVec4(0.00, 0.69, 0.33, 1.00)
colors[clr.SliderGrabActive] = ImVec4(0.00, 0.77, 0.37, 1.00)
colors[clr.Button] = ImVec4(0.00, 0.69, 0.33, 1.00)
colors[clr.ButtonHovered] = ImVec4(0.00, 0.82, 0.39, 1.00)
colors[clr.ButtonActive] = ImVec4(0.00, 0.87, 0.42, 1.00)
colors[clr.Header] = ImVec4(0.00, 0.69, 0.33, 1.00)
colors[clr.HeaderHovered] = ImVec4(0.00, 0.76, 0.37, 0.57)
colors[clr.HeaderActive] = ImVec4(0.00, 0.88, 0.42, 0.89)
colors[clr.Separator] = ImVec4(1.00, 1.00, 1.00, 0.40)
colors[clr.SeparatorHovered] = ImVec4(1.00, 1.00, 1.00, 0.60)
colors[clr.SeparatorActive] = ImVec4(1.00, 1.00, 1.00, 0.80)
colors[clr.ResizeGrip] = ImVec4(0.00, 0.69, 0.33, 1.00)
colors[clr.ResizeGripHovered] = ImVec4(0.00, 0.76, 0.37, 1.00)
colors[clr.ResizeGripActive] = ImVec4(0.00, 0.86, 0.41, 1.00)
colors[clr.CloseButton] = ImVec4(0.00, 0.82, 0.39, 1.00)
colors[clr.CloseButtonHovered] = ImVec4(0.00, 0.88, 0.42, 1.00)
colors[clr.CloseButtonActive] = ImVec4(0.00, 1.00, 0.48, 1.00)
colors[clr.PlotLines] = ImVec4(0.00, 0.69, 0.33, 1.00)
colors[clr.PlotLinesHovered] = ImVec4(0.00, 0.74, 0.36, 1.00)
colors[clr.PlotHistogram] = ImVec4(0.00, 0.69, 0.33, 1.00)
colors[clr.PlotHistogramHovered] = ImVec4(0.00, 0.80, 0.38, 1.00)
colors[clr.TextSelectedBg] = ImVec4(0.00, 0.69, 0.33, 0.72)
colors[clr.ModalWindowDarkening] = ImVec4(0.17, 0.17, 0.17, 0.48)
end
darkgreentheme()