Advertisement
Guest User

Untitled

a guest
Nov 17th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.27 KB | None | 0 0
  1. function dwbStuff(event, affliction, class)
  2.     if event == "got aff" then
  3.         if affliction == "damagedhead" then
  4.             if (affPosition("damagedhead") ~= afflictionPrioritiesDefault["blindness"]) then
  5.                 send("curing priority damagedhead 26")
  6.                 if sys.bals.salve then
  7.                     send("apply restoration to legs")
  8.                     sys.bals.salve = false
  9.                 end
  10.             end
  11.         elseif affliction == "damagedleftarm" or affliciton == "damagedrightarm" then
  12.             if (affPosition("damagedleftarm") ~= afflictionPrioritiesDefault["blindness"]) then
  13.                 send("curing priority damagedleftarm 26")
  14.                 send("curing priority damagedrightarm 26")
  15.                 if sys.bals.salve then
  16.                     send("apply resoration to legs")
  17.                     sys.bals.salve = false
  18.                 end
  19.             end
  20.         end
  21.     end
  22. end
  23.  
  24. registerAnonymousEventHandler("got aff", "dwbStuff")
  25.  
  26. function dwbRewind(event, affliction, class)
  27.     if event == "lost aff" then
  28.         if affliction == "prone" then
  29.             if (affPosition("damagedleftarm") ~= afflictionPrioritiesDefault["damagedleftarm"]) then
  30.                 affPrioRestore( "damagedleftarm" )
  31.                 affPrioRestore( "damagedrightarm" )
  32.             elseif (affPosition("damagedhead") ~= afflictionPrioritiesDefault["damagedhead"]) then
  33.                 affPrioRestore( "damagedhead" )
  34.             end
  35.         end
  36.     end
  37. end
  38.  
  39. registerAnonymousEventHandler("lost aff", "dwbRewind")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement