Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
exatox

[Runescape 2007][Fight Caves] [Fixed]

Recommended Posts

I added some things to Toby1's code to prevent it form getting stuck after Runescape's most recent update.

I don't know how to upload a file because I'm very new with Scar but here's the code! Just copy and paste it!

Any tips/suggestions to improve the code is encouraged although I'm not sure how much time I will have with school.

 

 

Warning: Does NOT support randoms although they are very rare. A Runescape ban could result in using this bot.

 

 

 

program RS07_FightCaveFighter;
{$DEFINE RS07}
{$I MSSL\MSSL.scar}
var
 X, Y: Integer;
const
 USERNAME = '';
 PASSWORD = '';


procedure EnterCave;
begin
Wait(2000 + Random(1700));
if (FindColorTol(X, Y, 10921906, RS07_GameActionBx.X1, RS07_GameActionBx.Y1, RS07_GameActionBx.X2, RS07_GameActionBx.Y2, 5)) then
 begin
   RS07_ClickMouse(X, Y, mbLeft);
   MSSL_Wait(800 + Random(3000));

 end;
end;

begin
 MSSL_Setup;
 ClearDebug;
// RS07_SetScreenBrightness(RS07_SCREEN_BRIGHTNESS_VERY_BRIGHT);
 ColorToleranceSpeed(2);
 SetColorSpeed2Modifiers(0.28, 0.17);
repeat
 RS07_AutoRetaliate;
 MSSL_Wait(500);
// if not RS07_LoggedIn then
//   begin
//      RS07_LogIn(username, password);
//     MSSL_Wait(3000 + Random(43));
//     RS07_SetCompassDir('S'); 
 //  end;
 if RS07_LoggedIn then
   begin
     EnterCave;
     MSSL_Wait(10000 + Random(5000));
   end;
   if FindColorTol(x, y, 16711680, 81, 369, 480, 459, 2) then 

   RS07_ClickMouse(300 + Random(15), 446 + Random(7), mbLeft);
   MSSL_Wait(600 + Random(500));

 until False;
end.

 

You can change the waiting times if you know what you are doing!

1000 = 1 second

 

Enjoy! B|

Exatox's Fight Caves 1.0.scar

Edited by exatox
  • Like 1
  • Confused 1

Share this post


Link to post
Share on other sites

I don't know how to use smart. It doesn't seem to work for me! How do I set it up? Is there a good guide somewhere explaining smart? I'd love to make have a smart option for my scripts!

Edited by exatox

Share this post


Link to post
Share on other sites

EDIT: Included basic script framework.

 

I don't know how to use smart. It doesn't seem to work for me! How do I set it up? Is there a good guide somewhere explaining smart? I'd love to make have a smart option for my scripts!
Install OSI2 and MSSL, then just hit run in SCAR and wait for SMART to load the game (wait until you see login screen)

 

NOTE: SMART might bug a little sometimes, so if you see SMART with white screen for like a minute,

then close SMART and run the script again, repeat doing this until you get it loaded correctly.

 

- - - Updated - - -

 

Here is a basic script "framework" for using SMART with SCAR Divi:

 

program RS07FrameWork;

{$DEFINE RS07}
{$DEFINE SMART} // We need to define SMART, .
{$I OSI\OSI.scar} // OSI comes with SMART so its required!
{$I MSSL\MSSL.scar}

procedure ScriptTerminate;
begin
 MSSL_Unsetup;
 FreeOSI; // Unsetups OSI - Always unsetup OSI after MSSL.
end;

// procedures and functions here.

begin
 SetUpOSI; // Setups OSI, always setup is before MSSL, becomes it loads SMART!
 MSSL_Setup;
 // Custom mainloop things start from this line
end.

 

-Jani

Share this post


Link to post
Share on other sites

Script works well for the most part and I appreciate what you did for fixing it, but I'm not sure why I get this error occasionally that stops it from working;

 

[MSSL Terminate - 13/05/2013 ~ 19:46:56(:720)]: Problem with RuneScape 2007 client! Applet INACTIVE?

Stopped execution (45498419.2815 ms)

 

This only occurs with the version that was posted by exatox, Janilabo's version works extremely well. The only thing I noticed is that sometimes it gets stuck clicking constantly at the bottom of the text box but it seems infrequent, my guess would be because it clicks when it detects the blue color there? So when somebody talks it constantly clicks the bottom. Would recommend turning off public chat.

Edited by Russy

Share this post


Link to post
Share on other sites
Script works well for the most part and I appreciate what you did for fixing it, but I'm not sure why I get this error occasionally that stops it from working;

 

[MSSL Terminate - 13/05/2013 ~ 19:46:56(:720)]: Problem with RuneScape 2007 client! Applet INACTIVE?

Stopped execution (45498419.2815 ms)

 

This only occurs with the version that was posted by exatox, Janilabo's version works extremely well. The only thing I noticed is that sometimes it gets stuck clicking constantly at the bottom of the text box but it seems infrequent, my guess would be because it clicks when it detects the blue color there? So when somebody talks it constantly clicks the bottom. Would recommend turning off public chat.

Thanks for the feedback man!

 

Thinking I could fix this issue, if you send me a bitmap with that "Click here to continue" part.. :P

I need full bitmap of the client though, to get the positioning correctly (I am going to base it on bitmap finding)

 

So if you want it fixed:

When you get that "Click here to continue" option to your screen, use the script I attached (capture.scar), target the RuneScape applet (SMART or browser) with SCAR Divi's Crosshair and then run the script (capture.scar) by pressing Play.

Doing this captures the full client and it will be saved to the same folder with script (SCAR Divi => Tools => Explore => Script's Folder) as "capturedClient.bmp".

 

Simply filter out all of your personal details from that bitmap, by editing it with paint (blank out anything you don't want to keep in it for us/me) and then save.

After that, send it to me with PM or attach it here with a post. :) This way, I could add better solutions in, just to prevent clicking those texts by other people in public chat (or anything else, really).

 

-Jani

Share this post


Link to post
Share on other sites

Hmm. I don't know why its doing this for you. I'll ponder on it tonight.

In the meantime, I added in Special Attack support for those rangers using magic shorts B| .

I will try and make it more flexible, allowing other special weapons to be used later.

 

program RS07_FightCaveFighter;
{$DEFINE RS07}
{$I MSSL\MSSL.scar}
var
X, Y: Integer;
const
USERNAME = '';
PASSWORD = '';




procedure EnterCave;
begin
Wait(2000 + Random(1700));
if (FindColorTol(X, Y, 10921906, RS07_GameActionBx.X1, RS07_GameActionBx.Y1, RS07_GameActionBx.X2, RS07_GameActionBx.Y2, 5)) then
begin

RS07_ClickMouse(X, Y, mbLeft);
MSSL_Wait(800 + Random(3000));

end;
end;



procedure Special;
begin


//mage short spec
if FindColorTol(x, y, 4097340, 700, 420, 710, 430, 2) then
repeat
begin
MSSL_Wait(60000 + Random(25000));
RS07_ClickMouse(572 + Random(120), 417 + Random(11), mbLeft);
end;

until FindColorTol(x, y, 4097340, 574, 415, 710, 430, 2);




end;








begin
MSSL_Setup;
ClearDebug;
RS07_SetScreenBrightness(RS07_SCREEN_BRIGHTNESS_VERY_BRIGHT);
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.28, 0.17);
repeat
RS07_AutoRetaliate;
MSSL_Wait(500);
if not RS07_LoggedIn then
begin
RS07_LogIn(username, password);
MSSL_Wait(3000 + Random(43));
RS07_SetCompassDir('S');
end;
if RS07_LoggedIn then
begin
EnterCave;
MSSL_Wait(5000 + Random(10000));
Special;
end;

//start cave
if FindColorTol(x, y, 16711680, 81, 369, 480, 459, 2) then

RS07_ClickMouse(300 + Random(15), 446 + Random(7), mbLeft);
MSSL_Wait(600 + Random(500));

until false;

end.[/Code]

Share this post


Link to post
Share on other sites
[quote name='exatox']Hmm. I don't know why its doing this for you. I'll ponder on it tonight.
In the meantime, I added in Special Attack support for those rangers using magic shorts :cool: .
I will try and make it more flexible, allowing other special weapons to be used later.

[Code]program RS07_FightCaveFighter;
{$DEFINE RS07}
{$I MSSL\MSSL.scar}
var
X, Y: Integer;
const
USERNAME = '';
PASSWORD = '';




procedure EnterCave;
begin
Wait(2000 + Random(1700));
if (FindColorTol(X, Y, 10921906, RS07_GameActionBx.X1, RS07_GameActionBx.Y1, RS07_GameActionBx.X2, RS07_GameActionBx.Y2, 5)) then
begin

RS07_ClickMouse(X, Y, mbLeft);
MSSL_Wait(800 + Random(3000));

end;
end;



procedure Special;
begin


//mage short spec
if FindColorTol(x, y, 4097340, 700, 420, 710, 430, 2) then
repeat
begin
MSSL_Wait(60000 + Random(25000));
RS07_ClickMouse(572 + Random(120), 417 + Random(11), mbLeft);
end;

until FindColorTol(x, y, 4097340, 574, 415, 710, 430, 2);




end;








begin
MSSL_Setup;
ClearDebug;
RS07_SetScreenBrightness(RS07_SCREEN_BRIGHTNESS_VERY_BRIGHT);
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.28, 0.17);
repeat
RS07_AutoRetaliate;
MSSL_Wait(500);
if not RS07_LoggedIn then
begin
RS07_LogIn(username, password);
MSSL_Wait(3000 + Random(43));
RS07_SetCompassDir('S');
end;
if RS07_LoggedIn then
begin
EnterCave;
MSSL_Wait(5000 + Random(10000));
Special;
end;

//start cave
if FindColorTol(x, y, 16711680, 81, 369, 480, 459, 2) then

RS07_ClickMouse(300 + Random(15), 446 + Random(7), mbLeft);
MSSL_Wait(600 + Random(500));

until false;

end.[/Code][/QUOTE]Glad to see you are progressing, exatox! :p

Fixed standards, added in support for SMART (uses OSI), tweaked colorfinding (now only the cave part is based on CTS2, just like it should?):

[code]program RS07_FightCaveFighter;

{$DEFINE RS07}
{$DEFINE SMART}
{$I OSI\OSI.scar}
{$I MSSL\MSSL.scar}

const
USERNAME = '';
PASSWORD = '';

procedure ScriptTerminate;
begin
MSSL_Unsetup;
FreeOSI;
end;

procedure EnterCave;
var
x, y: Integer;
begin
if FindColorTol(x, y, 16711680, 81, 369, 480, 459, 2) then //start cave
begin
RS07_ClickMouse(300 + Random(15), 446 + Random(7), mbLeft);
MSSL_Wait(600 + Random(500));
end;
Wait(2000 + Random(1700));
if (MSSL_FindColorTolCS(x, y, 10921906, RS07_GameActionBx.X1, RS07_GameActionBx.Y1, RS07_GameActionBx.X2, RS07_GameActionBx.Y2, 5, MSSL_ColorSettings2(2, 0.28, 0.17))) then
begin
RS07_ClickMouse(x, y, mbLeft);
MSSL_Wait(800 + Random(3000));
end;
end;

procedure Special;
var
x, y: Integer;
begin
//mage short spec
if FindColorTol(x, y, 4097340, 700, 420, 710, 430, 2) then
repeat
MSSL_Wait(60000 + Random(25000));
RS07_ClickMouse((572 + Random(120)), (417 + Random(11)), mbLeft);
until FindColorTol(x, y, 4097340, 574, 415, 710, 430, 2);
end;

begin
SetUpOSI;
MSSL_Setup;
ClearDebug;
RS07_SetScreenBrightness(RS07_SCREEN_BRIGHTNESS_VERY_BRIGHT);
repeat
RS07_AutoRetaliate;
MSSL_Wait(500);
case RS07_LoggedIn of
True:
begin
EnterCave;
MSSL_Wait(5000 + Random(10000));
Special;
end;
False:
begin
RS07_LogIn(USERNAME, PASSWORD);
MSSL_Wait(3000 + Random(43));
RS07_SetCompassDir('S');
end;
end;
until False;
end.[/code]

Although, I still recommend playing around with the version that I posted here before (post #2), because it wont click objects with same colors, as it checks those matching objects first with mouse and then if uptext matches with our object (cave) it performs the action (click). So it's a lot safer to use.

Share this post


Link to post
Share on other sites

Hey, good job on fixing that problem when RS updated if you want i'll add it to the thread I made(and give you credits of course), so, again, goodjob! P.S what was RS's update out of curiousity (what made it become stuck) :P ?

Share this post


Link to post
Share on other sites

Toby, I'm not completely sure what stopped it from working, but I sure as heck wasn't going to get 80 defense on my own! I believe RS made it necessary to press "click here to continue" to start the caves. Also, to prevent form getting stuck, the player has to start in the middle to keep the NPC from getting stuck. If the player isn't dying around/at wave 7, the chances of NPC Tok-Xil(126) leading your character to a corner to get stuck are very high. As my defense level is increasing I wear less armor :P This doesn't seem to affect xp/h

 

Janilabo, I still have no clue how to set up smart or how it works. Any chance you can point me to a good thread/guide? :eek:

Edited by exatox

Share this post


Link to post
Share on other sites

Now that the fight caves have a timer for every time you can go in, this method of XP is now drastically lessened. Although not a bad form of XP, I think there are better methods. I was wondering if somebody would be able to make those options viable, for example; the white knights in Falador. Setting a spawn point to that exact spot is perfect because you won't need food or any items, just fight until you die. Now this one may be a little bit more difficult, but I was wondering about a pest control script. I know this may be better suited for a different thread, but since this one seems active and has good script-writers so I figured I'd just post it here.

Share this post


Link to post
Share on other sites
Now that the fight caves have a timer for every time you can go in, this method of XP is now drastically lessened. Although not a bad form of XP, I think there are better methods. I was wondering if somebody would be able to make those options viable, for example; the white knights in Falador. Setting a spawn point to that exact spot is perfect because you won't need food or any items, just fight until you die. Now this one may be a little bit more difficult, but I was wondering about a pest control script. I know this may be better suited for a different thread, but since this one seems active and has good script-writers so I figured I'd just post it here.

 

I like the falador castle idea, although you would become prone to random events :\

Share this post


Link to post
Share on other sites
I like the falador castle idea, although you would become prone to random events :\
True, but I'm getting random events a lot now because of the fight cave timer as well. Not sure what else could be done.

 

Edit: Just came up with a pretty good idea, I think people will like it.

How about after dying in the fight caves, the script logs you out for "X" amount of an input time? This will reduce the random event chance greatly and will keep you getting XP.

Edited by Russy

Share this post


Link to post
Share on other sites
True, but I'm getting random events a lot now because of the fight cave timer as well. Not sure what else could be done.

 

Edit: Just came up with a pretty good idea, I think people will like it.

How about after dying in the fight caves, the script logs you out for "X" amount of an input time? This will reduce the random event chance greatly and will keep you getting XP.

 

I think this would seem pretty obvious to Jagex that it is a macro if it logs out EVERY time after dying in the fight pits, however, if you're willing to try add it I will try and help you (code wise) :P

Share this post


Link to post
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...