Treant Combat System

by Unknown

Back to Mechanic's Corner.

Daved2009-03-20 01:43:36
So I've been attempting to follow the documentation to set up my defs, here's what I've got in my script file:
CODE
my_defs = {
= { "elasticity", "balancing", "limber", "falling" },
= { "gripping" },
= { "nightsight" },
= { "insomnia" },
= { "performance" },
= { "beauty", "deathsight", "kingdom", "levitating", "mercy", "perfection", "protection", "waterwalking", "waterbreathing", "acquisitio" },
= { "kafe", "fire", "frost", "speed" }
}

my_defup = {
= php:Table(),
= php:Table(),
= php:Table(),
= php:Table()
}

my_defup = "insomnia"
my_defup = "nightsight"
my_defup = "rub beauty"
my_defup = "rub kingdom"
my_defup = "rub mercy"
my_defup = "rub perfection"


my_defup = "elasticity"
my_defup = "limber"
my_defup = "falling"
my_defup = "gripping"

my_defup = "eat kafe"

my_defup = "sip fire"
my_defup = "sip frost"
my_defup = "sip quicksilver"

defs:def_up(my_defup)


and here's the error I'm getting:
CODE
Run-time error
World: Treant
Immediate execution
:30: attempt to index global 'php' (a nil value)
stack traceback:
:30: in main chunk
Error context in script:
26 : = { "kafe", "fire", "frost", "speed" }
27 : }
28 :
29 : my_defup = {
30*: = php:Table(),
31 : = php:Table(),
32 : = php:Table(),
33 : = php:Table()
34 : }


Unknown2009-03-20 01:57:03
It should be obvious what's causing this, but my answer to this is the same as most things: "support contract, please."

I will help with fixing bugs or adding new things that make good sense. Help like this is what a contract is for, however. Thanks.
Daved2009-03-20 02:22:00
Soon enough, soon enough.
Unknown2009-03-20 02:47:19
QUOTE (Zarquan @ Mar 19 2009, 12:05 PM) <{POST_SNAPBACK}>
One of two ways: purchase a support contract and I'll tell you or scan through the code to find which variables you need to set.



Money's not cheap so I'll be blowing stuff up! dribble.gif
Daved2009-03-20 16:32:10
I seem to have fixed the problem I was having by changing my script file thusly:

CODE
my_defs = {
= { "elasticity", "balancing", "limber", "falling" },
= { "gripping" },
= { "nightsight" },
= { "insomnia" },
= { "performance" },
= { "beauty", "deathsight", "kingdom", "levitating", "mercy", "perfection", "protection", "waterwalking", "waterbreathing", "acquisitio" },
= { "kafe", "fire", "frost", "speed" }
}


require "php"
my_defup = {
= php:Table(),
= php:Table(),
= php:Table(),
= php:Table()
}

my_defup = "insomnia"
my_defup = "nightsight"
my_defup = "rub beauty"
my_defup = "rub kingdom"
my_defup = "rub mercy"
my_defup = "rub perfection"


my_defup = "elasticity"
my_defup = "limber"
my_defup = "falling"
my_defup = "grip"
my_defup = "rub levitate"
my_defup = "rub waterwalking"
my_defup = "rub waterbreathe"

my_defup = "eat kafe"

my_defup = "sip fire"
my_defup = "sip frost"
my_defup = "sip quicksilver"


require "defs"
require "display"
require "parry"
require "treant"
defs:def_up(my_defup)


When I reloaded the script file, it deffed me up smile.gif
Unknown2009-03-20 16:33:32
Okay, but now I have a silly question for you: how are you using Treant if you don't have the 'require "treant"' line in your main script (which loads everything you need into the global space)?
Unknown2009-03-20 16:37:27
Heh, I made my own auto-def trigger, seeing as Treant doesn't track spiritbonds. happy.gif
Unknown2009-03-20 16:39:38
QUOTE (Caerulo @ Mar 20 2009, 12:37 PM) <{POST_SNAPBACK}>
Heh, I made my own auto-def trigger, seeing as Treant doesn't track spiritbonds. happy.gif


Two very different things, though. They may be defensive in nature (no pun intended), but they are not defenses, so not covered by my defense tracking system. I personally just use Spiritbond Nature (not a pun at all) to put them all up and be done with it. Power is cheap and building a system to track the spirit bonds is just more hassle than I want. tongue.gif
Unknown2009-03-20 16:46:49
QUOTE (Zarquan @ Mar 21 2009, 12:39 AM) <{POST_SNAPBACK}>
Two very different things, though. They may be defensive in nature (no pun intended), but they are not defenses, so not covered by my defense tracking system. I personally just use Spiritbond Nature (not a pun at all) to put them all up and be done with it. Power is cheap and building a system to track the spirit bonds is just more hassle than I want. tongue.gif

Yea, I can understand why you don't track them. Although, I prefer to just manually (or rather, automatically) spiritbond individually rather than Spiritbond Nature. Don't understand why myself.
Daved2009-03-20 16:59:50
QUOTE (Zarquan @ Mar 20 2009, 12:33 PM) <{POST_SNAPBACK}>
Okay, but now I have a silly question for you: how are you using Treant if you don't have the 'require "treant"' line in your main script (which loads everything you need into the global space)?


I was wondering the same thing, but I got an error like

attempt to index global 'treant' (a nil value)

when I didn't have it there. I have require "treant" in my script file twice >.>
Unknown2009-03-22 22:09:10
Version 1.19 is now available! As always, please see the version history on the site for details on changes made.

One of the most noticeable changes (and probably the one that will have the most reports of needing adjustments) is curing with Choke. If you are brave enough to test this, please send me good, details reports (preferably, with logs that have DEBUG ON) so I'm able to recreate the problems and fix them.

I'd like to thank those who have been sending me lots of ideas and little bug reports or feature requests lately! You guys find things I missed and think up new stuff that I just don't have the time or creativity for myself. I enjoy receiving your e-mails and look forward to coding most of the things you send, so please keep it up. (However, please don't be too disappointed if I'm unable to answer your questions or add things you ask.)
Casilu2009-03-22 22:46:15
I uploaded the new version and it seems I can't find the treant_moon file.
Unknown2009-03-22 23:20:51
You're absolutely right! I forgot to add the file to my source control module, so I've fixed it up and the file is now in the archive. Re-download it and you'll find it. Thanks.
Sylphas2009-03-23 03:12:04
QUOTE (Zarquan @ Mar 22 2009, 06:09 PM) <{POST_SNAPBACK}>
I'd like to thank those who have been sending me lots of ideas and little bug reports or feature requests lately! You guys find things I missed and think up new stuff that I just don't have the time or creativity for myself. I enjoy receiving your e-mails and look forward to coding most of the things you send, so please keep it up. (However, please don't be too disappointed if I'm unable to answer your questions or add things you ask.)


I would like it to include a unicorn pony. However, I understand that unicorns may not compress well in a .zip format. If such is the case, I will accept a unicorn of a different format.
Unknown2009-03-23 03:30:40
This would be my first time updating it. Do I just save and extract the files in the same place as I did 1.18, and then do /treant:Install() once I start MUSH up?
Unknown2009-03-23 03:39:53
Yup, that's right. When you reload Treant.mcl, the version number will update to 1.19.
Unknown2009-03-26 18:52:23
Version 1.20 is now available. Check the history for the list of changes. Plenty of fixes, improvements, and additions in this version.

One thing of note is that premium scripts will now be auto-loaded when detected, so you won't need the 'require' lines in your main script. This only applies to purchased scripts and only to the Lua code. You still need to do the /treant:Install() to load the XML settings.

I'll be posting a name highlighting (premium) script shortly, too. It provides triggers to highlight names from each organization and a set of aliases to add/remove names. It uses custom colors 5-8, by default.
Unknown2009-03-26 18:56:58
Ooh, that was fast and with alot of nice things too. Thanks Zarquan. (and i'll actually thank you with some credits as soon as the prices drops a bit ninja.gif )
Everiine2009-03-26 19:02:42
Lol, I can't keep up with you! I was just getting used to the premium script you sent me smile.gif. Will download this now!

Also, to anyone considering a support contract, do it! Zarquan's support is fast, patient, and tailored to your needs. After I paid for my contract I sent credits for the Enemy Tracking plugin. That same day it arrived in my inbox, and he had tweaked some of the code based on my specialization and whatnot. Support your coder! biggrin.gif
Unknown2009-03-27 20:32:22
What's the built-in potionlist command again?