SRL Archive - SRL Bugs

Gametab switching to wrong tab


Footy

2012-08-04 15:51:51

When I use this is in a script:
6..8: begin writeln('Antiban: Checking crafting XP'); gametab(22); wait(randomrange(200, 600)); mmouse(632, 409 - Yoff, 4, 4); wait(randomrange(2000, 10000)); Gametab(25); wait(randomrange(200, 450)); end;                
It switches to the task gametab instead of the skills gametab. The inventory gametab works fine for me, just not this one. Could someone look into this, and see if its on SRL's side? Thanks

Element17

2012-08-04 16:27:42

Its better not to use the numbers because they are subject to change…not sure this is a bug. It says the numbers could be wrong in the include.


(*

GameTab
~~~~~~~

.. code-block:: pascal

function GameTab(Tab: Integer): Boolean;

Returns True if the Tab exists.

.. note::

by Zephyrsfury

.. code-block:: pascal

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;

.. note::
Please use the constants and not the numbers! They may change any interface update.

Recursive

2012-08-04 16:31:15

Gametab(tab_skills)

EDIT: My Bad, Gametab(tab_stats) psh

P1ng

2012-08-04 16:32:36

As stated by the two above it is much better to use the constants as they won't change, this is also true for other functions like Mouse(x,y,0,0,mouse_left) instead of 0/1/True/False

Footy

2012-08-04 17:48:40

Thanks guys, it works perfectly now. Ill try to use mouse_right and mouse_left in future scripts!

Olly

2012-08-04 19:11:54

Should use the built in antiban for checking skills :P

Footy

2012-08-04 19:28:16

Well I could, but I prefer making my own procedures and functions, Ill likely write my own little include, because it makes it much simpler to edit and change, rather then waiting for SRL's include to be fixed.