SRL Archive - Reflection Development

[R] Inventory.scar R_RandomMouseId;


ZaSz

2009-06-27 06:13:37


{*******************************************************************************
Function R_RandomMouseId(Id:integer; Option:string):boolean;
By: Zasz
Description: Clicks an Item by its I.D. But at a Random Spot in Inventory.
*******************************************************************************}

Function R_RandomMouseId(Id:integer; Option:string):boolean;
var
Invs, D, TempCounter, TempInt: integer;
ItemsID:Integer;
B:TBox;
TempX,TempY:integer;
InvSpot : tintegerarray;
begin
TempCounter := 0;
Invs := GetInterface(149, 0);
For TempInt:= 0 To 27 Do
begin
ItemsID := SmartGetFieldArrayInt(Invs, InventoryItemIDs, TempInt);
If(ItemsId = Id)Then
begin
Inc(TempCounter);
SetLength(InvSpot ,TempCounter);
InvSpot [TempCounter-1] := TempInt;
end;
end;
SmartFreeObject(Invs);
If(Length(InvSpot )>0)then
begin
TempInt:= Random(High(InvSpot));
B := InvBox(TempInt+ 1);
MMouse(B.x1+20-Random(5), B.y1+25-Random(5), 4, 4);
Wait(500+ Random(500));
GetMousePos(TempX, TempY);
Mouse(TempX, TempY, 0, 0, false);
Result := R_ChooseOption(Option);
end else
Result := false;
end;

I find it really useful as im also putting it as my food clicker in my fighter. It Just clicks a item by its id at a random inventory slot.

mormonman

2009-06-27 08:31:29

When I play legit, I am kind of OCD about my inventory, so this is not an antiban feature I would ever use. I personally think its makes it look like a bot.

ZaSz

2009-06-27 23:36:48

Some cases though, you randomly click, like when your fletching, and your knife is at the bottom, you don't click the log at the top…

mormonman

2009-06-28 00:36:29

From: Zasz
Some cases though, you randomly click, like when your fletching, and your knife is at the bottom, you don't click the log at the top…


Actually, I keep my knife at the top, and click the log at the top… In the case of having your knife on the bottom, I would click the closest log to the knife.