iirickyii Posted June 10, 2013 Share Posted June 10, 2013 the part in the red is where my mouse appears after my current coding is over but idk why it wont appear when i screenshot it, the blue thats circled (make X) is where i want my mouse to go to and then click So basically I need help with dragging my mouse to the (Make X) option and have it type in (27). I tried using this function RS07_ChooseOptionItemCount: Integer; but im not sure if thats right or not as im a NOOB to using scar ive only made a simple clicking script where it spams curse at the monk of zamorak under varrock castle in the cage no prior experience so no flaming on me please and if you can help me that would be great thanks! the part of the script that i would put this in is the part where its bolded and italic'ed thanks {$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; var X, Y: Integer; const Log = 1549514; 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); wait(2000) end; procedure CutLogs2; begin if FindColor(X, Y, Log, 0, 0, 700, 700) then begin WriteLn(IntToStr(X) + ', ' + IntToStr(Y)); WriteLn(GetColor(X, Y)); MoveMouse(X, Y); ClickMouse(X, Y, mbright); end; end; procedure ReturnBows; begin if RS07_OpenBank(RS07_BANK_VARROCK_WEST) then begin RS07_DepositEx(1, -1); end; end; begin SetUpOSI; MSSL_Setup; CutLogs; CutLogs2; end. Quote Link to comment Share on other sites More sharing options...
LordJashin Posted June 10, 2013 Share Posted June 10, 2013 Well for one. For SCAR Divi Code. You can use the [-SCAR][/-SCAR] TAGS BUT REMOVE THE DASHES - e.g. [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; var X, Y: Integer; const Log = 1549514; 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); wait(2000) end; procedure CutLogs2; begin if FindColor(X, Y, Log, 0, 0, 700, 700) then begin WriteLn(IntToStr(X) + ', ' + IntToStr(Y)); WriteLn(GetColor(X, Y)); MoveMouse(X, Y); ClickMouse(X, Y, mbright); end; end; procedure ReturnBows; begin if RS07_OpenBank(RS07_BANK_VARROCK_WEST) then begin RS07_DepositEx(1, -1); end; end; begin SetUpOSI; MSSL_Setup; CutLogs; CutLogs2; end. [/scar] I'm sure there is some functions for what you want, but I do not know at this time what they are. E.g. ChooseOption, ChooseOptionMulti, other functions out there... Quote Link to comment Share on other sites More sharing options...
iirickyii Posted June 11, 2013 Author Share Posted June 11, 2013 ive tried using this function function RS07_ChooseOptionItemCount: Integer; -Returns count of items from showing Choose Option menu (0-31). but where do i put the integer because it says thats its invalid in the debug box http://forums.scar-divi.com/mssl/2131-intro-mssls-runescape-2007-commands Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted June 12, 2013 Share Posted June 12, 2013 (edited) If using OSI, use the function ChooseOption(Option: String); [scar]if OptionBoxExists then if ChooseOption('Make X') then Writeln('Selected the option');[/scar] Also dont use MoveMouse use MMouse(); and Mouse() to click items not ClickMouse. These functions i suggested have variances which create emulate human clicking and movements better. Edited June 12, 2013 by shadowrecon Quote Link to comment Share on other sites More sharing options...
Janilabo Posted June 12, 2013 Share Posted June 12, 2013 (edited) There's several commands in MSSL which you can use for this task: These below I have documented in that particular Intro.. RS07_ChooseOptionUseItemQuick() (Takes Choose Option item index) procedure RS07_ChooseOptionUseItemQuick(ID: Integer); {==============================================================================] Explanation: Uses Choose option by list index (ID) quickly. NO FAILSAFES! [==============================================================================} RS07_ChooseOptionUseQuick() (Takes Choose Option item text/name) procedure RS07_ChooseOptionUseQuick(name: string); {==============================================================================] Explanation: Uses Choose option by name quickly. CASE-SENSITIVE, NO FAILSAFES! [==============================================================================} ..and then here's also some other ones, that I haven't documented in there yet, but they are of course available for you to use aswell... RS07_ChooseOptionUseItem() (Takes Choose Option item index) function RS07_ChooseOptionUseItem(ID: Integer): Boolean; {==============================================================================] Explanation: Uses Choose option by list index (ID). Returns true, if ID was clicked! [==============================================================================} RS07_ChooseOptionUse() (Takes Choose Option item text/name) function RS07_ChooseOptionUse(name: string): Boolean; {==============================================================================] Explanation: Uses Choose option by name. Choose Option item MUST Start With or Equal name. CASE-SENSITIVE! Returns true, if Choose Option was used succesfully. [==============================================================================} You can always find even more choose option related commands by browsing the Main.scar from ChooseOption section in MSSL: https://subversion.assembla.com/svn/MSSL/trunk/Library/Gaming/RuneScape_2007/Trunk/Core/ChooseOption/Main.scar That file is located in your computer at path: "*\MSSL\Library\Gaming\RuneScape_2007\Trunk\Core\ChooseOption\" *=Includes Folder (SCAR Divi => Tools => Explore => Includes Folder) @shadowrecon: RS07_MoveMouse() and RS07_ClickMouse() are designed especially for RS use. They include humanlike randomness. Regards, -Jani Edited June 12, 2013 by Janilabo Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted June 12, 2013 Share Posted June 12, 2013 @Jani [scar]procedure CutLogs2; begin if FindColor(X, Y, Log, 0, 0, 700, 700) then begin WriteLn(IntToStr(X) + ', ' + IntToStr(Y)); WriteLn(GetColor(X, Y)); MoveMouse(X, Y); ClickMouse(X, Y, mbright); end; end;[/scar] Quote Link to comment Share on other sites More sharing options...
Janilabo Posted June 12, 2013 Share Posted June 12, 2013 @Jani [scar]procedure CutLogs2;begin if FindColor(X, Y, Log, 0, 0, 700, 700) then begin WriteLn(IntToStr(X) + ', ' + IntToStr(Y)); WriteLn(GetColor(X, Y)); MoveMouse(X, Y); ClickMouse(X, Y, mbright); end; end;[/scar] Ahhhh, I see now... Sorry mate, that was my bad! Quote Link to comment Share on other sites More sharing options...