Altamurenza

Bully SE: Random Styles

Jan 26th, 2018
1,462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 26.61 KB | None | 0 0
  1. -- Random Styles V1.0
  2. -- By: Altamurenza
  3.  
  4.  
  5. -- Enable settings in game:
  6. local allow_settings = true
  7. -- Settings:
  8. local attack_freq = 120 -- Max: 1000
  9. local evade_freq = 650 -- Max: 1000
  10. local dist = 3 -- Max: 25 meters
  11. -- Stop any moves:
  12. local stop_moves = false
  13.  
  14. function main()
  15.     while not SystemIsReady() or AreaIsLoading() do
  16.         Wait(0)
  17.     end
  18.     -- Load Animations Group:
  19.     load_all_anim()
  20.     -- Create Thread:
  21.     Create_Thread()
  22.    
  23.     -- Main:
  24.     while true do
  25.         -- If you want to add some code right here !!
  26.         Wait(0)
  27.     end
  28. end
  29.  
  30. function FIGHTING_SYSTEM()
  31.     -- Fighting Script:
  32.     while true do
  33.         for num,ped in {PedFindInAreaXYZ(0,0,0,9999999)} do
  34.             if PedIsValid(ped) and ped ~= gPlayer then
  35.                 -- Targeted by peds:
  36.                 local target = PedGetTargetPed(ped)
  37.                 -- Position:
  38.                 local px,py,pz = PedGetPosXYZ(ped)
  39.                 local tx,ty,tz = PedGetPosXYZ(target)
  40.                 -- Process:
  41.                 if PedMePlaying(ped,"DEFAULT_KEY") and PedIsInCombat(ped) and PedIsValid(PedGetTargetPed(ped)) then
  42.                     if ped_is_attack(target) and PedGetTargetPed(target) == ped and PedGetTargetPed(ped) == target then
  43.                         if math.abs(px - tx) + math.abs(py - ty) + math.abs(pz - tz) <= dist and math.random(1,1000) < evade_freq then
  44.                             local evading_anims = {
  45.                                 {"/Global/BOSS_Darby/Offense/NonCombatActions/Hopback","Act/Anim/BOSS_Darby.act"},
  46.                                 {"/Global/BoxingPlayer/EvadeBank/Evades/Duck","act/anim/BoxingPlayer.act"},
  47.                                 {"/Global/P_Striker_B/Defense/Evade/EvadeBack/EvadeBack","Act/Anim/P_Striker_B.act"},
  48.                                 {"/Global/P_Bif/Defense/Evade/EvadeDuck","Act/Anim/P_Bif.act"},
  49.                                 {"/Global/P_Grappler_A/Defense/Evade/EvadeBack/Evade","act/anim/P_Grappler_A.act"},
  50.                                 {"/Global/P_Grappler_A/Offense/NonCombatActions/Hopback","Act/Anim/P_Grappler_A.act"},
  51.                             }
  52.                             local random_evade = math.random(1,6)
  53.                             PedSetActionNode(ped,evading_anims[random_evade][1],evading_anims[random_evade][2])
  54.                         end
  55.                     elseif PedMePlaying(target,"DEFAULT_KEY") and PedGetTargetPed(target) == ped and PedGetTargetPed(ped) == target then
  56.                         if math.abs(px - tx) + math.abs(py - ty) + math.abs(pz - tz) <= dist and math.random(1,1000) < attack_freq then
  57.                             local random_attack = math.random(1,table.getn(all_attacks))
  58.                             PedSetActionNode(ped,all_attacks[random_attack][1],all_attacks[random_attack][2])
  59.                         end
  60.                     end
  61.                 else
  62.                     -- Empty
  63.                     F_Nothing()
  64.                 end
  65.             else
  66.                 -- Empty
  67.                 F_Nothing()
  68.             end
  69.         end
  70.         Wait(0)
  71.     end
  72. end
  73. function SPEED_SETTINGS()
  74.     -- Default settings:
  75.     local speed_settings = {
  76.         default = 110,
  77.         ped_restore = {},
  78.         freeze = 0,
  79.     }
  80.     -- Process:
  81.     while true do
  82.         for i,ped in {PedFindInAreaXYZ(0,0,0,99999)} do
  83.             if PedIsValid(ped) then
  84.                 if not stop_moves then
  85.                     if PedIsValid(PedGetGrappleTargetPed(ped)) then
  86.                         local grab = PedGetGrappleTargetPed(ped)
  87.                         table.insert(speed_settings.ped_restore,{ped,GameGetPedStat(ped,20)})
  88.                         table.insert(speed_settings.ped_restore,{grab,GameGetPedStat(ped,20)})
  89.                         if not GameGetPedStat(ped,20) == speed_settings.default then
  90.                             GameSetPedStat(ped,20,speed_settings.default)
  91.                         end
  92.                         if not GameGetPedStat(grab,20) == speed_settings.default then
  93.                             GameSetPedStat(grab,20,speed_settings.default)
  94.                         end
  95.                     else
  96.                         for i,v in ipairs(speed_settings.ped_restore) do
  97.                             if PedIsValid(v[1]) then
  98.                                 GameSetPedStat(v[1],20,v[2])
  99.                                 table.remove(speed_settings.ped_restore,i)
  100.                                 i = i - 1
  101.                             end
  102.                         end
  103.                         if ped ~= gPlayer then
  104.                             GameSetPedStat(ped,20,105)
  105.                         else
  106.                             GameSetPedStat(ped,20,100)
  107.                         end
  108.                     end
  109.                 elseif stop_moves then
  110.                     -- Freeze
  111.                     GameSetPedStat(ped,20,0)
  112.                 end
  113.             else
  114.                 -- Empty
  115.                 F_Nothing()
  116.             end
  117.         end
  118.         Wait(0)
  119.     end
  120. end
  121. function COUNTER_MOVES()
  122.     local all_timer = {
  123.         bif_duck = {},
  124.         box_duck = {},
  125.         -- add more evade counter
  126.     }
  127.     while true do
  128.         for i,ped in {PedFindInAreaXYZ(0,0,0,99999)} do
  129.             if PedIsValid(ped) and ped ~= gPlayer then
  130.                 if PedIsPlaying(ped,"/Global/P_Bif/Defense/Evade/EvadeDuck",true) and get_chance(50) then
  131.                     table.insert(all_timer.bif_duck,{ped,GetTimer})
  132.                 elseif PedIsPlaying(ped,"/Global/BoxingPlayer/EvadeBank/Evades/Duck",true) and get_chance(50) then
  133.                     table.insert(all_timer.box_duck,{ped,GetTimer})
  134.                 end
  135.                 for num,tab in ipairs(all_timer.bif_duck) do
  136.                     if PedIsValid(tab[1]) then
  137.                         if tab[2]() + math.random(500,600) <= GetTimer() then
  138.                             PedSetActionNode(tab[1],"/Global/BOSS_Darby/Defense/Evade/EvadeRight/HeavyAttacks/EvadeLeftPunch","act/anim/BOSS_Darby.act")
  139.                             table.remove(all_timer.bif_duck,num)
  140.                             num = num - 1
  141.                         end
  142.                     end
  143.                 end
  144.                 for i,table in ipairs(all_timer.box_duck) do
  145.                     if PedIsValid(table[1]) then
  146.                         if table[2]() + math.random(500,600) <= GetTimer() then
  147.                             PedSetActionNode(table[1],"/Global/BoxingPlayer/EvadeBank/Evades/EvadeAttacks/BackCharge","act/anim/BoxingPlayer.act")
  148.                             table.remove(all_timer.box_duck,i)
  149.                             i = i - 1
  150.                         end
  151.                     end
  152.                 end
  153.             else
  154.                 F_Nothing()
  155.             end
  156.         end
  157.         Wait(0)
  158.     end
  159. end
  160. function SETTINGS_MENU()
  161.     -- Menu (Text and Select):
  162.     local menu = {
  163.         s = 1,
  164.         t = GetTimer(),
  165.         print_out = {"Attack Freq","Evades Freq","Distance"},
  166.     }
  167.     -- Button detection with sounds:
  168.     single_button = function(b)
  169.         if b == 14 then
  170.             if IsButtonBeingPressed(b,0) then
  171.                 SoundPlay2D("WrongBtn")
  172.                 return true
  173.             end
  174.         elseif b == 3 or b == 2 then
  175.             if IsButtonBeingPressed(b,0) then
  176.                 SoundPlay2D("NavUp")
  177.                 return true
  178.             end
  179.         elseif b == 0 or b == 1 then
  180.             if IsButtonPressed(b,0) then
  181.                 SoundPlay2D("ButtonUp")
  182.                 return true
  183.             end
  184.         end
  185.         return false
  186.     end
  187.     -- Main:
  188.     while true do
  189.         -- Double Tap to activate:
  190.         if IsButtonBeingReleased(14,0) then
  191.             if GetTimer() < menu.t + 500 then
  192.                 SoundPlay2D("Erand")
  193.                 PlayerSetControl(0)
  194.                 PauseGameClock()
  195.                 stop_moves = true
  196.                 Wait(200)
  197.                 -- Pause every sounds in-game:
  198.                 SoundPause()
  199.                 menu.t = GetTimer()
  200.                 repeat
  201.                     -- Unused function:
  202.                     EffectBlindedbyMud()
  203.                     -- Process:
  204.                     if single_button(3) then
  205.                         menu.s = menu.s + 1
  206.                         if menu.s > 3 then menu.s = 1 end
  207.                     elseif single_button(2) then
  208.                         menu.s = menu.s - 1
  209.                         if menu.s < 1 then menu.s = 3 end
  210.                     end
  211.                     if single_button(1) then
  212.                         if menu.s == 1 then
  213.                             attack_freq = attack_freq + 1
  214.                             if attack_freq > 1000 then attack_freq = 1 end
  215.                         elseif menu.s == 2 then
  216.                             evade_freq = evade_freq + 1
  217.                             if evade_freq > 1000 then evade_freq = 1 end
  218.                         elseif menu.s == 3 then
  219.                             dist = dist + 0.1
  220.                             if dist > 25 then dist = 1 end
  221.                         end
  222.                     elseif single_button(0) then
  223.                         if menu.s == 1 then
  224.                             attack_freq = attack_freq - 1
  225.                             if attack_freq < 1 then attack_freq = 1000 end
  226.                         elseif menu.s == 2 then
  227.                             attack_freq = attack_freq - 1
  228.                             if attack_freq < 1 then attack_freq = 1000 end
  229.                         elseif menu.s == 3 then
  230.                             dist = dist - 0.1
  231.                             if dist < 1 then dist = 25 end
  232.                         end
  233.                     end
  234.                     -- Text:
  235.                     if menu.s == 1 then
  236.                         TextPrintString("SETTINGS\n\n-> "..menu.print_out[menu.s].." = "..string.format("%.0f",attack_freq/10).."%\n"..menu.print_out[menu.s + 1].." = "..string.format("%.0f",evade_freq/10).."%\n"..menu.print_out[menu.s + 2].." = "..string.format("%.0f",dist*4).."%",0,1)
  237.                     elseif menu.s == 2 then
  238.                         TextPrintString("SETTINGS\n\n"..menu.print_out[menu.s - 1].." = "..string.format("%.0f",attack_freq/10).."%\n-> "..menu.print_out[menu.s].." = "..string.format("%.0f",evade_freq/10).."%\n"..menu.print_out[menu.s + 1].." = "..string.format("%.0f",dist*4).."%",0,1)
  239.                     elseif menu.s == 3 then
  240.                         TextPrintString("SETTINGS\n\n"..menu.print_out[menu.s - 2].." = "..string.format("%.0f",attack_freq/10).."%\n"..menu.print_out[menu.s - 1].." = "..string.format("%.0f",evade_freq/10).."%\n-> "..menu.print_out[menu.s].." = "..string.format("%.0f",dist*4).."%",0,1)
  241.                     end
  242.                     Wait(0)
  243.                 until single_button(14)
  244.                 Wait(200)
  245.                 -- Continue sounds:
  246.                 SoundContinue()
  247.                 UnpauseGameClock()
  248.                 PlayerSetControl(1)
  249.                 stop_moves = false
  250.             else
  251.                 menu.t = GetTimer()
  252.             end
  253.         end
  254.         Wait(0)
  255.     end
  256. end
  257.  
  258. -- Create all threads:
  259. function Create_Thread()
  260.     local thread_name = {}
  261.     -- Thread name:
  262.     table.insert(thread_name,"FIGHTING_SYSTEM")
  263.     table.insert(thread_name,"SPEED_SETTINGS")
  264.     table.insert(thread_name,"COUNTER_MOVES")
  265.     -- Settings Thread:
  266.     if allow_settings then
  267.         table.insert(thread_name,"SETTINGS_MENU")
  268.     end
  269.     -- Create:
  270.     for get_all_num = 1,table.getn(thread_name) do
  271.         CreateThread(thread_name[get_all_num])
  272.     end
  273. end
  274. -- Attack animations detector:
  275. function ped_is_attack(ped)
  276.     for i = 1,table.getn(all_attacks) do
  277.         -- Check:
  278.         if PedIsPlaying(ped,all_attacks[i][1],true) then
  279.             return true
  280.         end
  281.     end
  282.     return false
  283. end
  284. -- Get index of peds:
  285. function ped_get_index(ped)
  286.     for i = 0,258 do
  287.         if PedIsValid(ped) and PedIsModel(ped,i) then
  288.             return i
  289.         end
  290.     end
  291. end
  292. -- Dogs or Player models:
  293. function ped_is_not_human(ped)
  294.     -- Models: Dog, dog, dog, mascot, and player wrestling outfit.
  295.     local models = {141,219,220,88,98}
  296.     for number = 1,table.getn(models) do
  297.         if PedIsValid(ped) and PedIsModel(ped,models[number]) then return true end
  298.     end
  299.     return false
  300. end
  301. -- Chance:
  302. function get_chance(p)
  303.     return math.random(1,100) <= p
  304. end
  305. -- Instant KO:
  306. function force_ko()
  307.     PlayerKilled()
  308. end
  309. -- Instant Kill:
  310. function kill_now(ped)
  311.     PedSetHealth(ped,0)
  312.     PedPlayHitReaction(ped)
  313. end
  314. -- Load Animations:
  315. function load_all_anim()
  316.     --[[
  317.         IMPORTANT!
  318.        
  319.         Do not add too much, that will cause of crashes in Anniversary Edition after 5 seconds
  320.     ]]
  321.     local anim_group = {
  322.         "Authority",
  323.         "Boxing",
  324.         "B_Striker",
  325.         "CV_Female",
  326.         "CV_Male",
  327.         "DO_Edgar",
  328.         "DO_Grap",
  329.         "DO_StrikeCombo",
  330.         "DO_Striker",
  331.         "F_Adult",
  332.         "F_BULLY",
  333.         "F_Douts",
  334.         "F_Girls",
  335.         "F_Greas",
  336.         "F_Jocks",
  337.         "F_Nerds",
  338.         "F_OldPeds",
  339.         "F_Pref",
  340.         "F_Preps",
  341.         "G_Grappler",
  342.         "G_Johnny",
  343.         "G_Striker",
  344.         "Grap",
  345.         "J_Damon",
  346.         "J_Grappler",
  347.         "J_Melee",
  348.         "J_Ranged",
  349.         "J_Striker",
  350.         "LE_Orderly",
  351.         "N_Ranged",
  352.         "N_Striker",
  353.         "N_Striker_A",
  354.         "N_Striker_B",
  355.         "Nemesis",
  356.         "P_Grappler",
  357.         "P_Striker",
  358.         "PunchBag",
  359.         "Qped",
  360.         "Rat_Ped",
  361.         "Russell_Pbomb",
  362.         "Straf_Dout",
  363.         "Straf_Fat",
  364.         "Straf_Female",
  365.         "Straf_Male",
  366.         "Straf_Nerd",
  367.         "Straf_Prep",
  368.         "Straf_Savage",
  369.         "Straf_Wrest",
  370.         "TE_Female",
  371.         "3_05TheTenements",
  372.         "BROCKETL",
  373.         "C_Wrestling",
  374.     }
  375.     for i = 1,table.getn(anim_group) do
  376.         if not HasAnimGroupLoaded(anim_group[i]) then
  377.             LoadAnimationGroup(anim_group[i])
  378.         end
  379.     end
  380. end
  381.  
  382. -- Attack animation:
  383. all_attacks = {
  384.     --[[
  385.         IMPORTANT!
  386.        
  387.         Only used animations in final version of Bully and only for standing
  388.         animation, that would not working for grapple or mount animation !!
  389.     ]]
  390.     {"/Global/Player/Attacks/Strikes/LightAttacks/Left1/Release/JAB","act/anim/Player.act"},
  391.     {"/Global/Player/Attacks/Strikes/LightAttacks/Left1/Right2/Release/Cross","act/anim/Player.act"},
  392.     {"/Global/Player/Attacks/Strikes/LightAttacks/Left1/Right2/Left3/Release/Hook","act/anim/Player.act"},
  393.     {"/Global/Player/Attacks/Strikes/LightAttacks/Left1/Right2/Left3/Right4/Release/GutPunch","act/anim/Player.act"},
  394.     {"/Global/Player/Attacks/Strikes/LightAttacks/Left1/Right2/Left3/Right4/Left5/Release/UpperCut","act/anim/Player.act"},
  395.     {"/Global/Player/Attacks/Strikes/LightAttacks/Left1/Release/HeavyAttacks","act/anim/Player.act"},
  396.     {"/Global/Player/Attacks/Strikes/LightAttacks/Left1/Right2/Release/Unblockable/LegKickReleaseMax","act/anim/Player.act"},
  397.     {"/Global/Player/Attacks/Strikes/LightAttacks/Left1/Right2/Left3/Release/Unblockable/JackieKick","act/anim/Player.act"},
  398.     {"/Global/Player/Attacks/Strikes/LightAttacks/Left1/Right2/Left3/Right4/Release/Unblockable/HighKick","act/anim/Player.act"},
  399.     {"/Global/Player/Attacks/Strikes/RunningAttacks/HeavyAttacks/RunShoulder","act/anim/Player.act"},
  400.     {"/Global/BoxingPlayer/Attacks/BoxingAttacks/LightAttacks/Left1","act/anim/BoxingPlayer.act"},
  401.     {"/Global/BoxingPlayer/Attacks/BoxingAttacks/LightAttacks/Right2","act/anim/BoxingPlayer.act"},
  402.     {"/Global/BoxingPlayer/Attacks/BoxingAttacks/LightAttacks/Left3","act/anim/BoxingPlayer.act"},
  403.     {"/Global/BoxingPlayer/Attacks/BoxingAttacks/LightAttacks/Right4","act/anim/BoxingPlayer.act"},
  404.     {"/Global/BoxingPlayer/Attacks/BoxingAttacks/LightAttacks/Left5","act/anim/BoxingPlayer.act"},
  405.     {"/Global/GS_Male_A/Offense/Short/LightAttacks/SloppyJAB/SloppyCross","act/anim/GS_Male_A.act"},
  406.     {"/Global/GS_Male_A/Offense/Short/LightAttacks/SloppyJAB","act/anim/GS_Male_A.act"},
  407.     {"/Global/GS_Male_A/Offense/Short/HeavyAttacks/Shove2Hand","act/anim/GS_Male_A.act"},
  408.     {"/Global/GS_Female_A/Offense/Short/Strikes/LightAttacks/Slap","act/anim/GS_Female_A.act"},
  409.     {"/Global/GS_Female_A/Offense/Short/Strikes/HeavyAttacks","act/anim/GS_Female_A.act"},
  410.     {"/Global/Nemesis/Offense/Short/Strikes/LightAttacks/LeftHook/RightCross/HeavyAttacks/HeavyPunch2","Act/Anim/Nemesis.act"},
  411.     {"/Global/Nemesis/Offense/Short/Strikes/HeavyAttacks/HeavyPunch1","Act/Anim/Nemesis.act"},
  412.     {"/Global/Nemesis/Offense/Short/Strikes/HeavyAttacks/HeavyPunch2","Act/Anim/Nemesis.act"},
  413.     {"/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut/Knee","Act/Anim/Nemesis.act"},
  414.     {"/Global/Nemesis/Offense/Medium/Strikes/LightAttacks/OverHandR/HeavyAttacks/Knee","Act/Anim/Nemesis.act"},
  415.     {"/Global/Nemesis/Offense/Medium/Strikes/HeavyAttacks/JackieKick","Act/Anim/Nemesis.act"},
  416.     {"/Global/B_Striker_A/Offense/Short/Strikes/LightAttacks/WindMill_R/WindMill_L","act/anim/B_Striker_A.act"},
  417.     {"/Global/B_Striker_A/Offense/Short/Strikes/HeavyAttacks/SwingPunch/SwingPunch_R","act/anim/B_Striker_A.act"},
  418.     {"/Global/B_Striker_A/Offense/Short/Strikes/HeavyAttacks/GutKick/GutKick_R","act/anim/B_Striker_A.act"},
  419.     {"/Global/BOSS_Russell/Offense/Short/Strikes/LightAttacks/OverHand","act/anim/BOSS_Russell.act"},
  420.     {"/Global/BOSS_Russell/Offense/Medium/Strikes/HeavyAttacks","act/anim/BOSS_Russell.act"},
  421.     {"/Global/BOSS_Russell/Offense/Medium/Strikes/Unblockable/DoubleAxeHandle","act/anim/BOSS_Russell.act"},
  422.     {"/Global/BOSS_Russell/Offense/Special/Invincible/HeadButt/HeadButt_AnticStart","act/anim/BOSS_Russell.act"},
  423.     {"/Global/BOSS_Russell/Defense/Evade/EvadeInterrupt/EvadeInterrupt","act/anim/BOSS_Russell.act"},
  424.     {"/Global/BOSS_Russell/Offense/GroundAttack/GroundStomp1","act/anim/BOSS_Russell.act"},
  425.     {"/Global/Russell_102/Offense/Short/Strikes/LightAttacks/WindMill_R/WindMill_L/HeavyAttacks/SwingPunch_R","act/anim/Russell_102.act"},
  426.     {"/Global/Russell_102/Offense/Short/Medium/RisingAttacks","act/anim/Russell_102.act"},
  427.     {"/Global/P_Striker_A/Offense/Short/Strikes/LightAttacks/JAB","act/anim/P_Striker_A.act"},
  428.     {"/Global/P_Striker_A/Offense/Short/Strikes/LightAttacks/JAB/Cross","act/anim/P_Striker_A.act"},
  429.     {"/Global/P_Striker_A/Offense/Short/Strikes/LightAttacks/LeftHook/FinishingCross","act/anim/P_Striker_A.act"},
  430.     {"/Global/P_Striker_A/Offense/Short/Strikes/HeavyAttacks/Uppercut","act/anim/P_Striker_A.act"},
  431.     {"/Global/P_Striker_A/Offense/Medium/HeavyAttacks","act/anim/P_Striker_A.act"},
  432.     {"/Global/P_Striker_A/Defense/Evade/EvadeCounter/LightAttacks/EvadeBackPunch","act/anim/P_Striker_A.act"},
  433.     {"/Global/P_Striker_B/Offense/Short/Strikes/LightAttacks/LeftJab/Hook","act/anim/P_Striker_B.act"},
  434.     {"/Global/P_Striker_B/Offense/Short/Strikes/HeavyAttacks/Hook2","act/anim/P_Striker_B.act"},
  435.     {"/Global/P_Striker_B/Offense/Short/Strikes/Unblockable/HeavyPunchCharge","act/anim/P_Striker_B.act"},
  436.     {"/Global/P_Striker_B/Offense/Short/Grapples/HeavyAttacks/Catch_Throw","act/anim/P_Striker_B.act"},
  437.     {"/Global/P_Grappler_A/Offense/Short/Strikes/LightAttacks/LeftJabHead/LeftJabBody","act/anim/P_Grappler_A.act"},
  438.     {"/Global/P_Grappler_A/Offense/Short/Strikes/HeavyAttacks/RightCross/LeftDown","act/anim/P_Grappler_A.act"},
  439.     {"/Global/P_Grappler_A/Offense/Short/Strikes/Unblockable/HeavyPunchCharge","act/anim/P_Grappler_A.act"},
  440.     {"/Global/P_Grappler_A/Offense/Medium/Strikes/Kick/TauntKick","act/anim/P_Grappler_A.act"},
  441.     {"/Global/P_Bif/Offense/Short/LightAttacks/JAB/Cross","act/anim/P_Bif.act"},
  442.     {"/Global/P_Bif/Offense/Short/HeavyAttacks/LeftHook","act/anim/P_Bif.act"},
  443.     {"/Global/P_Bif/Offense/Short/HeavyAttacks/RightHook","act/anim/P_Bif.act"},
  444.     {"/Global/P_Bif/Offense/Medium/HeavyAttacks/GutPunch","act/anim/P_Bif.act"},
  445.     {"/Global/P_Bif/Offense/Medium/HeavyAttacks/StraightPunch","act/anim/P_Bif.act"},
  446.     {"/Global/P_Bif/Offense/Special/HeavyAttacks","act/anim/P_Bif.act"},
  447.     {"/Global/BOSS_Darby/Offense/Short/Strikes/LightAttacks/LeftJab/Hook","act/anim/BOSS_Darby.act"},
  448.     {"/Global/BOSS_Darby/Offense/Short/Strikes/HeavyAttacks/Hook2","act/anim/BOSS_Darby.act"},
  449.     {"/Global/BOSS_Darby/Offense/Medium/Medium/HeavyAttacks/JAB/Cross","act/anim/BOSS_Darby.act"},
  450.     {"/Global/BOSS_Darby/Offense/Short/Strikes/LightAttacks/LeftHook/FinishingCross","act/anim/BOSS_Darby.act"},
  451.     {"/Global/BOSS_Darby/Offense/Short/Strikes/Unblockable/HeavyPunchCharge/HeavyPunch","act/anim/BOSS_Darby.act"},
  452.     {"/Global/BOSS_Darby/Offense/Short/Grapples/HeavyAttacks/Catch_Throw/UpperLandGV","act/anim/BOSS_Darby.act"},
  453.     {"/Global/BOSS_Darby/Offense/Short/Grapples/HeavyAttacks/Catch_Throw/Finisher","act/anim/BOSS_Darby.act"},
  454.     {"/Global/BOSS_Darby/Offense/Special/Dash/Dash/Uppercut/ShortDarby","act/anim/BOSS_Darby.act"},
  455.     {"/Global/BOSS_Darby/Offense/Short","act/anim/BOSS_Darby.act"},
  456.     {"/Global/G_Striker_A/Offense/Short/Strikes/LightAttacks/RightHook/LeftHook/RightStomach","act/anim/G_Striker_A.act"},
  457.     {"/Global/G_Striker_A/Offense/Short/Strikes/HeavyAttacks/HeavyKnee","act/anim/G_Striker_A.act"},
  458.     {"/Global/G_Striker_A/Offense/Short/Strikes/HeavyAttacks/HeavyKick","act/anim/G_Striker_A.act"},
  459.     {"/Global/G_Striker_A/Offense/Medium/Strikes/HeavyAttack/KickThrust","act/anim/G_Striker_A.act"},
  460.     {"/Global/G_Striker_A/Offense/GroundAttack/GroundPunch","act/anim/G_Striker_A.act"},
  461.     {"/Global/G_Melee_A/Offense/Short/Strikes/LightAttacks/RightHook/LeftHook/RightStomach","act/anim/G_Melee_A.act"},
  462.     {"/Global/G_Melee_A/Offense/Medium/Strikes/HeavyAttacks/HeavyKick","act/anim/G_Melee_A.act"},
  463.     {"/Global/G_Melee_A/Offense/Short/Strikes/HeavyAttacks","act/anim/G_Melee_A.act"},
  464.     {"/Global/G_Melee_A/Offense/GroundAttack/GroundPunch","act/anim/G_Melee_A.act"},
  465.     {"/Global/Actions/Grapples/Front/Grapples/GrappleOpps/Melee/Greaser/Takedown","act/anim/G_Melee_A.act"},
  466.     {"/Global/G_Grappler_A/Offense/Short/Strikes/HeavyAttacks/RightHook/Uppercut","act/anim/G_Grappler_A.act"},
  467.     {"/Global/G_Grappler_A/Offense/Short/Strikes/HeavyAttacks/RightHook","act/anim/G_Melee_A.act"},
  468.     {"/Global/G_Grappler_A/Offense/Short/Strikes/HeavyAttacks/BootKick","act/anim/G_Melee_A.act"},
  469.     {"/Global/G_Grappler_A/Offense/Medium/Strikes/HeavyAttacks/HeavyAttacks","act/anim/G_Melee_A.act"},
  470.     {"/Global/G_Ranged_A/Offense/Short/Strikes/LightAttacks/RightHook/HeavyKnee","act/anim/G_Ranged_A.act"},
  471.     {"/Global/G_Ranged_A/Offense/Short/Strikes/LightAttacks/RightHook","act/anim/G_Melee_A.act"},
  472.     {"/Global/G_Ranged_A/Offense/Medium/Strikes/HeavyAttacks/HeavyKnee","act/anim/G_Melee_A.act"},
  473.     {"/Global/G_Johnny/Offense/Short/Strikes/LightAttacks","act/anim/G_Johnny.act"},
  474.     {"/Global/G_Johnny/Offense/Short/Strikes/HeavyKick/HeavyKick","act/anim/G_Johnny.act"},
  475.     {"/Global/G_Johnny/Offense/Medium/Strikes/HeavyAttack/HeavyKick","act/anim/G_Johnny.act"},
  476.     {"/Global/G_Johnny/Offense/Short/Strikes/HeavyKick","act/anim/G_Johnny.act"},
  477.     {"/Global/G_Johnny/Offense/Medium/Strikes/HeavyAttack","act/anim/G_Johnny.act"},
  478.     {"/Global/G_Johnny/Offense/Special/SpecialActions/LightAttacks","act/anim/G_Johnny.act"},
  479.     {"/Global/G_Johnny/Offense/Short/Strikes","act/anim/G_Johnny.act"},
  480.     {"/Global/N_Striker_A/Offense/Short/Strikes/LightAttacks/NerdJab","act/anim/N_Striker_A.act"},
  481.     {"/Global/N_Striker_A/Offense/Short/Strikes/LightAttacks/NerdJab/NerdHook","act/anim/N_Striker_A.act"},
  482.     {"/Global/N_Striker_A/Offense/Short/Strikes/HeavyAttacks/FatSlap","act/anim/N_Striker_A.act"},
  483.     {"/Global/N_Striker_A/Offense/Short/Strikes/HeavyAttacks/FatSlap/AssThrust","act/anim/N_Striker_A.act"},
  484.     {"/Global/N_Striker_B/Offense/Short/Strikes/LightAttacks/NerdJab/NerdHook","act/anim/N_Striker_B.act"},
  485.     {"/Global/N_Striker_B/Offense/Short/Strikes/HeavyAttacks/Flail","act/anim/N_Striker_B.act"},
  486.     {"/Global/N_Striker_B/Offense/Medium","act/anim/N_Striker_B.act"},
  487.     {"/Global/N_Ranged_A/Offense/Short/Strikes/LightAttacks/NerdJab","act/anim/N_Ranged_A.act"},
  488.     {"/Global/N_Ranged_A/Offense/Short/Strikes/LightAttacks/NerdJab/NerdHook","act/anim/N_Ranged_A.act"},
  489.     {"/Global/N_Ranged_A/Offense/Medium/Strikes/HeavyAttacks","act/anim/N_Ranged_A.act"},
  490.     {"/Global/N_Ranged_A/Defense/Flail","act/anim/N_Ranged_A.act"},
  491.     {"/Global/N_Earnest/Offense/FireSpudGun","act/anim/N_Earnest.act"},
  492.     {"/Global/J_Striker_A/Offense/Short/Strikes/LightAttacks/JAB","act/anim/J_Striker_A.act"},
  493.     {"/Global/J_Striker_A/Offense/Short/Strikes/LightAttacks/JAB/Elbow","act/anim/J_Striker_A.act"},
  494.     {"/Global/J_Striker_A/Offense/Short/Strikes/LightAttacks/JAB/Elbow/HeavyAttacks","act/anim/J_Striker_A.act"},
  495.     {"/Global/J_Striker_A/Offense/Short/Strikes/LightAttacks/JAB/Elbow/HeavyAttacks/Uppercut","act/anim/J_Striker_A.act"},
  496.     {"/Global/J_Striker_A/Offense/Medium/Grapples/GrapplesAtempt/Takedown","act/anim/J_Striker_A.act"},
  497.     {"/Global/J_Melee_A/Offense/Short/Strikes/LightAttacks/RightHand","act/anim/J_Melee_A.act"},
  498.     {"/Global/J_Melee_A/Offense/Short/Strikes/LightAttacks/RightHand/LeftHand","act/anim/J_Melee_A.act"},
  499.     {"/Global/J_Melee_A/Offense/Medium/Strikes/HeavyAttacks/HeavyRight","act/anim/J_Melee_A.act"},
  500.     {"/Global/J_Melee_A/Offense/Medium/Strikes/Unblockable","act/anim/J_Melee_A.act"},
  501.     {"/Global/J_Grappler_A/Offense/Short/Strikes/HeavyAttacks","act/anim/J_Grappler_A.act"},
  502.     {"/Global/J_Grappler_A/Offense/Medium/Strikes/HeavyAttacks/RightPunch/Axehandle","act/anim/J_Grappler_A.act"},
  503.     {"/Global/J_Ted/Offense/Short/Strikes/LightAttacks/JAB","act/anim/J_Ted.act"},
  504.     {"/Global/J_Ted/Offense/Medium/Grapples/GrapplesAtempt","act/anim/J_Ted.act"},
  505.     {"/Global/J_Mascot/Offense/Medium/Strikes/LightAttacks/WindMill_R","act/anim/J_Mascot.act"},
  506.     {"/Global/DO_Striker_A/Offense/Short","act/anim/DO_Striker_A.act"},
  507.     {"/Global/DO_Striker_A/Offense/Medium/HeavyAttacks","act/anim/DO_Striker_A.act"},
  508.     {"/Global/DO_Grappler_A/Offense/Short","act/anim/DO_Grappler_A.act"},
  509.     {"/Global/DO_Edgar/Offense/Short/LightAttacks/Punch1","act/anim/DO_Edgar.act"},
  510.     {"/Global/DO_Edgar/Offense/Medium/HeavyAttacks","act/anim/DO_Edgar.act"},
  511.     {"/Global/Crazy_Basic/Offense/Short/Short/Strikes/LightAttacks/WindMill_R","act/anim/Crazy_Basic.act"},
  512.     {"/Global/Crazy_Basic/Offense/Short/Short/Strikes/LightAttacks/WindMill_R/WindMill_L","act/anim/Crazy_Basic.act"},
  513.     {"/Global/Crazy_Basic/Offense/Short/Short/Strikes/LightAttacks/WindMill_R/WindMill_L/HeavyAttacks/SwingPunch_R","act/anim/Crazy_Basic.act"},
  514.     {"/Global/Crazy_Basic/Offense/Medium","act/anim/Crazy_Basic.act"},
  515.     {"/Global/Actions/Grapples/Front/Grapples/GrappleAttempt","Act/Globals.act"},
  516.     {"/Global/Actions/Grapples/Front/Grapples/GrappleMoves","Act/Globals.act"},
  517.     {"/Global/CV_Male_A/Offense/Short/LightAttacks/SloppyJAB/SloppyCross","act/anim/CV_Male_A.act"},
  518.     {"/Global/CV_Male_A/Offense/Short/Grapples/GrapplesAtempt","act/anim/CV_Male_A.act"},
  519.     {"/Global/CV_Female_A/Offense/Short/LightAttacks/Slap","act/anim/CV_Female_A.act"},
  520.     {"/Global/CV_Female_A/Offense/Short/HeavyAttacks","act/anim/CV_Female_A.act"},
  521.     {"/Global/CV_Drunk/Offense/Short/Grapples/GrapplesAtempt","act/anim/CV_Drunk.act"},
  522.     {"/Global/Actions/RisingAttacks/HeavyAttacks/RisingAttacks","Globals/G_Striker_A.act"},
  523.     -- Add more if you wish..
  524.     --{"/Global/Player","Act/Anim/Player.act"},
  525.     --{"/Global/Player","Act/Anim/Player.act"},
  526.     --{"/Global/Player","Act/Anim/Player.act"},
  527. }
  528.  
  529. -- STimeCycle Functions:
  530.  
  531. function F_AttendedClass()
  532.     if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
  533.         return
  534.     end
  535.     SetSkippedClass(false)
  536.     PlayerSetPunishmentPoints(0)
  537. end
  538. function F_MissedClass()
  539.     if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
  540.         return
  541.     end
  542.     SetSkippedClass(true)
  543.     StatAddToInt(166)
  544. end
  545. function F_AttendedCurfew()
  546.     if not PedInConversation(gPlayer) and not MissionActive() then
  547.         TextPrintString("You got home in time for curfew", 4)
  548.     end
  549. end
  550. function F_MissedCurfew()
  551.     if not PedInConversation(gPlayer) and not MissionActive() then
  552.         TextPrint("TM_TIRED5", 4, 2)
  553.     end
  554. end
  555. function F_StartClass()
  556.     if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
  557.         return
  558.     end
  559. end
  560. function F_EndClass()
  561.     if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
  562.         return
  563.     end
  564. end
  565. function F_StartMorning()
  566.     F_UpdateTimeCycle()
  567. end
  568. function F_EndMorning()
  569.     F_UpdateTimeCycle()
  570. end
  571. function F_StartLunch()
  572.     if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
  573.         F_UpdateTimeCycle()
  574.         return
  575.     end
  576.     F_UpdateTimeCycle()
  577. end
  578. function F_EndLunch()
  579.     F_UpdateTimeCycle()
  580. end
  581. function F_StartAfternoon()
  582.     F_UpdateTimeCycle()
  583. end
  584. function F_EndAfternoon()
  585.     F_UpdateTimeCycle()
  586. end
  587. function F_StartEvening()
  588.     F_UpdateTimeCycle()
  589. end
  590. function F_EndEvening()
  591.     F_UpdateTimeCycle()
  592. end
  593. function F_StartCurfew_SlightlyTired()
  594.     F_UpdateTimeCycle()
  595. end
  596. function F_StartCurfew_Tired()
  597.     F_UpdateTimeCycle()
  598. end
  599. function F_StartCurfew_MoreTired()
  600.     F_UpdateTimeCycle()
  601. end
  602. function F_StartCurfew_TooTired()
  603.     F_UpdateTimeCycle()
  604. end
  605. function F_EndCurfew_TooTired()
  606.     F_UpdateTimeCycle()
  607. end
  608. function F_EndTired()
  609.     F_UpdateTimeCycle()
  610. end
  611. function F_Nothing()
  612. end
  613. function F_ClassWarning()
  614.     if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
  615.         return
  616.     end
  617.     local l_23_0 = math.random(1, 2)
  618. end
  619. function F_UpdateTimeCycle()
  620.     if not IsMissionCompleated("1_B") then
  621.         local l_24_0 = GetCurrentDay(false)
  622.         if l_24_0 < 0 or l_24_0 > 2 then
  623.             SetCurrentDay(0)
  624.         end
  625.     end
  626.     F_UpdateCurfew()
  627. end
  628. function F_UpdateCurfew()
  629.     local l_25_0 = shared.gCurfewRules
  630.     if not l_25_0 then
  631.         l_25_0 = F_CurfewDefaultRules
  632.     end
  633.     l_25_0()
  634. end
  635. function F_CurfewDefaultRules()
  636.     local l_26_0 = ClockGet()
  637.     if l_26_0 >= 23 or l_26_0 < 7 then
  638.         -- shared.gCurfew = false
  639.         shared.gCurfew = true
  640.     else
  641.         shared.gCurfew = false
  642.     end
  643. end
Advertisement
Add Comment
Please, Sign In to add comment