Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.79 KB | None | 0 0
  1. curing={}
  2. curing.__index = curing
  3.  
  4. function curing.init()
  5. local self=setmetatable({},curing)
  6. attemptCures={}
  7.  
  8. self.herbBalance=tonumber(gmcp.Char.Vitals.herb)
  9. self.salveBalance=tonumber(gmcp.Char.Vitals.salve)
  10. self.pipeBalance=tonumber(gmcp.Char.Vitals.pipe)
  11. self.treeBalance=tonumber(gmcp.Char.Vitals.tree)
  12. self.renewBalance=tonumber(gmcp.Char.Vitals.renew)
  13. self.elixirBalance=tonumber(gmcp.Char.Vitals.affelixir)
  14. self.focusBalance=tonumber(gmcp.Char.Vitals.focus)
  15. attemptHerb=false
  16. attemptSalve=false
  17. attemptPipe=false
  18. attemptTree=false
  19. attemptFocus=false
  20. attemptRenew=false
  21. attemptElixir=false
  22. attemptWrithe=false
  23. self.writhing=false
  24.  
  25.  
  26. return self
  27. end
  28.  
  29.  
  30. function curing.reset(self)
  31. self.herbBalance=tonumber(gmcp.Char.Vitals.herb)
  32. self.salveBalance=tonumber(gmcp.Char.Vitals.salve)
  33. self.pipeBalance=tonumber(gmcp.Char.Vitals.pipe)
  34. self.treeBalance=tonumber(gmcp.Char.Vitals.tree)
  35. self.renewBalance=tonumber(gmcp.Char.Vitals.renew)
  36. self.elixirBalance=tonumber(gmcp.Char.Vitals.affelixir)
  37. self.focusBalance=tonumber(gmcp.Char.Vitals.focus)
  38. attemptHerb=false
  39. attemptCures={}
  40. attemptSalve=false
  41. attemptPipe=false
  42. attemptTree=false
  43. attemptFocus=false
  44. attemptRenew=false
  45. attemptElixir=false
  46. attemptWrithe=false
  47. self.writhing=false
  48.  
  49. end
  50.  
  51. function curing.update(self)
  52. self.herbBalance=tonumber(gmcp.Char.Vitals.herb)
  53. self.salveBalance=tonumber(gmcp.Char.Vitals.salve)
  54. self.pipeBalance=tonumber(gmcp.Char.Vitals.pipe)
  55. self.treeBalance=tonumber(gmcp.Char.Vitals.tree)
  56. self.renewBalance=tonumber(gmcp.Char.Vitals.renew)
  57. self.elixirBalance=tonumber(gmcp.Char.Vitals.affelixir)
  58. self.focusBalance=tonumber(gmcp.Char.Vitals.focus)
  59.  
  60. end
  61.  
  62.  
  63. function curing.cureAll(self, myaff)
  64. local cureTable={
  65. ["magic_impaired"] = { ["Herb"] = {"Kelp"},},
  66. ["writhe_necklock"] = { ["Special"] = {"Writhe"},},
  67. ["infernal_shroud"] = { },
  68. ["anorexia"] = { ["Salve"] = {"Epidermal to Torso"},},
  69. ["mistbrand"] = { },
  70. ["epilepsy"] = { ["Herb"] = {"Goldenseal"},},
  71. ["hatred"] = { ["Herb"] = {"Ash"},},
  72. ["premonition"] = { },
  73. ["left_leg_bruised_moderate"] = { ["Salve"] = {"Mending to Left leg"},},
  74. ["spiritbrand"] = { },
  75. ["weariness"] = { ["Herb"] = {"Kelp"},},
  76. ["forestbrand"] = { },
  77. ["electric_weakness"] = { },
  78. ["sandrot"] = { ["Herb"] = {"Bloodroot"},},
  79. ["conviction"] = { },
  80. ["fire_weakness"] = { },
  81. ["bloodlust"] = { },
  82. ["numbed_skin"] = { },
  83. ["battle_hunger"] = { },
  84. ["right_arm_damaged"] = { ["Salve"] = {"Restoration to right arm"},},
  85. ["impatience"] = { ["Herb"] = {"Goldenseal"},},
  86. ["shadowbrand"] = { },
  87. ["right_leg_broken"] = { ["Salve"] = {"Mending to right leg"},},
  88. ["commitment_fear"] = { ["Herb"] = {"Lobelia"},},
  89. ["left_leg_damaged"] = { ["Salve"] = {"Restoration to Left leg"},},
  90. ["left_arm_mangled"] = { ["Salve"] = {"Restoration to Left leg"},},
  91. ["head_mangled"] = { ["Salve"] = {"Restoration to Head"},},
  92. ["right_arm_bruised_critical"] = { ["Salve"] = {"Mending to right arm"},},
  93. ["blackout"] = { },
  94. ["troubled_breathing"] = { },
  95. ["selarnia"] = { ["Herb"] = {"Goldenseal"},["Salve"] = {"Mending to Torso"},},
  96. ["windbrand"] = { },
  97. ["crippled_throat"] = { ["Salve"] = {"Mending to Head"},},
  98. ["edict_shadowburn"] = { },
  99. ["vitalbane"] = { },
  100. ["writhe_impaled"] = { ["Special"] = {"Writhe"},},
  101. ["writhe_feed"] = { ["Special"] = {"Writhe"},},
  102. ["right_leg_dislocated"] = { ["Salve"] = {"Mending to right leg"},},
  103. ["writhe_vines"] = { ["Special"] = {"Writhe"},},
  104. ["wraith"] = { },
  105. ["oiled"] = { ["Special"] = {"Scrub"},},
  106. ["haemophilia"] = { ["Herb"] = {"Ginseng"},},
  107. ["shivering"] = { ["Salve"] = {"Caloric to Torso"},},
  108. ["soul_poison"] = { },
  109. ["left_leg_numbed"] = { },
  110. ["withering"] = { ["Smoke"] = {"Elm"},},
  111. ["effused_blood"] = { ["Salve"] = {"Epidermal to Torso"},},
  112. ["umbrage"] = { },
  113. ["dissonance"] = { ["Herb"] = {"Goldenseal"},},
  114. ["writhe_ropes"] = { ["Special"] = {"Writhe"},},
  115. ["right_arm_mangled"] = { ["Salve"] = {"Restoration to right arm"},},
  116. ["weakvoid"] = { },
  117. ["thorns"] = { },
  118. ["burnt_skin"] = { ["Salve"] = {"Restoration to Torso"},},
  119. ["voyria"] = { },
  120. ["addiction"] = { ["Herb"] = {"Ginseng"},},
  121. ["glasslimb"] = { },
  122. ["soulpuncture"] = { },
  123. ["head_bruised"] = { ["Salve"] = {"Mending to Head"},},
  124. ["void"] = { },
  125. ["distortion"] = { },
  126. ["heartflutter"] = { ["Herb"] = {"Bloodroot"},},
  127. ["masochism"] = { ["Herb"] = {"Lobelia"},},
  128. ["vinethorns"] = { },
  129. ["vertigo"] = { ["Herb"] = {"Lobelia"},},
  130. ["destroyed_throat"] = { ["Salve"] = {"Mending to Head"},},
  131. ["edict_stasis"] = { },
  132. ["sunlight_allergy"] = { ["Herb"] = {"Ginseng"},},
  133. ["hypertension"] = { },
  134. ["left_arm_amputated"] = { ["Salve"] = {"Restoration to left arm"},},
  135. ["unconscious"] = { },
  136. ["umbrage_curse"] = { },
  137. ["aeon"] = { ["Smoke"] = {"Elm"},},
  138. ["writhe_transfix"] = { ["Special"] = {"Writhe"},},
  139. ["mind_blank"] = { },
  140. ["torso_mangled"] = { ["Salve"] = {"Restoration to Torso"},},
  141. ["peace"] = { ["Herb"] = {"Bellwort"},},
  142. ["stupidity"] = { ["Herb"] = {"Goldenseal"},},
  143. ["hubris"] = { ["Herb"] = {"Bellwort"},},
  144. ["torso_deepwound"] = { },
  145. ["torso_damaged"] = { ["Salve"] = {"Restoration to Torso"},},
  146. ["agoraphobia"] = { ["Herb"] = {"Lobelia"},},
  147. ["torso_bruised_moderate"] = { ["Salve"] = {"Mending to Torso"},},
  148. ["penance"] = { },
  149. ["berserking"] = { ["Herb"] = {"Lobelia"},},
  150. ["torso_bruised_critical"] = { ["Salve"] = {"Mending to Torso"},},
  151. ["dementia"] = { ["Herb"] = {"Ash"},},
  152. ["edict_reckoning"] = { },
  153. ["torso_bruised"] = { ["Salve"] = {"Mending to Torso"},},
  154. ["crippled"] = { ["Herb"] = {"Bloodroot"},},
  155. ["corsin_weight"] = { },
  156. ["belonephobia"] = { },
  157. ["right_arm_numbed"] = { },
  158. ["thunderstorm"] = { },
  159. ["left_arm_damaged"] = { ["Salve"] = {"Restoration to left arm"},},
  160. ["blurry_vision"] = { ["Salve"] = {"Epidermal"},},
  161. ["throatslice"] = { },
  162. ["throatclaw"] = { ["Salve"] = {"Mending to Head"},},
  163. ["wasting"] = { ["Herb"] = {"Ginseng"},},
  164. ["spiritbane"] = { },
  165. ["numb_arms"] = { },
  166. ["stun"] = { },
  167. ["muddled"] = { },
  168. ["no_blindness"] = { },
  169. ["left_arm_numbed"] = { },
  170. ["asleep"] = { ["Special"] = {"Wake"},},
  171. ["sensitivity"] = { ["Herb"] = {"Kelp"},},
  172. ["mindclamped"] = { },
  173. ["unconsciousness"] = { },
  174. ["indifference"] = { ["Salve"] = {"Epidermal to Head"},},
  175. ["stuttering"] = { ["Salve"] = {"Epidermal to Head"},},
  176. ["left_leg_deepwound"] = { },
  177. ["disturb_confidence"] = { },
  178. ["blighted"] = { ["Herb"] = {"Ash"},},
  179. ["shyness"] = { ["Herb"] = {"Goldenseal"},},
  180. ["stonevice"] = { },
  181. ["stonebrand"] = { },
  182. ["pacifism"] = { ["Herb"] = {"Bellwort"},},
  183. ["soulroot"] = { },
  184. ["spinal_rip"] = { ["Salve"] = {"Restoration to Torso"},},
  185. ["right_arm_dislocated"] = { ["Salve"] = {"Mending to right arm"},},
  186. ["right_leg_bruised_moderate"] = { ["Salve"] = {"Mending to right leg"},},
  187. ["vomiting"] = { ["Herb"] = {"Ginseng"},},
  188. ["soulfire"] = { ["Herb"] = {"Bellwort"},},
  189. ["hypersomnia"] = { ["Herb"] = {"Ash"},},
  190. ["shadow_coat"] = { },
  191. ["generosity"] = { ["Herb"] = {"Bellwort"},},
  192. ["hepafarin"] = { },
  193. ["left_leg_bruised_critical"] = { ["Salve"] = {"Mending to left leg"},},
  194. ["smashed_throat"] = { ["Salve"] = {"Restoration to Head"},},
  195. ["stormtouched"] = { },
  196. ["cracked_ribs"] = { ["Salve"] = {"Mending to Torso"},},
  197. ["confusion"] = { ["Herb"] = {"Ash"},},
  198. ["slickness"] = { ["Smoke"] = {"Valerian"},["Herb"] = {"Bloodroot"},},
  199. ["soulchill"] = { },
  200. ["limp_veins"] = { ["Herb"] = {"Kelp"},},
  201. ["superstition"] = { ["Herb"] = {"Bellwort"},},
  202. ["recklessness"] = { ["Herb"] = {"Lobelia"},},
  203. ["hellsight"] = { ["Smoke"] = {"Elm"},},
  204. ["writhe_thighlock"] = { ["Special"] = {"Writhe"},},
  205. ["sand_trapped"] = { },
  206. ["emberbrand"] = { },
  207. ["effused_phlegm"] = { ["Salve"] = {"Epidermal to Torso"},},
  208. ["resin_glauxe"] = { },
  209. ["attuned"] = { },
  210. ["ripped_throat"] = { },
  211. ["infested"] = { ["Herb"] = {"Goldenseal"},},
  212. ["ripped_spleen"] = { },
  213. ["left_arm_dislocated"] = { ["Salve"] = {"Mending to left arm"},},
  214. ["left_arm_bruised"] = { ["Salve"] = {"Mending to left arm"},},
  215. ["ripped_groin"] = { },
  216. ["right_leg_numbed"] = { },
  217. ["ablaze"] = { ["Salve"] = {"Mending to Torso"},},
  218. ["right_leg_mangled"] = { ["Salve"] = {"Restoration to right leg"},},
  219. ["frozen_feet"] = { },
  220. ["writhe_bind"] = { ["Special"] = {"Writhe"},},
  221. ["right_leg_deepwound"] = { },
  222. ["right_leg_amputated"] = { ["Salve"] = {"Restoration to right leg"},},
  223. ["right_leg_damaged"] = { ["Salve"] = {"Restoration to right leg"},},
  224. ["left_leg_amputated"] = { ["Salve"] = {"Restoration to left leg"},},
  225. ["edict_absorption"] = { },
  226. ["lovers_effect"] = { ["Herb"] = {"Bellwort"},},
  227. ["infernal_seal"] = { },
  228. ["blindness"] = { },
  229. ["right_leg_bruised"] = { ["Salve"] = {"Mending to right leg"},},
  230. ["left_arm_broken"] = { ["Salve"] = {"Mending to left arm"},},
  231. ["right_arm_missing"] = { },
  232. ["soul_disease"] = { },
  233. ["collapsed_lung"] = { ["Salve"] = {"Restoration to Torso"},},
  234. ["right_arm_bruised_moderate"] = { ["Salve"] = {"Mending to right arm"},},
  235. ["writhe_armpitlock"] = { ["Special"] = {"Writhe"},},
  236. ["head_bruised_critical"] = { ["Salve"] = {"Mending to Head"},},
  237. ["head_bruised_moderate"] = { ["Salve"] = {"Mending to Head"},},
  238. ["right_arm_bruised"] = { ["Salve"] = {"Mending to right arm"},},
  239. ["amnesia"] = { },
  240. ["paranoia"] = { ["Herb"] = {"Ash"},},
  241. ["right_arm_amputated"] = { ["Salve"] = {"Restoration to right arm"},},
  242. ["resonance"] = { },
  243. ["plodding"] = { ["Herb"] = {"Moss"},},
  244. ["sadness"] = { ["Herb"] = {"Ash"},},
  245. ["right_arm_broken"] = { ["Salve"] = {"Mending to right arm"},},
  246. ["quicksand"] = { },
  247. ["physical_disruption"] = { ["Herb"] = {"Ginseng"},},
  248. ["petrified"] = { },
  249. ["frozen"] = { ["Salve"] = {"Caloric to Torso"},},
  250. ["blood_curse"] = { ["Herb"] = {"Ash"},},
  251. ["crushed_kneecaps"] = { ["Salve"] = {"Mending to Legs"},},
  252. ["edict_heretic"] = { },
  253. ["paresis"] = { ["Herb"] = {"Bloodroot"},},
  254. ["mob_impaled"] = { ["Special"] = {"Writhe"},},
  255. ["rend"] = { ["Herb"] = {"Ginseng"},},
  256. ["paralysis"] = { ["Herb"] = {"Bloodroot"},},
  257. ["body_odor"] = { ["Herb"] = {"Ginseng"},},
  258. ["burnt_eyes"] = { ["Salve"] = {"Epidermal to Head"},},
  259. ["no_deafness"] = { },
  260. ["disturb_inhibition"] = { },
  261. ["mutation_sickness"] = { },
  262. ["thin_blood"] = { ["Herb"] = {"Ginseng"},},
  263. ["mirroring"] = { ["Herb"] = {"Bloodroot"},},
  264. ["crushed_elbows"] = { ["Salve"] = {"Mending to Arms"},},
  265. ["disrupted"] = { ["Special"] = {"Concentrate"},},
  266. ["transfix"] = { },
  267. ["mental_fatigue"] = { },
  268. ["mental_disruption"] = { ["Herb"] = {"Ginseng"},},
  269. ["disfigurement"] = { ["Smoke"] = {"Valerian"},},
  270. ["mauled_face"] = { ["Salve"] = {"Restoration to Head"},},
  271. ["deadening"] = { ["Smoke"] = {"Elm"},},
  272. ["edict_weakening"] = { },
  273. ["gorged"] = { ["Salve"] = {"Epidermal to Torso"},},
  274. ["right_leg_bruised_critical"] = { ["Salve"] = {"Mending to right leg"},},
  275. ["loneliness"] = { ["Herb"] = {"Lobelia"},},
  276. ["fear"] = { ["Special"] = {"Compose"},},
  277. ["head_deepwound"] = { },
  278. ["edict_imprisonment"] = { },
  279. ["lethargy"] = { ["Herb"] = {"Ginseng"},},
  280. ["omen"] = { },
  281. ["effused_blackbile"] = { ["Salve"] = {"Epidermal to Torso"},},
  282. ["left_leg_mangled"] = { ["Salve"] = {"Restoration to left leg"},},
  283. ["claustrophobia"] = { ["Herb"] = {"Lobelia"},},
  284. ["crippled_body"] = { ["Herb"] = {"Bloodroot"},},
  285. ["head_damaged"] = { ["Salve"] = {"Restoration to Head"},},
  286. ["dizziness"] = { ["Herb"] = {"Goldenseal"},},
  287. ["grappled"] = { ["Special"] = {"Writhe"},},
  288. ["writhe_web"] = { ["Special"] = {"Writhe"},},
  289. ["magical_weakness"] = { },
  290. ["right_arm_deepwound"] = { },
  291. ["lifebane"] = { },
  292. ["left_leg_bruised"] = { ["Salve"] = {"Mending to left leg"},},
  293. ["left_leg_broken"] = { ["Salve"] = {"Mending to left leg"},},
  294. ["clumsiness"] = { ["Herb"] = {"Kelp"},},
  295. ["left_arm_bruised_moderate"] = { ["Salve"] = {"Mending left arm"},},
  296. ["disturb_impulse"] = { },
  297. ["ruptured_eardrum"] = { },
  298. ["baldness"] = { ["Herb"] = {"Kelp"},},
  299. ["effused_yellowbile"] = { ["Salve"] = {"Epidermal to Torso"},},
  300. ["cold_weakness"] = { },
  301. ["left_arm_bruised_critical"] = { ["Salve"] = {"Mending to left arm"},},
  302. ["crushed_chest"] = { ["Salve"] = {"Restoration to Torso"},},
  303. ["idiocy"] = { ["Herb"] = {"Moss"},},
  304. ["hypochondria"] = { ["Herb"] = {"Kelp"},},
  305. ["edict_condemned"] = { },
  306. ["hallucinations"] = { ["Herb"] = {"Ash"},},
  307. ["blood_poison"] = { ["Herb"] = {"Kelp"},},
  308. ["left_arm_deepwound"] = { },
  309. ["left_leg_dislocated"] = { ["Salve"] = {"Mending to left leg"},},
  310. ["deafness"] = { },
  311. ["asthma"] = { ["Herb"] = {"Kelp"},},
  312. ["justice"] = { ["Herb"] = {"Bellwort"},},
  313. ["disturb_sanity"] = { },
  314.  
  315. }
  316. local herbP={["hypochondria"]=4, ["dizziness"]=4, ["dementia"]=4, ["clumsiness"]=3, ["stupidity"]=2, ["magic_impaired"]=1, ["weariness"]=1, ["shyness"]=3, ["hallucinations"]=3, ["asthma"]=0, ["epilepsy"]=3, ["paranoia"]=3, ["sensitivity"]=3, ["impatience"]=1, ["hypersomnia"]=2,
  317. ["blood_poisoning"]=3, ["dissonance"]=3, ["hatred"]=3, ["infested"]=3, ["limp veins"]=3, ["blood_curse"]=3, ["blighted"]=1, ["fear_of_commitment"]=2, ["body_order"]=3, ["overwhelming_pride"]=3, ["pacifism"]=3, ["haemophilia"]=3, ["recklessness"]=3,
  318. ["masochism"]=3, ["mental_disruption"]=3, ["peace"]=3, ["agoraphobia"]=3, ["physical_disruption"]=1, ["lovers_effect"]=1, ["loneliness"]=3, ["sunlight_allergy"]=2, ["superstition"]=3, ["berserking"]=2, ["vomiting"]=3, ["generosity"]=3,
  319. ["vertigo"]=3, ["thin_blood"]=3, ["justice"]=3, ["claustrophobia"]=3, ["rend"]=1, ["lethargy"]=2, ["addiction"]=3, ["paralysis"]=1, ["paresis"]=3, ["mirroring"]=0, ["crippled_body"]=1, ["crippled"]=2, ["slickness"]=3, ["heartflutter"]=3, ["sandrot"]=3,
  320. ["plodding"]=3, ["idiocy"]=3, ["no_deafness"]=3, ["no_blindness"]=3, ["stupidity"]=3,}
  321.  
  322. local salveP={["anorexia"] = 0, ["gorge"] = 1, ["blood_effusion"] = 5, ["phlegm_effusion"] = 5, ["yellow_bile_effusion"] = 5, ["black_bile_effusion"] = 5, ["indifference"] = 0, ["stuttering"] = 3, ["blurry_vision"] = 1, ["head_bruised"] = 3, ["head_bruised_critical"] = 3, ["head_bruised_moderate"] = 3, ["head_damaged"] = 2,
  323. ["head_deepwound"] = 3, ["head_mangled"] = 2, ["left_arm_amputated"] = 2, ["left_arm_broken"] = 3, ["left_arm_bruised"] = 3,
  324. ["left_arm_bruised_critical"] = 3, ["left_arm_bruised_moderate"] = 3, ["left_arm_damaged"] = 2, ["left_arm_deepwound"] = 3,
  325. ["left_arm_dislocated"] = 3, ["left_arm_mangled"] = 3, ["left_arm_numbed"] = 3, ["left_leg_amputated"] = 2, ["left_leg_broken"] = 3,
  326. ["left_leg_bruised"] = 3, ["left_leg_bruised_critical"] = 3, ["left_leg_bruised_moderate"] = 3, ["left_leg_damaged"] = 2,
  327. ["left_leg_deepwound"] = 3, ["left_leg_dislocated"] = 3, ["left_leg_mangled"] = 2, ["left_leg_numbed"] = 3,
  328. ["right_arm_amputated"] = 2, ["right_arm_broken"] = 3, ["right_arm_bruised"] = 3, ["right_arm_bruised_critical"] = 3,
  329. ["right_arm_bruised_moderate"] = 3, ["right_arm_damaged"] = 2, ["right_arm_deepwound"] = 3, ["right_arm_dislocated"] = 3,
  330. ["right_arm_mangled"] = 2, ["right_arm_numbed"] = 3, ["right_leg_amputated"] = 2, ["right_leg_broken"] = 3,
  331. ["right_leg_bruised"] = 3, ["right_leg_bruised_critical"] = 3, ["right_leg_bruised_moderate"] = 3, ["right_leg_damaged"] = 2,
  332. ["right_leg_deepwound"] = 3, ["right_leg_dislocated"] = 3, ["right_leg_mangled"] = 2, ["right_leg_numbed"] = 3, ["torso_bruised"] = 3,
  333. ["torso_bruised_critical"] = 3, ["torso_bruised_moderate"] = 3, ["torso_damaged"] = 2, ["torso_deepwound"] = 3, ["torso_mangled"] = 2,
  334. ["burning"] = 3, ["shivering"] = 3, ["frozen"] = 2, ["no_caloric"] = 4, ["mass"] = 4, ["mauled_face"] = 3, ["spinal_rip"] = 2, ["crushed_chest"] = 3, ["smashed_throat"] = 2, ["throatslash"] = 3, ["crushed_elbow"] = 3, ["crushed_knee"]= 3}
  335.  
  336. local smokeP= { ["aeon"] = 3, ["withering"] = 3, ["hellsight"] = 3, ["deadening"] = 3, ["slickness"] = 3, ["disfigurement"] = 3,}
  337. if not myaff.afflictionList.smokeAfflictions == {} and not attemptPipe and not myaff.afflictionList.pipeAfflictions["asthma"] and self.pipeBalance==1 and not attemptCures["Renew"] == "Random" and not attemptCures["Tree"] == "Random" then
  338. local bestPick=""
  339. for k, v in pairs(myaff.afflictionList.smokeAfflictions) do
  340. if bestPick=="" or smokeP[bestPick]> smokeP[k] then
  341. bestPick=k
  342. end
  343. end
  344. send("smoke " .. cureTable[bestPick]["Smoke"])
  345. attemptCures["Smoke"]=bestPick
  346. attemptPipe=true
  347. tempTimer(.5, [[attemptPipe=false]])
  348. tempTimer(.5, [[attemptCures[]].. "Smoke" .. [[]=""]])
  349.  
  350. end
  351. if not myaff.afflictionList.herbAfflictions == {} and not attemptHerb and not myaff.afflictionList.salveAfflictions["anorexia"] and self.herbBalance==1 and not attemptCures["Renew"] == "Random" and not attemptCures["Tree"] == "Random" then
  352. local bestPick=""
  353. for k, v in pairs(myaff.afflictionList.herbAfflictions) do
  354. if bestPick=="" or herbP[bestPick]> herbP[k] then
  355. bestPick=k
  356. end
  357. end
  358. send("outc " .. cureTable[bestPick]["Herb"])
  359. send("eat " .. cureTable[bestPick]["Herb"])
  360. attemptHerb=true
  361. attemptCures["Herb"]=bestPick
  362. tempTimer(.5, [[attemptHerb=false]])
  363. tempTimer(.5, [[attemptCures[]].. "Herb" .. [[]=""]])
  364. end
  365. if not myaff.afflictionList.salveAfflictions == {} and not attemptSalve and not myaff.afflictionList.pipeAfflictions["slickness"] and self.salveBalance==1 and not attemptCures["Renew"] == "Random" and not attemptCures["Tree"] == "Random" then
  366. local bestPick=""
  367. for k, v in pairs(myaff.afflictionList.smokeAfflictions) do
  368. if bestPick=="" or salveP[bestPick]> salveP[k] then
  369. bestPick=k
  370. end
  371. end
  372. send("apply " .. cureTable[bestPick]["Salve"])
  373. attemptCures["Salve"]=bestPick
  374. attemptSalve=true
  375. tempTimer(.5, [[attemptSalve=false]])
  376. tempTimer(.5, [[attemptCures[]].. "Salve" .. [[]=""]])
  377. end
  378. if not myaff.afflictionList.focusAfflictions == {} and not attemptFocus and not myaff.afflictionList.herbAfflictions["impatience"] and self.focusBalance==1 and not attemptCures["Renew"] == "Random" and not attemptCures["Tree"] == "Random" then
  379. local focusTable={"stupidity","anorexia","epilepsy","mirroring", "mental_disruption",
  380. "paranoia","hallucinations","shyness","stuttering","dizziness","indifference","berserking",
  381. "pacifism","lovers","hatred","generosity","claustrophobia","vertigo","loneliness","agoraphobia",
  382. "masochism","recklessness","weariness","impatience","confusion","dementia","premonition",}
  383. for _, v in pairs(focusTable) do
  384. if myaff.afflictionList.focusAfflictions[v] and not attemptCures["Herb"]==v then
  385. attemptCures["Focus"]=v
  386. attemptFocus=true
  387.  
  388. tempTimer(.5, [[attemptFocus=false]])
  389. tempTimer(.5, [[attemptCures[]].. "Focus" .. [[]=""]])
  390. break
  391. end
  392. end
  393.  
  394. end
  395. if not myaff.afflictionList.treeAfflictions == {} and not (attemptTree and attemptRenew) and (self.treeBalance==1 or self.renewBalance ==1) and not (attemptRenew and attemptTree) then
  396. local affCounter=0
  397. for k, v in pairs(myaff.afflictionList.treeAfflictionts) do
  398. if not k==attemptCures["Focus"] or k==attemptCures["Salve"] or k==attemptCures["Smoke"] or k==attemptCures["Herb"] then
  399. affCounter=affCounter+1
  400. end
  401. end
  402. if attemptRenew then
  403. affCounter=affCounter-1
  404. end
  405. if attemptTree then
  406. affCounter=affCounter-1
  407. end
  408.  
  409.  
  410. end
  411.  
  412. end
  413.  
  414.  
  415.  
  416.  
  417. afflictionList={}
  418. afflictionList.__index = afflictionList
  419.  
  420. function afflictionList.init()
  421. local self=setmetatable({},afflictionList)
  422.  
  423. self.afflictionList={}
  424. self.afflictionList.writheAffliction=false
  425. self.afflictionList.herbAfflictions={}
  426. self.afflictionList.focusAfflictions={}
  427. self.afflictionList.salveAfflictions={}
  428. self.afflictionList.treeAfflictions={}
  429. self.afflictionList.renewAfflictions={}
  430. self.afflictionList.pipeAfflictions={}
  431. self.defenseList={}
  432. return self
  433. end
  434. -- syntax equivalent to "MyClass.new = function..."
  435.  
  436. function afflictionList.DA(self, defense)
  437. self.defenseList[defense]=false
  438. end
  439.  
  440. function afflictionList.HA(self, defense)
  441. self.defenseList[defense]=nil
  442. end
  443.  
  444. function afflictionList.RA(self, affliction)
  445. self.afflictionList.herbAfflictions[affliction]=nil
  446. self.afflictionList.focusAfflictions[affliction]=nil
  447. self.afflictionList.salveAfflictions[affliction]=nil
  448. self.afflictionList.treeAfflictions[affliction]=nil
  449. self.afflictionList.renewAfflictions[affliction]=nil
  450. self.afflictionList.pipeAfflictions[affliction]=nil
  451. self.afflictionList.writheAfflictions[affliction]=nil
  452. end
  453.  
  454. function afflictionList.AA(self, affliction)
  455. self:herbAffliction(affliction)
  456. self:focusAffliction(affliction)
  457. self:salveAffliction(affliction)
  458. self:pipeAffliction(affliction)
  459. self:treeAffliction(affliction)
  460. print("finish")
  461.  
  462.  
  463. end
  464.  
  465.  
  466. function afflictionList.focusAffliction(self, affliction)
  467. local focusTable={"stupidity","anorexia","epilepsy","mirroring", "mental_disruption",
  468. "paranoia","hallucinations","shyness","stuttering","dizziness","indifference","berserking",
  469. "pacifism","lovers","hatred","generosity","claustrophobia","vertigo","loneliness","agoraphobia",
  470. "masochism","recklessness","weariness","impatience","confusion","dementia","premonition",}
  471. for _, v in pairs(focusTable) do
  472. if v==affliction then
  473. self.afflictionList.focusAfflictions[affliction]=true
  474. break
  475. end
  476. end
  477. end
  478.  
  479.  
  480. function afflictionList.herbAffliction(self, affliction)
  481. local herbTable={"hypochondria","dizziness","dementia", "clumsiness","stupidity", "magic_impaired", "weariness","shyness","hallucinations", "asthma","epilepsy","paranoia", "sensitivity","impatience","hypersomnia",
  482. "blood_poisoning","dissonance","hatred", "infested","limp veins","blood_curse", "blighted", "fear_of_commitment", "body_order", "overwhelming_pride", "pacifism","haemophilia","recklessness",
  483. "masochism", "mental_disruption", "peace", "agoraphobia", "physical_disruption", "lovers_effect", "loneliness", "sunlight_allergy", "superstition", "berserking", "vomiting", "generosity",
  484. "vertigo", "thin_blood", "justice", "claustrophobia", "rend", "lethargy", "addiction", "paralysis", "paresis", "mirroring", "crippled_body", "crippled", "slickness", "heartflutter", "sandrot",
  485. "plodding", "idiocy", "no_deafness", "no_blindness","stupidity",
  486. }
  487. for _, v in pairs(herbTable) do
  488. if v==affliction then
  489. self.afflictionList.herbAfflictions[affliction]=true
  490. break
  491. end
  492. end
  493. end
  494.  
  495. function afflictionList.salveAffliction(self, affliction)
  496. local salveTable={"anorexia", "gorge", "blood_effusion", "phlegm_effusion", "yellow_bile_effusion", "black_bile_effusion", "indifference", "stuttering", "blurry_vision", "head_bruised","head_bruised_critical","head_bruised_moderate","head_damaged",
  497. "head_deepwound","head_mangled","left_arm_amputated","left_arm_broken","left_arm_bruised",
  498. "left_arm_bruised_critical","left_arm_bruised_moderate","left_arm_damaged","left_arm_deepwound",
  499. "left_arm_dislocated","left_arm_mangled","left_arm_numbed","left_leg_amputated","left_leg_broken",
  500. "left_leg_bruised","left_leg_bruised_critical","left_leg_bruised_moderate","left_leg_damaged",
  501. "left_leg_deepwound","left_leg_dislocated","left_leg_mangled","left_leg_numbed",
  502. "right_arm_amputated","right_arm_broken","right_arm_bruised","right_arm_bruised_critical",
  503. "right_arm_bruised_moderate","right_arm_damaged","right_arm_deepwound","right_arm_dislocated",
  504. "right_arm_mangled","right_arm_numbed","right_leg_amputated","right_leg_broken",
  505. "right_leg_bruised","right_leg_bruised_critical","right_leg_bruised_moderate","right_leg_damaged",
  506. "right_leg_deepwound","right_leg_dislocated","right_leg_mangled","right_leg_numbed","torso_bruised",
  507. "torso_bruised_critical","torso_bruised_moderate","torso_damaged","torso_deepwound","torso_mangled",
  508. "burning", "shivering", "frozen", "no_caloric", "mass", "mauled_face", "spinal_rip", "crushed_chest",
  509. "smashed_throat", "throatslash", "crushed_elbow", "crushed_knee" }
  510.  
  511. for _, v in pairs(salveTable) do
  512. if v==affliction then
  513. self.afflictionList.salveAfflictions[affliction]=true
  514. break
  515. end
  516. end
  517. end
  518.  
  519. function afflictionList.treeAffliction(self, affliction)
  520. local match=false
  521. local treeTable={ "hypochondria","dizziness","dementia", "clumsiness","stupidity", "magic_impaired", "weariness","shyness","hallucinations", "asthma","epilepsy","paranoia", "sensitivity","impatience","hypersomnia",
  522. "blood_poisoning","dissonance","hatred", "infested","limp veins","blood_curse", "blighted", "fear_of_commitment", "body_order", "overwhelming_pride", "pacifism","haemophilia","recklessness",
  523. "masochism", "mental_disruption", "peace", "agoraphobia", "physical_disruption", "lovers_effect", "loneliness", "sunlight_allergy", "superstition", "berserking", "vomiting", "generosity",
  524. "vertigo", "thin_blood", "justice", "claustrophobia",
  525. "anorexia", "gorge", "left_leg_broken", "right_leg_broken", "left_arm_broken",
  526. "right_arm_broken", "indifference", "stuttering", "blurry_vision",
  527. "rend", "lethargy", "addiction", "paralysis", "paresis", "mirroring", "crippled_body", "crippled", "slickness", "heartflutter", "sandrot",}
  528. for _, v in pairs(treeTable) do
  529. if v==affliction then
  530. self.afflictionList.treeAfflictions[affliction]=true
  531. self.afflictionList.renewAfflictions[affliction]=true
  532. break
  533. end
  534. end
  535. end
  536.  
  537. function afflictionList.pipeAffliction(self, affliction)
  538. local pipeTable={ "aeon", "withering", "hellsight", "deadening", "slickness", "disfigurement"}
  539. for _, v in pairs(pipeTable) do
  540. if v==affliction then
  541. self.afflictionList.pipeAfflictions[affliction]=true
  542. end
  543. end
  544. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement