Originally Posted by
Shatterhand
Why dont you take the item with the first click?
Check for uptext, if its 'Take' then left click, if its not, right click and choose option 'Take'.
It take first item it click. But it won't take rest of the items in stack as x,y changed as player moved + they are below players leg.
Originally Posted by
The Mayor
Why don't you just right click the loot and pick it up that way?
Simba Code:
Procedure CheckLoot;
var
x, y: Integer;
begin
Writeln('CheckLoot');
if FindObjCustom(x,y,['ake','Take'],[7414386,7350664,6624140,5640311], 10) then
begin
Writeln('FOUND Loot');
PlaySound('G:\rs\beep.wav');
MMouse(x,y, 0, 0);
if IsUpTextMultiCustom(['rrow', 'oins']) then //you can add this uptext check if you don't want to pick up loot you don't want
begin
ClickMouse2(mouse_right); // right click
Wait(RandomRange(250, 500));
ChooseOption('ake'); // select Take
end;
while (IsMoving = True) do
begin
wait(100);
end;
end;
end;
E: Ninjad
Thanks @The Mayor, i used some of your code. But we have a stack of items as drop, not just one item. For one item, just clicking on it will work.
Originally Posted by
t4q
I've combined this to loot taking procedure... after it doesn't find loot any more - it checks under yout feet:
Simba Code:
mmouse(259, 184, 5, 5);
if IsUpTextMultiCustom(['ssence', 'rrow', 'icket', 'diamo', 'uby', 'Natu', 'Law', 'Coal','oins','ire']) then
begin
repeat
clickmouse2(mouse_left);
wait(100+random(50));
until
not IsUpTextMultiCustom(['ssence', 'rrow', 'icket', 'diamo', 'uby', 'Natu', 'Law', 'Coal']);
@t4q i think this is what i need.
But it is not working for me. as mouse is not correctly over the loot.
In my code, i put a big wait after the mmmouse, so i can see the mouse is not over the loot, so i am not getting any uptext.
Simba Code:
mmouse(259, 184, 5, 5);
wait(randomRange(1100,1500));
I want to read mmmouse documentation to get it exactly over loot
my current function
Simba Code:
Function CheckLoot:Boolean;
begin
Writeln('[CheckLoot] START');
if FindObjCustom(x,y,['ake','Take'],[7414386,7350664,6624140,5640311, 15000814], 10) then
begin
Writeln('[CheckLoot] FOUND Loot');
// playSound(ScriptPath + 'beep.wav');
MMouse(x,y, 0, 0);
ClickMouse2(mouse_right);
Wait(RandomRange(150, 300));
ChooseOption('ake');
mmouse(259, 184, 5, 5);
wait(randomRange(1100,1500));
if IsUpTextMultiCustom(['Grape', 'rape','ake']) then
begin
repeat
Writeln('[CheckLoot] Taking Loots below you');
ClickMouse2(mouse_left);
Wait(RandomRange(150, 300));
until not IsUpTextMultiCustom(['Grape', 'rape','ake']);
end;
wait(200+ random(100));
end;
wait(randomRange(600,900));
Writeln('[CheckLoot] END');
end;
IsUpTextMultiCustom(['Grape', 'rape','ake']) is always return FALSE as "mmouse(259, 184, 5, 5)" is not moving mouse over the loot.