Jump to content
Wanted

OSI 2 Updates e.g. Structure, Mouse. RS07 New Bank and OCR and others

Recommended Posts

https://github.com/OfficialSCARInclude/OSI2/commit/bc571610d3c54b88def3f69818a6fcfd99698764

 

New Bank functions

SMART restructure and DebugSMART

New OCR GetAmount/GetInvAmount done

Bug in MMouse patched!

Other minor stuff

 

SMART

 

Restructured SMART to OSI\SMART\ should be more seamless now for RS2 to use it in the future and other things. However, the specific SMART.scar will remain in RS07 folder because it will be different than the other load outs I don't feel like combining all of them it's just more seamless this way. I may reconsider this later..

 

Also added DebugSMART.scar

 

45377666.png

 

Text/Clearing canvas probably needs some work still... I'm not yet familiar with new SMART functions and SCAR bitmap functions enough to care to mess with it yet when it's not priority but welcome for others to input.

 

[sCAR] * procedure SmartDebugText(Text: string; Chars, Color, X, Y: Integer);

By: Wanted

* procedure SmartDebugATPABoundsEx(ATPA: T2DPointArray; ShowTPAs, ShowATPABorder, ShowTPABorders, ShowTPAIndexes: Boolean);

By: Wanted

* procedure SmartDebugATPABounds(ATPA: T2DPointArray);

By: Wanted

* procedure SmartDebugATPA(ATPA: T2DPointArray);

By: Wanted

* procedure SmartDebugTPA(TPA: TPointArray);

By: Wanted

* procedure SmartDebugTBA(TBA: TBoxArray);

By: Wanted

* procedure SmartDebugBox(TB: TBox);

By: Wanted[/sCAR]

 

Don't forget to enable graphics.

 

Minor stuff

 

Debug.scar, changed all array index fonts to arial.. it's just smarter/easier/prettier.

Color.scar spiral actually uses spiral algorithm now instead of SortTPA

Other stuff not worth even mentioning.. look at github.

 

Mouse

 

Added * procedure GetMousePosP(var P: TPoint);

 

Finally found the culprit behind the 2 year old bug that has plagued OSI this long. Human SCAR's mouse alone is prone to 1 pixel of inaccuracy causing missclicks. I found this out today while working on banking functions that had to be super accurate with the scroll bar I've fixed it by added a mouse pos check and set mouse pos at the end of MMouse as follows:

 

[sCAR]{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure MMouse(X, Y, RX, RY: Integer);

Contributors: Timer, Wanted, Freddy, Bixby Sayz, LordJashin.

Description: Moves the mouse humanly.

Date Created: August 7th, 2011. By Timer

Last Modified: March 16th, 2013. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure MMouse(X, Y, RX, RY: Integer);

var

P: TPoint;

B1: TBox;

begin

B1 := Box(X - RX, Y - RY, X + RX, Y + RY);

P := RRectanglePoint(B1.X1, B1.Y1, B1.X2, B1.Y2);

if (MouseSpeed <> 0) then

MoveMouseEx(P.X, P.Y, MouseSpeed)

else

MoveMouse(P.X, P.Y);

GetMousePosP(P);

if (IAbs(P.X - X) > RX) then

SetMousePos(X, P.Y);

GetMousePosP(P);

if (IAbs(P.Y - Y) > RY) then

SetMousePos(P.X, Y);

end;[/sCAR]

 

Now tons of stuff like SetGameTab, MouseInvItem etc. no longer need B.X1 + 2 crap it's been changed in lots of places as follows:

 

 

Classic example:

 

[sCAR]MouseBox(B.X1 + 2, B.Y1 + 2, B.X2 - 2, B.Y2 - 2, ClickLeft);[/sCAR]

 

Into

 

[sCAR]MouseBoxB(B, ClickLeft);[/sCAR]

 

or my personal favorite

 

DragMouseInvItem

 

[sCAR] DragMouseBox(B.X1 + 2, B.Y1 + 2, B.X2 - 2, B.Y2 - 2, B2.X1 + 2, B2.Y1 + 2, B2.X2 - 2, B2.Y2 - 2, True);[/sCAR]

 

Into

 

[sCAR]DragMouseBoxB(B, B2, True);[/sCAR]

 

OCR

 

[sCAR]{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

function GetAmount(B: TBox): LongInt;

Contributors: Wanted

Description: Returns the amount of something taking into account text color within box.

Date Created: November 6th, 2011. By Wanted. RS2 Build 675.

Last Modified: March 16th, 2013. By Wanted. RS07 Build ???.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}[/sCAR]

 

[sCAR]{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

function GetInvItemAmount(Slot: Integer): LongInt;

Contributors: Wanted

Description: Returns the amount of item in inv taking into account text color within box.

Date Created: November 6th, 2011. By Wanted. RS2 Build 675.

Last Modified: March 16th, 2013. By Wanted. RS07 Build ???.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}[/sCAR]

 

Bank

 

Here's where I made a lot of useful RS07 progress, but had to stop because I'm going to ask for help on this one in another thread but so far I have the following:

 

[sCAR]{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Official SCAR Include

Runescape 07

Banking Routines

--------------------------------------------------------------------------------

* function BankScreen: Boolean;

By: Wanted

* function CloseBank(CheckBS: Boolean): Boolean;

By: Wanted

* function DepositItemsEx(Slots: TIntArray; Exclude, CheckBS: Boolean): Boolean;

By: Wanted

* function DepositItems(Slots: TIntArray; CheckBS: Boolean): Boolean;

By: Wanted

* function DepositAllExclude(Exclude: TIntArray; CheckBS: Boolean): Boolean;

By: Wanted

* function DepositAll(CheckBS: Boolean): Boolean;

By: Wanted

* function ToggleUseNotes(Use: Boolean): Boolean;

By: Wanted

* function ToggleSwapMode(Use: Boolean): Boolean;

By: Wanted

* function GetBankScrollBarPos: Extended;

By: Wanted

* function ScrollToBankToRow(Row: Integer): Boolean;

By: Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}[/sCAR]

 

I plan to make every single slot in the bank from top to bottom an actual index you can refer to and have OSI scroll and fix the cords automatically. This is what I'll be posting another thread soon asking for help in.

 

I also plan to add another deposit not seen in OSI 1 that allows you to use Store X.

 

Hope to get more out soon

 

-Cheers

 

Edit: http://forums.scar-divi.com/showthread.php?2190-Correcting-points-based-on-scroll-bar-position

 

Oh and ScrollToBankToRow seriously I need to fix that

 

ScrollBankToRow

Edited by Wanted
Link to comment
Share on other sites

オンライン カジノは、プレイヤーが自宅にいながらにしてポーカー、ルーレット、ブラックジャック、スロットなどのギャンブル ゲームを楽しむ機会を提供する仮想プラットフォームです。 オンラインカジノは、アクセスのしやすさ、ゲームの種類の多さ、そして大金を獲得する機会があるため、年々人気が高まっています。

オンラインカジノの主な利点は、利便性とアクセスしやすさです。 プレイヤーは、通常のカジノの営業時間に制限されず、いつでもゲームを楽しむことができます。 必要なのは、インターネットにアクセスできるデバイスと、カジノのウェブサイトにアクセスできることだけです。 これにより、プレイヤーは従来のカジノによくありがちなストレスや緊張を感じることなく、快適な環境でプレイすることができます。

オンラインカジノのもう1つの利点は、ゲームの選択肢が豊富なことです。 ユーザーは、それぞれ独自のルールと勝利の機会を提供する何百もの異なるゲームから選択できます。 技術革新のおかげで、オンライン ゲームのグラフィックとサウンドは高品質になり、プレイヤーは興奮と情熱の雰囲気に浸ることができます。

さまざまなゲームに加えて、オンライン カジノはプレーヤーにさまざまなボーナスやプロモーションも提供します。 これらは、スロットのフリースピン、プレイのための追加のお金、または貴重な賞品が得られる特別なトーナメントなどです。 このようなボーナスにより、勝利の可能性が高まり、ゲームがさらに楽しくなります。

もちろん、オンラインカジノでのプレイにはリスクがあります。 ギャンブルには依存性がある可能性があるため、自分の感情を監視し、支出をコントロールすることが重要であることを覚えておくことが重要です。 カジノはまた、責任あるゲーミングをサポートし、自己排除や賭け金制限の機会を提供します av01 ダウンロード

全体として、オンライン カジノはギャンブル愛好家にとって便利でエキサイティングなエンターテイメントを提供します。 幅広いゲーム、ボーナスの選択肢があり、いつでもプレイできるため、世界中のプレイヤーの間で人気が高まっています。 ただし、責任あるゲームと、ゲームが単なる楽しみと娯楽の源であるように自分の行動を制御する能力について覚えておくことが重要です。
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...