Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 39.81 KB | None | 0 0
  1. --Alchemist--
  2.  
  3. function alchemistHealing(event, affliction, class)
  4.     if classTimerExists("alchemist") then
  5.         if event == "got aff" then
  6.             if affliction == "asthma" and not raid then
  7.                 if Aff.paralysis and Aff.impatience and (Aff.slickness or Aff.stupidity or Aff.weariness or Aff.clumsiness or Aff.sensitivity or Aff.darkshade) and (affPosition("asthma") ~= afflictionPrioritiesDefault["aeon"]) and not trueShade then
  8.                     if affSwapped ~= "asthma" and canSwap then
  9.                         send("curing priority asthma 1")
  10.                         canSwap = false
  11.                     end
  12.                 end
  13.             end
  14.         end
  15.     end
  16. end
  17.  
  18. registerAnonymousEventHandler("got aff", "alchemistHealing")
  19. registerAnonymousEventHandler("reset aff prios", "alchemistHealing")
  20.  
  21. function alchemistLost(event, affliction, class)
  22.     if classTimerExists("alchemist") then
  23.         if event == "lost aff" then
  24.             if affliction == "asthma" then
  25.                 if (affPosition("asthma") ~= afflictionPrioritiesDefault["asthma"]) then
  26.                     affPrioRestore( "asthma" )
  27.                     canSwap = true
  28.                 end
  29.             end
  30.         end
  31.     end
  32. end
  33.  
  34. registerAnonymousEventHandler("lost aff", "alchemistLost")
  35.  
  36. --Apostate--
  37.  
  38. function apostateHealing(event, affliction, class)
  39.     if classTimerExists("apostate") then
  40.         if event == "got aff" then
  41.             if affliction == "asthma" and not raid then
  42.                 if Aff.paralysis and (Aff.impatience or Aff.hellsight or Aff.weariness or Aff.clumsiness or Aff.healthleech or Aff.sensitivity) and (Aff.impatience or Aff.hellsight or Aff.weariness or Aff.clumsiness or Aff.healthleech or Aff.sensitivity) and (affPosition("asthma") ~= afflictionPrioritiesDefault["aeon"]) and not trueShade then
  43.                     if affSwapped ~= "asthma" and canSwap then
  44.                         send("curing priority asthma 1")
  45.                         canSwap = false
  46.                     end
  47.                 elseif Aff.paralysis and Aff.asthma and Aff.impatience and Aff.slickness and (affPosition("impatience") ~= afflictionPrioritiesDefault["aeon"]) and not trueShade then
  48.                     if affSwapped ~= "impatience" and canSwap then
  49.                         send("curing priority impatience 1")
  50.                         canSwap = false
  51.                     end
  52.                 end
  53.             end
  54.         end
  55.     end
  56. end
  57.  
  58. registerAnonymousEventHandler("got aff", "apostateHealing")
  59. registerAnonymousEventHandler("reset aff prios", "apostateHealing")
  60.  
  61. function apostateManaHandling(event, affliction, class)
  62.     prioMana = (tonumber(currentMana/maxMana)*100)
  63.     prioHealth = (tonumber(currentHealth/maxHealth)*100)
  64.     if classTimerExists("apostate") then
  65.         if event == "got aff" then
  66.             if manaPrio then
  67.                 if prioMana > 80 then
  68.                     send("curing priority health")
  69.                     healthPrio = true
  70.                     manaPrio = false
  71.                 elseif prioMana > 80 then
  72.                     send("curing priority health")
  73.                     healthPrio = true
  74.                     manaPrio = false
  75.                 end
  76.             elseif healthPrio then
  77.                 if not Aff.masochism then
  78.                     if prioMana <= 72 then
  79.                         send("curing priority mana")
  80.                         manaPrio = true
  81.                         healthPrio = false
  82.                     end
  83.                 elseif Aff.masochism then
  84.                     if prioMana <= 75 then
  85.                         send("curing priority mana")
  86.                         manaPrio = true
  87.                         healthPrio = false
  88.                     end
  89.                 end
  90.             end
  91.         end
  92.     end
  93. end
  94.  
  95. registerAnonymousEventHandler("got aff", "apostateManaHandling")
  96. registerAnonymousEventHandler("reset aff prios", "apostateManaHandling")
  97.  
  98.  
  99. function apostateLost(event, affliction, class)
  100.     if classTimerExists("apostate") then
  101.         if event == "lost aff" then
  102.             if affliction == "asthma" then
  103.                 if (affPosition("asthma") ~= afflictionPrioritiesDefault["asthma"]) then
  104.                     affPrioRestore( "asthma" )
  105.                     canSwap = true
  106.                 end
  107.             elseif affliction == "impatience" then
  108.                 if (affPosition("impatience") ~= afflictionPrioritiesDefault["impatience"]) then
  109.                     affPrioRestore( "impatience" )
  110.                     canSwap = true
  111.                 end
  112.             end
  113.         end
  114.     end
  115. end
  116.  
  117. registerAnonymousEventHandler("lost aff", "apostateLost")
  118.  
  119. --Bard--
  120.  
  121. function bardHealing(event, affliction, class)
  122.     if classTimerExists("bard") then
  123.         if event == "got aff" then
  124.             if affliction == "asthma" and not raid then
  125.                 if Aff.paralysis and (Aff.weariness or Aff.clumsiness or Aff.vertigo or Aff.sensitivity or Aff.hallucinations or Aff.stupidity) and (Aff.weariness or Aff.clumsiness or Aff.vertigo or Aff.sensitivity or Aff.hallucinations or Aff.stupidity) and (affPosition("asthma") ~= afflictionPrioritiesDefault["aeon"]) and not trueShade then
  126.                     if affSwapped ~= "asthma" and canSwap then
  127.                         send("curing priority asthma 1")
  128.                         canSwap = false
  129.                     end
  130.                 elseif Aff.paralysis and Aff.impatience and Aff.asthma and Aff.slickness and (affPosition("impatience") ~= afflictionPrioritiesDefault["aeon"]) then
  131.                     if affSwapped ~= "impatience" and canSwap then
  132.                         send("curing priority impatience 1")
  133.                         canSwap = false
  134.                     end
  135.                 end
  136.             end
  137.         end
  138.     end
  139. end
  140.  
  141. registerAnonymousEventHandler("got aff", "bardHealing")
  142. registerAnonymousEventHandler("reset aff prios", "bardHealing")
  143.  
  144. function bardLost(event, affliction, class)
  145.     if classTimerExists("bard") then
  146.         if event == "lost aff" then
  147.             if affliction == "asthma" then
  148.                 if (affPosition("asthma") ~= afflictionPrioritiesDefault["asthma"]) then
  149.                     affPrioRestore( "asthma" )
  150.                         canSwap = true
  151.                 end
  152.             elseif affliction == "impatience" then
  153.                 if (affPosition("impatience") ~= afflictionPrioritiesDefault["impatience"]) then
  154.                     affPrioRestore( "impatience" )
  155.                         canSwap = true
  156.                 end
  157.             end
  158.         end
  159.     end
  160. end
  161.  
  162. registerAnonymousEventHandler("lost aff", "bardLost")
  163.  
  164. --Blademaster--
  165.  
  166. function blademasterHealing(event, affliction, class)
  167.     if classTimerExists("blademaster") then
  168.         if event == "got aff" then
  169.             if affliction == "damagedhead" and not raid then
  170.                 if Aff.damagedhead and canPredict then
  171.                     send("curing predict mildtrauma")
  172.                     canPredict = false
  173.                 end
  174.             elseif affliction == "damagedleftarm" or affliction == "damagedrightarm" and not raid then
  175.                 if (affPosition("addiction") ~= afflictionPrioritiesDefault["aeon"]) then
  176.                     if affSwapped ~= "addiction" and canSwap then
  177.                         send("curing priority addiction 1")
  178.                         canSwap = false
  179.                     end
  180.                 end
  181.             elseif affliction == "damagedleftarm" or affliction == "damagedrightarm" and not raid then
  182.                 if (affPosition("damagedleftarm") ~= afflictionPrioritiesDefault["blindness"]) then
  183.                     send("curing priority damagedleftarm 26")
  184.                     send("curing priority damagedrightarm 26")
  185.                     if canPredict then
  186.                         send("curing predict damagedleftleg")
  187.                         canPredict = false
  188.                     end
  189.                 end
  190.             end
  191.         end
  192.     end
  193. end
  194.  
  195. registerAnonymousEventHandler("got aff", "blademasterHealing")
  196. registerAnonymousEventHandler("reset aff prios", "blademasterHealing")
  197.  
  198. function blademasterLostAff(event, affliction, class)
  199.     if classTimerExists("blademaster") then
  200.         if event == "lost aff" then
  201.             if affliction == "damagedhead" then
  202.                 if (affPosition("damagedhead") ~= afflictionPrioritiesDefault["damagedhead"]) then
  203.                     affPrioRestore( "damagedhead" )
  204.                 end
  205.             elseif affliction == "damagedleftleg" or affliction == "damagedrightleg" then
  206.                 if (affPosition("damagedleftarm") ~= afflictionPrioritiesDefault["damagedleftarm"]) then
  207.                     affPrioRestore( "damagedleftarm" )
  208.                     affPrioRestore( "damagedrightarm" )
  209.                 end
  210.             end
  211.         end
  212.     end
  213. end
  214.  
  215. registerAnonymousEventHandler("lost aff", "blademasterLostAff")
  216.  
  217. --Depthswalker--
  218.  
  219. function depthsHandle(event, affliction, class)
  220.     if classTimerExists("depthswalker") then
  221.         if event == "got aff" then
  222.             if affliction == "timeloop" then
  223.                 if not Aff.paralysis then
  224.                     if (affPosition("timeloop") ~= afflictionPrioritiesDefault["aeon"]) then
  225.                         send("curing priority timeloop 1")
  226.                     end
  227.                 elseif Aff.paralysis then
  228.                     if (affPosition("paralysis") ~= afflictionPrioritiesDefault["aeon"]) then
  229.                         send("curing priority paralysis 1")
  230.                     end
  231.                 end
  232.             elseif affliction == "depression" or affliction == "shadowmadness" or affliction == "parasite" then
  233.                 if not Aff.timeloop and not Aff.paralysis and Def.speed then
  234.                     if (affPosition(affliction) ~= afflictionPrioritiesDefault["aeon"]) then
  235.                         send("curing priority " ..affliction.. " 1")
  236.                     end
  237.                 elseif not Aff.paralysis and Aff.asthma and Def.speed then
  238.                     if (affPosition("asthma") ~= afflictionPrioritiesDefault["aeon"]) then
  239.                         send("curing priority asthma 1")
  240.                     end
  241.                 end
  242.             end
  243.         end
  244.     end
  245. end
  246.  
  247. registerAnonymousEventHandler("depthsHandle", "got aff")
  248. registerAnonymousEventHandler("depthsHandle", "reset aff prios")
  249.  
  250. function DepthManaHandling(event, affliction, class)
  251.     prioMana = (tonumber(currentMana/maxMana)*100)
  252.     prioHealth = (tonumber(currentHealth/maxHealth)*100)
  253.         if classTimerExists("depthswalker") then
  254.             if event == "got aff" then
  255.                 if manaPrio then
  256.                     if prioMana > 80 and not Aff.retribution then
  257.                         send("curing priority health")
  258.                         healthPrio = true
  259.                         manaPrio = false
  260.                     elseif prioMana > 80 and Aff.retribution then
  261.                         send("curing priority health")
  262.                         healthPrio = true
  263.                         manaPrio = false
  264.                     end
  265.                 elseif healthPrio then
  266.                     if not Aff.retribution then
  267.                         if prioMana <= 52 then
  268.                             send("curing priority mana")
  269.                             manaPrio = true
  270.                             healthPrio = false
  271.                         end
  272.                     elseif Aff.retribution then
  273.                         if prioMana <= 60 then
  274.                             send("curing priority mana")
  275.                             manaPrio = true
  276.                             healthPrio = false
  277.                     end
  278.                 end
  279.             end
  280.         end
  281.     end
  282. end
  283.  
  284. registerAnonymousEventHandler("got aff", "DepthManaHandling")
  285. registerAnonymousEventHandler("reset aff prios", "DepthManaHandling")
  286.  
  287. function depthsReset(event, affliction, class)
  288.     if classTimerExists("depthswalker") then
  289.         if event == "lost aff" then
  290.             if affliction == "timeloop" then
  291.                 if not Aff.timeloop then
  292.                     if (affPosition("timeloop") ~= afflictionPrioritiesDefault["aeon"]) then
  293.                         affPrioRestore( "timeloop" )
  294.                     end
  295.                 end
  296.             end
  297.         end
  298.     end
  299. end
  300.  
  301. registerAnonymousEventHandler("depthsReset", "lost aff")
  302.  
  303. --Dragon--
  304.  
  305. function dragonHealing(event, affliction, class)
  306.     if classTimerExists("dragon") then
  307.         if event == "got aff" then
  308.             if affliction == "damagedleftleg" or affliction == "damagedrightleg" and not raid then
  309.                 if Aff.prone then
  310.                     if (affPosition("sensitivity") ~= afflictionPrioritiesDefault["aeon"]) and canSwap then
  311.                         send("curing priority sensitivity 1")
  312.                         send("curing priority asthma 2")
  313.                         send("curing priority impatience 3")
  314.                         send("curing priority paralysis 26")
  315.                         canSwap = false
  316.                     end
  317.                 end
  318.             end
  319.         end
  320.     end
  321. end
  322.  
  323. registerAnonymousEventHandler("got aff", "dragonHealing")
  324.  
  325. function dragonHealReset(event, affliction, class)
  326.     if classTimerExists("dragon") then
  327.         if event == "lost aff" then
  328.             if affliction == "sensitivity" or affliction == "damagedleftleg" or affliction == "damagedrightleg" then
  329.                 if (affPosition("sensitivity") ~= afflictionPrioritiesDefault["sensitivity"]) then
  330.                     if canSwap then
  331.                         affPrioRestore( "sensitivity" )
  332.                         affPrioRestore( "asthma" )
  333.                         affPrioRestore( "impatience" )
  334.                         affPrioRestore( "paralysis" )
  335.                         canSwap = false
  336.                     end
  337.                 end
  338.             end
  339.         end
  340.     end
  341. end
  342.  
  343. registerAnonymousEventHandler("lost aff", "dragonHealReset")
  344.  
  345.  
  346. --Jester--
  347.  
  348. function jesterHealing(event, affliction, class)
  349.     if classTimerExists("jester") then
  350.         if event == "got aff" then
  351.             if affliction == "asthma" and not raid then
  352.                 if Aff.paralysis and (Aff.clumsiness or Aff.slickness or Aff.Aeon) and (affPosition("asthma") ~= afflictionPrioritiesDefault["aeon"]) and not trueShade and not Aff.impatience then
  353.                     if affSwapped ~= "asthma" and canSwap then
  354.                         send("curing priority asthma 1")
  355.                         canSwap = false
  356.                     end
  357.                 elseif Aff.paralysis and Aff.impatience and (Aff.asthma or Aff.clumsiness or Aff.slickness) and (affPosition("impatience") ~= afflictionPrioritiesDefault["aeon"]) and not trueShade and not raid then
  358.                     if affSwapped ~= "impatience" and canSwap then
  359.                         send("curing priority impatience 1")
  360.                         canSwap = false
  361.                     end
  362.                 end
  363.             end
  364.         end
  365.     end
  366. end
  367.  
  368. registerAnonymousEventHandler("got aff", "jesterHealing")
  369. registerAnonymousEventHandler("reset aff prios", "jesterHealing")
  370.  
  371.  
  372. function jesterLost(event, affliction, class)
  373.     if classTimerExists("jester") then
  374.         if event == "lost aff" then
  375.             if affliction == "asthma" then
  376.                 if (affPosition("asthma") ~= afflictionPrioritiesDefault["asthma"]) then
  377.                     affPrioRestore( "asthma" )
  378.                     canSwap = true
  379.                 end
  380.             elseif affliction == "impatience" then
  381.                 if (affPosition("impatience") ~= afflictionPrioritiesDefault["impatience"]) then
  382.                     affPrioRestore( "impatience" )
  383.                     canSwap = true
  384.                 end
  385.             end
  386.         end
  387.     end
  388. end
  389.  
  390. registerAnonymousEventHandler("lost aff", "jesterLost")
  391.  
  392. --Magi--
  393.  
  394. function fuckSalves(event, affliction, class)
  395.     if classTimerExists("magi") then
  396.         if event == "got aff" then
  397.             if affliction == "brokenleftarm" or affliction == "brokenrightarm" then
  398.                 if (Aff.brokenleftarm or Aff.brokenrightarm) and canSwap and (affPosition("damagedleftarm") ~= afflictionPrioritiesDefault["aeon"]) and not Aff.prone then
  399.                     send("curing priority brokenleftarm 1")
  400.                     send("curing priority brokenrightarm 1")
  401.                     canSwap = false
  402.                 end
  403.             elseif affliction == "brokenleftleg" or affliction == "brokenrightleg" then
  404.                 if (Aff.brokenleftleg or Aff.brokenleftleg) and canSwap and Aff.prone and (affPosition("damagedrightleg") ~= afflictionPrioritiesDefault["aeon"]) and not Aff.damagedleftleg and not Aff.damagedrightleg then
  405.                     send("curing priority brokenrightleg 1")
  406.                     send("curing priority brokenleftleg 1")
  407.                     canSwap = false
  408.                 end
  409.             end
  410.         end
  411.     end
  412. end
  413.  
  414. registerAnonymousEventHandler("got aff", "fuckSalves")
  415. registerAnonymousEventHandler("reset aff prios", "fuckSalves")
  416.  
  417. function magiLost(event, affliction, class)
  418.     if classTimerExists("magi") then
  419.         if event == "lost aff" then
  420.             if affliction == "dehydrated" or affliction == "burning" then
  421.                 if not Aff.burning and (affPosition("burning") ~= afflictionPrioritiesDefault["burning"]) then
  422.                     affPrioRestore( "burning" )
  423.                     canSwap = true
  424.                 end
  425.             elseif affliction == "brokenleftarm" or affliction == "brokenrightarm" then
  426.                 if not Aff.brokenleftarm and not Aff.brokenrightarm and (affPosition("brokenleftarm") ~= afflictionPrioritiesDefault["brokenleftarm"]) then
  427.                     affPrioRestore( "brokenleftarm" )
  428.                     affPrioRestore( "brokenrightarm" )
  429.                 end
  430.             elseif affliction == "brokenrightleg" or affliction == "brokenleftleg" then
  431.                 if not Aff.brokenrightleg and not Aff.brokenleftleg and (affPosition("brokenrightleg") ~= afflictionPrioritiesDefault["brokenrightleg"]) then
  432.                     affPrioRestore( "brokenrightleg" )
  433.                     affPrioRestore( "brokenleftleg" )
  434.                 end
  435.             end
  436.         end
  437.     end
  438. end
  439.  
  440. registerAnonymousEventHandler("lost aff", "magiLost")
  441.  
  442. --Monk--
  443.  
  444. function monkHandling(event, affliction, class)
  445.     if event == "got aff" then
  446.         if affliction == "damagedleftarm" or affliction == "damagedhead" and not raid then
  447.             if classTimerExists("monk") then
  448.                 if (affPosition("damagedleftarm") ~= afflictionPrioritiesDefault["blindness"]) then
  449.                     if canSwap then
  450.                         send("curing priority damagedleftarm 26")
  451.                         send("curing priority damagedrightarm 26")
  452.                         send("curing priority damagedhead 26")
  453.                         canSwap = false
  454.                     end
  455.                 end
  456.             end
  457.         elseif affliction == "concussion" and not raid then
  458.             if (currentHealth/maxHealth)*100 > 65 then
  459.                 if (affPosition("concussion") ~= afflictionPrioritiesDefault["aeon"]) then
  460.                     if canSwap and Aff.damagedleftleg and Aff.damagedrightleg then
  461.                         send("curing priority concussion 2")
  462.                         canSwap = false
  463.                     end
  464.                 end
  465.             end
  466.         end
  467.     end
  468. end
  469.  
  470. registerAnonymousEventHandler("got aff", "monkHandling")
  471.  
  472. function monkDwForce(event, affliction, class)
  473.     if event == "lost def" then
  474.         if not Def.antiforce then
  475.             if gmcp.Char.Status.class == "Depthswalker" then
  476.                 if not Aff.prone and not intoned and not sys.paused then
  477.                     send("intone gaiartha")
  478.                 end
  479.             end
  480.         end
  481.     end
  482. end
  483.  
  484. registerAnonymousEventHandler("lost def", "monkDwForce")
  485.  
  486.  
  487.  
  488. function monkReset(event, affliction, class)
  489.     if event == "lost aff" then
  490.         if affliction == "prone" then
  491.             if not Aff.prone then
  492.                 if (affPosition("damagedleftarm") ~= afflictionPrioritiesDefault["damagedleftarm"]) then
  493.                     if canSwap then
  494.                         affPrioRestore("damagedleftarm")
  495.                         affPrioRestore("damagedrightarm")
  496.                         affPrioRestore("damagedhead")
  497.                         canSwap = false
  498.                     end
  499.                 end
  500.             end
  501.         elseif affliction == "concussion" then
  502.             if (affPosition("concussion") ~= afflictionPrioritiesDefault["concussion"]) then
  503.                 if canSwap then
  504.                     affPrioRestore("concussion")
  505.                     affPrioRestore("damagedleftarm")
  506.                     affPrioRestore("damagedrightarm")
  507.                     affPrioRestore("damagedhead")
  508.                     canSwap = false
  509.                 end
  510.             end
  511.         end
  512.     end
  513. end
  514.  
  515. registerAnonymousEventHandler("lost aff", "monkReset")
  516.  
  517. --Occultist--
  518.  
  519. function occieHealing(event, affliction, class)
  520.     if classTimerExists("occultist") then
  521.         if event == "got aff" then
  522.             if affliction == "lethargy" and not raid then
  523.                 if Aff.lethargy and (affPosition("lethargy") ~= afflictionPrioritiesDefault["aeon"]) then
  524.                     if affSwapped ~= "lethargy" and canSwap then
  525.                         send("curing priority lethargy 1")
  526.                         canSwap = false
  527.                     end
  528.                 end
  529.             elseif affliction == "vertigo" and not raid then
  530.                 if not Aff.lethargy then
  531.                     if (affPosition("vertigo") ~= afflictionPrioritiesDefault["aeon"]) then
  532.                         if affSwapped ~= "vertigo" and canSwap then
  533.                             send("curing priority vertigo 1")
  534.                             canSwap = false
  535.                         end
  536.                     end
  537.                 end
  538.             elseif affliction == "stupidity" and not raid then
  539.                 if (affPosition("stupidity") ~= afflictionPrioritiesDefault["aeon"]) then
  540.                     if affSwapped ~= "stupidity" and canSwap then
  541.                         send("curing priority stupidity 1")
  542.                         canSwap = false
  543.                     end
  544.                 end
  545.             elseif affliction == "lovers" and not raid then
  546.                 if (affPosition("lovers") ~= afflictionPrioritiesDefault["aeon"]) and not Aff.cadmus and not Aff.hecate then
  547.                     if canSwap then
  548.                         send("curing priority lovers 1")
  549.                         canSwap = false
  550.                     end
  551.                 end
  552.             end
  553.         end
  554.     end
  555. end
  556.  
  557. registerAnonymousEventHandler("got aff", "occieHealing")
  558. registerAnonymousEventHandler("reset aff prios", "occieHealing")
  559.  
  560. function occieCadmus(event, affliction, class)
  561.     if classTimerExists("occultist") then
  562.         if event == "got aff" then
  563.             if affliction == "cadmuscurse" then
  564.                 if settings.usefocus == true then
  565.                     send("curing focus off")
  566.                 end
  567.             end
  568.         elseif event == "lost aff" then
  569.             if affliction == "cadmusecurse" then
  570.                 if settings.usefocus == false then
  571.                     send("curing focus on")
  572.                 end
  573.             end
  574.         end
  575.     end
  576. end
  577.  
  578. registerAnonymousEventHandler("got aff", "occieCadmus")
  579. registerAnonymousEventHandler("reset aff prios", "occieCadmus")
  580.  
  581. function occieLost(event, affliction, class)
  582.     if classTimerExists("occultist") then
  583.         if event == "lost aff" then
  584.             if affliction == "lethargy" then
  585.                 if not Aff.lethargy and (affPosition("lethargy") ~= afflictionPrioritiesDefault["lethargy"]) and canSwap then
  586.                     affPrioRestore( "lethargy" )
  587.                     canSwap = true
  588.                 end
  589.             elseif affliction == "vertigo" then
  590.                 if (affPosition("vertigo") ~= afflictionPrioritiesDefault["vertigo"]) then
  591.                     affPrioRestore( "vertigo" )
  592.                     canSwap = true
  593.                 end
  594.             elseif affliction == "stupidity" then
  595.                 if (affPosition("stupidity") ~= afflictionPrioritiesDefault["stupidity"]) then
  596.                     affPrioRestore( "stupidity" )
  597.                     canSwap = true
  598.                 end
  599.             elseif affliction == "lovers" then
  600.                 if (affPosition("lovers") ~= afflictionPrioritiesDefault["lovers"]) then
  601.                     affPrioRestore( "lovers" )
  602.                     canSwap = true
  603.                 end
  604.             end
  605.         end
  606.     end
  607. end
  608.  
  609. registerAnonymousEventHandler("lost aff", "occieLost")
  610.  
  611. --Priest--
  612.  
  613. function paladinHandle(event, affliction, class)
  614.     if classTimerExists("paladin") then
  615.         if event == "got aff" then
  616.             if affliction == "hellsight" and not raid then
  617.                 if Aff.asthma and canFit then
  618.                     send("fitness")
  619.                 elseif Aff.asthma and (Aff.paralysis or Aff.stupidity or Aff.paranoia or Aff.hallucinations or Aff.asthma or Aff.slickness or Aff.dementia or Aff.weariness or Aff.sensitivity) and (affPosition("asthma") ~= afflictionPrioritiesDefault["aeon"]) and not trueShade and not canFit and not raid then
  620.                     if affSwapped ~= "impatience" and canSwap then
  621.                         send("curing priority asthma 1")
  622.                         canSwap = false
  623.                     end
  624.                 end
  625.             end
  626.             if not Def.blindness then
  627.                 if gmcp.Char.Status.class == "Blademaster" then
  628.                     if sendBlind == true or sendBlind == nil then
  629.                         send("blind")
  630.                         sendBlind = false
  631.                     end
  632.                 end
  633.             end
  634.             if not Def.deafness then
  635.                 if gmcp.Char.Status.class == "Blademaster" then
  636.                     send("deaf")
  637.                 end
  638.             end
  639.         end
  640.     end
  641. end
  642.  
  643. registerAnonymousEventHandler("got aff", "paladinHandle")
  644. registerAnonymousEventHandler("reset aff prios", "paladinHandle")
  645.  
  646. function paladinLost(event, affliction, class)
  647.     if classTimerExists("paladin") then
  648.         if event == "lost aff" then
  649.             if affliction == "hellsight" then
  650.                 if (affPosition("asthma") ~= afflictionPrioritiesDefault["asthma"]) then
  651.                     affPrioRestore( "asthma" )
  652.                     canSwap = true
  653.                 end
  654.             end
  655.         end
  656.     end
  657. end
  658.  
  659. registerAnonymousEventHandler("lost aff", "paladinLost")
  660.  
  661. --Priest--
  662.  
  663. function priestHealing(event, affliction, class)
  664.     if classTimerExists("priest") then
  665.         if event == "got aff" then
  666.             if affliction == "earthdisrupt" and not raid then
  667.                 if (affPosition("earthdisrupt") ~= afflictionPrioritiesDefault["scytherus"]) then
  668.                     if not Aff.asthma and not Aff.hellsight and canSwap then
  669.                         send("curing priority earthdisrupt 5")
  670.                         send("curing priority spiritdisrupt 5")
  671.                         send("curing priority waterdisrupt 5")
  672.                         send("curing priority airdisrupt 5")
  673.                         send("curing priority firedisrupt 5")
  674.                         send("curing priority justice 6")
  675.                         canSwap = false
  676.                     end
  677.                 end
  678.             elseif affliction == "hellsight" and not raid then
  679.                 if (affPosition("hellsight") ~= afflictionPrioritiesDefault["aeon"]) and canSwap then
  680.                     send("curing priority hellsight 1")
  681.                     send("curing priority asthma 1")
  682.                     canSwap = false
  683.                 end
  684.             elseif affliction == "asthma" and not raid then
  685.                 if Aff.asthma then
  686.                     if (affPosition("asthma") ~= afflictionPrioritiesDefault["asthma"]) and canSwap then
  687.                         send("curing priority asthma 1")
  688.                         canSwap = false
  689.                     end
  690.                 end
  691.             end
  692.         end
  693.     end
  694. end
  695.  
  696. registerAnonymousEventHandler("got aff", "priestHealing")
  697. registerAnonymousEventHandler("reset aff prios", "priestHealing")
  698.  
  699. function priestFocusing(event, affliction, class)
  700.     if classTimerExists("priest") then
  701.         if event == "got aff" then
  702.             if affliction == "spiritdisrupt" then
  703.                 if settings.usefocus == true then
  704.                     if Aff.spiritdisrupt and (Aff.earthdisrupt or Aff.waterdisrupt or Aff.airdisrupt or Aff.firedisrupt) then
  705.                         send("curing focus off")
  706.                         settings.usefocus = false
  707.                     end
  708.                 end
  709.             end
  710.         end
  711.     end
  712. end
  713.  
  714. registerAnonymousEventHandler("got aff", "priestFocusing")
  715. registerAnonymousEventHandler("reset aff prios", "priestFocusing")
  716.  
  717. function disruptLost(event, affliction, class)
  718.     if classTimerExists("priest") then
  719.         if event == "lost aff" then
  720.             if affliction == "spiritdisrupt" then
  721.                 if not Aff.spiritdisrupt and not settings.usefocus then
  722.                     send("curing focus on")
  723.                     settings.usefocus = true
  724.                 end
  725.             elseif affliction == "earthdisrupt" then
  726.                 if (affPosition("earthdisrupt") ~= afflictionPrioritiesDefault["earthdisrupt"]) then
  727.                     if not Aff.spiritdisrupt then
  728.                         affPrioRestore( "earthdisrupt" )
  729.                         canSwap = true
  730.                     end
  731.                 end
  732.             elseif affliction == "waterdisrupt" then
  733.                 if (affPosition("waterdisrupt") ~= afflictionPrioritiesDefault["waterdisrupt"]) then
  734.                     if not Aff.earthdisrupt then
  735.                         affPrioRestore( "waterdisrupt" )
  736.                         canSwap = true
  737.                     end
  738.                 end
  739.             elseif affliction == "firedisrupt" then
  740.                 if (affPosition("firedisrupt") ~= afflictionPrioritiesDefault["firedisrupt"]) then
  741.                     if not Aff.earthdisrupt then
  742.                         affPrioRestore( "firedisrupt" )
  743.                         canSwap = true
  744.                     end
  745.                 end
  746.             elseif affliction == "airdisrupt" then
  747.                 if (affPosition("airdisrupt") ~= afflictionPrioritiesDefault["airdisrupt"]) then
  748.                     if not Aff.earthdisrupt then
  749.                         affPrioRestore( "airdisrupt" )
  750.                         canSwap = true
  751.                     end
  752.                 end
  753.             elseif affliction == "hellsight" then
  754.                 if (affPosition("hellsight") ~= afflictionPrioritiesDefault["hellsight"]) then
  755.                     if not Aff.hellsight then
  756.                         affPrioRestore( "hellsight" )
  757.                         affPrioRestore( "asthma" )
  758.                         canSwap = true
  759.                     end
  760.                 end
  761.             end
  762.         end
  763.     end
  764. end
  765.  
  766. registerAnonymousEventHandler("lost aff", "disruptLost")
  767.  
  768. function priestManaHandling(event, affliction, class)
  769.     prioMana = (tonumber(currentMana/maxMana)*100)
  770.     prioHealth = (tonumber(currentHealth/maxHealth)*100)
  771.         if classTimerExists("priest") then
  772.             if event == "got aff" then
  773.                 if manaPrio then
  774.                     if prioMana > 80 and not Aff.inquisition then
  775.                         send("curing priority health")
  776.                         healthPrio = true
  777.                         manaPrio = false
  778.                     elseif prioMana > 80 and Aff.inquisition then
  779.                         send("curing priority health")
  780.                         healthPrio = true
  781.                         manaPrio = false
  782.                     end
  783.                 elseif healthPrio then
  784.                     if not Aff.inquisition then
  785.                         if prioMana <= 72 then
  786.                             send("curing priority mana")
  787.                             manaPrio = true
  788.                             healthPrio = false
  789.                         end
  790.                     elseif Aff.inquisition then
  791.                         if prioMana <= 75 then
  792.                             send("curing priority mana")
  793.                             manaPrio = true
  794.                             healthPrio = false
  795.                     end
  796.                 end
  797.             end
  798.         end
  799.     end
  800. end
  801.  
  802. registerAnonymousEventHandler("got aff", "priestManaHandling")
  803. registerAnonymousEventHandler("reset aff prios", "priestManaHandling")
  804.  
  805. --Sentinel--
  806.  
  807. function sentinelHealing(event, affliction, class)
  808.     if classTimerExists("sentinel") then
  809.         if event == "got aff" then
  810.             if affliction == "impatience" and not raid then
  811.                 if Aff.impatience and Aff.paralysis and (Aff.stupidity or Aff.paranoia or Aff.hallucinations or Aff.dementia or Aff.dizziness or Aff.epilepsy or Aff.confusion) and (affPosition("impatience") ~= afflictionPrioritiesDefault["aeon"]) and not trueShade then
  812.                     if canSwap then
  813.                         send("curing priority impatience 1")
  814.                         canSwap = false
  815.                     end
  816.                     if not Def.blindness then
  817.                         if gmcp.Char.Status.class == "Blademaster" then
  818.                             send("blind")
  819.                         end
  820.                     end
  821.                 end
  822.             elseif affliction == "prone" and not raid then
  823.                 if Aff.prone and (Aff.damagedleftleg or Aff.damagedrightleg) then
  824.                     if not Def.deafness then
  825.                         send("curing priority defense deafness 1")
  826.                     end
  827.                 end
  828.             end
  829.         end
  830.     end
  831. end
  832.  
  833. registerAnonymousEventHandler("got aff", "sentinelHealing")
  834. registerAnonymousEventHandler("reset aff prios", "sentinelHealing")
  835.  
  836. function sentinelLost(event, affliction, class)
  837.     if classTimerExists("sentinel") then
  838.         if event == "lost aff" then
  839.             if affliction == "impatience" then
  840.                 if (affPosition("impatience") ~= afflictionPrioritiesDefault["impatience"]) then
  841.                     affPrioRestore( "impatience" )
  842.                     canSwap = true
  843.                 end
  844.             end
  845.         end
  846.     end
  847. end
  848.  
  849. registerAnonymousEventHandler("lost aff", "sentinelLost")
  850.  
  851. --Serpent--
  852.  
  853. function serpentHealing(event, affliction, class)
  854.     if classTimerExists("serpent") then
  855.         if event == "got aff" then
  856.             if affliction == "asthma" and not raid then
  857.                 if Aff.paralysis and (Aff.weariness or Aff.sensitivity or Aff.hypochondria or Aff.clumsiness or Aff.lethargy or Aff.addiction or Aff.darkshade) and (Aff.weariness or Aff.sensitivity or Aff.hypochondria or Aff.clumsiness or Aff.lethargy or Aff.addiction or Aff.darkshade) and (affPosition("asthma") ~= afflictionPrioritiesDefault["aeon"]) and not trueShade and not Aff.impatience then
  858.                     if canSwap then
  859.                         send("curing priority asthma 1")
  860.                         send("curing priority hypochondria 2")
  861.                         send("curing priority impatience 3")
  862.                         canSwap = false
  863.                     end
  864.                 end
  865.             elseif affliction == "paralysis" and not raid then
  866.                 if Aff.asthma and (Aff.weariness or Aff.sensitivity or Aff.clumsiness or Aff.hypochondria) and (Aff.weariness or Aff.sensitivity or Aff.clumsiness or Aff.hypochondria) and (affPosition("asthma") ~= afflictionPrioritiesDefault["aeon"]) then
  867.                     if canSwap then
  868.                         send("curing priority asthma 1")
  869.                         canSwap = false
  870.                     end
  871.                 end
  872.             elseif affliction == "impatience" and not raid then
  873.                 if Aff.asthma and (Aff.weariness or Aff.sensitivity or Aff.hypochondria or Aff.clumsiness or Aff.asthma or Aff.lethargy or Aff.addiction or Aff.darkshade) and (affPosition("impatience") ~= afflictionPrioritiesDefault["aeon"]) then
  874.                     if canSwap then
  875.                         send("curing priority impatience 1")
  876.                         send("curing priority asthma 2")
  877.                         send("curing priority hypochondria 3")
  878.                         canSwap = false
  879.                     end
  880.                 end
  881.             elseif affliction == "scytherus" and not raid then
  882.                 if not Aff.anorexia and not Aff.impatience and not Aff.hypochondria and (affPosition("scytherus") ~= afflictionPrioritiesDefault["aeon"]) and not trueShade then
  883.                     if canSwap then
  884.                         send("curing priority scytherus 1")
  885.                         canSwap = false
  886.                     end
  887.                 end
  888.             elseif affliction == "slickness" and not raid then
  889.                 if Aff.asthma and Aff.paralysis and (Aff.weariness or Aff.clumsiness or Aff.sensitivity) and (affPosition("asthma") ~= afflictionPrioritiesDefault["aeon"]) and not trueShade then
  890.                     if canSwap then
  891.                         send("curing priority asthma 1")
  892.                         canSwap = false
  893.                     end
  894.                 elseif Aff.asthma and Aff.slickness and Aff.impatience and (affPosition("impatience") ~= afflictionPrioritiesDefault["aeon"]) then
  895.                     if canSwap then
  896.                         send("curing priority impatience 1")
  897.                         canSwap = false
  898.                     end
  899.                 end
  900.             elseif affliction == "hypochondria" and not raid then
  901.                 if (affPosition("hypochondria") ~= afflictionPrioritiesDefault["aeon"]) then
  902.                     if canSwap then
  903.                         send("curing priority hypochondria 1")
  904.                         canSwap = false
  905.                     end
  906.                 end
  907.             end
  908.         end
  909.     end
  910. end
  911.  
  912. registerAnonymousEventHandler("got aff", "serpentHealing")
  913. registerAnonymousEventHandler("reset aff prios", "serpentHealing")
  914.  
  915. function serpentLost(event, affliction, class)
  916.     if classTimerExists("serpent") then
  917.         if event == "lost aff" then
  918.             if affliction == "asthma" then
  919.                 if (affPosition("asthma") ~= afflictionPrioritiesDefault["asthma"]) then
  920.                     affPrioRestore( "asthma" )
  921.                     canSwap = true
  922.                 end
  923.             elseif affliction == "impatience" then
  924.                 if (affPosition("impatience") ~= afflictionPrioritiesDefault["impatience"]) then
  925.                     affPrioRestore( "impatience" )
  926.                     canSwap = true
  927.                 end
  928.             elseif affliction == "scytherus" then
  929.                 if (affPosition("scytherus") ~= afflictionPrioritiesDefault["scytherus"]) then
  930.                     affPrioRestore( "scytherus" )
  931.                     canSwap = true
  932.                 end
  933.             elseif affliction == "hypochondria" then
  934.                 if (affPosition("hypochondria") ~= afflictionPrioritiesDefault["hypochondria"]) then
  935.                     affPrioRestore( "hypochondria" )
  936.                     canSwap = true
  937.                 end
  938.             end
  939.         end
  940.     end
  941. end
  942.  
  943. registerAnonymousEventHandler("lost aff", "serpentLost")
  944.  
  945. --Shikudo--
  946.  
  947. function shikudoHandling(event, affliction, class)
  948.     if event == "got aff" then
  949.         if affliction == "asthma" then
  950.             if classTimerExists("shikudo") then
  951.                 if (affPosition("slickness") ~= afflictionPrioritiesDefault["aeon"]) and canSwap then
  952.                     send("curing priority slickness 1")
  953.                     canSwap = false
  954.                 end
  955.             end
  956.         end
  957.     end
  958. end
  959.  
  960. registerAnonymousEventHandler("got aff", "shikudoHandling")
  961.  
  962.  
  963. function shikudoReset(event, affliction, class)
  964.     if event == "lost aff" then
  965.         if affliction == "asthma" then
  966.             if classTimerExists("shikudo") then
  967.                 if (affPosition("slickness") ~= afflictionPrioritiesDefault["slickness"]) then
  968.                     affPrioRestore("slickness")
  969.                 end
  970.             end
  971.         end
  972.     end
  973. end
  974.  
  975. registerAnonymousEventHandler("lost off", "shikudoReset")
  976.  
  977. --SnB--
  978.  
  979. function snbHealing(event, affliction, class)
  980.     if classTimerExists("SnB") then
  981.         if event == "got aff" then
  982.             if affliction == "asthma" and not raid then
  983.                 if Aff.paralysis and Aff.asthma and (Aff.clumsiness or Aff.sensitivity or Aff.weariness) and (Aff.clumsiness or Aff.sensitivity or Aff.weariness) and (affPosition("asthma") ~= afflictionPrioritiesDefault["aeon"]) then
  984.                     if canSwap then
  985.                         send("curing priority asthma 1")
  986.                         canSwap = false
  987.                     end
  988.                 end
  989.             elseif affliction == "prone" and not raid then
  990.                 if Aff.sensitivity and (Aff.asthma or Aff.weariness or Aff.clumsiness or Aff.slickness) and (affPosition("sensitivity") ~= afflictionPrioritiesDefault["aeon"]) then
  991.                     if (Aff.damagedleftleg or Aff.damagedrightleg) then
  992.                         if canSwap then
  993.                             send("curing priority sensitivity 1")
  994.                             canSwap = false
  995.                         end
  996.                     end
  997.                 elseif Aff.paralysis and (Aff.asthma or Aff.slickness or Aff.anorexia) and Aff.prone and sys.bals.focus then
  998.                     if (affPosition("paralysis") ~= afflictionPrioritiesDefault["paralysis"]) then
  999.                         if canSwap then
  1000.                             send("curing priority paralysis 2")
  1001.                             canSwap = false
  1002.                         end
  1003.                     end
  1004.                 end
  1005.             end
  1006.         end
  1007.     end
  1008. end
  1009.  
  1010. registerAnonymousEventHandler("got aff", "snbHealing")
  1011. registerAnonymousEventHandler("reset aff prios", "snbHealing")
  1012.  
  1013. function snbLost(event, affliction, class)
  1014.     if classTimerExists("SnB") then
  1015.         if event == "lost aff" then
  1016.             if affliction == "asthma" then
  1017.                 if not Aff.asthma and (affPosition("asthma") ~= afflictionPrioritiesDefault["asthma"]) then
  1018.                     affPrioRestore( "asthma" )
  1019.                     canSwap = true
  1020.                 end
  1021.             elseif affliction == "prone" then
  1022.                 if not Aff.prone and not Aff.weariness and (affPosition("sensitivity") ~= afflictionPrioritiesDefault["sensitivity"]) then
  1023.                     affPrioRestore( "sensitivity" )
  1024.                     canSwap = true
  1025.                 end
  1026.             end
  1027.         end
  1028.     end
  1029. end
  1030.  
  1031. registerAnonymousEventHandler("lost aff", "snbLost")
  1032.  
  1033. --Sylvan--
  1034.  
  1035. function sylvanHealing(event, affliction, class)
  1036.     if classTimerExists("sylvan") then
  1037.         if event == "got aff" then
  1038.             if affliction == "asthma" and not raid then
  1039.                 if Aff.paralysis and (Aff.clumsiness or Aff.sensitivity or Aff.weariness or Aff.healthleech) and (affPosition("asthma") ~= afflictionPrioritiesDefault["aeon"]) then
  1040.                     if canSwap then
  1041.                         send("curing priority asthma 1")
  1042.                         canSwap = false
  1043.                     end
  1044.                 elseif Aff.paralysis and Aff.impatience and (Aff.clumsiness or Aff.sensitivity or Aff.asthma or Aff.weariness or Aff.healthleech) and (affPosition("impatience") ~= afflictionPrioritiesDefault["aeon"]) then
  1045.                     if canSwap then
  1046.                         send("curing priority impatience 1")
  1047.                         canSwap = false
  1048.                     end
  1049.                 end
  1050.             elseif affliction == "damagedleftarm" or affliction == "damagedrightarm" and not raid then
  1051.                 if (affPosition("damagedleftarm") ~= afflictionPrioritiesDefault["blindness"]) and canSwap then
  1052.                     send("curing priority damagedleftarm 26")
  1053.                     send("curing priority damagedrightarm 26")
  1054.                     send("curing priority damagedhead 26")
  1055.                     canSwap = false
  1056.                 end
  1057.             end
  1058.         end
  1059.     end
  1060. end
  1061.  
  1062. registerAnonymousEventHandler("got aff", "sylvanHealing")
  1063. registerAnonymousEventHandler("reset aff prios", "sylvanHealing")
  1064.  
  1065. function sylvanLost(event, affliction, class)
  1066.     if classTimerExists("sylvan") then
  1067.         if event == "lost aff" then
  1068.             if affliction == "asthma" then
  1069.                 if (affPosition("asthma") ~= afflictionPrioritiesDefault["asthma"]) then
  1070.                     affPrioRestore( "asthma" )
  1071.                     canSwap = true
  1072.                 end
  1073.             elseif affliction == "prone" then
  1074.                 if (affPosition("damagedleftarm") ~= afflictionPrioritiesDefault["damagedleftarm"]) and canSwap then
  1075.                     affPrioRestore( "damagedleftarm" )
  1076.                     affPrioRestore( "damagedrightarm" )
  1077.                     affPrioRestore( "damagedhead" )
  1078.                     canSwap = true
  1079.                 end
  1080.             elseif affliction == "impatience" then
  1081.                 if (affPosition("impatience") ~= afflictionPrioritiesDefault["impatience"]) then
  1082.                     affPrioRestore( "impatience" )
  1083.                     canSwap = true
  1084.                 end
  1085.             end
  1086.         end
  1087.     end
  1088. end
  1089.  
  1090. registerAnonymousEventHandler("lost aff", "sylvanLost")
  1091.  
  1092. --Active Curing Script--
  1093.  
  1094. -----------------------------Phoenix for affliction----------------------------------------
  1095. function impatienceNoTreeGained2(event, affliction, class)
  1096.     if event == "got aff" then
  1097.         if affliction == "impatience" or affliction == "asthma" or affliction == "anorexia" or affliction == "slickness" then
  1098.             if gmcp.Char.Status.class == "Blademaster" and Aff.paralysis and Aff.asthma and Aff.slickness and Aff.anorexia and Aff.weariness and stats.shin > "85" and sys.bals.b and sys.bals.e and not Aff.prone and not sys.retard then
  1099.                     send("shin phoenix")
  1100.            elseif Aff.paralysis and Aff.asthma and Aff.slickness and Aff.anorexia and Aff.impatience and sys.bals.b and sys.bals.e and gmcp.Char.Status.race == "Dragon" and dheal and not Aff.recklessness and not sys.retard then
  1101.                     send("dragonheal")
  1102.                     dheal = false
  1103.            elseif Aff.paralysis and Aff.asthma and Aff.impatience and gmcp.Char.Status.class == "Serpent" and shrug and sys.bals.b and sys.bals.e and not Aff.weariness and not sys.retard then
  1104.                     send("shrugging")
  1105.                     shrug = false
  1106.             elseif Aff.prone and Aff.anorexia and Aff.impatience and shaman and gmcp.Char.Status.class == "Serpent" and shrug and sys.bals.b and sys.bals.e and not Aff.weariness and not sys.retard then
  1107.                     send("shrugging")
  1108.                     shrug = false
  1109.             elseif (gmcp.Char.Status.class == "Blademaster" or gmcp.Char.Status.class == "Paladin" or gmcp.Char.Status.class == "Runewarden") and Aff.Anorexia and Aff.impatience and Aff.paralysis and Aff.asthma and sys.bals.b and sys.bals.e and canFit and (gmcp.Char.Status.class == "Paladin" or gmcp.Char.Status.class == "Blademaster") and not Aff.weariness and not sys.retard then
  1110.                     send("fitness")
  1111.                     canFit = false
  1112.             elseif gmcp.Char.Status.class == "Jester" and Aff.asthma and Aff.slickness and Aff.anorexia and not Aff.paralysis and not Aff.prone then
  1113.                     send("fling fool at me")
  1114.             elseif gmcp.Char.Status.class == "Depthswalker" and Aff.asthma and Aff.slickness and Aff.anorexia and not Aff.recklessness and sys.bals.e and sys.bals.b and canAcc then
  1115.                     send("chrono accelerate boost")
  1116.                     canAcc = false
  1117.             end
  1118.         end
  1119.     end
  1120. end --func
  1121.  
  1122. registerAnonymousEventHandler("got aff", "impatienceNoTreeGained2")
  1123. registerAnonymousEventHandler("reset aff prios", "impatienceNoTreeGained2")
  1124.  
  1125. function impatienceLost2(event, affliction)
  1126.     if event == "lost aff" then
  1127.         if affliction == "impatience" then
  1128.             if (affPosition("impatience") ~= afflictionPrioritiesDefault["impatience"]) and not Aff.impatience then
  1129.                 send("curing priority impatience 3")
  1130.                 canSwap = true
  1131.             end
  1132.         end
  1133.     end
  1134. end --func
  1135.  
  1136. registerAnonymousEventHandler("lost aff", "impatienceLost2")
  1137.  
  1138. --Alleviate--
  1139.  
  1140. function alleviateHandling(event, affliction, class)
  1141.     if event == "got aff" then
  1142.         if Aff.asthma and (Aff.weariness or Aff.clumsiness or Aff.sensitivity or Aff.lethargy or Aff.dementia or Aff.addiction or Aff.darkshade) and (Aff.weariness or Aff.clumsiness or Aff.sensitivity or Aff.lethargy or Aff.dementia or Aff.addiction or Aff.darkshade) then
  1143.             if sys.bals.a and gmcp.Char.Status.class == "Blademaster" and not Aff.paralysis  and not (Aff.brokenleftarm or Aff.damagedleftarm or Aff.brokenrightarm or Aff.damagedrightarm) and not (Aff.brokenleftarm or Aff.damagedleftarm or Aff.brokenrightarm or Aff.damagedrightarm) then
  1144.                 if sys.bals.b and sys.bals.e and not Aff.aeon and not Aff.stupidity then
  1145.                     send("alleviate")
  1146.                     sys.bals.a = false
  1147.                 elseif sys.bals.b and sys.bals.e and not Aff.aeon and Aff.stupidity then
  1148.                     send("alleviate")
  1149.                     send("alleviate")
  1150.                     send("alleviate")
  1151.                     send("alleviate")
  1152.                     sys.bals.a = false
  1153.                 end
  1154.             end
  1155.         elseif (Aff.damagedleftleg or Aff.damagedrightleg) and Aff.impatience and Aff.anorexia then
  1156.             if sys.bals.a and gmcp.Char.Status.class == "Blademaster" and not Aff.paralysis and not (Aff.brokenleftarm or Aff.damagedleftarm or Aff.brokenrightarm or Aff.damagedrightarm) and not (Aff.brokenleftarm or Aff.damagedleftarm or Aff.brokenrightarm or Aff.damagedrightarm) then
  1157.                 if sys.bals.b and sys.bals.e then
  1158.                     if not sys.bals.salve and not Aff.aeon then
  1159.                         send("alleviate")
  1160.                     end
  1161.                 end
  1162.             end
  1163.         end
  1164.     end
  1165. end
  1166.  
  1167. registerAnonymousEventHandler("got aff", "alleviateHandling")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement