Jump to content
Wanted

IMPORTANT Tab/Screen Check Restructure. UPDATE YOUR SCRIPTS NOW. OSI Dev. 3/30/12

Recommended Posts

https://github.com/OSI1/OSI1/commit/d2267af4143d546536a1acafa5e8f31d5f2462e2

 

Serious changes have taken place in OSI today. All scripts will break with this (can be updated in minutes).

 

Ever since the beginning of OSI I have foreseen the problem of redundant and inappropriate screen and tab checks.

 

For example, DropItems uses MouseItem which uses InvItemExists which checks to make sure you're on the inventory tab... well this causes the inventory tab to be checked up to 28 times in a row... and then if you're on the bank screen (where no tabs are visible) then you will end up calling that plus BankScreen 28 times and many other significant complications and such.

 

All functions within OSI that use a screen check (such as CheckBS 'bankscreeen', CheckPS 'pinscreen', CheckIT 'inventorytab', CheckET 'equipmenttab') are restructured specifically with these complications and efficiencies (sometimes MAJOR efficiency problems) directly in mind.

 

This means that you will find a larger amount of functions in OSI that use these checks, which means the function parameters have changed, which also means your scripts will not compile until adjusted accordingly.

 

A list of functions that have had their parameters changed:

 

[sCAR]Gametabs.scar

 

function IsSlotEquipped(Slot: Integer; CheckET: Boolean): Boolean;

function ClickEquipedItem(Slot: Integer; TypeC: ClickActions; CheckET: Boolean): Boolean;

function GetSkillLevelEx(Skill: Integer; BottomNumber, CheckST: Boolean): Integer;

function GetSkillLevel(Skill: Integer; CheckST: Boolean): Integer;

function HoverSkill(Skill: Integer; CheckST: Boolean): Boolean;

function GetSkillInfo(Skill: Integer; CurrentCheck, NextCheck, RemainderCheck, CheckST: Boolean): TIntegerArray;

function GetXP(Skill: Integer; CheckST: Boolean): Integer;

procedure GetAllLevels(CheckST: Boolean);

 

Inventory.scar

 

function InvItemExists(Slot: Integer; CheckIT: Boolean): Boolean;

function InvCount(CheckIT: Boolean): Integer;

function InvFull(CheckIT: Boolean): Boolean;

function InvEmpty(CheckIT: Boolean): Boolean;

function MouseItem(Slot: Integer; TypeC: ClickActions; CheckIT: Boolean): Boolean;

function DragItem(FromSlot, ToSlot: Integer; CheckIT: Boolean): Boolean;

function DropItem(Slot: Integer; CheckIT: Boolean): Boolean;

function DropItemsPEx(Slots, Pattern: TIntegerArray; Exclude, CheckIT: Boolean): Integer;

function DropItemsEx(Slots: TIntegerArray; Exclude, CheckIT: Boolean): Integer;

function DropItems(Slots: TIntegerArray; CheckIT: Boolean): Integer;

function DropAllExclude(Exclude: TIntegerArray; CheckIT: Boolean): Integer;

function DropAll(CheckIT: Boolean): Integer;

function FindInvItemsDTM(dtm: Integer; CheckIT: Boolean): TIntegerArray;

function CountInvItemsDTM(dtm: Integer; CheckIT: Boolean): Integer;

function FindInvItemsBMP(bmp, Tol: Integer; CheckIT: Boolean): TIntegerArray;

function CountInvItemsBMP(bmp, Tol: Integer; CheckIT: Boolean): Integer;

 

Bank.scar

 

function EnterBankPin(Pin: string; CheckPS: Boolean): Boolean;

function DepositAllEx(Inv, Equip, Summon, CPouch, CheckBS: Boolean): Boolean; // MAJOR

function SearchBank(SearchText: string; CheckBS: Boolean): Boolean;

 

Runecrafting.scar

 

function FindPouch(Pouch: Integer; var Slot: Integer; CheckIT: Boolean): Boolean;

function ClickPouch(Pouch, Option: Integer; CheckIT: Boolean): Boolean;[/sCAR]

 

The most important one to note is DepositAllEx which will still compile correctly, however the order of the parameters is changed around moving CheckBS to the back which will result in the function compiling but not operating correctly unless you adjust accordingly (most people just use DepositAll and not DepositAllEx anyways, so it's already been fixed for those of you)

 

Of course these functions will affect many of the other functions because of the way OSI is ingeniously structured.

 

Q: "When will I know to use CheckBS, CheckTI, etc?"

A: You never want to use CheckTI = True if you have the bankscreen open obviously, you can use your intelligence to determine if it's a good idea to use checks in certain cases. Also you can eliminate redundancy if you know you will already have a tab open or screen up by setting checks to false to avoid recalling them needlessly.

 

Setting InvCount(True) if you have the bankscreen will cause InvCount to fail. Same goes for any tab checks while bankscreen is open (other than CheckBS obviously)

Setting checks to False if done improperly will cause OSI not to automatically adjust your tabs to the correct tab or click on something that is not there when screen checking and therefor FAIL i.e. GetXP(CheckST) and CloseBank(CheckBS)

 

Be smart!!!

 

That being said you notice SIGNIFICANT speed improvements, CPU usage (more fluid operating functions, even less lag.. not there was probably lag to begin with most cases).

 

In other news DragItem, DragBankItem, WithdrawSlotEx box bounds when clicking items was reduced slightly to avoid possible miss-clicks.

 

I'm also making good progress on OSI Runecrafter.

 

Cheers

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