PDA

View Full Version : Inventory Tbox



jhildy
07-31-2007, 12:10 AM
i released these to members but i thought id release them to non-members aswell because i would like some more feedback. these are the same functions and the MMouseinv ect but they use the whole box of where an item is.
Function InvTbox(i: integer): Tbox;
begin
row := ceil(i div 4);
col :=i mod 4
if (col < 0) then
begin
col := 4;
end;
Result.x1:=569+(42*(col-1));
Result.y1:=213+(36*(row-1));
Result.x2:=600+(42*(col-1));
Result.y2:=244+(36*(row-1));
end;

Procedure MMouseItemBox(i: integer);
var Box: Tbox;
begin
Box:=InvTbox(i);
x:=RandomRange(Box.X1,Box.X2);
y:=RandomRange(Box.Y1,Box.Y2);
MMouse(x,y,0,0);
end;

Procedure MouseItemBox(i: integer;Left: boolean);
var Box: Tbox;
begin
Box:=InvTbox(i);
x:=RandomRange(Box.X1,Box.X2);
y:=RandomRange(Box.Y1,Box.Y2);
Mouse(x,y,0,0,Left);
end;
//by lorax made with InvBox
procedure DropItemBox(i: Integer);
begin
GameTab(4);
if ExistsItem(i) then
begin
MouseItemBox(i, False);
Wait(50 + Random(100));
if ChooseOption(x, y, 'Drop') then
Wait(200 + Random(100));
end;
end;
//By lorax with InvBox
Procedure DropAllBox;
begin
for i:=1 to 28 do
Dropitembox(i);
end;
//by sdcit made with invbox
procedure DropTobox(x, y: Integer);
var
todr: Integer;
begin
for todr := x to y do
DropItembox(todr)
end;
//By RSN with Invbox
procedure DragItembox(inv1, inv2: Integer);
var
x, y: Integer;
begin
MMouseItemBox(Inv1);
GetMousePos(x, y);
HoldMouse(x, y, True);
Wait(150 + Random(50));
MMouseItembox(Inv2);
GetMousePos(x, y);
ReleaseMouse(x, y, True);
Wait(100 + Random(100));
MMouse(x, y, 2, 2)
end;

i also adapted some current srl functions to use them.

itSchRis917
07-31-2007, 02:12 AM
Oooo, this is useful. Thank you very much!

Harry
07-31-2007, 02:23 AM
Oh, 1337! :D

Tim0suprem0
07-31-2007, 04:02 PM
These look nice, thanks!

rotflmfwao
08-01-2007, 02:14 AM
very helpful, thanks a bunch XD

Santa_Clause
08-01-2007, 06:23 AM
if ChooseOption(x, y, 'Drop') then

ClickOption('Drop', 2)...more efficient. 2 means it searches in the inventory, 1 is mainscreen and 3 is chatbox. It makes it faster than searching whole screen.

jhildy
08-01-2007, 07:31 PM
tell lorax that i just used my tbox function.

Santa_Clause
08-02-2007, 07:28 AM
Ha?

jhildy
08-02-2007, 10:20 PM
lorax made that function but i substituted the mmouseitem with mmouseitembox.