Treant Combat System

by Unknown

Back to Mechanic's Corner.

Unknown2009-04-07 15:32:41
I see. I understand roughly how it works (it's similar to your map plugin, right?), but as I still don't understand Lua yet, it's beyond me at the moment.
Unknown2009-04-07 15:50:12
My own prompt modifier is nothing like my map plugin (and Simimi's isn't, either, except that it's a plugin).

I thought I'd posted this here before, but maybe I just e-mailed it to someone. You modify this to do whatever you want...

CODE

     enabled="y"
   keep_evaluating="y"
   match="^\\d+h\\, \\d+\\m\\, \\d+e\\, \\d+p\\, \\d+en\\, \\d+w(?:\\, \\d+mo)? .*?\\-.*?$"
   name="prompt_dec__"
   omit_from_log="y"
   omit_from_output="y"
   regexp="y"
   script="decorate_prompt"
   sequence="1000"
  >
  


CODE
function decorate_prompt(name, line, wildcards, styles)
  local time_ms = GetInfo(232)
  ColourTell("dimgray", "", string.format(" ", time_ms))

  for _, v in ipairs(styles) do
    ColourTell(RGBColourToName(v.textcolour), RGBColourToName (v.backcolour), v.text)
  end

  Note("")
end
Unknown2009-04-07 15:55:05
Oh, thanks! I'll see what I can do with it.
Unknown2009-04-08 08:31:12
Alright, I've been trying to figure out what HPC is. I'm guessing that it's number of seconds after , but I can't seem to figure out what '0' is to convert it to HH:MM:SS format.
Unknown2009-04-08 11:03:00
Exactly my point. It's measured in microseconds, but the starting point is arbitrary and thus it cannot be converted to standard clock time.
Unknown2009-04-08 11:56:30
Ah, I see, so you use it to measure time between the two prompts, and not clock-time?
Unknown2009-04-08 11:58:17
Yup. I wish I knew how Zugg coded his millisecond time field, so I could come up with something similar for MUSHclient.
Gaetele2009-04-08 18:34:05
When I try to create a New World from the template.mcl, I get two error messages.

Line 446: C:\\Program Files\\MUSHclient\\worlds\\plugins\\treant_plugin_atcp.xml was not found. (include file not loaded)
Line 447: C:\\Program Files\\MUSHclient\\worlds\\plugins\\treant_plugin_map.xml was not found. (include file not loaded)

It seems it's looking through the actual MUSHclient folder instead of looking through C:\\Treant like it should be.
Unknown2009-04-08 18:38:01
It'll do that when you miss the important step of setting C:\\Treant as your working directory. (If I had one credit for every time this happened... I'd have more credits.)
Gaetele2009-04-08 18:45:15
I do have it set as my directory though.
Unknown2009-04-08 18:46:26
Either you're mistaken or the plugins are not in that directory. What sometimes happens is that a person changes one shortcut and runs a different one without even realizing it. Double and triple check it!
Daved2009-04-08 18:48:05
I had a similar problem, the solution is in the global preferences window, where you went to have MUSHClient trust all worlds. Go to the plugin tab, and change that directory to your Treant directory.
Gaetele2009-04-08 18:48:40
Unknown2009-04-08 18:50:17
Try Daved's method then? Either the dozens of others who use Treant have figured this out on their own or they've just created their own workarounds. But, yes, I do have my own global directory set in MUSHclient to my Treant directory, so it couldn't hurt to change that.
Gaetele2009-04-08 18:53:37
That worked, Daved. Thanks.
Ashteru2009-04-10 15:40:46
Don't know if anyone else had that, but when I played around in Treant a bit, I got this
Line 4: Timer for 'every' time cannot have zero interval (timer not loaded)
after trying to get the autoharvester to work
Unknown2009-04-10 15:56:05
That particular error can occur when your locale settings use a comma instead of a decimal-point to delineate floating-point numbers (i.e., "0,5" instead of "0.5"), or at least that's what I gathered from the last person to report this problem to me.
Ashteru2009-04-10 16:15:01
Aah, interesting
Unknown2009-04-12 18:49:00
CODE
NL:45/100 H:2857/2857 M:24/3324 E:3513/3513 P:10/10 N:12055/12055 W:14890/14890 ð ex-


What's this?
Unknown2009-04-12 21:33:15
That's an ATCP packet that didn't get caught by the plugin because of some glitch. I'm inclined to say that the glitch is in Rapture, but maybe that's not fair. No, it's not something I plan to fix at this point because debugging that is a pain in my rear.