Jump to content
iirickyii

MSSL inventory clicking/using help

Recommended Posts

Hi, this is my first time using MSSL and SMART and i need help because in my script in my procedure CutLogs i can't seem to figure out an MSSL command line to first POINT at index number 0 (first slot in inventory...which is a knife) then I want it to use it at index number 1 (which would be a log) and then I need it to click Cut X (then type in a number which would be 27) but I can't figure out how to do the first part which is at least click on it so can someone please help and figure out whats wrong! will be very appreciated :P and btw I know I haven't set the first procedure before CutLog because i Know it already works and I want to get this CutLog procedure done and tested out before i put it before CutLog and add a repeat and im not done with the 3rd procedure (returnbow)

 

 

[scar]

 

{$DEFINE RS07} // V - Bright Settings

{$DEFINE SMART} // Comment out to use normal browser

{$DEFINE OSI_RS07_Color_Anti_Randoms}

 

{$I OSI\OSI.scar}

{$I MSSL\MSSL.scar}

 

procedure ScriptTerminate;

begin

MSSL_Unsetup;

FreeOSI;

end;

 

procedure GetLogs;

begin

RS07_OpenBank(RS07_BANK_VARROCK_WEST);

wait(1321);

RS07_WithdrawEx(0, -1);

wait(1222);

RS07_CloseBank;

end;

 

procedure CutLogs;

begin

------- \\ i need help with a command line here to point at first slot in inventory (index number 0) then click it, use it with 2nd inventory slot (1) and do a X command and type in 27 (this is going to be an auto fletcher script if you havent noticed) im stuck here so please help thanks guys!!

end;

 

procedure ReturnBows;

begin

if RS07_OpenBank(RS07_BANK_VARROCK_WEST) then

begin

RS07_DepositEx(1, -1);

end;

end;

 

 

begin

SetUpOSI;

MSSL_Setup;

CutLogs;

end.

Link to comment
Share on other sites

Hey man, I will be able to help you out with this problem later today, I just need to finish first an object tracking function for upcoming version of MSSL (this is top priority to get out as soon as possible).

 

Glad to see you added in comments exactly where you need help!

 

Will be posting out solutions to this topic tonight. :)

 

Regards,

-Jani

Link to comment
Share on other sites

Hello iirickyii, where do you get that "Cut X" from?

You might have to workout that yourself, but I am able to help you out with slot usage.

 

Here:

{$DEFINE RS07} // V - Bright Settings
//{$DEFINE SMART} // Comment out to use normal browser
{$DEFINE OSI_RS07_Color_Anti_Randoms}

{$I OSI\OSI.scar}
{$I MSSL\MSSL.scar}

procedure ScriptTerminate;
begin
 MSSL_Unsetup;
 FreeOSI;
end;

procedure GetLogs;
begin
 RS07_OpenBank(RS07_BANK_VARROCK_WEST);
 wait(1321);
 RS07_WithdrawEx(0, -1);
 wait(1222);
 RS07_CloseBank;
end;

function UseItemWithItem(item1Slot, item2Slot: Integer): Boolean;
var
 pt1, pt2: TPoint;
begin
 if (InRange(item1Slot, 0, 27) and InRange(item2Slot, 0, 27) and (item1Slot <> item2Slot) and RS07_LoggedIn and RS07_OpenInventory) then
 begin
   Result := (RS07_InventorySlotUsed(item1Slot) and RS07_InventorySlotUsed(item2Slot));
   if Result then
   begin  
     RS07_QuickOpenInventory; // Just a failsafe, for cancelling any (possibly) old item usages
     pt1 := RS07_GetInventorySlotCenter(item1Slot);
     MSSL_OffsetPoint(pt1, RandomRange(-3, 4), RandomRange(-3, 4)); 
     pt2 := RS07_GetInventorySlotCenter(item2Slot);
     MSSL_OffsetPoint(pt2, RandomRange(-3, 4), RandomRange(-3, 4)); 
     MSSL_Wait(35 + Random(25));
     RS07_ClickMouse(pt1.X, pt1.Y, mbLeft);
     MSSL_Wait(90 + Random(0));
     RS07_ClickMouse(pt2.X, pt2.Y, mbLeft);
   end;
 end;
end;

procedure CutLogs;
begin
 UseItemWithItem(0, 1);    
end;

procedure ReturnBows;
begin
 if RS07_OpenBank(RS07_BANK_VARROCK_WEST) then
 begin
   RS07_DepositEx(1, -1);
 end;
end;

begin
 SetUpOSI;
 MSSL_Setup;
 CutLogs;
end.

 

So there's now UseItemWithItem. ;)

Link to comment
Share on other sites

Thank you very much!! Now I dont even need to use smart client and that worked and basically after what you wrote i need to be able to point to "Oak Longbow" in this picture but its supposed to be Maple Longbow but im not at that fletch lvl yet and thats why i want this to do that helpp.png

 

then after i point at it i want to be able to right click it and choose "Make X" help 2.pngthats where this comes from but the only way I know how is to do findcolor and such as this is first time using mssl so i'm stuck and want it to type 27 to fletch my whole inventory or i watched this guide on here showing i can do make X by this one code i forgot basically showing how many megapixels down it is after you right click it im pretty sure but thanks janilabo !!

Link to comment
Share on other sites

I just can't help my self:

... how many megapixels down it ...

Not megapixels, nor kilopixels but pixels.

Megapixel = 1000 kilopixel -> 1 kilopixels = 1000 pixels. So one megapixel is = 1000000 pixels. The screen usually only got around 900-1080 pixels height, and 1440 - 1920px width.

 

What your asking is pretty basic. And is with out a doubt something you should try to figure out your self. Mostly all you need to do is move the mouse to X,Y-coordiants, and use MSSL's select option to choose Make X.

Link to comment
Share on other sites

I just can't help my self:

 

Not megapixels, nor kilopixels but pixels.

Megapixel = 1000 kilopixel -> 1 kilopixels = 1000 pixels. So one megapixel is = 1000000 pixels. The screen usually only got around 900-1080 pixels height, and 1440 - 1920px width.

 

What your asking is pretty basic. And is with out a doubt something you should try to figure out your self. Mostly all you need to do is move the mouse to X,Y-coordiants, and use MSSL's select option to choose Make X.

lol my bad was pretty chopped earlier but thank ya will attempt myself

Link to comment
Share on other sites

Thanks for pointing out how to use that Make X ricky (I don't play RuneScape 2, I am more into RuneScape Classic, so I only script for RS07 without playing it myself)

You can use SMART if you want, I just forgot to remove the comments from it (its easier for me to develop things using browser)..

Anyways, advice by James (Wanted) is a working solution to that, but I can help you do it (write the code) if you need. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...