The following incredibly long spammage is my Affliction Handling script, or at least the very beginning of it. Right now I'm just making a table of afflictions with their respective on/off values. My problem is that I can't seem to do anything with them. If I do echo(v) it shows me a long string of zeros that seem to correspond with how many items are in the list, but I cannot for the life of me get it to do echo(k). All references to a specific affliction don't work. I even tried a simple test alias to do afflictionList.fear = 1 and then echo(afflictionList.fear), but nothing works at all. Any insight would be most appreciated.
Code: Select all
afflictionList = {
["addiction"] = 0,
["aeon"] = 0,
["agoraphobia"] = 0,
["anorexia"] = 0,
["asthma"] = 0,
["baldness"] = 0,
["berserking"] = 0,
["black_bile"] = 0,
["blood_curse"] = 0,
["blood_effusion"] = 0,
["blood_poisoning"] = 0,
["blurry_vision"] = 0,
["body_odor"] = 0,
["burning"] = 0,
["claustrophobia"] = 0,
["clumsiness"] = 0,
["confusion"] = 0,
["deadening"] = 0,
["dementia"] = 0,
["disfigurement"] = 0,
["disrupt"] = 0,
["dissonance"] = 0,
["dizziness"] = 0,
["earth_rot"] = 0,
["epilepsy"] = 0,
["fear_of_commitment"] = 0,
["frozen"] = 0,
["generosity"] = 0,
["haemophilia"] = 0,
["hallucinations"] = 0,
["hatred"] = 0,
["heartflutter"] = 0,
["hellsight"] = 0,
["hypersomnia"] = 0,
["hypochondria"] = 0,
["idiocy"] = 0,
["impatience"] = 0,
["indifference"] = 0,
["justice"] = 0,
["lethargy"] = 0,
["limp_veins"] = 0,
["loneliness"] = 0,
["lovers_effect"] = 0,
["masochism"] = 0,
["pride"] = 0,
["pacifism"] = 0,
["paralysis"] = 0,
["paranoia"] = 0,
["peace"] = 0,
["phlegm"] = 0,
["plodding"] = 0,
["recklessness"] = 0,
["sadness"] = 0,
["self_pity"] = 0,
["selarnia"] = 0,
["sensitivity"] = 0,
["shivering"] = 0,
["shyness"] = 0,
["slickness"] = 0,
["spinal_rip"] = 0,
["stupidity"] = 0,
["stuttering"] = 0,
["sunlight_allergy"] = 0,
["thin_blood"] = 0,
["throat_slash"] = 0,
["vertigo"] = 0,
["vomiting"] = 0,
["voyria"] = 0,
["weariness"] = 0,
["yellow_bile"] = 0,
["bound"] = 0,
["entanglement"] = 0,
["feed"] = 0,
["hanged_man"] = 0,
["hoist"] = 0,
["impaled"] = 0,
["lure"] = 0,
["quicksand"] = 0,
["transfix"] = 0,
["web"] = 0,
["broken_left_arm"] = 0,
["broken_right_arm"] = 0,
["broken_left_leg"] = 0,
["broken_right_leg"] = 0,
["broken_head"] = 0,
["broken_torso"] = 0,
["jawlock_armpit"] = 0,
["jawlock_neck"] = 0,
["jawlock_thigh"] = 0,
["mangled_left_arm"] = 0,
["mangled_right_arm"] = 0,
["mangled_left_leg"] = 0,
["mangled_right_leg"] = 0,
["mangled_head"] = 0,
["mangled_torso"] = 0,
["blind"] = 0,
["deaf"] = 0,
["insomnia"] = 0,
["prone"] = 0,
["fear"] = 0
}
-- Just trying to make the stupid thing recognize my afflictions, when
-- that works we can actually have it reset the values
function resetAfflictions()
for k,v in pairs(afflictionList) do
print(k,v)
end
end