If so, would you implement that like:
Code: Select all
reqbuffname="500704,620313"
Code: Select all
reqbuffname="500704,620313"
Code: Select all
if( randomfollow ) then
local t = {}
local i = 1;
for token in string.gmatch(randomfollow, "[^,]+") do
t[i] = token;
i= i + 1;
end
tmp.RandomFollow = t;
end
if( randombefore ) then
local t = {}
local i = 1;
for token in string.gmatch(randombefore, "[^,]+") do
t[i] = token;
i= i + 1;
end
tmp.RandomBefore = t;
end
Code: Select all
-- Check required buffs/debuffs
for key,reqbuff in pairs(self.ReqBuffName) do
local count = 0
if(self.ReqBuffCount[key])then
count = ReqBuffCount[key]
end
if( reqbuff ~= "" and reqbuff ~= "nil") then
local bool;
if( self.ReqBuffTarget == "player" ) then
bool = player:hasBuff(reqbuff, count)
elseif target and ( self.ReqBuffTarget == "target" ) then
bool = target:hasBuff(reqbuff, count)
end
if bool == false then
debug_skilluse("REQBUFF");
return false
end
end
end
-- Check non-required buffs/debuffs
for key,nobuff in pairs(self.NoBuffName) do
local count = 0
if(self.NoBuffCount[key])then
count = NoBuffCount[key]
end
if( nobuff ~= "" and nobuff ~= "nil") then
local bool;
if( self.NoBuffTarget == "player" ) then
bool = player:hasBuff(nobuff, count)
elseif target and ( self.NoBuffTarget == "target" ) then
bool = target:hasBuff(nobuff, count)
end
if bool == true then
debug_skilluse("NOBUFF");
return false
end
end
end
Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests