these scripts can be combined?
code 1:
function OnEvent(event, arg)
if event == "PROFILE_ACTIVATED" then
EnablePrimaryMouseButtonEvents(true)
elseif event == "MOUSE_BUTTON_PRESSED" and arg == 1 and IsMouseButtonPressed(3)and IsKeyLockOn"capslock" then -- RMB pressed
Sleep(10)
repeat
MoveMouseRelative(0,2)
Sleep(10)
until not IsMouseButtonPressed(1) -- RMB released
end
end
code 2
----------------Made By LazyBaxy------------------
local norecoil = true
local norecoilDelay = 16
local norecoilForce = 4
local fastloot = true
local setposmode = false
local fastlootkey_pos1 = 6
local fastlootkey_pos2 = 6
local cords = {{3552,8456},{26870,27774},26278}
--cords{{pos1 x, pos1 y},{pos2 x, pos2 y}, inventory x}
--use setposmode to adjust fastloot.
------------------Advanced------------------------
function fastloot(loc)
local x = math.random(cords[loc][1]-100,cords[loc][1]+100)
local y = math.random(cords[loc][2]-100,cords[loc][2]+100)
local d = math.random(cords[3],cords[3]+1000)
MoveMouseTo(x,y)
PressMouseButton(1)
MoveMouseTo(d,y)
ReleaseMouseButton(1)
end
function OnEvent(event, arg)
if(event=="PROFILE_ACTIVATED") then
EnablePrimaryMouseButtonEvents(1)
elseif(event=="PROFILE_DEACTIVATED") then
ReleaseMouseButton(1)
elseif(IsMouseButtonPressed(1) and IsMouseButtonPressed(3) and norecoil)then
repeat
MoveMouseRelative(0,norecoilForce)
Sleep(norecoilDelay)
until not IsMouseButtonPressed(1)
elseif(setposmode) then
ClearLog()
local x, y = GetMousePosition()
OutputLogMessage("X: "..x.."
Y: "..y.."
")
elseif(event=="MOUSE_BUTTON_PRESSED" and fastloot) then
if(arg==fastlootkey_pos1) then
fastloot(1)
elseif(arg==fastlootkey_pos2) then
fastloot(2)
end
end
end
I just want the fastloot part from the second code!!!
..............................................................................................................................................................................................
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…