Hey i'm currently writing an infinite farming script. And I need to know how to click the 28th inventory spot after it clicks the HighAlch spell. Can anyone help me with this procedure? I already have the DTM of the spell.
Hey i'm currently writing an infinite farming script. And I need to know how to click the 28th inventory spot after it clicks the HighAlch spell. Can anyone help me with this procedure? I already have the DTM of the spell.
I think InvMouse would work for that.
Currently: Working on Defending&Attacking in my Castle-Wars ScriptProject Rebuild: 90M/170M
Simba Code:(*
InvMouse
~~~~~~~~
.. code-block:: pascal
function InvMouse(InvSlot, Action: Byte) : boolean;
A combined MouseItem & MMouseItem, will hopefully replace both
procedures one day. Usage is like SRL's MouseBox, Action determines what to do:
- 1: Leftclick
- 2: Rightclick
- 3: Move mouse to item
.. note::
by EvilChicken!
Example:
.. code-block:: pascal
if InvMouse(1, rightClick) then
WaitOption('eposit', 500);
*)
function InvMouse(InvSlot, Action: Byte) : boolean;
var
TB: TBox;
CurrPT : TPoint;
begin
result := false;
if (not InRange(Action, 0, 3)) then
begin
srl_Warn('InvMouse', 'Action #' + IntToStr(Action) + ' is not a valid action', warn_AllVersions);
Exit;
end;
if (not InRange(InvSlot, 1, 28)) then
begin
srl_Warn('InvMouse', 'Inventory slot #' + IntToStr(InvSlot) + ' is not a valid slot', warn_AllVersions);
Exit;
end;
GameTab(tab_inv);
Result := true;
TB := InvBox(InvSlot);
GetMousePos(CurrPT.x,CurrPT.y);
if PointInBox(CurrPT,TB) then
MouseBox(Max(CurrPT.x-random(2),TB.x1),Max(CurrPT.y-random(2),TB.y1),
Min(CurrPT.x+random(2),TB.x2),Min(CurrPT.y+random(2),TB.y2),Action) //LOL Pro-human much!
else
MouseBox(TB.X1, TB.Y1, TB.X2, TB.Y2, Action);
end;
Kinda explains itself, but it basically just moves to an inventory spot then clicks depending on what you tell it to do![]()
Currently: Working on Defending&Attacking in my Castle-Wars ScriptProject Rebuild: 90M/170M
There are currently 1 users browsing this thread. (0 members and 1 guests)