require("addon")
local sampev = require('libs.samp.events')
local dr = '2/5/1992'
local id = 1
function sampev.onShowDialog(dialogId, style, title, button1, button2, text)
if text:match('Задание было выполнено') then
sendDialogResponse(id, 1, 0, '')
return false
end
end
function onRunCommand(cmd)
if cmd == '!kvests' then
newTask(function()
coordStart(1773, -1893, 13, 23, 2, false)
wait(28500)
sendKey(1024)
wait(1000)
sendDialogResponse(id, 2, 0, '')
wait(500)
sendDialogResponse(id, 1, 0, '')
wait(500)
sendDialogResponse(id, 1, 0, '')
wait(1000)
coordStart(1495, -1280, 14, 23, 2, false)
wait(31000)
coordStart(1509, 1360, 10, 23, 2, false)
wait(6000)
sendKey(1024)
wait(500)
sendDialogResponse(id, 1, 0, '')
wait(500)
sendDialogResponse(id, 1, -1, dr)
wait(500)
coordStart(1496, 1335, 10, 23, 2, false)
wait(7000)
coordStart(1773, -1893, 13, 23, 2, false)
wait(29500)
sendKey(1024)
wait(1000)
sendDialogResponse(id, 2, 0, '')
wait(500)
sendDialogResponse(id, 1, 0, '')
wait(500)
sendKey(1024)
wait(5000)
sendDialogResponse(id, 2, 0, '')
wait(500)
sendDialogResponse(id, 2, 0, '')
wait(500)
sendDialogResponse(id, 1, 0, '')
wait(500)
coordStart(-79, 90, 3, 23, 2, false)
wait(115000)
sendKey(1024)
wait(500)
sendDialogResponse(id, 3, 0, '')
wait(500)
sendKey(1024)
wait(500)
sendDialogResponse(id, 2, 0, '')
wait(500)
coordStart(-104, 104, 3, 23, 2, false)
wait(3000)
end)
end
end