if not ksys.rituals[ritual] then
output("<red>" .. ritual:title() .. " not a valid Ritual!")
return false
else
output("Beginning " .. ritual:title() .. " ritual. Total steps: " .. #ksys.rituals[ritual])
ksys.temp.ritual = ritual
ksys.temp.ritual_step = 1
end
end
"secure scythe",
"WIELD athame",
"speak albedi",
"chant bujev kuy wo de ulo du elnur nu",
"paint ulo on me with blood",
"empty pipe",
"outc bladder slice; ",
"put bladder slice in pipe",
"light pipe",
"smoke pipe",
"secure athame:,
"wield scythe",
"speak aetolian"}
next ritual steps:
function nextRitualStep()
local step = ksys.rituals[ksys.temp.ritual][ksys.temp.ritual_step]
output("Ritual Step " .. ksys.temp.ritual_step .. " of " .. #ksys.rituals[ksys.temp.ritual] .. ": " .. step)
expandAlias(step)
ksys.temp.ritual_step = ksys.temp.ritual_step + 1
if ksys.temp.ritual_step > #ksys.rituals[ksys.temp.ritual] then
output(ksys.temp.ritual:title() .. " ritual completed!")
ksys.temp.ritual = nil
ksys.temp.ritual_step = 0
end
end
Ritual Hook:
ksys.hooks.functions.rituals =
function()
if not ksys.balances.both() and not ritual_attempt or ksys.temp.ritual == nil then return false end
send(";")
nextRitualStep()
ritual_attempt = true
tempTimer(.2, [[ritual_attempt = false]])
tempTimer(.4, [[send(";")]])
end
Any help or advice would be wonderful.
Comments
if not ksys.balances.both() and not ritual_attempt or ksys.temp.ritual == nil then return false end
Looks like you want to abort if you either aren't doing a ritual, or don't have balance, or are already attempting a step. So something like this:
if not ksys.balances.both() or ritual_attempt or ksys.temp.ritual == nil then return false end
Nothing is going to get better. It's not.”
― Dr. Seuss, The Lorax
Nothing is going to get better. It's not.”
― Dr. Seuss, The Lorax