Curing System

Posted by Noctem on Mon 20 Aug 2007 11:44 PM — 30 posts, 106,670 views.

#0
Well, I come for help. Lots and lots of help. I'm trying to set up my curing system on IRE's game Lusternia. It needs to be an advanced system, and try as I might, I can't figure it out on my own. To begin with, to create a working script for the game, what is some suggested reading? Should I just bloody learn the whole language disjoint from MUSHclient, or should I be looking somewhere specific with instructions about HOW to program Lua in MUSHClient? Next I need to actually figure out how to get it to work. The idea of my system is this:

Receive affliction 1:
script starts, checks anything that could stop the curing of this affliction, checks to see if it is a priority affliction

sets variable for affliction to 1. Goes through the process of getting the cure from wherever it is in my inventory, using it, and then setting the variable back to 0.



This is a basic outline, but I'm getting quite flustered at my lack of skill, even though I try very hard.
USA #1
This is a rather complex script that you are trying to make here. If you are new to Lua scripting, then you might want to try out a few simpler scripts first. Or, if you want to make progress in this script, break it into smaller chunks and deal with them one at a time.

1) Having some sort of flag system set up to show what affects you have on at the current time is a good place to start.

2) Next, build a priority queue and have it dump the most important affect to the screen.

3) An inventory scanner for the curatives can be extremely tricky, and it is usually very specific to each mud. Being able to scan in how much of each item you have is useful, but sometimes unnecessary. If the items can be kept track of through purchase, usage, and looting messages, you might just be able to keep a tally of all the items in a table. That would simplify things greatly. Have the counter for the item displayed each time something is purchased or used.

4) Set up another script to check the priority queue periodically and see if anything in the inventory table matches up with an affect. Then send a use message, and set a flag noting that this is in progress. Reset the flag on a use message.


Each one of these isn't too terribly bad on it's own, but it would be very complicated for a non-Lusternia player to make. Some information could be provided here by the general MUSHclient userbase, but some more information on the actual mud output would be needed. I'm planning on making a little potion tracker for the mud I play on, so I'll post it (or at least a link to it) on the forums.
#2
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.
Amended on Tue 21 Aug 2007 02:58 AM by Simimi
Netherlands #3
I've written a curingsystem for Aetolia, although that is in Python. In any case, it is of the IRE family and I can assure you it is a lot of work, but also very rewarding if you like scripting. My curingsystem alone just crossed the 700 triggers barrier, and there are no noticable slowdowns yet.

I don't play Lusternia so can't give any exact advice, however...

1. Save data in a logical way. Don't be afraid to make it more abstract. Doing so will make it easier to make the various balances (eating herbs, applying salves etc) work on their own.
2. Triggering the prompt and doing your curing actions from there has its advantages over directly curing on an affliction message. It also makes it more painful when you have a bug somewhere, since your entire prompt and thus all of your curing will cease to be executed.
3. Don't be afraid to omit stuff from output if you know you can afford it. Or, gag and echo something more useful in return. It is a nasty balance between making it easier for yourself while in mid-combat and figuring out why your system is not working the way you want to.

I wanted to mention a few more things, but I kind of forgot.. Oh well.
#4
Quote:
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.

I'm not sure where your problem is?

I can see a couple of ways of doing it, the hardest part is coping with the "Type MORE to continue reading. (59% shown)" and working out where the end is.

I think the important parts are (1) the initial trigger on "Glancing into the Rift, you see:" that EnableTriggerGroups
the actual processing and EnableTimers the 5 (10? 15?) second watchdog timer that DisableTriggerGroups everything and does the processing on the data collected, (2) the aforementioned watchdog timer, (3) the actual trigger(s) that trap the data.

It _looks_ like each line is 1, 2 or 3 repetitions of:
[ nn] item
Where " nn" = 4 characters (can you get more than 9999 of an item?) and "item" is always lowercase and one word.

So... regexes look like:
^\s+[([ 0-9]{4})] ([a-z]+)$
^\s+[([ 0-9]{4})] ([a-z]+)\s+[([ 0-9]{4})] ([a-z]+)$
^\s+[([ 0-9]{4})] ([a-z]+)\s+[([ 0-9]{4})] ([a-z]+)\s+[([ 0-9]{4})] ([a-z]+)$

And they each fire a function that caches the data for the watchdog timer to reprocess.
#5
Well I had just started working on a rift trigger, and Noc was asking about an inventory trigger.

Each line in the mud output has 3 lines of [ nn] item, and only 2000 of any one item at a time.

My problem with doing things like this is that I can capture things with regex, but I do not know how to reprint it as something else. In the rift example, I would like it to reprint the data organized by what the item is, which I guess would need a masterlist of all commodities that can be put into the rift, by type?
USA #6
Here's how I would do the capture:
^  (?:\[([ \d]{4})\] (\w+)\s*){1,3}

This way all the odd numbered wildcards are the count of the following wildcard, which is an item. Just need one trigger sending to a script which loops through the wildcards grabbing the information to put into some sort of table.

riftitems={}
function riftcapture( sTrig, sLine, wildcards )
  riftitems[ wildcards[2] ] = tonumber( wildcards[1] )
  if wildcards[4] then
    riftitems[ wildcards[4] ] = tonumber( wildcards[3] )
    if wildcards[6] then
      riftitems[ wildcards[6] ] = tonumber( wildcards[5] )
    end
  end
end

riftsort = { { "tints", {"yellowtint", "redtint"} }
             { "herbs", {"sparkleberry", "wormwood", "yarrow" },
             { "commodities", {"wood","gems","rope","gold" }
           }
function showrift()
  for _,i in riftsort do
    Note( "*("..string.upper(i[1])..")*")
    for k,v in i[2] do
      Tell( string.format( "  [%4d"] %-15s", riftitems[i], i ) }
    end
    Note( "" )
  end
end

edit: someday I will remember to use convert to forum codes before saving the message.
Amended on Tue 21 Aug 2007 07:00 PM by Shaun Biggs
#7
Playing with it, it keeps asking me to close something on line 12, on line 16. So I closed it, and it said close it on line 17, so I did, then line 18, and so on and so forth...


[string "Script file"]:18: '}' expected (to close '{' at line 12) near 'function'




riftitems={}
function riftcapture( sTrig, sLine, wildcards )
  riftitems[ wildcards[2] ] = tonumber( wildcards[1] )
  if wildcards[4] then
    riftitems[ wildcards[4] ] = tonumber( wildcards[3] )
    if wildcards[6] then
      riftitems[ wildcards[6] ] = tonumber( wildcards[5] )
    end
  end
end

riftsort = { { "tints", {"yellowtint", "redtint"},
             { "herbs", {"sparkleberry", "wormwood", "yarrow" },
             { "commodities", {"wood","gems","rope","gold" },
           }

function showrift()
  for _,i in riftsort do
    Note( "*("..string.upper(i[1])..")*")
    for k,v in i[2] do
      Tell( string.format( "  [%4d"] %-15s", riftitems[i], i ) }
    end
    Note( "" )
  end
end
end
Amended on Wed 22 Aug 2007 06:45 AM by Nick Gammon
USA #8
Bah, forgot a comma and put a brace where a parenthesis goes. Sorry, I kind of haphazardly ripped this out of a potion tracking plugin I made and tried hacking it back together too quickly. Just as a side note, if not all the things for sale have there own categories, then there should be some way to make a table of all the unclassified items in the rift.

riftitems={}
function riftcapture( sTrig, sLine, wildcards )
  riftitems[ wildcards[2] ] = tonumber( wildcards[1] )
  if wildcards[4] then
    riftitems[ wildcards[4] ] = tonumber( wildcards[3] )
    if wildcards[6] then
      riftitems[ wildcards[6] ] = tonumber( wildcards[5] )
    end
  end
end

riftsort = { { "tints", {"yellowtint", "redtint"} },
             { "herbs", {"sparkleberry", "wormwood", "yarrow" },
             { "commodities", {"wood","gems","rope","gold" }
           }
function showrift()
  for _,i in riftsort do
    Note( "*("..string.upper(i[1])..")*")
    for k,v in i[2] do
      Tell( string.format( "  [%4d"] %-15s", riftitems[i], i ) )
    end
    Note( "" )
  end
end
#9
I do not think I know this syntax, because I apparently have never done anything cool or radical with my scripts because most of this I am seeing is new to me (it is a great study aid though!).


[string "Script file"]:17: '}' expected (to close '{' at line 14) near 'function'



riftitems={}
function riftcapture( sTrig, sLine, wildcards )
  riftitems[ wildcards[2] ] = tonumber( wildcards[1] )
  if wildcards[4] then
    riftitems[ wildcards[4] ] = tonumber( wildcards[3] )
    if wildcards[6] then
      riftitems[ wildcards[6] ] = tonumber( wildcards[5] )
    end
  end
end

riftsort = { { "tints", {"yellowtint", "redtint", "bluetint", "purpletint", "greentint", "goldtint" } },
             { "herbs", {"sparkleberry", "wormwood", "yarrow", "pennyroyal", "sargassum", "weed", "arnica", "calamus", "chevril", "colewort", "coltsfoot", "faeleaf", "flax", "galingale", "kafe", "kombu", "marjoram", "merbloom", "mistletoe", "myrtle", "reishi", "rosehips", "sage" },
             { "commodities", {"wood", "gems", "rope", "gold", "coal", "leather" },
			 { "gems", {"moonstone", "ruby", "emerald", "amethyst", "coral", "pearl", "beryl", "bloodstone", "garnet", "jade", "onyx", "opal", "sapphire", "turquoise" }
		   }
function showrift()
  for _,i in riftsort do
    Note( "*("..string.upper(i[1])..")*")
    for k,v in i[2] do
      Tell( string.format( "  [%4d"] %-15s", riftitems[i], i ) )
    end
    Note( "" )
  end
end


That is most of the rift items, though... things like "ruby" would be "rubies" in the rift, so would I need to add those to the list also? It is not a complete list, but it covers everything in -my- rift. A friend is sending something of everything possible for me to add.
Amended on Wed 22 Aug 2007 06:45 AM by Nick Gammon
USA #10
Text editors that match {}, (), and [] are an invaluable tool. When adding the extra items, you forgot the underlined "}". This, as well as how I screwed up with having a "}" where a ")" should have been are easy to check for when your editor makes note of where the paired mark is.

riftsort = { { "tints", {"yellowtint", "redtint", "bluetint", "purpletint", "greentint", "goldtint" } },
             { "herbs", {"sparkleberry", "wormwood", "yarrow", "pennyroyal", "sargassum", "weed",
	                 "arnica", "calamus", "chevril", "colewort", "coltsfoot", "faeleaf", "flax",
			 "galingale", "kafe", "kombu", "marjoram", "merbloom", "mistletoe", "myrtle",
			 "reishi", "rosehips", "sage" } },
             { "commodities", {"wood", "gems", "rope", "gold", "coal", "leather" } },
             { "gems", {"moonstone", "ruby", "emerald", "amethyst", "coral", "pearl", "beryl", "bloodstone",
	                "garnet", "jade", "onyx", "opal", "sapphire", "turquoise" } }
           }

Also, since Lua allows for tables to be defined over several lines, I broke up the assigment into a few lines. Mostly so I could see where the pairs of braces were. If you don't like it, it's easy to convert back.
Amended on Wed 22 Aug 2007 05:43 AM by Shaun Biggs
#11
I just use LuaEdit. If you can recommend something better, please do. Thanks for all the help by the by! Let's see if I can get this working now. Why is it always the same error?

[string "Script file"]:24: '}' expected (to close '{' at line 14) near 'function'


line 14 is the line with 'function' on it, obviously.


riftsort = { { "tints", {"yellowtint", "redtint", "bluetint", "purpletint", "greentint", "goldtint" } },
             { "herbs", {"sparkleberry", "wormwood", "yarrow", "pennyroyal", "sargassum", "weed",
	                 "arnica", "calamus", "chevril", "colewort", "coltsfoot", "faeleaf", "flax",
			 "galingale", "kafe", "kombu", "marjoram", "merbloom", "mistletoe", "myrtle",
			 "reishi", "rosehips", "sage" },
             { "commodities", {"wood", "gems", "rope", "gold", "coal", "leather" } },
             { "gems", {"moonstone", "ruby", "emerald", "amethyst", "coral", "pearl", "beryl", "bloodstone",
	                "garnet", "jade", "onyx", "opal", "sapphire", "turquoise" }
           }


function showrift()
USA #12
I'm just going back and editing the posts now... getting to be too long of a thread just for typos.

As for editors, I use Textpad, but I don't believe it's free. I haven't used a Windows system in ages, so I don't really remember. Crimson is what Nick recommended to me for Windows, and from the screenshots, it looks like it's a great program. Free to use, to boot.
Amended on Wed 22 Aug 2007 06:01 AM by Shaun Biggs
#13
I agree, good idea!


Tell( string.format( "  [%4d"] %-15s", riftitems[i], i ) )



[string "Script file"]:27: ')' expected near ']'
Amended on Wed 22 Aug 2007 06:42 AM by Nick Gammon
USA #14
Tell( string.format( "  [%4d] %-15s", riftitems, i ) )

Hopefully that's it... pretty much the end of the script anyway.
Amended on Wed 22 Aug 2007 06:43 AM by Nick Gammon
#15
I hoped so, but this one is probably my problem, and not yours... there is an error if the trigger is calling;

riftcapture( sTrig, sLine, wildcards )

[string "Script file"]:3: attempt to index local 'wildcards' (a nil value)
stack traceback:
	[string "Script file"]:3: in function 'riftcapture'
	[string "Trigger: "]:1: in main chunk

OR

riftcapture()

[string "Script file"]:3: attempt to index local 'wildcards' (a nil value)
stack traceback:
	[string "Script file"]:3: in function 'riftcapture'
	[string "Trigger: "]:1: in main chunk

OR

showrift()

[string "Script file"]:24: attempt to call a table value
stack traceback:
	[string "Script file"]:24: in function 'showrift'
	[string "Trigger: "]:1: in main chunk


It also boots me from the mud, with an error:


could not decompress text file from mud: -5


The Mushclient error flashes pretty fast on my system, I'm trying to catch it exactly but it appears to be as above.
Australia Forum Administrator #16
As for an editor, I am very happy with Crimson Editor, freeware, that syntax colours Lua (and other things) and is very fast:

http://www.crimsoneditor.com/
Australia Forum Administrator #17
I pasted your code into Crimson Editor, which underlines the matching bracket, which is very helpful in cases where you leave out one. To get it to compile OK you had to have the final bracket paired with the opening one, like this:


  riftsort = { { "tints", {"yellowtint", "redtint", "bluetint", "purpletint", "greentint", "goldtint" } },
             { "herbs", {"sparkleberry", "wormwood", "yarrow", "pennyroyal", "sargassum", "weed",
	                 "arnica", "calamus", "chevril", "colewort", "coltsfoot", "faeleaf", "flax",
			 "galingale", "kafe", "kombu", "marjoram", "merbloom", "mistletoe", "myrtle",
			 "reishi", "rosehips", "sage" },
             { "commodities", {"wood", "gems", "rope", "gold", "coal", "leather" } },
             { "gems", {"moonstone", "ruby", "emerald", "amethyst", "coral", "pearl", "beryl", "bloodstone",
	                "garnet", "jade", "onyx", "opal", "sapphire", "turquoise" }
           }
           }}

Australia Forum Administrator #18
However, I wonder at your table layout. You have lots of items which are numerically keyed. It might be simpler to do it like this:


  riftsort = {
    tints = {"yellowtint", "redtint", "bluetint", "purpletint", "greentint", "goldtint" },
    herbs = {"sparkleberry", "wormwood", "yarrow", "pennyroyal", "sargassum", "weed",
             "arnica", "calamus", "chevril", "colewort", "coltsfoot", "faeleaf", "flax",
             "galingale", "kafe", "kombu", "marjoram", "merbloom", "mistletoe", "myrtle",
             "reishi", "rosehips", "sage" },
    commodities  = {"wood", "gems", "rope", "gold", "coal", "leather" },
    gems = {"moonstone", "ruby", "emerald", "amethyst", "coral", "pearl", "beryl", "bloodstone",
            "garnet", "jade", "onyx", "opal", "sapphire", "turquoise" },
           }


If you do that, you can see the overall layout with a bit of debugging code:


require "tprint"
tprint (riftsort)


This prints:


"gems":
  1="moonstone"
  2="ruby"
  3="emerald"
  4="amethyst"
  5="coral"
  6="pearl"
  7="beryl"
  8="bloodstone"
  9="garnet"
  10="jade"
  11="onyx"
  12="opal"
  13="sapphire"
  14="turquoise"
"commodities":
  1="wood"
  2="gems"
  3="rope"
  4="gold"
  5="coal"
  6="leather"
"tints":
  1="yellowtint"
  2="redtint"
  3="bluetint"
  4="purpletint"
  5="greentint"
  6="goldtint"
"herbs":
  1="sparkleberry"
  2="wormwood"
  3="yarrow"
  4="pennyroyal"
  5="sargassum"
  6="weed"
  7="arnica"
  8="calamus"
  9="chevril"
  10="colewort"
  11="coltsfoot"
  12="faeleaf"
  13="flax"
  14="galingale"
  15="kafe"
  16="kombu"
  17="marjoram"
  18="merbloom"
  19="mistletoe"
  20="myrtle"
  21="reishi"
  22="rosehips"
  23="sage"


With this layout you can refer to your gems (which is a table), as riftsort.gems.
Amended on Wed 22 Aug 2007 06:53 AM by Nick Gammon
Australia Forum Administrator #19
Quote:

It also boots me from the mud, with an error:

could not decompress text file from mud: -5


Sometimes a script error can do that. For now you can disable compression - see the world configuration -> Output -> Disable Compression.




When pasting code into this forum it helps to "quote forum codes" - this puts a backslash in front of square brackets, otherwise things like [i] turn the text that follows into italics. You can do this inside MUSHclient by copying the code to the clipboard, and selecting Edit menu -> Convert Clipboard Forum Codes.
USA #20
First off, the trigger wasn't working with the {1,3} for some reason. It was just grabbing the last argument.

<triggers>
  <trigger
   enabled="y"
   match="^  (?:\[([ \d]{4})\] (\w+)\s*)(?:\[([ \d]{4})\] (\w+)\s*)?(?:\[([ \d]{4})\] (\w+)\s*)?"
   name="zzzztestingthing"
   regexp="y"
   script="riftcapture"
   sequence="100"
  >
  </trigger>
</triggers>

As far as the code went, I'm not sure where everything got messed up, but now that I'm actually back on a computer where I could test things out:

riftitems={}
function riftcapture( sTrig, sLine, wildcards )
  riftitems[ wildcards[2] ] = tonumber( wildcards[1] )
  if wildcards[4] then
    riftitems[ wildcards[4] ] = tonumber( wildcards[3] )
    if wildcards[6] then
      riftitems[ wildcards[6] ] = tonumber( wildcards[5] )
    end
  end
end

riftsort = { { "tints", {"yellowtint", "redtint", "bluetint", "purpletint", "greentint", "goldtint" } },
             { "herbs", {"sparkleberry", "wormwood", "yarrow", "pennyroyal", "sargassum", "weed",
	                 "arnica", "calamus", "chevril", "colewort", "coltsfoot", "faeleaf", "flax",
			 "galingale", "kafe", "kombu", "marjoram", "merbloom", "mistletoe", "myrtle",
			 "reishi", "rosehips", "sage" } },
             { "commodities", {"wood", "gems", "rope", "gold", "coal", "leather" } },
             { "gems", {"moonstone", "ruby", "emerald", "amethyst", "coral", "pearl", "beryl", "bloodstone",
	                "garnet", "jade", "onyx", "opal", "sapphire", "turquoise" } }
           }
function showrift()
  for _,i in ipairs( riftsort ) do
    Note( "*("..string.upper(i[1])..")*" )
    for _,j in ipairs( i[2] ) do
      if riftitems[j] ~= nil then
        Tell( string.format( "  [%d] %s", riftitems[j], j ) )
      end
    end
    Note( "" )
  end

Here's the output when I did the test:

  [ 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
*(TINTS)*
  [86] bluetint  [130] greentint  [34] goldtint
*(HERBS)*
  [40] arnica  [159] calamus  [10] colewort  [3] coltsfoot  [225] faeleaf  [10] flax  [7] galingale  [120] kafe  [6] kombu  [38] marjoram  [10] merbloom  [10] mistletoe
*(COMMODITIES)*
  [40] gems  [34] gold  [2] coal  [144] leather
*(GEMS)*
  [125] amethyst

I'd set up an alias so that when you enter the command to look into the rift, it clears the table.
Australia Forum Administrator #21
Quote:

I hoped so, but this one is probably my problem, and not yours... there is an error if the trigger is calling;


riftcapture( sTrig, sLine, wildcards )


I am not sure what you are doing here. MUSHclient calls the script, you shouldn't be doing it yourself. Again I think you are confusing techniques here. Have you read:

http://www.gammon.com.au/forum/?id=6030
#22
I pasted your script and trigger into my MUSH exactly as it is for you and it does nothing for me when rift is done...

3289h, 3106m, 2923e, 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          [ 290] gems
  [  34] gold               [  34] goldtint           [ 130] greentint
  [ 118] kafe               [   6] kombu              [ 143] leather
  [  38] marjoram           [  10] merbloom           [  10] mistletoe
Type MORE to continue reading. (57% shown)
3289h, 3106m, 2923e, 10p, 15345en, 14430w elrx-


And thanks Nick, I'm glad I am learning so much from this project!
USA #23
You have to call the showrift function somehow. I did it from the command line, but if I were to call it often, I'd just have an alias for it. Possibly figure out how a quick way to display the information automatically, but that can get tricky.
#24
Same as other thread. Showrift plugin located here.

http://forums.lusternia.com/index.php?act=attach&type=post&id=1519
Australia Forum Administrator #25
I couldn't access that page, and a search for "showrift" returned no results.
Australia Forum Administrator #26
Quote:

attempt to index local 'wildcards' (a nil value)


Without seeing the code, it looks like you are calling riftcapture without supplying the wildcards array, hence the error message about it being nil.

Your snippet showed this:



riftcapture()


If you called that, then you haven't supplied the 3 arguments that riftcapture is expecting.
#27
So sorry Nick! I had changed the name of the plugin shortly after making that post.

Both plugins can be found here, on my website.

http://www.icitan.net/lusternia/systembuilding/

The plugin is now called, "riftsort"

It seems to be working just fine.
Amended on Wed 22 Aug 2007 10:10 PM by Simimi
Australia Forum Administrator #28
OK, so problem solved, then?
#29
Yes sir, the only 'problem' now is that the users want it to print in different ways, like in columns (right now the print is determined by your in game wrap width,((I think)) which mine is 255).

Since I had been working for a long time to try and figure out -how- to do custom prints like that, all I have to study on is this code here. I'm afraid I am not skilled enough for the fancy custom prints the users are looking for...