portScript("\\Library\\LibTable.lua") -- imports the LibTable library
ImportScript("\\Library\\LibPed.lua") -- imports the LibPed library
local l_0_0 = false
MissionSetup = function() -- basic mission setup function which is used in almost all bully scripts
local l_1_0 = 270 -- X coords
local l_1_1 = -110 -- Y coords
local l_1_2 = 6.4000000953674 -- Z coords
PlayerSetHealth(200) -- gives the player 200 health
AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
end
MissionCleanup = function()
end -- end statement
function IsMoving()
local s = 0.08 -- sensitivity
return GetStickValue(16,c) > s or GetStickValue(16,c) < -s or GetStickValue(17,c) > s or GetStickValue(17,c) < -s
end
function Block()
if IsButtonPressed(10,0) and IsButtonBeingPressed(12,0) and not PedIsValid(PedGetGrappleTargetPed(gPlayer)) then
PedSetActionTree(gPlayer,"/Global/Player","Act/Player.act")
elseif IsButtonBeingReleased (10,0) and not PedIsValid(PedGetGrappleTargetPed(gPlayer)) then
PedSetActionTree(gPlayer,"/Global/B_Striker_A", "Act/Anim/B_Striker_A.act")
end
end
main = function()
F_MissionSetup()
gMissionRunning = true
while gMissionRunning do
IsMoving()
Block()
if IsButtonPressed(14,0) then
PedSetActionTree(gPlayer, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB", "Act/Anim/Nemesis.act")
elseif IsButtonPressed(10,0) and IsMoving() and not isStrafing and not PedIsValid(PedGetGrappleTargetPed(gPlayer)) then
ExecuteActionNode(gPlayer,"/Global/B_Striker_A/Default_KEY/ExecuteNodes/LocomotionOverride/Combat","Act/Anim/B_Striker_A")
isStrafing = true
elseif (not IsButtonPressed(10,0) or not IsMoving()) and isStrafing and not PedIsValid(PedGetGrappleTargetPed(gPlayer)) then
PedSetActionTree(gPlayer,"/Global/B_Striker_A", "Act/Anim/B_Striker_A")
isStrafing = false
elseif PedIsValid(PedGetTargetPed()) and not PedIsValid(PedGetGrappleTargetPed(gPlayer)) then
local x,y,z = PedGetPosXYZ(PedGetTargetPed())
PedFaceXYZ(gPlayer,x,y,z)
end
UpdateTextQueue()
Wait(0)
end
end