Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- On event handlers: svo got aff, svo lost aff and svo updated aff
- -------------------------------------------------
- -- Put your Lua functions here. --
- -- --
- -- Note that you can also use external Scripts --
- -------------------------------------------------
- function AffEcho(event, affliction)
- if (event == "svo got aff" and affliction:title() ~= "Bleeding") then
- doecho = "GotAff"
- if affliction == "crippledleftarm" then
- affliction = "Crippled Left Arm"
- elseif affliction == "crippledrightarm" then
- affliction = "Crippled Right Arm"
- elseif affliction == "crippledleftleg" then
- affliction = "Crippled Left Leg"
- elseif affliction == "crippledrightleg" then
- affliction = "Crippled Right Leg"
- end
- if affliction == "mangledleftarm" then
- affliction = "Broken Left Arm"
- elseif affliction == "mangledrightarm" then
- affliction = "Broken Right Arm"
- elseif affliction == "mangledleftleg" then
- affliction = "Broken Left Leg"
- elseif affliction == "mangledrightleg" then
- affliction = "Broken Right Leg"
- end
- table.insert(gotafftable, affliction)
- elseif (event == "svo lost aff" and affliction:title() ~= "Bleeding") then
- doecho = "LostAff"
- if affliction == "crippledleftarm" then
- affliction = "Crippled Left Arm"
- elseif affliction == "crippledrightarm" then
- affliction = "Crippled Right Arm"
- elseif affliction == "crippledleftleg" then
- affliction = "Crippled Left Leg"
- elseif affliction == "crippledrightleg" then
- affliction = "Crippled Right Leg"
- end
- if affliction == "mangledleftarm" then
- affliction = "Broken Left Arm"
- elseif affliction == "mangledrightarm" then
- affliction = "Broken Right Arm"
- elseif affliction == "mangledleftleg" then
- affliction = "Broken Left Leg"
- elseif affliction == "mangledrightleg" then
- affliction = "Broken Right Leg"
- end
- table.insert(lostafftable, affliction)
- end
- end
- -------------- ACTUAL ECHO SCRIPT ---------------
- function DoAffEcho()
- if doecho then
- if doecho == "GotAff" then
- tablesize = #gotafftable
- for i=1,tablesize do
- if gotafftable[i]:title() == ("Broken Left Arm" or "Broken Right Arm" or "Broken Left Leg" or "Broken Right Leg") then
- cecho("<gray>[<firebrick>Guardian<gray>]: <orange>"..gotafftable[i]:title().." <red>Gained!+ \n")
- else
- cecho("<gray>[<firebrick>Guardian<gray>]: <red>"..gotafftable[i]:title().." Gained!+\n")
- end
- end
- gotafftable = { }
- doecho = nil
- elseif doecho == "LostAff" then
- tablesize = #lostafftable
- for i=1,tablesize do
- cecho("<gray>[<firebrick>Guardian<gray>]: <white>"..lostafftable[i]:title().." Cured!-\n")
- end
- lostafftable = { }
- doecho = nil
- end
- end
- end
- ------------------ DEFENCE SCRIPTS --------------
- These run off the events svo got def and svo lost def
- function DefenceEcho(event, defence)
- if (event == "svo got def" and defence:title() ~= "Breath") then
- cecho("<gray>[<firebrick>Guardian<gray>]: <coral>"..defence:title().." Gained!+\n")
- elseif (event == "svo lost def" and defence:title() ~= "Breath") then
- cecho("<gray>[<firebrick>Guardian<gray>]: <cyan>"..defence:title().." Lost!-\n")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement