05-03-2014, 03:26 AM
LUA Programming
itemrange = 500;
repeat
if GetTarget() ~= nil then
if GetTarget():IsAlikeDeath() and GetTarget():IsMonster() and GetZoneType() ~= 12 then
SetPause(true);
itemList = GetItemManager();
for item in itemList.list do
itemloc = item:GetLocation();
if not item == nil then
if GetRangeTo(itemloc) < itemrange then
repeat
Command("/useshortcut 1 1");
Sleep(50);
Command("/useshortcut 1 2");
Sleep(50);
Command("/useshortcut 1 1");
Sleep(50);
until GetRangeTo(itemloc) > itemrange
end;
end;
Sleep(100); --- set sleep time
SetPause(false);
end;
end;
end;
Sleep(200);
until false;