DarkstaR
01-10-2014, 07:20 PM
This update fixes a stability issue which recently surfaced and adds some useful improvements to the Scripter.
Changelog:
3.4.6
Fixed a bug which was causing persistent debugs upon login and injection. XenoBot will be much more stable now.
Improved the versatility of the Creature iterators in the Scripter.
The new function prototype for all iterators is Creature.Iterator(options), where options is a table
of Creature class member functions and expected results. Compare functions (eq, neq, gt, lt) can be used,
and the default is eq. Examples:
Print the names of all summons (the stand-alone "true" assumes the equals operator):
for n, c in Creature.iMonsters({issummon = true}) do print(n) end
Print the names of allies with less than 50% hp (The {lt, 50} uses the less-than operator on the value 50):
for n, c in Creature.iAllies({healthpercent = {lt, 50}}) do print(n) end
Calls to iterators which use the old prototypes Creature.Iterator(dist) and Creature.Iterator(dist, sort)
will still function normally. In order to use these options with the new options system, however, you must call
the iterators in the following fasion (the options dist and sort can NOT use compare functions):
for n, c in Creature.iAllies({dist = 5, sort = mysortfunc, healthpercent = {lt, 50}}) do print(n) end
For download and operation instructions, refer back to this thread:
http://forums.xenobot.net/showthread.php?19
Changelog:
3.4.6
Fixed a bug which was causing persistent debugs upon login and injection. XenoBot will be much more stable now.
Improved the versatility of the Creature iterators in the Scripter.
The new function prototype for all iterators is Creature.Iterator(options), where options is a table
of Creature class member functions and expected results. Compare functions (eq, neq, gt, lt) can be used,
and the default is eq. Examples:
Print the names of all summons (the stand-alone "true" assumes the equals operator):
for n, c in Creature.iMonsters({issummon = true}) do print(n) end
Print the names of allies with less than 50% hp (The {lt, 50} uses the less-than operator on the value 50):
for n, c in Creature.iAllies({healthpercent = {lt, 50}}) do print(n) end
Calls to iterators which use the old prototypes Creature.Iterator(dist) and Creature.Iterator(dist, sort)
will still function normally. In order to use these options with the new options system, however, you must call
the iterators in the following fasion (the options dist and sort can NOT use compare functions):
for n, c in Creature.iAllies({dist = 5, sort = mysortfunc, healthpercent = {lt, 50}}) do print(n) end
For download and operation instructions, refer back to this thread:
http://forums.xenobot.net/showthread.php?19