Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wrackAff = "paralyse"
- trueAff1 = ""
- trueAff2 = ""
- aignore = "nothing"
- temperNums = {
- ["choleric"] = 0,
- ["melancholic"] = 0,
- ["phlegmatic"] = 0,
- ["sanguine"] = 0
- };
- shortHum = {
- ["c"] = "choleric",
- ["m"] = "melancholic",
- ["p"] = "phlegmatic",
- ["s"] = "sanguine"
- };
- wrackAffs = {
- ["choleric"] = {
- ["nausea"] = 0,
- ["sensitivity"] = 2,
- ["slickness"] = 3
- },
- ["melancholic"] = {
- ["stupidity"] = 0,
- ["anorexia"] = 2,
- ["impatience"] = 3
- },
- ["phlegmatic"] = {
- ["clumsiness"] = 0,
- ["weariness"] = 2,
- ["asthma"] = 3
- },
- ["sanguine"] = {
- ["haemophilia"] = 0,
- ["recklessness"] = 2,
- ["paralysis"] = 3
- },
- };
- wrackPrio = { "paralysis", "impatience", "asthma",
- "clumsiness", "haemophilia", "nausea", "sensitivity",
- "stupidity", "weariness", "recklessness",
- "slickness", "anorexia"};
- wrackDmg = { "paralysis", "sensitivity", "clumsiness", "asthma",
- "impatience", "haemophilia", "nausea"};
- wrackBleed = { "paralysis", "haemophilia", "sensitivity", "clumsiness", "asthma",
- "impatience", "nausea"};
- herbWrackPrio = { "paralysis", "impatience", "asthma",
- "clumsiness", "haemophilia", "nausea",
- "sensitivity"};
- wrackPrioConv = {
- ["paralysis"] = "paralyse",
- ["impatience"] = "impatience",
- ["asthma"] = "kalmia",
- ["clumsiness"] = "xentio",
- ["stupidity"] = "stupidity",
- ["recklessness"] = "eurypteria",
- ["haemophilia"] = "haemophilia",
- ["sensitivity"] = "sensitivity",
- ["nausea"] = "euphorbia",
- ["slickness"] = "gecko",
- ["anorexia"] = "slike",
- ["weariness"] = "vernalius"
- };
- wrackHum = {
- ["paralysis"] = "sanguine",
- ["impatience"] = "melancholic",
- ["asthma"] = "phlegmatic",
- ["clumsiness"] = "phlegmatic",
- ["stupidity"] = "melancholic",
- ["recklessness"] = "sanguine",
- ["haemophilia"] = "sanguine",
- ["sensitivity"] = "choleric",
- ["nausea"] = "choleric",
- ["slickness"] = "choleric",
- ["anorexia"] = "melancholic",
- ["weariness"] = "phlegmatic",
- };
- function numTempered()
- local i = 0
- for k,v in pairs(temperNums) do
- if v > 0 then
- i = i + 1
- end
- end
- return i
- end
- function minHumour(humour)
- local minC = 100
- local minT = "choleric"
- for k,v in pairs(humour) do
- if temperNums[v] < minC then
- minC = temperNums[v]
- minT = v
- end
- end
- return minT
- end
- function canTrueWrack(aff1, aff2, humour)
- local temper1 = wrackHum[aff1]
- local temper2 = wrackHum[aff2]
- if canWrack(temper1, aff1) and canWrack(temper2, aff2) then
- return minHumour(humour)
- elseif canWrack(temper1, aff1) then
- if canTemperWrack(temper2, aff2) then
- return temper2
- end
- elseif canWrack(temper2, aff2) then
- if canTemperWrack(temper1, aff1) then
- return temper1
- end
- end
- return "none"
- end
- function canWrack(temper, v)
- if temperNums[temper] >= wrackAffs[temper][v] then
- return true
- else
- return false
- end
- end
- function canTemperWrack(temper, v)
- if affInWrackPool()+affInTemper(temper) > 1 then
- if temperNums[temper] + 3 >= wrackAffs[temper][v] then
- return true
- end
- else
- if temperNums[temper] + affInWrackPool()+affInTemper(temper)+1 >= wrackAffs[temper][v] then
- return true
- end
- end
- return false
- end
- function autoWrack(humour, prio)
- local wrack1 = ""
- local wrack2 = ""
- local temperVar = ""
- local v1 = ""
- local loopTmp = true
- for k,v in ipairs(prio) do
- for kk, vv in ipairs(prio) do
- if vv ~= v and (not tarAff[wrackPrioConv[v]] and not tarAff[wrackPrioConv[vv]])
- and wrackHum[v]~=wrackHum[vv] and aignore ~= wrackPrioConv[v] and aignore ~= wrackPrioConv[vv] then
- if table.contains(humour, canTrueWrack(v, vv, humour)) and loopTmp then
- send("temper " ..target.. " " ..canTrueWrack(v, vv, humour))
- truewrackWhat(v, vv)
- loopTmp = false
- end
- end
- end
- end
- for k,v in ipairs(wrackPrio) do
- if not tarAff[wrackPrioConv[v]] and aignore ~= wrackPrioConv[v] then
- if loopTmp then
- send("temper " ..target.. " " ..minHumour(humour))
- end
- if v == "paralysis" then
- torcOrWrack("paralyse", humour)
- else
- wrackWhat(v)
- end
- return
- end
- end
- end
- function wrackWhat(aff)
- wrackAff = wrackPrioConv[aff]
- send("wrack " ..target.. " " ..aff)
- end
- function truewrackWhat(aff1, aff2)
- trueAff1 = wrackPrioConv[aff1]
- trueAff2 = wrackPrioConv[aff2]
- send("truewrack " ..target.. " " ..aff1.. " " ..aff2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement