Jump to content
slacky

Problem using InvFull and DropAll!

Recommended Posts

Hello... It goes like this: When I come to the point when I need to drop all my logs/or anything else, I check the Inventory, using:

if(InvFull = True) Then DropAll; - DropAll is short for DropAllExclude([])

 

Iv'e tried some other methods, with no luck. Like DropItems, InvCount... It all returns the same result.

- Keeps jumping over the Inventory image/button, untill it has repeatet it self 28 times.

 

I'm updating OSI 2-3 times a day in despret hope for a fix, but nothing so far. The problem has been going on

atleast 4 days (that's when I updated my SCAR and startet using OSI in my dev. and not SRL).

 

Edit:

I tried updating using, GIT, since I see a lot of updates to OSI in GitHub. - Not any help.

 

 

Edit2:

I hacked together a sample (To make a simple IronMiner)...

If it works for you, then there is somethin wrong here... So i'm atleast closer to an answer.

 

program SomeSimpleBot;

// This should probobly work with both trees, and Iron. 
// You will just have to change the timer, and color.
// Works most places.

{$DEFINE RS2}
{$DEFINE OSI_Color_Anti_Randoms}
{$I OSI\OSI.scar}
{$I OSI\RS2\Misc\Anti-Ban.scar}

procedure ScriptTerminate;
begin
 FreeOSI;
end;

var x, y: Integer;

//--Color: Rock, (or tree)---->
const 
 color = 2570337; //Carefully selected color of Iron.
 timer = 3000; //For iron. 
               //For willows use atleast 6000.
//--AntiBan----------------->
procedure MacroMouse(pos_x,pos_y:Integer; sel:boolean);
begin
 pos_x := pos_x+random(3)-random(3); //randomshit
 pos_y := pos_y+random(3)-random(3); //randomshit
 MoveMouseSmoothEx(pos_x,pos_y, 1, 10, 100, 8, 16);
 wait(200+random(300));
 GetMousePos(x, y);
 ClickMouse(x,y,sel);
end;

procedure Randomize;
begin
 x := Random(123); Wait(120 + Random(120));
 y := Random(153); Wait(50 + Random(50));
 MoveMouseSmoothEx(x,y, 1, 10, 100, 6, 4);
   Wait(450 + Random(350));
end;
//--END AntiBan-------------->

procedure ClickTarget;
begin
 if IsUpTextMulti(['Mine', 'ine','Min']) then
   GetMousePos(x, y);
   MacroMouse(x, y, True);
   Wait(timer + Random(1200));
   if(random(4) = 0) Then Randomize;
end;

procedure FindTarget;
var
 w, h: Integer;
 p: TPoint;
 TPA: TPointArray;
begin
 GetClientDimensions(w, h);
 begin
   ColorToleranceSpeed(2);
   SetColorspeed2Modifiers(0.14, 0.72);
   if FindColorsTolerance(TPA, color, MSX1, MSY1, MSX2, MSY2, 8) then
   begin
     p := TPA[Random(Length(TPA))];
     WriteLn('Found some rocks: ' + IntToStr(p.x) + ', ' + IntToStr(p.y));
   end;
   MMouse(p.x, p.y, 1, 1);
   Wait(100 + Random(200));
 end;
end;



//Run program------------------->
begin
 SetupOSI;
 repeat
   FindTarget;
   ClickTarget;
   if(InvFull) then DropAll;
 until False;
end.

Edited by slacky
Link to comment
Share on other sites

I will quote myself: "I tried updating using, GIT". So i've tried it all (that I know) :/

 

It would be nice, if anyone could just manualy upload the latest OSI, to any filesharing-site, and paste the link here! :D

Edited by slacky
Link to comment
Share on other sites

So what is the problem than?

 

Arg! I've just deleted scar, deleted OSI and ALL of the work-files.. Reinstalled it all.. And the same problem seems to come up. So eather the latest OSI is buggy, or scar does "not support" Windows XP SP3, since i've tried it on all my three computers (which are all running XP SP3). It would be nice if anyone could test the function with the latest OSI, and scar. And tell me if it's a general problem.

Link to comment
Share on other sites

So what is the problem than?

 

Arg! I've just deleted scar, deleted OSI and ALL of the work-files.. Reinstalled it all.. And the same problem seems to come up. So eather the latest OSI is buggy, or scar does "not support" Windows XP SP3, since i've tried it on all my three computers (which are all running XP SP3). It would be nice if anyone could test the function with the latest OSI, and scar. And tell me if it's a general problem.

In theory SCAR should work with XP and up, but I can only guarantee it works for Windows 7 as it is designed on and for Windows 7.

Link to comment
Share on other sites

Safemode (And fixed client, highest brightness.) was to no help. Guess the problem is missing support for Windows XP, in scar. It's a pitty that I only can use Simba on Fedora.

Wierd thing is that i works with SMART...

 

If not XP is old get with the times.
That might be. But windows 7 got no features that I long for, it requires more, it gives you less controll, and it's just generally crappy compared to XP. You know there is a reason for that about 38% of the market is still using XP. Anyways, im not using XP as my main OS, I'm just running it as a VM, from fedora, mainly due to lack of photoshop support (and some other stuff) in linux. Yes, wine did not cut it.

 

And I could say the same to you. As a developer you should know by now that Linux is a much better platform for most developing. But i guess you only work on your rsbots :)

 

......................

I made my own small dropfunction, that works for me (and using bitmap to check if inv. is full)..

 

Btw: Is there a premade function that can help me split "gameplay"-screen from the "menu" (as in inventory-, combat-, stats-bar *and so on*)? Some way that I can select a pixalrange, within that area, ad just work a loop within it?

 

 

Anyway thank you for your support, I'm gratefull! :)

Edited by slacky
Link to comment
Share on other sites

Btw: Is there a premade function that can help me split "gameplay"-screen from the "menu" (as in inventory-, combat-, stats-bar *and so on*)? Some way that I can select a pixalrange, within that area, ad just work a loop within it?

 

OSI\RS2\Core\Globas.scar

 

Gamescreen constants

 

I used SCAR with windows XP for 5 years with no problems at all, and other people still use XP with SCAR have no problems at all. So maybe your copy of it is dodgy.

Link to comment
Share on other sites

So I figured out that the problem is within this code (Inventory.scar):

 

  if (not (SetGameTab(Tab_Inv))) then
   if (not (BankScreen)) then
     Exit;

I removed it, EVERYWHERE in the Inventory.scar, then some of it worked (not tested everything) :) As i said earlier, the problem was that the mouse was jumping over the Inventorybutton. So, something is wrong (atleast here) with the function: SetGameTab(Tab_Inv), so, i'm goin to modify that function, if I can :)

 

I'm a newbe to pascal... But i learn fast, as I got 3 years with Python, and 6 years with PHP. And time with some other programming and scripting languages.

 

Edit: It seems to be a problem with the OCR, since I cant seem to get ChooseOptionMulti to work.. :S

- I dont know... It WORKS perfectly using SMART...

Edited by slacky
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...