Just thought I would poke my nose in
Code: Select all
if not player:hasBuff("Magic Perfume") then
inventory:useItem(202879);
elseif (player:hasBuff("Magic Perfume")) then
ksLog("Magic Perfume detected, disabling looting and bag checks", LOGLEVEL_INFO);
KS_allow_loot =false;
KS_check_bag=true;
KS_item_queue_size = 20;
else
KS_allow_loot =true;
KS_check_bag=true;
KS_item_queue_size = 0;
end;
That code isn't so good, the 3rd part will never ever ever get done because the first 2 parts are true or false for the same thing. So you either have the buff or you don't have the buff and you will never do the 3rd section.
Maybe you could change it so that if you don't have the buff you try to use the item but if the item doesn't exist then change the values.
Code: Select all
if not player:hasBuff("Magic Perfume") then
if inventory:getItemCount(202879) ~= 0 then
inventory:useItem(202879);
else -- no buff and no item
KS_allow_loot =true;
KS_check_bag=true;
KS_item_queue_size = 0;
end
else -- has buff
ksLog("Magic Perfume detected, disabling looting and bag checks", LOGLEVEL_INFO);
KS_allow_loot =false;
KS_check_bag=true;
KS_item_queue_size = 20;
end;
As for me I just put this in my profiles onleavecombat section
Code: Select all
if not player:hasBuff(503479) then -- pet perfume 30 days
--inventory:useItem(204514) -- 30 day
inventory:useItem(207582) --1 day
end