Results 1 to 5 of 5

Thread: Inventory Mouse Functions

  1. #1
    Join Date
    Feb 2006
    Posts
    582
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Inventory Mouse Functions

    IsInvItem will move the mouse to the slot, check to see if the item is there and then return true or false.
    MouseInvItem will do what IsInvItem does and then decides to click it left or right.
    Code:
    function IsInvItem(InvItem: string; Slot: integer): boolean;
    begin
      MMouseItem(Slot);
      if(IsUpText('Use ' + InvItem))then
        begin
          Result:= True;
        end else
          Result:= False;
    end;
    
    function MouseInvItem(InvItem: string; Slot: integer; Click: boolean): boolean;
    begin
      if(IsInvItem(InvItem, Slot))then
        begin
          MouseItem(Slot, Click);
          Result:= True;
        end else
          Result:= False;
    end;
    This is only appropriate for some items knowing that some items don't have "Use" as thier first option.
    Free File Hosting
    No download timers!

    Rifkwtf.com

  2. #2
    Join Date
    Feb 2006
    Location
    Las Vegas, NV
    Posts
    939
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    coolio! also you could incorporate the isuptext to what a scripter can put in.. pretty much just add a little part like this

    Code:
    function IsInvItem(Action, InvItem: string; Slot: integer): boolean;
    begin
      MMouseItem(Slot);
      if(IsUpText(Action + ' ' + InvItem))then
        begin
          Result:= True;
        end else
          Result:= False;
    end;
    
    function MouseInvItem(Action, InvItem: string; Slot: integer; Click: boolean): boolean;
    begin
      if(IsInvItem(Action, InvItem, Slot))then
        begin
          MouseItem(Slot, Click);
          Result:= True;
        end else
          Result:= False;
    end;
    i know its somethin simple but you could use it like this..
    Code:
    if(MouseInvItem('Blow Up', 'Potato', 4, true))then
      writeln('you blew it up!')
    that way you dont need to limit it to 'Use'.. lol blow up potato.. what a game that would be
    Busy with real life. I'll still be around occasionally.
    Current Mood:


  3. #3
    Join Date
    Feb 2006
    Posts
    582
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Actually, I was thinking about that.

    Thanks
    Free File Hosting
    No download timers!

    Rifkwtf.com

  4. #4
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Woot for Pwndeh

    Tnx for sharing ;D

  5. #5
    Join Date
    Feb 2006
    Posts
    582
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by XxKanexX
    Woot for Pwndeh

    Tnx for sharing ;D
    Took five seconds, pulled it out of my ass because I was bored.

    No problem for sharing.

    I also ran out of ideas.
    Free File Hosting
    No download timers!

    Rifkwtf.com

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Mouse Functions
    By 0wn 4 skill in forum OSR Help
    Replies: 3
    Last Post: 07-04-2008, 09:20 PM

Posting Permissions

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