News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: Combo mod  (Read 1223 times)

0 Members and 1 Guest are viewing this topic.

Offline Ming

  • Full Member
  • ***
  • Posts: 154
  • Gender: Male
  • 抽刀斷水水更流,舉杯消愁愁更愁
    • View Profile
Combo mod
« on: October 18, 2021, 10:17:26 AM »
Code: [Select]
Fight = function()
  local FirstPunch = {"/Global/P_Striker_A/Offense/Short/Strikes/LightAttacks/JAB", "P_Striker_A.act", 0.32}
  local SecondPunch = {"/Global/G_Striker_A/Offense/Short/Strikes/LightAttacks/RightHook", "G_Striker_A.act", 0.3}
  local ThirdPunch = {"/Global/DO_Edgar/Offense/Short/LightAttacks/Punch1/Punch2", "DO_Edgar.act", 0.4}
  local FourthPunch = {"/Global/B_Striker_A/Offense/Short/Strikes/HeavyAttacks/SwingPunch/SwingPunch_R", "B_Striker_A.act", 0.37}
  local FifthPunch =  {"/Global/G_Johnny/Offense/Short/Strikes/HeavyKick", "G_Johnny.act", 0.44}
  local SixthPunch = {"/Global/Player/Attacks/Strikes/LightAttacks/Left1/Right2/Left3/Release/Unblockable/JackieKick", "Act/Anim/Player.act", 0.38}
  local SeventhPunch = {"/Global/Actions/Offense/RunningAttacks/RunningAttacksDirect", "Globals/GlobalActions.act", 0.35}
  local AllPunches = {{FirstPunch}, {SecondPunch}, {ThirdPunch}, {FourthPunch}, {FifthPunch}, {SixthPunch}, {SeventhPunch}}
  local LastPunch = {
    {"/Global/Player/Attacks/Strikes/LightAttacks/Left1/Right2/Left3/Release/Unblockable/JackieKick", "Act/Anim/Player.act"},
    {"/Global/G_Grappler_A/Offense/Short/Strikes/HeavyAttacks/BootKick", "G_Grappler_A.act"},
    {"/Global/G_Johnny/Offense/Short/Strikes/HeavyKick", "G_Johnny.act"},
    {"/Global/G_Johnny/Offense/Medium/Strikes/HeavyAttack", "G_Johnny.act"},
    {"/Global/G_Striker_A/Offense/Medium/Strikes/HeavyAttack/KickThrust", "G_Striker_A.act"}
  }
  if PedIsPlaying(gPlayer, "/Global/Player/Attacks/Strikes/LightAttacks/Left1/Release/JAB", true) then
    PlayerForceActionNode(FirstPunch[1], FirstPunch[2])
  end
  for i = 1, 7 do
    if i < 7 and PedIsPlaying(gPlayer, AllPunches[i][1], true) and IsButtonPressed(6, 0) and PedGetNodeTime(gPlayer) > AllPunches[i][3] then
      PlayerForceActionNode(AllPunches[i + 1][1], AllPunches[i + 1][2])
    elseif i == 7 and IsButtonPressed(6, 0) and PedIsPlaying(gPlayer, AllPunches[i][1], true) and PedGetNodeTime(gPlayer) > AllPunches[i][3] then
      local TianDiZhuZai = math.random(1, size(LastPunch))
      PlayerForceActionNode(LastPunch[TianDiZhuZai][1], LastPunch[TianDiZhuZai][2])
    end
  end
end
I think AllPunches is wrong
Does someone know how to do ?