If you look in the Mechanics section of the Lusternia forum, you can see many many threads started by myself that cover every little aspect of system making within Lusternia. To get you started I recommend adding the php.Lua file to your /lua dir for mush client, to let you build Lua tables that are forced to be compiled the way you want (for easily prioritizing affliction curing). Here is the file for you.
function phpTable(...)
local newTable,keys,values={},{},{}
newTable.pairs=function(self) -- pairs iterator
local count=0
return function()
count=count+1
return keys[count],values[keys[count]]
end
end
setmetatable(newTable,{
__newindex=function(self,key,value)
if not self[key] then table.insert(keys,key)
elseif value==nil then -- Handle item delete
local count=1
while keys[count]~=key do count = count + 1 end
table.remove(keys,count)
end
values[key]=value -- replace/create
end,
__index=function(self,key) return values[key] end
})
return newTable
end
return phpTable
You would use it like this... in theory.
require "phptable"
salveaffs = phpTable()
salveaffs["asthma"] = "apply melancholic to chest"
salveaffs["concussion"] = "apply regeneration to head"
for affs,cure in salveaffs:pairs() do
if affs[aff] then
if (string.find(cure, "apply") and able_apply()) then
Execute(cure)
break
end
end
end
Note that each of those three things are not together in my script, but they are separated by other code. That is one example of how you could go about it.
==========================================================
Also, as for the inventory sort thing, I have been working on that for almost a week and I have gotten no where. I think a Rift sorter would be more useful, as well as a better example of how something like this might be done.
A 'rift' is a place where we can store (herbs|commodities|tinictures|gems) etc etc. The issue here is as your rift gets fuller, the text gets longer. Here is an example.
3289h, 3106m, 2740e, 10p, 15345en, 14430w elrx-
ir
Glancing into the Rift, you see:
[ 125] amethyst [ 40] arnica [ 86] bluetint
[ 159] calamus [ 59] chervil [ 2] coal
[ 10] colewort [ 3] coltsfoot [ 225] faeleaf
[ 10] flax [ 7] galingale [ 40] gems
[ 34] gold [ 34] goldtint [ 130] greentint
[ 120] kafe [ 6] kombu [ 144] leather
[ 38] marjoram [ 10] merbloom [ 10] mistletoe
Type MORE to continue reading. (59% shown)
3289h, 3106m, 2740e, 10p, 15345en, 14430w elrx-
more
[ 1] myrtle [ 21] pennyroyal [ 110] purpletint
[ 127] redtint [ 4] reishi [ 1] rope
[ 15] rosehips [ 10] sage [ 5] sargassum
[ 136] sparkleberry [ 59] weed [ 17] wood
[ 27] wormwood [ 83] yarrow [ 127] yellowtint
3289h, 3106m, 2740e, 10p, 15345en, 14430w elrx-
Many people using Mush have asked for a way to catch your rift, and reprint it more ordered, like;
ir
Glancing into the Rift, you see:
*(TINTS)*
[ 127] yellowtint [ 127] redtint
*(HERBS)*
[ 136] sparkleberry [ 27] wormwood [ 83] yarrow
*(COMMODITIES)*
[ 17] wood [ 50] gems [ 10] rope [ 77] gold
And so on and So forth. If we can figure this out, we cold apply the same to other similar systems, like inventories, rune bags, tarot decks, dream catchers, etc etc etc.