:) lets go through this problem, maybe we can figure out whatsagoin on. :)
{*******************************************************************************
function InvFull: Boolean;
By: n3ss3s
Description: Returns True if inventory is full
*******************************************************************************}
function InvFull: Boolean;
begin
Result := (InvCount = 28); // <-- Hmm... invcount
end;
{*******************************************************************************
function InvCount: Integer;
By: RsN
Description: Returns amount of items in your inventory
*******************************************************************************}
function InvCount: Integer;
var
I: Integer;
begin
Result := 0;
GameTab(tab_inv); // <-- hmm.. gametab..
for I := 1 to 28 do
if (ExistsItem(I)) then
Inc(Result);
end;
{*******************************************************************************
function GameTab(Tab: Integer): Boolean;
By: ZephyrsFury
Description: Switches to a specific game tab.
const
tab_Combat = 21;
tab_Stats = 22;
tab_Quest = 23;
tab_Diary = 24;
tab_Inv = 25;
tab_Equip = 26;
tab_Prayer = 27;
tab_Magic = 28;
tab_Objectives = 29;
tab_Friends = 30;
tab_Ignore = 31;
tab_Clan = 32;
tab_Options = 33;
tab_Emotes = 34;
tab_Music = 35;
tab_Notes = 36;
tab_LogOut = 37;
*******************************************************************************}
function GameTab(Tab: Integer): Boolean;
var
tP: TPoint;
T, Tries: Integer;
begin
Result := false;
if (not(InRange(Tab, Tab_Combat, Tab_LogOut))) then
begin
SRL_Warn('GameTab', 'Tab ' + IntToStr(Tab) + ' is not a valid tab number.', warn_AllVersions);
Exit;
end;
Result := (GetCurrentTab = Tab);
if (Result) then exit;
if (TabExists(Tab)) then
begin
tP := Point((Tab - 21) mod 8 * 30 + RandomRange(527, 545),
(Tab - 21) div 8 * 298 + RandomRange(177, 197));
if (Tab = tab_LogOut) then
tP := Point(RandomRange(747, 760), RandomRange(3, 18));
Tries := 0;
while ((Tries < 3) and (not Result)) do
begin
Mouse(tP.X, tP.Y, 0, 0, True);
T := GetSystemTime;
while (not Result) and (GetSystemTime - T < 2000) do
begin
Result := (GetCurrentTab = Tab);
Wait(100 + Random(100));
end;
Inc(Tries);
end;
if (Result) then
Wait(250 + Random(300));
end else
SRL_Warn('GameTab', 'GameTab ' + IntToStr(Tab) + ' is not a valid tab number.', warn_Notice);
So we tracked this down to 1 area where the problem -might- be, but since I know this is working fine, lets just go ahead anyway and see what its doing.
Result := (GetCurrentTab = Tab); // So pretty much: if (YourTab) = (TheTabYouWant) then the Result is True.
if (Result) then exit; // if the result is true then exit this function.
if (TabExists(Tab)) then // if the tab you want exists in SRL then...
begin
tP := Point((Tab - 21) mod 8 * 30 + RandomRange(527, 545),
(Tab - 21) div 8 * 298 + RandomRange(177, 197); // Gets the point(x, y) of the tab you want.
if (Tab = tab_LogOut) then // if the tab you want is the LogOut tab then...
tP := Point(RandomRange(747, 760), RandomRange(3, 18)); // gets the point of the log_out point.
hmm, so this is how it gets the tpoint (which is just an X and Y) to click on. Lets see what it does after that…
Tries := 0; // Tries is declared as 0.
while ((Tries < 3) and (not Result)) do // so while you have less then 3 tries, and its not on the tab you want ...
begin
Mouse(tP.X, tP.Y, 0, 0, True); // Click on the tab you want...
T := GetSystemTime; // Mark the system time..
while (not Result) and (GetSystemTime - T < 2000) do // While its not on the tab you want, and 2 seconds have not passed do..
begin
Result := (GetCurrentTab = Tab); // Re-check to see if your tab is set to the tab you want...
Wait(100 + Random(100)); // wait a bit..
Inc(Tries); // Increases Tries by 1.
end;
end;
so itll pretty much only click on this tab 3 times total [granted that its not on the inventory tab].
The problem you may be getting is that maybe runescape's Graphics settings aren't set right for the downloaded client. Try to re-check if its set to safe-mode, low-res, and all that good botting stuff :D Either way, i don't see how the script is constantly clicking the inventory tab, since your only calling it once, it should only click it a max (3) times, even if its not working :O After u make sure all the graphics settings are good for this client and the web-browser try this.
[Make sure your using simba xD] This should read through the things your using and see if things are working correctly. Don't forget to activate your client ^^.
program EtherFreaker;
{$i srl\srl.scar}
var
CGT: Integer; // Well use this to see our current game tab.
InvC: Integer; // Well use this to see how many items are in our inventory.
begin
SetupSRL; // Make sure you call this if your using any of SRL's Functions :D
Wait(RandomRange(400, 700)); // Waits a random range from 400 ms to 700 ms.
CGT := GetCurrentTab; // CGT is now assigned to the function GetCurrentTab.
InvC := InvCount; // InvC is now assigned the function InvCount.
if (CGT = 25) then // Tab 25 is the inventory tab.
Writeln('-> Our current game tab is the inventory.')
else
Writeln('[X] Our current game tab is not the inventory, its gametab('+ToStr(CGT)+').');
Writeln('-> We have ' + ToStr(InvC) + ' items in our inventory.');
if InvFull then
Writeln('--> Our inventory is full.')
else
Writeln('[X] Our inventory is not full.');
end.
If everything here works fine [if the debug prints out good], then theres no problem. If something didnt return right, then post the debug up here :D, hope we helped dude.
Heres a little of my testing. I just downloaded the runescape client from runescapes site. Logged in, activated the client, and ran this. Heres a couple.
|First Run|
// I had a Pickaxe in my inventory, inventory gametab pre-selected.
Compiled succesfully in 2684 ms.
-> Our current game tab is the inventory.
-> We have 1 items in our inventory.
[X] Our inventory is not full.
Successfully executed.
|Second Run|
// I had a Pickaxe and 2 ores in my inventory, i had the stats gametab pre-selected.
SRL Compiled in 47 msec
[X] Our current game tab is not the inventory, its gametab(22).
-> We have 3 items in our inventory.
[X] Our inventory is not full.
Successfully executed.
// It clicked the inventory tab :), and it said that the stats game_tab was pre-selected when it ran. Everything checks out.
|Third Run|
// I had a Pickaxe and 27 ores in my inventory(full inventory), i had the inventory gametab pre-selected.
SRL Compiled in 32 msec
-> Our current game tab is the inventory.
-> We have 28 items in our inventory.
--> Our inventory is full.
Successfully executed.
Everything should work out good for you bud :), i know my web-browser RS works 100% with SRL, and so does the client :), you should have no problems :D.