Results 1 to 7 of 7

Thread: InvMouse returns true when it shouldn't

  1. #1
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default InvMouse returns true when it shouldn't

    InvMouse will return true as long as the param you pass it is 1-28. it says "idgaf" if there is actually something to click... It will click even if nothing is their. If we want that(no IDEA why) then i want mouseItem back!!!
    Last edited by footballjds; 03-20-2012 at 07:26 PM.

  2. #2
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by footballjds View Post
    InvMouse will return true as long as the param you pass it is 1-28 and it can get to the inventory tab. it says "idgaf" if there is actually something to click... It will click even if nothing is their. If we want that(no IDEA why) then i want mouseItem back!!!
    We have MouseItem...

    But in your case just do. If ExistsItem(2) then InvMouse(2....);


    ~Home

  3. #3
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    InvMouse shouldn't check if there is an item in that slot or not, it's job is to mouse that slot. The script should check if something is there.

    MouseItem is still there.
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  4. #4
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    Quote Originally Posted by Kyle Undefined View Post
    InvMouse shouldn't check if there is an item in that slot or not, it's job is to mouse that slot. The script should check if something is there.

    MouseItem is still there.
    what the heck is the point in a function that ALWAYS returns true?
    (unless you give it a bad click var or your item isn't 1-28) IMHO the only way it will return false is if the scripter has a logic error and tells it to click an inv slot that doesn't exist or tells it to do something aside from move, rightClick, leftClick.
    Quote Originally Posted by Home View Post
    We have MouseItem...
    ~Home
    no, we don't:
    Simba Code:
    procedure MouseItem(I: Integer; button: Integer);
    begin
      InvMouse(i, button);
    end;

    mouse item doesn't do jack sh$%$... MouseItem should DEFINITELY check if there's an item there... don't you agree? After all the name of the procedure is MouseItem not MouseInvSlot...



    here is InvMouse, always returning true...
    Why would we check the invSlot and Action but not check if there's something there? lol'd...
    If you don't want invMouse to check for an item then restore MouseItem back to what it was long before....
    Simba Code:
    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;//<--- wtf?
      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;
    Last edited by footballjds; 03-20-2012 at 07:31 PM.

  5. #5
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    It returns true because it's doing what it said, it's mouse-ing the inventory slot. It will return false if the mouse or slot arguments aren't correct.

    The name suits what it does perfectly.
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  6. #6
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    Quote Originally Posted by Kyle Undefined View Post
    It returns true because it's doing what it said, it's mouse-ing the inventory slot. It will return false if the mouse or slot arguments aren't correct.

    The name suits what it does perfectly.
    don't ignore the rest of what i said kyle
    talk about MouseItem...

  7. #7
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Kyle's right about InvMouse, and when did MouseItem ever check if there was an item in that slot? I agree that it should check, but really? You're making a huge deal over this when you could just add one line of code to your script.

    MouseItem is a completely pointless function as it is, actually. It's just InvMouse with a different name. I'll add an if (ExistsItem(I)) then to MMouseItem and MouseItem.

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
  •