Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.21 KB | None | 0 0
  1. On event handlers: svo got aff, svo lost aff and svo updated aff
  2.  
  3. -------------------------------------------------
  4. --         Put your Lua functions here.        --
  5. --                                             --
  6. -- Note that you can also use external Scripts --
  7. -------------------------------------------------
  8.  
  9. function AffEcho(event, affliction)
  10.   if (event == "svo got aff" and affliction:title() ~= "Bleeding") then
  11.     doecho = "GotAff"
  12.     if affliction == "crippledleftarm" then
  13.             affliction = "Crippled Left Arm"
  14.         elseif affliction == "crippledrightarm" then
  15.             affliction = "Crippled Right Arm"
  16.         elseif affliction == "crippledleftleg" then
  17.             affliction = "Crippled Left Leg"
  18.         elseif affliction == "crippledrightleg" then
  19.             affliction = "Crippled Right Leg"
  20.     end
  21.     if affliction == "mangledleftarm" then
  22.             affliction = "Broken Left Arm"
  23.         elseif affliction == "mangledrightarm" then
  24.             affliction = "Broken Right Arm"
  25.         elseif affliction == "mangledleftleg" then
  26.             affliction = "Broken Left Leg"
  27.         elseif affliction == "mangledrightleg" then
  28.             affliction = "Broken Right Leg"
  29.     end
  30.     table.insert(gotafftable, affliction)
  31.     elseif (event == "svo lost aff" and affliction:title() ~= "Bleeding") then
  32.     doecho = "LostAff"
  33.     if affliction == "crippledleftarm" then
  34.             affliction = "Crippled Left Arm"
  35.         elseif affliction == "crippledrightarm" then
  36.             affliction = "Crippled Right Arm"
  37.         elseif affliction == "crippledleftleg" then
  38.             affliction = "Crippled Left Leg"
  39.         elseif affliction == "crippledrightleg" then
  40.             affliction = "Crippled Right Leg"
  41.     end
  42.     if affliction == "mangledleftarm" then
  43.             affliction = "Broken Left Arm"
  44.         elseif affliction == "mangledrightarm" then
  45.             affliction = "Broken Right Arm"
  46.         elseif affliction == "mangledleftleg" then
  47.             affliction = "Broken Left Leg"
  48.         elseif affliction == "mangledrightleg" then
  49.             affliction = "Broken Right Leg"
  50.     end
  51.     table.insert(lostafftable, affliction)
  52.     end
  53. end
  54.  
  55. -------------- ACTUAL ECHO SCRIPT ---------------
  56.  
  57.  function DoAffEcho()
  58.  
  59.     if doecho then
  60.         if doecho == "GotAff" then
  61.             tablesize = #gotafftable   
  62.             for i=1,tablesize do
  63.                 if gotafftable[i]:title() == ("Broken Left Arm" or "Broken Right Arm" or "Broken Left Leg" or "Broken Right Leg") then
  64.                 cecho("<gray>[<firebrick>Guardian<gray>]: <orange>"..gotafftable[i]:title().." <red>Gained!+ \n")
  65.                 else
  66.                 cecho("<gray>[<firebrick>Guardian<gray>]: <red>"..gotafftable[i]:title().." Gained!+\n")
  67.                 end
  68.             end
  69.             gotafftable = { }
  70.             doecho = nil
  71.         elseif doecho == "LostAff" then
  72.             tablesize = #lostafftable
  73.             for i=1,tablesize do
  74.             cecho("<gray>[<firebrick>Guardian<gray>]: <white>"..lostafftable[i]:title().." Cured!-\n")
  75.             end
  76.             lostafftable = { }
  77.             doecho = nil
  78.         end
  79.     end
  80. end
  81.  
  82.  
  83. ------------------ DEFENCE SCRIPTS --------------
  84.  
  85. These run off the events svo got def and svo lost def
  86.  
  87. function DefenceEcho(event, defence)
  88.   if (event == "svo got def" and defence:title() ~= "Breath") then
  89.     cecho("<gray>[<firebrick>Guardian<gray>]: <coral>"..defence:title().." Gained!+\n")
  90.     elseif (event == "svo lost def" and defence:title() ~= "Breath") then
  91.     cecho("<gray>[<firebrick>Guardian<gray>]: <cyan>"..defence:title().." Lost!-\n")
  92.     end
  93. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement