-
Thanks for the update
Unfortunately the following script doesn't work:
[code=lua]
local config = {
attacks = {
--[[
spells should be prioritized from top to bottom, eg: exori gran will be attempted before exori or exori mas.
players:
true = the area will include players in the threshold
false = the area will only count the monsters in the area
aggressive:
0 = attack triggers when no players are in the area.
1 = attack triggers when only war enemies and skulled players, noone else.
2 = attack triggers when innocents are in the area but not when friendlies are.
3 = attack triggers when friendlies are in the area but not when innocents are.
4 = attack triggers without any regards to players in the area.
]]
--{words="exori gran", threshold=3, mana=340, radius=1, aggressive=4, players=false},
{words="exori", threshold=4, mana=120, radius=1, aggressive=4, players=false}
--{words="exori ico", threshold =1, mana=40, radius=1, aggressive=4, players=false},
--{words="exori hur", threshold =2, mana=40, radius=1, aggressive=4, players=false}
}
}
local function think()
for _, info in ipairs(config.attacks)do
local amount = getTargetsInArea(Self.Position(), info.radius, info.aggressive, info.players)
if(amount)then
if(amount >= info.threshold) and (Self.CanCastSpell(info.words)) then
Self.Cast(info.words, info.mana)
end
end
end
end
[/code]
yields an error:
16:07 XenoScript Error:
Script: Script.lua
Line #: 1943
Chunk: C:\Program Files ?x86??XenoBot?Data?XenoLuaLib.lua
Error: attempt to index global 'pos' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.
How can I fix this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules