Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sub_limb(dir, limb)
- if dir == "left" then
- if limb == "arm" then
- lArmD = lArmD - 1
- else
- lLegD = lLegD - 1
- end
- elseif dir == "right" then
- if limb == "arm" then
- rArmD = rArmD - 1
- else
- rLegD = rLegD - 1
- end
- elseif dir == "head" then
- headD = headD - 1
- elseif dir == "torso" then
- torsoD = torsoD - 1
- end
- if larmB >= breakpoint - 2 then
- setBackgroundColor("larmB",250,150,150,250);
- else
- setBackgroundColor("larmB",200,200,200,250);
- end
- if lLegD >= breakpoint -2 then
- setBackgroundColor("llegB",250,150,150,250);
- else
- setBackgroundColor("llegB",200,200,200,250);
- end
- if rArmD >= breakpoint -2 then
- setBackgroundColor("rarmB",250,150,150,250);
- else
- setBackgroundColor("rarmB",200,200,200,250);
- end
- if rLegD >= breakpoint -2 then
- setBackgroundColor("rlegB",250,150,150,250);
- else
- setBackgroundColor("rlegB",200,200,200,250);
- end
- if headD >= breakpoint -2 then
- setBackgroundColor("headB",250,150,150,250);
- else
- setBackgroundColor("headB",200,200,200,250);
- end
- if torsoD >= breakpoint -2 then
- setBackgroundColor("torsoB",250,150,150,250);
- else
- setBackgroundColor("torsoB",200,200,200,250);
- end
- if lArmD < 0 then
- lArmD = 0
- end
- if lLegD < 0 then
- lArmD = 0
- end
- if rArmD < 0 then
- rArmD = 0
- end
- if rLegD < 0 then
- rLegD = 0
- end
- if headD < 0 then
- headD = 0
- end
- if torsoD < 0 then
- torsoD = 0
- end
- echo("larmB","<center> " .. lArmD .. " </center>")
- echo("llegB","<center> " .. lLegD .. " </center>")
- echo("rarmB","<center> " .. rArmD .. " </center>")
- echo("rlegB","<center> " .. rLegD .. " </center>")
- echo("torsoB","<center> " .. torsoD .. " </center>")
- echo("headB","<center> " .. headD .. " </center>")
- --echo("\nFinished")
- end
- -------------------------------------------------
- -- Limb Counter Functions --
- -------------------------------------------------
- breakpoint = 9
- function ck_limb( dir, limb )
- --echo("\nIn ck_limb " .. dir .. " " .. limb)
- if dir == "left" then
- if limb == "arm" then
- lArmD = lArmD + 1
- else
- lLegD = lLegD + 1
- end
- elseif dir == "right" then
- if limb == "arm" then
- rArmD = rArmD + 1
- else
- rLegD = rLegD + 1
- end
- elseif dir == "head" then
- headD = headD + 1
- elseif dir == "torso" then
- torsoD = torsoD + 1
- end
- if leftarmhit >= breakpoint - 2 then
- setBackgroundColor("leftarmhit",250,150,150,250);
- end
- if lLegD >= breakpoint - 2 then
- setBackgroundColor("llegB",250,150,150,250);
- end
- if rLegD >= breakpoint - 2 then
- setBackgroundColor("rlegB",250,150,150,250);
- end
- if rArmD >= breakpoint - 2 then
- setBackgroundColor("rarmB",250,150,150,250);
- end
- if torsoD >= breakpoint - 2 then
- setBackgroundColor("torsoB",250,150,150,250);
- end
- if headD >= breakpoint -2 then
- setBackgroundColor("headB",250,150,150,250);
- end
- if larmB >= breakpoint then
- bg("black")
- fg("lawn_green")
- echo("\n[[[ LVL 2 BREAK ON LEFT ARM ]]]");
- tempTimer(0.3, [[ larmB = 0; echo("larmB","<center> " .. rArmD .. " </center>") ]])
- setBackgroundColor("larmB",200,200,200,250);
- end
- if lLegD >= breakpoint then
- bg("black")
- fg("lawn_green")
- echo("\n[[[ LVL 2 BREAK ON LEFT LEG ]]]");
- tempTimer(0.3, [[ lLegD = 0; echo("llegB","<center> " .. rLegD .. " </center>") ]])
- setBackgroundColor("llegB",200,200,200,250);
- end
- if rArmD >= breakpoint then
- bg("black")
- fg("lawn_green")
- echo("\n[[[ LVL 2 BREAK ON RIGHT ARM ]]]");
- tempTimer(0.3, [[ rArmD = 0; echo("rarmB","<center> " .. rArmD .. " </center>") ]])
- setBackgroundColor("rarmB",200,200,200,250);
- end
- if rLegD >= breakpoint then
- bg("black")
- fg("lawn_green")
- echo("\n[[[ LVL 2 BREAK ON RIGHT LEG ]]]");
- tempTimer(0.3, [[ rLegD = 0; echo("rlegB","<center> " .. rLegD .. " </center>") ]])
- setBackgroundColor("rlegB",200,200,200,250);
- end
- if torsoD >= breakpoint then
- bg("black")
- fg("lawn_green")
- echo("\n[[[ LVL 2 BREAK ON TORSO ]]]");
- tempTimer(0.3, [[ torsoD = 0; echo("torsoB","<center> " .. torsoD .. " </center>") ]])
- setBackgroundColor("torsoB",200,200,200,250);
- end
- if headD >= breakpoint then
- bg("black")
- fg("lawn_green")
- echo("\n[[[ LVL 2 BREAK ON HEAD ]]]");
- tempTimer(0.3, [[ headD = 0; echo("headB","<center> " .. headD .. " </center>") ]])
- setBackgroundColor("headB",200,200,200,250);
- end
- echo("larmB","<center> " .. lArmD .. " </center>")
- echo("llegB","<center> " .. lLegD .. " </center>")
- echo("rarmB","<center> " .. rArmD .. " </center>")
- echo("rlegB","<center> " .. rLegD .. " </center>")
- echo("torsoB","<center> " .. torsoD .. " </center>")
- echo("headB","<center> " .. headD .. " </center>")
- --echo("\nFinished")
- end
- --------------------------------------------
- -- Subtract Lim Damage --
- --------------------------------------------
- function sub_limb(dir, limb)
- if dir == "left" then
- if limb == "arm" then
- lArmD = lArmD - 1
- else
- lLegD = lLegD - 1
- end
- elseif dir == "right" then
- if limb == "arm" then
- rArmD = rArmD - 1
- else
- rLegD = rLegD - 1
- end
- elseif dir == "head" then
- headD = headD - 1
- elseif dir == "torso" then
- torsoD = torsoD - 1
- end
- if lArmD >= breakpoint - 2 then
- setBackgroundColor("larmB",250,150,150,250);
- else
- setBackgroundColor("larmB",200,200,200,250);
- end
- if lLegD >= breakpoint -2 then
- setBackgroundColor("llegB",250,150,150,250);
- else
- setBackgroundColor("llegB",200,200,200,250);
- end
- if rArmD >= breakpoint -2 then
- setBackgroundColor("rarmB",250,150,150,250);
- else
- setBackgroundColor("rarmB",200,200,200,250);
- end
- if rLegD >= breakpoint -2 then
- setBackgroundColor("rlegB",250,150,150,250);
- else
- setBackgroundColor("rlegB",200,200,200,250);
- end
- if headD >= breakpoint -2 then
- setBackgroundColor("headB",250,150,150,250);
- else
- setBackgroundColor("headB",200,200,200,250);
- end
- if torsoD >= breakpoint -2 then
- setBackgroundColor("torsoB",250,150,150,250);
- else
- setBackgroundColor("torsoB",200,200,200,250);
- end
- if lArmD < 0 then
- lArmD = 0
- end
- if lLegD < 0 then
- lArmD = 0
- end
- if rArmD < 0 then
- rArmD = 0
- end
- if rLegD < 0 then
- rLegD = 0
- end
- if headD < 0 then
- headD = 0
- end
- if torsoD < 0 then
- torsoD = 0
- end
- echo("larmB","<center> " .. lArmD .. " </center>")
- echo("llegB","<center> " .. lLegD .. " </center>")
- echo("rarmB","<center> " .. rArmD .. " </center>")
- echo("rlegB","<center> " .. rLegD .. " </center>")
- echo("torsoB","<center> " .. torsoD .. " </center>")
- echo("headB","<center> " .. headD .. " </center>")
- --echo("\nFinished")
- end
- --------------------------------------------
- -- Initialize all Limbs to Zero --
- --------------------------------------------
- function initLimbs()
- headD = 0
- lArmD = 0
- rArmD = 0
- torsoD = 0
- lLegD = 0
- rLegD = 0
- if target ~= last_target then
- breakpoint=9
- end
- end
- ------------------------------------------
- -- Check Max Health to get Breakpoint --
- ------------------------------------------
- function doAssessCheck( health )
- health=tonumber(health)
- bg("black")
- fg("white")
- if health < 4000 then
- if health > 3000 then
- if health >= 3265 then
- breakpoint = 11
- else
- breakpoint = 10
- end
- else
- breakpoint = 7
- end
- else
- if health < 4600 then
- breakpoint = 12
- else
- if health < 5200 then
- breakpoint = 14
- else
- if health > 6000 then
- if health > 8000 then
- if health > 8500 then
- breakpoint = 18
- else
- breakpoint = 17
- end
- else
- breakpoint = 16
- end
- else
- breakpoint = 14
- end
- end
- end
- end
- loadDummy()
- end
- function resetLimb( limb )
- bg("black")
- fg("green_yellow")
- echo(" Resetting: " .. limb .. " \n")
- if limb == "head" then
- headD = 0;
- setBackgroundColor("headB",200,200,200,250);
- echo("headB","<center> " .. headD .. " </center>");
- elseif limb == "torso" then
- torsoD = 0;
- setBackgroundColor("torsoB",200,200,200,250);
- echo("torsoB","<center> " .. torsoD .. " </center>");
- elseif limb == "leftarm" then
- leftarmhit = 0;
- setBackgroundColor("larmB",200,200,200,250);
- echo("larmB","<center> " .. lArmD .. " </center>");
- elseif limb == "rightarm" then
- rightarmhit = 0;
- setBackgroundColor("rarmB",200,200,200,250);
- echo("rarmB","<center> " .. rArmD .. " </center>");
- elseif limb == "leftleg" then
- leftleghit = 0;
- setBackgroundColor("llegB",200,200,200,250);
- echo("llegB","<center> " .. lLegD .. " </center>");
- elseif limb == "rightleg" then
- rightleghit = 0;
- setBackgroundColor("rlegB",200,200,200,250);
- echo("rlegB","<center> " .. rLegD .. " </center>");
- end
- end
Add Comment
Please, Sign In to add comment