Results 1 to 5 of 5

Thread: Alching Procedure?

  1. #1
    Join Date
    Jun 2011
    Location
    Anywhere that has WIFI
    Posts
    669
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Alching Procedure?

    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.

  2. #2
    Join Date
    Feb 2011
    Location
    Earth
    Posts
    1,784
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I think InvMouse would work for that.

    Currently: Working on Defending&Attacking in my Castle-Wars Script
    Project Rebuild: 90M/170M

  3. #3
    Join Date
    Jun 2011
    Location
    Anywhere that has WIFI
    Posts
    669
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by PatDuffy View Post
    I think InvMouse would work for that.
    Could you give me an example? I'm having trouble actually putting it into a script.

  4. #4
    Join Date
    Feb 2011
    Location
    Earth
    Posts
    1,784
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Jokester View Post
    Could you give me an example? I'm having trouble actually putting it into a script.
    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 Script
    Project Rebuild: 90M/170M

  5. #5
    Join Date
    Jun 2011
    Location
    Anywhere that has WIFI
    Posts
    669
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by PatDuffy View Post
    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
    Yeah I think I got it thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •