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


Show Posts

* Messages | Topics | Attachments

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Ordinarypeople

Pages: [1]
1
Modding Questions/Help / Help
« on: October 15, 2022, 11:25:05 AM »
{help} can anyone explain why my mod is not running?

2
Modding Questions/Help / Re: Question / how to add npc fighting style
« on: October 14, 2022, 04:28:40 AM »

apakah akan berhasil seperti ini?



utama = fungsi()
    - tunggu pemuatan game.
    sementara tidak SystemIsReady() atau AreaIsLoading() lakukan
        Tunggu(0)
    akhir
    MuatAnim()
    sementara lakukan
        Tunggu(0)
    akhir
akhir
GRUP lokal = {
    'Otoritas','Tinju','Russell','Nemesis','B_Striker' ,'CV_Female','CV_Male','DO_Edgar','DO_Grap','DO_StrikeCombo',
    'DO_Striker','F_Adult','F_BULLY','F_Douts','F_Girls','F_Greas','F_Jocks',' F_Nerds','F_OldPeds','F_Pref','F_Preps',
    'G_Grappler','
    'N_Striker','N_Striker_A','N_Striker_B','P_Grappler','P_Striker','PunchBag','Qped','Rat_Ped','Russell_Pbomb','Straf_Dout',
    'Straf_Fat','Straf_Female' ','Straf_Nerd','Straf_Prep','Straf_Savage','Straf_Wrest','TE_Female','MINI_React',
    }
    untuk _, ANIM di ipairs(GROUP)
        jika tidak HasAnimGroupLoaded (ANIM) maka
            LoadAnimationGroup
        akhir (
    ANIM )
    -- lingkaran.
    sementara benar lakukan
        Tunggu(0)
    akhir
   
lokal X, Y, Z = PlayerGetPosXYZ()
untuk INDEX, PED di ({PedFindInAreaXYZ(X, Y,

        jika PedIsInCombat(PED) dan PedMePlaying(PED, 'DEFAULT_KEY') maka
            jika PedGetName(PED) == 'N_Peanut' dan DistanceBetweenPeds2D(PED, PedGetTargetPed(PED)) <= 1,5 maka
                jika math.random(1, 100) <= 5 maka
                    PedSetActionNode(PED, '/Global/G_Johnny/Offense/Special/SpecialActions/Grapples/Dash', 'Act/Anim/G_Johnny.act')
                akhir
                jika math.random(1, 100) <= 10 maka
                    PedSetActionNode (PED, '/Global/Nemesis/Offense/Medium/Strikes/HeavyAttacks/JackieKick', 'Act/Anim/Nemesis.act')
                akhir
                jika math.random(1, 100) <= 3 maka
                    PedSetActionNode(PED, '/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut', 'Act/Anim/Nemesis.act')
                akhir
            akhir
          TextPrintString('Berhasil!', 1, 1)
           
        akhir
    akhir
 akhir

3
Modding Questions/Help / Re: Question / how to add npc fighting style
« on: October 13, 2022, 04:37:44 PM »
Can you give me a lua example of this?

I'm very happy with this

and can you see my file here:

-- Main function:
function main()
    -- Waiting for the game's appearing:
    while not SystemIsReady() or AreaIsLoading() do
        Wait(0)
    end
    LoadAnim()
    while true do
        Wait(0)
        MyMod()
    end
end

local F_Peds = {}


LoopFunctions = function()
repeat
CheckForPeds()
Wait(80)
until not Alive
end


CheckForPeds = function()
local P_H_P_L = PedGetWhoHitMeLast(gPlayer)
local P_T_P = PedGetTargetPed(gPlayer)
if PedIsValid(P_T_P) and PedGetHealth(P_T_P) > 1 then
if OnlyOnePedInstance(P_T_P) then
RegisterPed(P_T_P)
end
elseif PedIsValid(P_H_P_L) and PedGetHealth(P_H_P_L) > 1 then
if OnlyOnePedInstance(P_H_P_L) then
RegisterPed(P_H_P_L)
end
end

for i = 1,table.getn(F_Peds) do
if PedIsValid(F_Peds) then
local F_H_P_L = PedGetWhoHitMeLast(F_Peds)
local F_T_P = PedGetTargetPed(F_Peds)

if PedIsValid(F_T_P) and PedGetHealth(F_T_P) > 1 then
if OnlyOnePedInstance(F_T_P) and F_T_P ~= gPlayer then
RegisterPed(F_T_P)
end
end

if PedIsValid(F_H_P_L) and PedGetHealth(F_H_P_L) > 1 then
if OnlyOnePedInstance(F_H_P_L) and F_H_P_L ~= gPlayer then
RegisterPed(F_H_P_L)
end
end

end
end

end


OnlyOnePedInstance = function(PedToCheck)
local Match = false

for i = 1,table.getn(F_Peds) do
 if PedToCheck == F_Peds then
  Match = true
 end
end

if Match then
return false
else
return true
end

end

RegisterPed = function(Ped)
table.insert(F_Peds,Ped)
end


CheckPeds = function()
for i = 1,table.getn(F_Peds) do
 if not PedIsValid(F_Peds) or PedIsDead(F_Peds) then
  table.remove(F_Peds,i)
 end
end
end

CyclePeds = function()
for i = 1,table.getn(F_Peds) do
  FactionAndNameBased(F_Peds)
end
end

FactionAndNameBased = function(FI_Ped)
local FI_Ped_F = PedGetFaction(FI_Ped)
local FI_Ped_N = PedGetName(FI_Ped)
local RDNM_1 = math.random(1100)
local RDNM_2 = math.random(1100)
local RDNM_3 = math.random(1100)
local RDNM_4 = math.random(1100)
local RDNM_5 = math.random(1200)
local RDNM_6 = math.random(1200)
local RDNM_7 = math.random(1300)
local RDNM_8 = math.random(1300)
local RDNM_9 = math.random(1400)
local RDNM_10 = math.random(1400)



if PedIsValid(FI_Ped) and PedGetHealth(FI_Ped) > 1 then
if PedIsInCombat(FI_Ped) then
if PedGetGrappleTargetPed(FI_Ped) < 0 then


-----------------
--Name based-----
-----------------

elseif RDNM_1 == RDNM_2 and FI_Ped_N == "N_Peanut" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/G_Johnny/Offense/Special/SpecialActions/Grapples/Dash", "Act/Anim/G_Johnny.act")

elseif RDNM_3 == RDNM_4 and FI_Ped_N == "N_Peanut" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Medium/Strikes/HeavyAttacks/JackieKick", "Act/Anim/Nemesis.act")


elseif RDNM_5 == RDNM_6 and FI_Ped_N == "N_Peanut" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut", "Act/Anim/Nemesis.act")


elseif RDNM_1 == RDNM_2 and FI_Ped_N == "N_Ricky" then
PedSetActionNode(FI_Ped, "/Global/G_Johnny/Offense/Special/SpecialActions/Grapples/Dash", "Act/Anim/G_Johnny.act")


elseif RDNM_3 == RDNM_4 and FI_Ped_N == "N_Ricky" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 2 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Medium/Strikes/HeavyAttacks/JackieKick", "Act/Anim/Nemesis.act")


elseif RDNM_5 == RDNM_6 and FI_Ped_N == "N_Ricky" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut", "Act/Anim/Nemesis.act")


elseif RDNM_1 == RDNM_2 and FI_Ped_N == "N_Gary" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Short/Strikes/HeavyAttacks/HeavyPunch1", "Act/Anim/Nemesis.act")


elseif RDNM_3 == RDNM_4 and FI_Ped_N == "N_Gary" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 2 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Medium/Strikes/HeavyAttacks/JackieKick", "Act/Anim/Nemesis.act")


elseif RDNM_5 == RDNM_6 and FI_Ped_N == "N_Gary" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/BOSS_Darby/Offense/Short/Grapples/HeavyAttacks/Catch_Throw", "Act/Anim/BOSS_Darby.act")


elseif RDNM_7 == RDNM_8 and FI_Ped_N == "N_Gary" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut", "Act/Anim/Nemesis.act")


elseif RDNM_9 == RDNM_10 and FI_Ped_N == "N_Gary" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Russell_102/Offense/Short/Medium/RisingAttacks", "Act/Anim/Russell_102.act")


elseif RDNM_1 == RDNM_2 and FI_Ped_N == "N_Russell" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Russell_102/Offense/Short/Medium/RisingAttacks", "Act/Anim/Russell_102.act")


elseif RDNM_3 == RDNM_4 and FI_Ped_N == "N_Russell" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/BOSS_Russell/Offense/Special/Invincible/HeadButt/HeadButt_AnticStart/", "Act/Anim/BOSS_Russell.act")


elseif RDNM_5 == RDNM_6 and FI_Ped_N == "N_Russell" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/BOSS_Russell/Offense/Medium/Strikes/Unblockable/DoubleAxeHandle", "Act/Anim/BOSS_Russell.act")


elseif RDNM_7 == RDNM_8 and FI_Ped_N == "N_Russell" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut", "Act/Anim/Nemesis.act")


elseif RDNM_1 == RDNM_2 and FI_Ped_N == "N_Troy" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Russell_102/Offense/Short/Medium/RisingAttacks", "Act/Anim/Russell_102.act")


elseif RDNM_3 == RDNM_4 and FI_Ped_N == "N_Troy" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/BOSS_Russell/Offense/Medium/Strikes/Unblockable/DoubleAxeHandle", "Act/Anim/BOSS_Russell.act")



-----------------
--Faction based--
-----------------



elseif RDNM_1 == RDNM_2 and FI_Ped_F == 2 then
PedSetActionNode(FI_Ped, "/Global/J_Damon/Offense/SpecialStart/StartRun", "Act/Anim/J_Damon.act")


elseif RDNM_1 == RDNM_2 and FI_Ped_F == 5 and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/BOSS_Darby/Offense/Short/Grapples/HeavyAttacks/Catch_Throw", "Act/Anim/BOSS_Darby.act")


elseif RDNM_3 == RDNM_4 and FI_Ped_F == 5 and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut/Knee", "Act/Anim/Nemesis.act")


elseif RDNM_1 == RDNM_2 and FI_Ped_F == 3 and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut", "Act/Anim/Nemesis.act")


elseif RDNM_3 == RDNM_4 and FI_Ped_F == 3 and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 2 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Medium/Strikes/HeavyAttacks/JackieKick", "Act/Anim/Nemesis.act")


elseif RDNM_5 == RDNM_6 and FI_Ped_F == 3 and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Short/Strikes/HeavyAttacks/HeavyPunch1", "Act/Anim/Nemesis.act")


elseif RDNM_1 == RDNM_2 and FI_Ped_F == 1 and PedGetWeapon(FI_Ped) == 305 then
PedSetActionNode(FI_Ped, "/Global/N_Earnest/Offense/FireSpudGun", "Act/Anim/N_Earnest.act")


elseif RDNM_3 == RDNM_4 and FI_Ped_F == 1 and PedGetWeapon(FI_Ped) == 307 then
PedSetActionNode(FI_Ped, "/Global/N_Earnest/Offense/ThrowBombs", "Act/Anim/N_Earnest.act")


elseif RDNM_5 == RDNM_6 and FI_Ped_F == 1 and PedGetWeapon(FI_Ped) == 301 then
PedSetActionNode(FI_Ped, "/Global/N_Earnest/Offense/ThrowBombs", "Act/Anim/N_Earnest.act")


end
end
end

end


main = function()
 
  LoadAnimationGroup("Authority")
  LoadAnimationGroup("Boxing")
  LoadAnimationGroup("Earnest")
  LoadAnimationGroup("B_Striker")
  LoadAnimationGroup("CV_Female")
  LoadAnimationGroup("CV_Male")
  LoadAnimationGroup("DO_Edgar")
  LoadAnimationGroup("DO_Grap")
  LoadAnimationGroup("DO_StrikeCombo")
  LoadAnimationGroup("DO_Striker")
  LoadAnimationGroup("F_Adult")
  LoadAnimationGroup("F_BULLY")
  LoadAnimationGroup("F_Crazy")
  LoadAnimationGroup("F_Douts")
  LoadAnimationGroup("F_Girls")
  LoadAnimationGroup("F_Greas")
  LoadAnimationGroup("F_Jocks")
  LoadAnimationGroup("F_Nerds")
  LoadAnimationGroup("F_OldPeds")
  LoadAnimationGroup("F_Pref")
  LoadAnimationGroup("F_Preps")
  LoadAnimationGroup("G_Grappler")
  LoadAnimationGroup("G_Johnny")
  LoadAnimationGroup("G_Striker")
  LoadAnimationGroup("J_Damon")
  LoadAnimationGroup("J_Grappler")
  LoadAnimationGroup("J_Melee")
  LoadAnimationGroup("J_Ranged")
  LoadAnimationGroup("J_Striker")
  LoadAnimationGroup("Nemesis")
  LoadAnimationGroup("N_Ranged")
  LoadAnimationGroup("N_Striker")
  LoadAnimationGroup("N_Striker_A")
  LoadAnimationGroup("N_Striker_B")
  LoadAnimationGroup("P_Grappler")
  LoadAnimationGroup("P_Striker")
  LoadAnimationGroup("Russell")
  LoadAnimationGroup("Russell_Pbomb")
  LoadAnimationGroup("Straf_Dout")
  LoadAnimationGroup("Straf_Fat")
  LoadAnimationGroup("Straf_Female")
  LoadAnimationGroup("Straf_Male")
  LoadAnimationGroup("Straf_Nerd")
  LoadAnimationGroup("Straf_Prep")
  LoadAnimationGroup("Straf_Savage")
  LoadAnimationGroup("Straf_Wrest")
  LoadAnimationGroup("TE_Female")
 
  CreateThread("LoopFunctions")
  --DisablePunishmentSystem(true)
  repeat
  CheckPeds()
  CyclePeds()
    Wait(10)
  until not Alive
end
 
F_AttendedClass = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  SetSkippedClass(false)
  PlayerSetPunishmentPoints(0)
end
 
F_MissedClass = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  SetSkippedClass(true)
  StatAddToInt(166)
end
 
F_AttendedCurfew = function()
  if not PedInConversation(gPlayer) and not MissionActive() then
    TextPrintString("You got home in time for curfew", 4)
  end
end
 
F_MissedCurfew = function()
  if not PedInConversation(gPlayer) and not MissionActive() then
    TextPrint("TM_TIRED5", 4, 2)
  end
end
 
F_StartClass = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  F_RingSchoolBell()
  local l_6_0 = PlayerGetPunishmentPoints() + GetSkippingPunishment()
end
 
F_EndClass = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  F_RingSchoolBell()
end
 
F_StartMorning = function()
  F_UpdateTimeCycle()
end
 
F_EndMorning = function()
  F_UpdateTimeCycle()
end
 
F_StartLunch = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    F_UpdateTimeCycle()
    return
  end
  F_UpdateTimeCycle()
end
 
F_EndLunch = function()
  F_UpdateTimeCycle()
end
 
F_StartAfternoon = function()
  F_UpdateTimeCycle()
end
 
F_EndAfternoon = function()
  F_UpdateTimeCycle()
end
 
F_StartEvening = function()
  F_UpdateTimeCycle()
end
 
F_EndEvening = function()
  F_UpdateTimeCycle()
end
 
F_StartCurfew_SlightlyTired = function()
  F_UpdateTimeCycle()
end
 
F_StartCurfew_Tired = function()
  F_UpdateTimeCycle()
end
 
F_StartCurfew_MoreTired = function()
  F_UpdateTimeCycle()
end
 
F_StartCurfew_TooTired = function()
  F_UpdateTimeCycle()
end
 
F_EndCurfew_TooTired = function()
  F_UpdateTimeCycle()
end
 
F_EndTired = function()
  F_UpdateTimeCycle()
end
 
F_Nothing = function()
end
 
F_ClassWarning = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  local l_23_0 = math.random(1, 2)
end
 
F_UpdateTimeCycle = function()
  if not IsMissionCompleated("1_B") then
    local l_24_0 = GetCurrentDay(false)
    if l_24_0 < 0 or l_24_0 > 2 then
      SetCurrentDay(0)
    end
  end
  F_UpdateCurfew()
end
 
F_UpdateCurfew = function()
  local l_25_0 = shared.gCurfewRules
  if not l_25_0 then
    l_25_0 = F_CurfewDefaultRules
  end
  l_25_0()
end
 
F_CurfewDefaultRules = function()
  local l_26_0 = ClockGet()
  if l_26_0 >= 23 or l_26_0 < 7 then
    shared.gCurfew = true
  else
    shared.gCurfew = false
  end
end

that's all i have made but it doesn't work.
Can you see where it went wrong?

4
Modding Questions/Help / Re: Question / how to add npc fighting style
« on: October 13, 2022, 12:15:57 AM »
Thank you for all your explanations, I will try what you convey.

Can you explain to me about this :

https://bully-board.com/index.php?topic=22279.msg380365#msg380365

This mod I've been looking for for a long time, I've tried to make it but the mod doesn't work, I've copied everything he wrote but it still doesn't work.

 

5
Mod Releases / Re: Freeroam mixed fighting
« on: October 12, 2022, 08:31:42 AM »
Making peds in freeroam use different moves.

Make sure to backup your script files.
Download

http://www.youtube.com/watch?v=hpCU4CClEts

Edit: Updated the script


Code: [Select]
local F_Peds = {}


LoopFunctions = function()
repeat
CheckForPeds()
Wait(80)
until not Alive
end


CheckForPeds = function()
local P_H_P_L = PedGetWhoHitMeLast(gPlayer)
local P_T_P = PedGetTargetPed(gPlayer)
if PedIsValid(P_T_P) and PedGetHealth(P_T_P) > 1 then
if OnlyOnePedInstance(P_T_P) then
RegisterPed(P_T_P)
end
elseif PedIsValid(P_H_P_L) and PedGetHealth(P_H_P_L) > 1 then
if OnlyOnePedInstance(P_H_P_L) then
RegisterPed(P_H_P_L)
end
end

for i = 1,table.getn(F_Peds) do
if PedIsValid(F_Peds[i]) then
local F_H_P_L = PedGetWhoHitMeLast(F_Peds[i])
local F_T_P = PedGetTargetPed(F_Peds[i])

if PedIsValid(F_T_P) and PedGetHealth(F_T_P) > 1 then
if OnlyOnePedInstance(F_T_P) and F_T_P ~= gPlayer then
RegisterPed(F_T_P)
end
end

if PedIsValid(F_H_P_L) and PedGetHealth(F_H_P_L) > 1 then
if OnlyOnePedInstance(F_H_P_L) and F_H_P_L ~= gPlayer then
RegisterPed(F_H_P_L)
end
end

end
end

end


OnlyOnePedInstance = function(PedToCheck)
local Match = false

for i = 1,table.getn(F_Peds) do
 if PedToCheck == F_Peds[i] then
  Match = true
 end
end

if Match then
return false
else
return true
end

end

RegisterPed = function(Ped)
table.insert(F_Peds,Ped)
end


CheckPeds = function()
for i = 1,table.getn(F_Peds) do
 if not PedIsValid(F_Peds[i]) or PedIsDead(F_Peds[i]) then
  table.remove(F_Peds,i)
 end
end
end

CyclePeds = function()
for i = 1,table.getn(F_Peds) do
  FactionAndNameBased(F_Peds[i])
end
end

FactionAndNameBased = function(FI_Ped)
local FI_Ped_F = PedGetFaction(FI_Ped)
local FI_Ped_N = PedGetName(FI_Ped)
local RDNM_1 = math.random(1100)
local RDNM_2 = math.random(1100)
local RDNM_3 = math.random(1100)
local RDNM_4 = math.random(1100)
local RDNM_5 = math.random(1200)
local RDNM_6 = math.random(1200)
local RDNM_7 = math.random(1300)
local RDNM_8 = math.random(1300)
local RDNM_9 = math.random(1400)
local RDNM_10 = math.random(1400)



if PedIsValid(FI_Ped) and PedGetHealth(FI_Ped) > 1 then
if PedIsInCombat(FI_Ped) then
if PedGetGrappleTargetPed(FI_Ped) < 0 then


-----------------
--Name based-----
-----------------

elseif RDNM_1 == RDNM_2 and FI_Ped_N == "N_Peanut" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/G_Johnny/Offense/Special/SpecialActions/Grapples/Dash", "Act/Anim/G_Johnny.act")

elseif RDNM_3 == RDNM_4 and FI_Ped_N == "N_Peanut" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Medium/Strikes/HeavyAttacks/JackieKick", "Act/Anim/Nemesis.act")


elseif RDNM_5 == RDNM_6 and FI_Ped_N == "N_Peanut" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut", "Act/Anim/Nemesis.act")


elseif RDNM_1 == RDNM_2 and FI_Ped_N == "N_Ricky" then
PedSetActionNode(FI_Ped, "/Global/G_Johnny/Offense/Special/SpecialActions/Grapples/Dash", "Act/Anim/G_Johnny.act")


elseif RDNM_3 == RDNM_4 and FI_Ped_N == "N_Ricky" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 2 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Medium/Strikes/HeavyAttacks/JackieKick", "Act/Anim/Nemesis.act")


elseif RDNM_5 == RDNM_6 and FI_Ped_N == "N_Ricky" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut", "Act/Anim/Nemesis.act")


elseif RDNM_1 == RDNM_2 and FI_Ped_N == "N_Gary" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Short/Strikes/HeavyAttacks/HeavyPunch1", "Act/Anim/Nemesis.act")


elseif RDNM_3 == RDNM_4 and FI_Ped_N == "N_Gary" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 2 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Medium/Strikes/HeavyAttacks/JackieKick", "Act/Anim/Nemesis.act")


elseif RDNM_5 == RDNM_6 and FI_Ped_N == "N_Gary" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/BOSS_Darby/Offense/Short/Grapples/HeavyAttacks/Catch_Throw", "Act/Anim/BOSS_Darby.act")


elseif RDNM_7 == RDNM_8 and FI_Ped_N == "N_Gary" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut", "Act/Anim/Nemesis.act")


elseif RDNM_9 == RDNM_10 and FI_Ped_N == "N_Gary" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Russell_102/Offense/Short/Medium/RisingAttacks", "Act/Anim/Russell_102.act")


elseif RDNM_1 == RDNM_2 and FI_Ped_N == "N_Russell" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Russell_102/Offense/Short/Medium/RisingAttacks", "Act/Anim/Russell_102.act")


elseif RDNM_3 == RDNM_4 and FI_Ped_N == "N_Russell" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/BOSS_Russell/Offense/Special/Invincible/HeadButt/HeadButt_AnticStart/", "Act/Anim/BOSS_Russell.act")


elseif RDNM_5 == RDNM_6 and FI_Ped_N == "N_Russell" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/BOSS_Russell/Offense/Medium/Strikes/Unblockable/DoubleAxeHandle", "Act/Anim/BOSS_Russell.act")


elseif RDNM_7 == RDNM_8 and FI_Ped_N == "N_Russell" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut", "Act/Anim/Nemesis.act")


elseif RDNM_1 == RDNM_2 and FI_Ped_N == "N_Troy" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Russell_102/Offense/Short/Medium/RisingAttacks", "Act/Anim/Russell_102.act")


elseif RDNM_3 == RDNM_4 and FI_Ped_N == "N_Troy" and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/BOSS_Russell/Offense/Medium/Strikes/Unblockable/DoubleAxeHandle", "Act/Anim/BOSS_Russell.act")



-----------------
--Faction based--
-----------------



elseif RDNM_1 == RDNM_2 and FI_Ped_F == 2 then
PedSetActionNode(FI_Ped, "/Global/J_Damon/Offense/SpecialStart/StartRun", "Act/Anim/J_Damon.act")


elseif RDNM_1 == RDNM_2 and FI_Ped_F == 5 and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/BOSS_Darby/Offense/Short/Grapples/HeavyAttacks/Catch_Throw", "Act/Anim/BOSS_Darby.act")


elseif RDNM_3 == RDNM_4 and FI_Ped_F == 5 and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut/Knee", "Act/Anim/Nemesis.act")


elseif RDNM_1 == RDNM_2 and FI_Ped_F == 3 and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut", "Act/Anim/Nemesis.act")


elseif RDNM_3 == RDNM_4 and FI_Ped_F == 3 and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 2 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Medium/Strikes/HeavyAttacks/JackieKick", "Act/Anim/Nemesis.act")


elseif RDNM_5 == RDNM_6 and FI_Ped_F == 3 and DistanceBetweenPeds2D(PedGetTargetPed(FI_Ped), FI_Ped) <= 1.5 then
PedSetActionNode(FI_Ped, "/Global/Nemesis/Offense/Short/Strikes/HeavyAttacks/HeavyPunch1", "Act/Anim/Nemesis.act")


elseif RDNM_1 == RDNM_2 and FI_Ped_F == 1 and PedGetWeapon(FI_Ped) == 305 then
PedSetActionNode(FI_Ped, "/Global/N_Earnest/Offense/FireSpudGun", "Act/Anim/N_Earnest.act")


elseif RDNM_3 == RDNM_4 and FI_Ped_F == 1 and PedGetWeapon(FI_Ped) == 307 then
PedSetActionNode(FI_Ped, "/Global/N_Earnest/Offense/ThrowBombs", "Act/Anim/N_Earnest.act")


elseif RDNM_5 == RDNM_6 and FI_Ped_F == 1 and PedGetWeapon(FI_Ped) == 301 then
PedSetActionNode(FI_Ped, "/Global/N_Earnest/Offense/ThrowBombs", "Act/Anim/N_Earnest.act")


end
end
end

end


main = function()
 
  LoadAnimationGroup("Authority")
  LoadAnimationGroup("Boxing")
  LoadAnimationGroup("Earnest")
  LoadAnimationGroup("B_Striker")
  LoadAnimationGroup("CV_Female")
  LoadAnimationGroup("CV_Male")
  LoadAnimationGroup("DO_Edgar")
  LoadAnimationGroup("DO_Grap")
  LoadAnimationGroup("DO_StrikeCombo")
  LoadAnimationGroup("DO_Striker")
  LoadAnimationGroup("F_Adult")
  LoadAnimationGroup("F_BULLY")
  LoadAnimationGroup("F_Crazy")
  LoadAnimationGroup("F_Douts")
  LoadAnimationGroup("F_Girls")
  LoadAnimationGroup("F_Greas")
  LoadAnimationGroup("F_Jocks")
  LoadAnimationGroup("F_Nerds")
  LoadAnimationGroup("F_OldPeds")
  LoadAnimationGroup("F_Pref")
  LoadAnimationGroup("F_Preps")
  LoadAnimationGroup("G_Grappler")
  LoadAnimationGroup("G_Johnny")
  LoadAnimationGroup("G_Striker")
  LoadAnimationGroup("J_Damon")
  LoadAnimationGroup("J_Grappler")
  LoadAnimationGroup("J_Melee")
  LoadAnimationGroup("J_Ranged")
  LoadAnimationGroup("J_Striker")
  LoadAnimationGroup("Nemesis")
  LoadAnimationGroup("N_Ranged")
  LoadAnimationGroup("N_Striker")
  LoadAnimationGroup("N_Striker_A")
  LoadAnimationGroup("N_Striker_B")
  LoadAnimationGroup("P_Grappler")
  LoadAnimationGroup("P_Striker")
  LoadAnimationGroup("Russell")
  LoadAnimationGroup("Russell_Pbomb")
  LoadAnimationGroup("Straf_Dout")
  LoadAnimationGroup("Straf_Fat")
  LoadAnimationGroup("Straf_Female")
  LoadAnimationGroup("Straf_Male")
  LoadAnimationGroup("Straf_Nerd")
  LoadAnimationGroup("Straf_Prep")
  LoadAnimationGroup("Straf_Savage")
  LoadAnimationGroup("Straf_Wrest")
  LoadAnimationGroup("TE_Female")
 
  CreateThread("LoopFunctions")
  --DisablePunishmentSystem(true)
  repeat
  CheckPeds()
  CyclePeds()
    Wait(10)
  until not Alive
end
 
F_AttendedClass = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  SetSkippedClass(false)
  PlayerSetPunishmentPoints(0)
end
 
F_MissedClass = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  SetSkippedClass(true)
  StatAddToInt(166)
end
 
F_AttendedCurfew = function()
  if not PedInConversation(gPlayer) and not MissionActive() then
    TextPrintString("You got home in time for curfew", 4)
  end
end
 
F_MissedCurfew = function()
  if not PedInConversation(gPlayer) and not MissionActive() then
    TextPrint("TM_TIRED5", 4, 2)
  end
end
 
F_StartClass = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  F_RingSchoolBell()
  local l_6_0 = PlayerGetPunishmentPoints() + GetSkippingPunishment()
end
 
F_EndClass = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  F_RingSchoolBell()
end
 
F_StartMorning = function()
  F_UpdateTimeCycle()
end
 
F_EndMorning = function()
  F_UpdateTimeCycle()
end
 
F_StartLunch = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    F_UpdateTimeCycle()
    return
  end
  F_UpdateTimeCycle()
end
 
F_EndLunch = function()
  F_UpdateTimeCycle()
end
 
F_StartAfternoon = function()
  F_UpdateTimeCycle()
end
 
F_EndAfternoon = function()
  F_UpdateTimeCycle()
end
 
F_StartEvening = function()
  F_UpdateTimeCycle()
end
 
F_EndEvening = function()
  F_UpdateTimeCycle()
end
 
F_StartCurfew_SlightlyTired = function()
  F_UpdateTimeCycle()
end
 
F_StartCurfew_Tired = function()
  F_UpdateTimeCycle()
end
 
F_StartCurfew_MoreTired = function()
  F_UpdateTimeCycle()
end
 
F_StartCurfew_TooTired = function()
  F_UpdateTimeCycle()
end
 
F_EndCurfew_TooTired = function()
  F_UpdateTimeCycle()
end
 
F_EndTired = function()
  F_UpdateTimeCycle()
end
 
F_Nothing = function()
end
 
F_ClassWarning = function()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  local l_23_0 = math.random(1, 2)
end
 
F_UpdateTimeCycle = function()
  if not IsMissionCompleated("1_B") then
    local l_24_0 = GetCurrentDay(false)
    if l_24_0 < 0 or l_24_0 > 2 then
      SetCurrentDay(0)
    end
  end
  F_UpdateCurfew()
end
 
F_UpdateCurfew = function()
  local l_25_0 = shared.gCurfewRules
  if not l_25_0 then
    l_25_0 = F_CurfewDefaultRules
  end
  l_25_0()
end
 
F_CurfewDefaultRules = function()
  local l_26_0 = ClockGet()
  if l_26_0 >= 23 or l_26_0 < 7 then
    shared.gCurfew = true
  else
    shared.gCurfew = false
  end
end


Can you give me the StimeCycle.lua?
Because I've copied everything above, but it doesn't work for me, or the arrangement is wrong

6
Modding Questions/Help / Question / how to add npc fighting style
« on: October 11, 2022, 09:30:29 AM »
Can you help me?, I just started modding 

Pages: [1]