----------------------------------------------------------------------------------------------------------------------------------------------- -- Alias and Keybindings ----------------------------------------------------------------------------------------------------------------------------------------------- AliasTable = { ---------- Vials ---------- hh = "apply health to head", ha = "apply health to arms", hl = "apply health to legs", hc = "apply health to chest", hg = "apply health to gut", mh = "apply mending to head", mc = "apply mending to chest", mg = "apply mending to gut", ma = "apply mending to arms", ml = "apply mending to legs", amc = "apply melancholic to chest", amh = "apply melancholic to head", arh = "apply regeneration to head", arb = "apply regeneration to chest", arg = "apply regeneration to gut", ara = "apply regeneration to arms", arl = "apply regeneration to legs", sb = "sip bromide", sm = "sip mana", da = "drink allheale", dan = "drink antidote", dfi = "drink fire", dfr = "drink frost", dh = "drink health", dlo = "drink love", dma = "drink mana", dpl = "drink phlegmatic", dsn = "drink sanguine", dq = "drink quicksilver", dv = "drink vitae", ---------- Herbs ---------- aah = "outr arnica\\napply arnica to head", aac = "outr arnica\\napply arnica to chest", aag = "outr arnica\\napply arnica to gut", aaa = "outr arnica\\napply arnica to arms", aal = "outr arnica\\napply arnica to legs", eca = "outr calamus\\neat calamus", ech = "outr chervil\\neat chervil", eco = "outr coltsfoot\\neat coltsfoot", eea = "outr earwort\\neat earwort", efa = "outr faeleaf\\neat faeleaf", ega = "outr galingale\\neat galingale", eho = "outr horehound\\neat horehound", eka = "outr kafe\\neat kafe", eko = "outr kombu\\neat kombu", ema = "outr marjoram\\neat marjoram", emy = "outr myrtle\\neat myrtle", epe = "outr pennyroyal\\neat pennyroyal", ere = "outr reishi\\neat reishi", esp = "outr sparkleberry\\neat sparkleberry", ewo = "outr wormwood\\neat wormwood", eya = "outr yarrow\\neat yarrow", sco = smoke_coltsfoot, sfa = smoke_faeleaf, smy = smoke_myrtle, ---------- Dispell ---------- dcl = "dispell illusion me claws", dco = "dispell illusion me colourburst", dpa = "dispell illusion me phantom", dra = "dispell illusion me rainbowpattern", ---------- Aquamancy ---------- cle = "cast cleanse me", ride = "mount turtle", tf = "order turtle follow me", tl = "order turtle lose", tm = "mount turtle", tp = "order turtle passive", turtle = "aquacast turtle", cen = "aquacast center", cur = "aquacast currents", dce = "demesne center", del = "aquacast deluge", flo = "aquacast forceflood", hea = "aquacast healspring", ice = "aquacast icefloe", jel = "aquacast jellies", mel = "aquacast meld", nee = "aquacast needlerain", sti = "aquacast stillwater", swe = "aquacast sweetfount", wat = "aquacast watch on", whi = "aquacast whirlpool", ff = "aquacast flashflood", deld = "aquacast deluge demesne", head = "aquacast healspring demesne", iced = "aquacast icefloe demesne", jeld = "aquacast jellies demesne", need = "aquacast needlerain demesne", stid = "aquacast stillwater demese", swed = "aquacast sweetfount demesne", twi = "twirl staff", ---------- Resilience ---------- fm = "focus mind", fb = "focus body", fs = "focus spirit", re = "restore", wri = "writhe", mon = "metawake on", mof = "metawake off", ---------- Miscelleneaous ---------- getg = "get 1000 gold from backpack", putg = "put 1000 gold in backpack", wsh = "wield shield", ws = "wield staff", ---------- Stances ---------- she = "stance head", sgu = "stance guts", sch = "stance chest", sar = "stance arms", sle = "stance legs", ---------- Planar ---------- tel = "transverse elemental", tco = "transverse cosmic", tas = "transverse astral", tet = "transverse ethereal", tpr = "transverse prime", } AliasFuncTable = { defup = "defup", geth = "geth", puth = "puth", pipe = "pipe", ps = "ps *", gs = "gs *", rpipe = "rpipe", rring = "rring", rvial = "rvial *", tar = "tar *", rej = "rej", unl = "unl", F1 = "F1", F2 = "F2", F3 = "F3", F4 = "F4", F5 = "F5", F6 = "F6", F7 = "F7", F8 = "F8", F9 = "F9", F10 = "F10", F11 = "F11", F12 = "F12", Divide = "Divide", Multiply = "Multiply", Add = "Add", Subtract = "Subtract", aqua = "aqua", mini = "mini", CTRL1 = "CTRL1", CTRL2 = "CTRL2", CTRL3 = "CTRL3", d_start = "start", d_stop = "stop", d_resetall = "reset", d_createall = "init", d_showvalues = "showval", d_createalias = "createalias", d_createmacro = "createmacro", d_threshold = "limits * * * *", } MacroTable = { F1 = "F1", F2 = "F2", F3 = "F3", F4 = "F4", F5 = "F5", F6 = "F6", F7 = "F7", F8 = "F8", F9 = "F9", F10 = "F10", F11 = "F11", F12 = "F12", Divide = "Divide", Multiply = "Multiply", Add = "Add", Subtract = "Subtract", } ----------------------------------------------------------------------------------------------------------------------------------------------- -- Alias functions ----------------------------------------------------------------------------------------------------------------------------------------------- function rej (thename, theoutput, wildcards, line) Send("reject "..target) Send("enemy "..target) end function unl (thename, theoutput, wildcards, line) Send("psi id unlock") Send("psi super unlock") Send("psi sub unlock") end function aqua (thename, theoutput, wildcards, line) Send("aquacast healspring") DoAfter ("5", "aquacast needlerain demesne") DoAfter ("11", "aquacast deluge demesne") DoAfter ("17", "aquacast icefloe demesne") DoAfter ("22", "aquacast stillwater demesne") DoAfter ("27", "aquacast tsunami ") DoAfter ("32", "aquacast sweetfount demesne") DoAfter ("37", "aquacast jellies demesne") end function mini (thename, theoutput, wildcards, line) Send("aquacast needlerain demesne") DoAfter ("5", "aquacast jellies demesne") DoAfter ("10", "aquacast currents") DoAfter ("15", "aquacast whirlpool") end function geth (thename, theoutput, wildcards, line) Send ("outr 2 arnica") Send ("outr 2 calamus") Send ("outr 2 chervil") Send ("outr 2 coltsfoot") Send ("outr 2 earwort") Send ("outr 2 faeleaf") Send ("outr 2 galingale") Send ("outr 2 horehound") Send ("outr 2 kafe") Send ("outr 2 kombu") Send ("outr 2 marjoram") Send ("outr 2 myrtle") Send ("outr 2 pennyroyal") Send ("outr 2 reishi") Send ("outr 2 sparkleberry") Send ("outr 2 wormwood") Send ("outr 2 yarrow") end function puth (thename, theoutput, wildcards) Send ("inr 10 arnica") Send ("inr 10 calamus") Send ("inr 10 chervil") Send ("inr 10 coltsfoot") Send ("inr 10 earwort") Send ("inr 10 faeleaf") Send ("inr 10 galingale") Send ("inr 10 horehound") Send ("inr 10 kafe") Send ("inr 10 kombu") Send ("inr 10 marjoram") Send ("inr 10 myrtle") Send ("inr 10 pennyroyal") Send ("inr 10 reishi") Send ("inr 10 sparkleberry") Send ("inr 10 wormwood") Send ("inr 10 yarrow") end function rring (thename, theoutput, wildcards) Send ("recharge ring54178 from cube") Send ("recharge ring46085 from cube") Send ("recharge ring76992 from cube") Send ("recharge ring8028 from cube") Send ("recharge ring149685 from cube") Send ("recharge ring142702 from cube") Send ("recharge ring116593 from cube") end function rvial (thename, theoutput, wildcards) Send ("refill 24043 from " .. wildcards[1]) Send ("refill 16756 from " .. wildcards[1]) Send ("refill 150877 from " .. wildcards[1]) Send ("refill 114015 from " .. wildcards[1]) Send ("refill 153370 from " .. wildcards[1]) Send ("refill 110537 from " .. wildcards[1]) Send ("refill 105185 from " .. wildcards[1]) Send ("refill 82926 from " .. wildcards[1]) end function ps (thename, theoutput, wildcards) Send ("point staff "..target.." "..wildcards[1] ) end function gs (thename, theoutput, wildcards) Send ("cast gust "..target.." "..wildcards[1] ) end function rpipe (thename, theoutput, wildcards) Send ("outr coltsfoot") Send ("put coltsfoot in 65347") Send ("outr faeleaf") Send ("put faeleaf in 128226") Send ("outr myrtle") Send ("put myrtle in 68597") end function pipe (thename, theoutput, wildcards) Send ("get pipe from backpack") Send ("get pipe from backpack") Send ("get pipe from backpack") Send ("light 65347") Send ("light 128226") Send ("light 68597") end function defup (thename, theoutput, wildcards) Send ("rub 54178") Send ("rub 76992") Send ("rub 8028") Send ("rub 46085") Send ("rub 142702") DoAfter ("3", "rub 149685") DoAfter ("6", "cast stoneskin") DoAfter ("11", "cast elementshield") DoAfter ("15", "psi sub secondsight") DoAfter ("15", "psi id mindbar") DoAfter ("21", "stance legs") DoAfter ("21", "parry head 100") DoAfter ("21", "insomnia") DoAfter ("22", "cast levitate") DoAfter ("27", "weave blur") DoAfter ("30", "raise staff") DoAfter ("35", "evoke netzach") DoAfter ("40", "thirdeye") DoAfter ("40", "deathsense") DoAfter ("43", "rub ring116593") end function tar (thename, theoutput, wildcards) target=wildcards[1] Send ("settarget tar "..wildcards[1]) end function CTRL1 (thename, theoutput, wildcards) Send ("Read "..ScrollOfHealing) end function CTRL2 (thename, theoutput, wildcards) Send ("Read "..ScrollOfCurse.." "..target) end function CTRL3 (thename, theoutput, wildcards) Send ("Read "..ScrollOfProtection) end function F1 (thename, theoutput, wildcards) end function F2 (thename, theoutput, wildcards) Note (os.time()) Send (smoke_faeleaf) Send ("mindset cautious") Send ("PSI sub RECKLESSNESS "..target) Send ("PSI id DOMINATE "..target.." debate nezha with passion") Send ("PSI super PSYCHICVAMPIRISM "..target) Send ("weave illusion With a focused look, Nezha strikes at you with a platinum spiked morningstar. Nezha crushes your throat, crushing your windpipe.") end function F3 (thename, theoutput, wildcards) Note (os.time()) Send (smoke_faeleaf) Send ("PSI id PARALYSE "..target) Send ("PSI sub RECKLESSNESS "..target) Send ("PSI super PSYCHICVAMPIRISM "..target) Send ("weave illusion With a focused look, Nezha strikes at you with a platinum spiked morningstar. Nezha crushes your throat, crushing your windpipe.") end function F4 (thename, theoutput, wildcards) Send (smoke_faeleaf) Send ("PSI sub PACIFY "..target) Send ("PSI id PARALYSE "..target) Send ("PSI super MINDBLAST "..target) Send ("weave illusion With a heavy overhand stroke, Nezha slams a prismatic white-steel scimitar down upon you. Nezha hacks your neck, and blood fountains out in a thick spray.") end function F5 (thename, theoutput, wildcards) Send (smoke_faeleaf) Send ("PSI id PARALYSE "..target) Send ("PSI sub ADDICTION "..target) Send ("weave illusion You notice that your sweat glands have begun to rapidly secrete a foul, oily substance.") end function F6 (thename, theoutput, wildcards) Send (smoke_faeleaf) Send ("PSI id PHOBIA "..target) Send ("PSI sub AMPLIFYPHOBIA "..target) Send ("weave illusion With a heavy overhand stroke, Nezha slams a prismatic white-steel scimitar down upon you. Nezha hacks your neck, and blood fountains out in a thick spray.") end function F7 (thename, theoutput, wildcards) Send (smoke_faeleaf) Send ("PSI id DOMINATE "..target.." unenemy all") Send ("PSI sub STUPIDITY "..target) Send ("weave illusion You focus your mind intently on curing your mental maladies.") end function F8 (thename, theoutput, wildcards) Send ("PSI id Paralyse "..target) Send ("PSI sub STUPIDITY "..target) Send ("PSI super MINDBURST "..target) end function F9 (thename, theoutput, wildcards) Send ("point staff "..target) end function F10 (thename, theoutput, wildcards) Send ("outr sparkleberry") Send ("eat sparkleberry") end function F11 (thename, theoutput, wildcards) Send ("pray to shakiniel") end function F12 (thename, theoutput, wildcards) Send ("weave reflection at me") end function Divide (thename, theoutput, wildcards) Send ("WEAVE WOUNDS "..target) Send ("DISSOLVE "..target) end function Multiply (thename, theoutput, wildcards) Send ("WEAVE CLAWS "..target) Send ("DISSOLVE "..target) end function Subtract (thename, theoutput, wildcards) Send ("AQUACAST BUBBLE "..target) end function Add (thename, theoutput, wildcards) Send ("WEAVE PHANTOM "..target) Send ("DISSOLVE "..target) end function d_start (thename, theoutput, wildcards) guard_master = 1 end function d_stop (thename, theoutput, wildcards) guard_master = 0 end function d_threshold (thename, theoutput, wildcards) if wildcards[1] ~= nil then thre_health = tonumber(wildcards[1]) end if wildcards[2] ~= nil then thre_mana = tonumber(wildcards[2]) end if wildcards[3] ~= nil then thre_bromide = tonumber(wildcards[3]) end if wildcards[4] ~= nil then thre_scroll = tonumber(wildcards[4]) end end ----------------------------------------------------------------------------------------------------------------------------------------------- -- Creators ----------------------------------------------------------------------------------------------------------------------------------------------- function CreateTriggerEx (curr_table) for index,value in pairs(curr_table) do -- the deaffliction catchers -- for a_index, a_trigger in pairs (value.deaffliction) do -- Start from 100 so it names of afflic and deafflict dont clash together if a_trigger ~= "none" then AddTrigger(index..a_index+100, a_trigger, "", trigger_flag.Enabled+trigger_flag.RegularExpression+trigger_flag.KeepEvaluating+trigger_flag.Replace, custom_colour.Custom15, 0, "", value.remover) end end -- then the affliction catchers -- for a_index, a_trigger in pairs (value.afflictionline) do if a_trigger ~= "none" then AddTrigger(index..a_index, a_trigger, "", trigger_flag.Enabled+trigger_flag.RegularExpression+trigger_flag.KeepEvaluating+trigger_flag.Replace, custom_colour.Custom15, 0, "", value.inserter) end end end end function CreateTrigger (curr_table) for index,value in pairs(curr_table) do -- first the remover -- if value.deaffliction ~= "none" then AddTrigger(index.."0", value.deaffliction, "", trigger_flag.Enabled+trigger_flag.RegularExpression+trigger_flag.KeepEvaluating+trigger_flag.Replace , custom_colour.Custom15, 0, "", value.remover) end -- then the affliction catchers -- for a_index, a_trigger in pairs (value.afflictionline) do --------------------------------------------------------- -- The values are like this: -- Aeon1: index..a_index -- a_trigger: "You feel the time stream slow" -- value.inserter: function to process the trigger -- --------------------------------------------------------- if a_trigger ~= "none" then AddTrigger(index..a_index, a_trigger, "", trigger_flag.Enabled+trigger_flag.RegularExpression+trigger_flag.KeepEvaluating+trigger_flag.Replace, custom_colour.Custom15, 0, "", value.inserter) end end end end function d_createall () CreateTriggerEx (WritheCure) CreateTriggerEx (FocusBodyCure) CreateTriggerEx (PhysicalCure) CreateTriggerEx (HealthCure) CreateTriggerEx (HerbCure) CreateTriggerEx (PurgativeCure) CreateTriggerEx (SalveCure) CreateTriggerEx (BalanceTable) CreateTriggerEx (SpellCure) CreateTriggerEx (NoCureTable) CreateTriggerEx (NotesTable) d_createalias () d_createmacro () d_resetall () end function d_resetall () herb_table={} health_table={} purgative_table={} physical_table={} spell_table={} health_table = {WoundsHead=0,WoundsGut=0,WoundsChest=0,WoundsArmLeft=0,WoundsArmRight=0,WoundsLegLeft=0,WoundsLegRight=0} bal_health = 1 bal_herb = 1 bal_purgative = 1 bal_stun = 1 bal_sleep = 1 bal_writhe = 1 bal_focus = 1 bal_focusmind = 1 bal_salve = 1 bal_parry = 1 bal_stance = 1 bal_equi = 1 bal_prone = 1 bal_psisub = 1 bal_psisup = 1 bal_psiid = 1 bal_psilocksub = 1 bal_psilocksup = 1 bal_psilockid = 1 bal_limb = 1 bal_all = 1 bal_pipe = 1 bal_kafe = 1 bal_scrollheal = 1 bal_rightarm = 1 bal_leftarm = 1 bal_blanknote = 1 healer_guard = 1 healer_aeonguard = 1 end function d_showvalues () for h_index, h_value in ipairs (herb_table) do Note (h_index.." and ".. h_value ) end for h_index, h_value in ipairs (health_table) do Note (h_index.." and ".. h_value ) end for h_index, h_value in ipairs (purgative_table) do Note (h_index.." and ".. h_value ) end for h_index, h_value in ipairs (physical_table) do Note (h_index.." and ".. h_value ) end Note ("Finished") end function d_createalias () for index, value in pairs(AliasFuncTable) do AddAlias("", value, "", alias_flag.Enabled + alias_flag.Replace , index) end for a_index, a_value in pairs(AliasTable) do AddAlias("", a_index, a_value, alias_flag.Enabled + alias_flag.Replace, "") end end function d_createmacro () for a_index, a_value in pairs(MacroTable) do Accelerator(a_index, a_index) end Accelerator("Ctrl+1", "CTRL1") Accelerator("Ctrl+2", "CTRL2") Accelerator("Ctrl+3", "CTRL3") --for _, v in pairs (AcceleratorList ()) do -- Note (v) --end end AddAlias("", "init", "", alias_flag.Enabled + alias_flag.Replace, "d_createall")