Jump to content
iirickyii

help with auto fletcher

Recommended Posts

helpme.png 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.

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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 by shadowrecon
Link to comment
Share on other sites

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 by Janilabo
Link to comment
Share on other sites

@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... :P

Sorry mate, that was my bad!

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...