PDA

View Full Version : [Reflection] Resizable Mode 2015-06-04



Fitta
06-04-2015, 03:28 PM
Due to the new update it'll take a little while to fix smaller parts of the include. Do not fear, it'll be back again shortly :)

Edit1:

Reflect.Gametab.Open was broken

What happend? There was a switch in the widget numbers making us look for widgets that did not exist.
Here is the updated debug
http://i.gyazo.com/38df8b0a0ca116bffa9c6875343ab06f.png


And here is the updated constants to make .Open work again..

{Gametab}

Gametab_ClanChat = 25;
Gametab_FriendsList = 26;
Gametab_IgnoreList = 27;
Gametab_Logout = 28;
Gametab_Options = 29;
Gametab_Emotes = 30;
Gametab_MusicPlayer = 31;
Gametab_CombatOptions = 49;
Gametab_Stats = 50;
Gametab_QuestList = 51;
Gametab_Inventory = 52;
Gametab_WornEquipment = 53;
Gametab_Prayer = 54;
Gametab_Magic = 55;



Edit2:
All the other hooks seem to be working fine, but if any of you want to help me in my task of checking these little buggers, then please go ahead and use these..


const
ReflectionRevision = '79';

{Node = gv}
Node_UID: THook = ['ef', 1];
Node_Next: THook = ['ek', 1];
Node_Prev: THook = ['ex', 1];

{Cacheable = gr}
Cacheable_Next: THook = ['cr', 1];
Cacheable_Prev: THook = ['cs', 1];

{Renderable = cm}
Renderable_ModelHeight: THook = ['cb', -734091663];

{Animable = n}

{Model = cx}

{AnimationSequence = az}

{NpcDefinition = au}
NpcDefinition_Actions: THook = ['g', 1];
NpcDefinition_Name: THook = ['l', 1];
NpcDefinition_ID: THook = ['p', -1536623773];
NpcDefinition_CombatLevel: THook = ['y', 905796195];

{LinkedList = gh}
LinkedList_Head: THook = ['b', 1];
LinkedList_Current: THook = ['e', 1];

{Actor = ak}
Actor_Animation: THook = ['bj', -129982891];
Actor_QueueX: THook = ['bd', 1];
Actor_QueueY: THook = ['bu', 1];
Actor_WorldX: THook = ['g', 714387585];
Actor_WorldY: THook = ['f', 443183909];
Actor_SpokenText: THook = ['al', 1];
Actor_CombatCycle: THook = ['aq', -1403997273];
Actor_Health: THook = ['as', 1916365129];
Actor_MaxHealth: THook = ['ay', 1946223691];
Actor_Interactingindex: THook = ['ad', -435283347];

{Npc = ac}
Npc_Definition: THook = ['b', 1];

{ObjectDefinition = am}
ObjectDefinition_Actions: THook = ['ai', 1];
ObjectDefinition_Name: THook = ['n', 1];

{Buffer = dj}

{Widget = fx}
Widget_Children: THook = ['ep', 1];
Widget_InvIDs: THook = ['do', 1];
Widget_StackSizes: THook = ['dm', 1];
Widget_ItemAmount: THook = ['ez', -377425935];
Widget_ItemID: THook = ['eq', 652646019];
Widget_WidgetID: THook = ['z', -1428688301];
Widget_Name: THook = ['ca', 1];
Widget_Text: THook = ['bz', 1];
Widget_IsHidden: THook = ['ap', 1];
Widget_AbsoluteX: THook = ['d', 280533711];
Widget_AbsoluteY: THook = ['ax', 150978763];
Widget_RelativeX: THook = ['d', 280533711];
Widget_RelativeY: THook = ['ax', 150978763];
Widget_Width: THook = ['ag', -978834493];
Widget_Height: THook = ['ai', -62917981];
Widget_ParentID: THook = ['ac', -513345053];
Widget_ScrollX: THook = ['al', 1041005965];
Widget_ScrollY: THook = ['ak', -847651301];
Widget_BoundsIndex: THook = ['el', 1730503215];

{WidgetNode = k}
WidgetNode_ID: THook = ['b', 550133409];

{HashTable = ge}
HashTable_Buckets: THook = ['e', 1];
HashTable_Size: THook = ['b', 1];

{GameShell = eb}

{Player = a}
Player_Definition: THook = ['e', 1];
Player_Name: THook = ['b', 1];

{Client = client}
Client_LoopCycle: THook = ['client.h', -2061225245];
Client_Region: THook = ['d.dl', 1];
Client_Plane: THook = ['a.hm', -436484799];
Client_MenuCount: THook = ['client.iu', 1121447219];
Client_MenuWidth: THook = ['ay.ha', -1117658985];
Client_MenuHeight: THook = ['dc.hu', 2088094925];
Client_MenuOptions: THook = ['client.ie', 1];
Client_MenuActions: THook = ['client.io', 1];
Client_IsMenuOpen: THook = ['client.ho', 1];
Client_MenuX: THook = ['az.hs', -306763191];
Client_MenuY: THook = ['ee.hr', 365734005];
Client_BaseX: THook = ['dy.cw', 1307004557];
Client_BaseY: THook = ['ad.cj', -1916106429];
Client_Widgets: THook = ['fx.b', 1];
Client_LocalPlayer: THook = ['f.hg', 1];
Client_LocalPlayers: THook = ['client.gl', 1];
Client_TileSettings: THook = ['l.e', 1];
Client_TileHeights: THook = ['l.b', 1];
Client_LocalNpcs: THook = ['client.cg', 1];
Client_NpcIndices: THook = ['client.cb', 1];
Client_Sine: THook = ['cf.aw', 1];
Client_Cosine: THook = ['cf.ac', 1];
Client_CameraPitch: THook = ['a.fn', 1973349267];
Client_CameraYaw: THook = ['dj.fo', -242029701];
Client_CameraX: THook = ['ca.eo', 99420353];
Client_CameraY: THook = ['eh.fj', -1231385699];
Client_CameraZ: THook = ['client.fm', -1132651853];
Client_GroundItems: THook = ['client.hh', 1];
Client_GameSettings: THook = ['fi.a', 1];
Client_MapScale: THook = ['client.eq', -334710349];
Client_MapAngle: THook = ['client.fw', -1147639833];
Client_MapOffset: THook = ['client.ej', 1757100609];
Client_CurrentLevels: THook = ['client.hf', 1];
Client_RealLevels: THook = ['client.hw', 1];
Client_Experiences: THook = ['client.hv', 1];
Client_Energy: THook = ['client.k', -462981805];
Client_Weight: THook = ['client.jq', 1485798329];
Client_Rights: THook = ['client.h', -2061225245];
Client_CurrentWorld: THook = ['client.ar', -939231799];
Client_LoginState: THook = ['client.c', -2061786953];
Client_PlayerIndex: THook = ['client.hk', -643248669];
Client_WidgetPositionX: THook = ['client.la', 1];
Client_WidgetPositionY: THook = ['client.li', 1];
Client_WidgetWidths: THook = ['client.lo', 1];
Client_WidgetHeights: THook = ['client.lu', 1];
Client_WidgetNodeCache: THook = ['client.jt', 1];
Client_CrosshairColor: THook = ['client.gb', -822258891];
Client_DestinationX: THook = ['client.mt', 467466875];
Client_DestinationY: THook = ['client.mr', -1157010332];

{Region = cb}
Region_SceneTiles: THook = ['l', 1];

{BoundaryObject = cs}
BoundaryObject_ID: THook = ['o', -1530326365];
BoundaryObject_Flags: THook = ['m', -1398482299];
BoundaryObject_Plane: THook = ['b', -892155191];
BoundaryObject_Height: THook = ['p', -506977239];
BoundaryObject_Render: THook = ['l', 1];
BoundaryObject_Render2: THook = ['u', 1];
BoundaryObject_Orientation: THook = ['k', -8046679];
BoundaryObject_LocalX: THook = ['e', -1211607659];
BoundaryObject_LocalY: THook = ['a', -1446263589];

{GameObject = cu}
GameObject_ID: THook = ['z', -902221355];
GameObject_Flags: THook = ['r', -1886144005];
GameObject_Plane: THook = ['b', 1307425195];
GameObject_WorldX: THook = ['a', 844169099];
GameObject_WorldY: THook = ['k', -825066889];
GameObject_Height: THook = ['e', -902909889];
GameObject_Render: THook = ['p', 1];
GameObject_Orientation: THook = ['l', 959181943];
GameObject_LocalX: THook = ['u', 827064225];
GameObject_LocalY: THook = ['m', -9411951];
GameObject_OffsetX: THook = ['o', -305552111];
GameObject_OffsetY: THook = ['q', -1416883087];

{FloorDecoration = ct}
FloorDecoration_Render: THook = ['k', 1];
FloorDecoration_LocalX: THook = ['e', -1233039595];
FloorDecoration_LocalY: THook = ['a', -1913912235];
FloorDecoration_Plane: THook = ['b', 476456035];
FloorDecoration_ID: THook = ['p', -1585321645];
FloorDecoration_Flags: THook = ['l', -1974313147];

{WallDecoration = ck}
WallDecoration_ID: THook = ['q', 1427324801];
WallDecoration_Flags: THook = ['v', -502751645];
WallDecoration_LocalX: THook = ['e', -1204426185];
WallDecoration_LocalY: THook = ['a', -806965815];
WallDecoration_Plane: THook = ['b', -1696201559];
WallDecoration_Renderable: THook = ['o', 1];
WallDecoration_Renderable2: THook = ['m', 1];
WallDecoration_Orientation: THook = ['k', 1773153601];
WallDecoration_Height: THook = ['p', -1263130157];
WallDecoration_RelativeX: THook = ['l', -721839653];
WallDecoration_RelativeY: THook = ['u', 957896505];

{SceneTile = ci}
SceneTile_GameObject: THook = ['n', 1];
SceneTile_GroundDecoration: THook = ['m', 1];
SceneTile_WallDecoration: THook = ['o', 1];
SceneTile_BoundaryObject: THook = ['u', 1];

{Item = ax}
Item_ID: THook = ['b', -197377273];
Item_StackSizes: THook = ['e', -1259183067];


Edit3:

Turns out bank.simba was effected too..
These are the new constants :)

{Bank}

Widget_Bank_Container = 12;
Widget_Bank_TotalItems_Child = 5;
Widget_Bank_ItemSlots_Child = 12;
Widget_PinScreen_Container = 213;


Edit4:

Reflect.Bank.Close, same as the rest, widgets widgets widgets.....

function TReflectionBank.Close: Boolean;
var
BankWidget, BankChild: TReflectWidget;
Tries: Integer;
T: TReflectTimer;
begin
if not Reflect.Bank.IsOpen then
Exit(True);
BankWidget.GetWidget(Widget_Bank_Container, 3);
BankChild.GetChild(BankWidget, 11);
while (Reflect.Bank.IsOpen) and (not Result) and (Tries < 4) do
begin
If BankChild.Interact('Close', 2)then
begin
T.Start;
while (T.ElapsedTime < 2000) and (Reflect.Bank.IsOpen)do
Wait(RandomRange(50, 100));
Result := (not Reflect.Bank.IsOpen);
end;
Inc(Tries);
Wait(RandomRange(100, 200));
end;
BankChild.Free;
BankWidget.Free;
end;

Edit5:

This is nothing that hurts the include itself BUT, all chat widgets have been replaced to 162, 43 instead of the old 137, 2

Pakyakkistan
06-04-2015, 03:56 PM
Due to the new update it'll take a little while to fix smaller parts of the include. Do not fear, it'll be back again shortly :)

Edit2:
All the other hooks seem to be working fine, but if any of you want to help me in my task of checking these little buggers, then please go ahead and use these..


const
ReflectionRevision = '79';

{Node = gv}
Node_UID: THook = ['ef', 1];
Node_Next: THook = ['ek', 1];
Node_Prev: THook = ['ex', 1];

{Cacheable = gr}
Cacheable_Next: THook = ['cr', 1];
Cacheable_Prev: THook = ['cs', 1];

{Renderable = cm}
Renderable_ModelHeight: THook = ['cb', -734091663];

{Animable = n}

{Model = cx}

{AnimationSequence = az}

{NpcDefinition = au}
NpcDefinition_Actions: THook = ['g', 1];
NpcDefinition_Name: THook = ['l', 1];
NpcDefinition_ID: THook = ['p', -1536623773];
NpcDefinition_CombatLevel: THook = ['y', 905796195];

{LinkedList = gh}
LinkedList_Head: THook = ['b', 1];
LinkedList_Current: THook = ['e', 1];

{Actor = ak}
Actor_Animation: THook = ['bj', -129982891];
Actor_QueueX: THook = ['bd', 1];
Actor_QueueY: THook = ['bu', 1];
Actor_WorldX: THook = ['g', 714387585];
Actor_WorldY: THook = ['f', 443183909];
Actor_SpokenText: THook = ['al', 1];
Actor_CombatCycle: THook = ['aq', -1403997273];
Actor_Health: THook = ['as', 1916365129];
Actor_MaxHealth: THook = ['ay', 1946223691];
Actor_Interactingindex: THook = ['ad', -435283347];

{Npc = ac}
Npc_Definition: THook = ['b', 1];

{ObjectDefinition = am}
ObjectDefinition_Actions: THook = ['ai', 1];
ObjectDefinition_Name: THook = ['n', 1];

{Buffer = dj}

{Widget = fx}
Widget_Children: THook = ['ep', 1];
Widget_InvIDs: THook = ['do', 1];
Widget_StackSizes: THook = ['dm', 1];
Widget_ItemAmount: THook = ['ez', -377425935];
Widget_ItemID: THook = ['eq', 652646019];
Widget_WidgetID: THook = ['z', -1428688301];
Widget_Name: THook = ['ca', 1];
Widget_Text: THook = ['bz', 1];
Widget_IsHidden: THook = ['ap', 1];
Widget_AbsoluteX: THook = ['d', 280533711];
Widget_AbsoluteY: THook = ['ax', 150978763];
Widget_RelativeX: THook = ['d', 280533711];
Widget_RelativeY: THook = ['ax', 150978763];
Widget_Width: THook = ['ag', -978834493];
Widget_Height: THook = ['ai', -62917981];
Widget_ParentID: THook = ['ac', -513345053];
Widget_ScrollX: THook = ['al', 1041005965];
Widget_ScrollY: THook = ['ak', -847651301];
Widget_BoundsIndex: THook = ['el', 1730503215];

{WidgetNode = k}
WidgetNode_ID: THook = ['b', 550133409];

{HashTable = ge}
HashTable_Buckets: THook = ['e', 1];
HashTable_Size: THook = ['b', 1];

{GameShell = eb}

{Player = a}
Player_Definition: THook = ['e', 1];
Player_Name: THook = ['b', 1];

{Client = client}
Client_LoopCycle: THook = ['client.h', -2061225245];
Client_Region: THook = ['d.dl', 1];
Client_Plane: THook = ['a.hm', -436484799];
Client_MenuCount: THook = ['client.iu', 1121447219];
Client_MenuWidth: THook = ['ay.ha', -1117658985];
Client_MenuHeight: THook = ['dc.hu', 2088094925];
Client_MenuOptions: THook = ['client.ie', 1];
Client_MenuActions: THook = ['client.io', 1];
Client_IsMenuOpen: THook = ['client.ho', 1];
Client_MenuX: THook = ['az.hs', -306763191];
Client_MenuY: THook = ['ee.hr', 365734005];
Client_BaseX: THook = ['dy.cw', 1307004557];
Client_BaseY: THook = ['ad.cj', -1916106429];
Client_Widgets: THook = ['fx.b', 1];
Client_LocalPlayer: THook = ['f.hg', 1];
Client_LocalPlayers: THook = ['client.gl', 1];
Client_TileSettings: THook = ['l.e', 1];
Client_TileHeights: THook = ['l.b', 1];
Client_LocalNpcs: THook = ['client.cg', 1];
Client_NpcIndices: THook = ['client.cb', 1];
Client_Sine: THook = ['cf.aw', 1];
Client_Cosine: THook = ['cf.ac', 1];
Client_CameraPitch: THook = ['a.fn', 1973349267];
Client_CameraYaw: THook = ['dj.fo', -242029701];
Client_CameraX: THook = ['ca.eo', 99420353];
Client_CameraY: THook = ['eh.fj', -1231385699];
Client_CameraZ: THook = ['client.fm', -1132651853];
Client_GroundItems: THook = ['client.hh', 1];
Client_GameSettings: THook = ['fi.a', 1];
Client_MapScale: THook = ['client.eq', -334710349];
Client_MapAngle: THook = ['client.fw', -1147639833];
Client_MapOffset: THook = ['client.ej', 1757100609];
Client_CurrentLevels: THook = ['client.hf', 1];
Client_RealLevels: THook = ['client.hw', 1];
Client_Experiences: THook = ['client.hv', 1];
Client_Energy: THook = ['client.k', -462981805];
Client_Weight: THook = ['client.jq', 1485798329];
Client_Rights: THook = ['client.h', -2061225245];
Client_CurrentWorld: THook = ['client.ar', -939231799];
Client_LoginState: THook = ['client.c', -2061786953];
Client_PlayerIndex: THook = ['client.hk', -643248669];
Client_WidgetPositionX: THook = ['client.la', 1];
Client_WidgetPositionY: THook = ['client.li', 1];
Client_WidgetWidths: THook = ['client.lo', 1];
Client_WidgetHeights: THook = ['client.lu', 1];
Client_WidgetNodeCache: THook = ['client.jt', 1];
Client_CrosshairColor: THook = ['client.gb', -822258891];
Client_DestinationX: THook = ['client.mt', 467466875];
Client_DestinationY: THook = ['client.mr', -1157010332];

{Region = cb}
Region_SceneTiles: THook = ['l', 1];

{BoundaryObject = cs}
BoundaryObject_ID: THook = ['o', -1530326365];
BoundaryObject_Flags: THook = ['m', -1398482299];
BoundaryObject_Plane: THook = ['b', -892155191];
BoundaryObject_Height: THook = ['p', -506977239];
BoundaryObject_Render: THook = ['l', 1];
BoundaryObject_Render2: THook = ['u', 1];
BoundaryObject_Orientation: THook = ['k', -8046679];
BoundaryObject_LocalX: THook = ['e', -1211607659];
BoundaryObject_LocalY: THook = ['a', -1446263589];

{GameObject = cu}
GameObject_ID: THook = ['z', -902221355];
GameObject_Flags: THook = ['r', -1886144005];
GameObject_Plane: THook = ['b', 1307425195];
GameObject_WorldX: THook = ['a', 844169099];
GameObject_WorldY: THook = ['k', -825066889];
GameObject_Height: THook = ['e', -902909889];
GameObject_Render: THook = ['p', 1];
GameObject_Orientation: THook = ['l', 959181943];
GameObject_LocalX: THook = ['u', 827064225];
GameObject_LocalY: THook = ['m', -9411951];
GameObject_OffsetX: THook = ['o', -305552111];
GameObject_OffsetY: THook = ['q', -1416883087];

{FloorDecoration = ct}
FloorDecoration_Render: THook = ['k', 1];
FloorDecoration_LocalX: THook = ['e', -1233039595];
FloorDecoration_LocalY: THook = ['a', -1913912235];
FloorDecoration_Plane: THook = ['b', 476456035];
FloorDecoration_ID: THook = ['p', -1585321645];
FloorDecoration_Flags: THook = ['l', -1974313147];

{WallDecoration = ck}
WallDecoration_ID: THook = ['q', 1427324801];
WallDecoration_Flags: THook = ['v', -502751645];
WallDecoration_LocalX: THook = ['e', -1204426185];
WallDecoration_LocalY: THook = ['a', -806965815];
WallDecoration_Plane: THook = ['b', -1696201559];
WallDecoration_Renderable: THook = ['o', 1];
WallDecoration_Renderable2: THook = ['m', 1];
WallDecoration_Orientation: THook = ['k', 1773153601];
WallDecoration_Height: THook = ['p', -1263130157];
WallDecoration_RelativeX: THook = ['l', -721839653];
WallDecoration_RelativeY: THook = ['u', 957896505];

{SceneTile = ci}
SceneTile_GameObject: THook = ['n', 1];
SceneTile_GroundDecoration: THook = ['m', 1];
SceneTile_WallDecoration: THook = ['o', 1];
SceneTile_BoundaryObject: THook = ['u', 1];

{Item = ax}
Item_ID: THook = ['b', -197377273];
Item_StackSizes: THook = ['e', -1259183067];


If you are still getting these checked I can assist if you haven't finished yet

Fitta
06-04-2015, 04:06 PM
Those should be working, everything should be up and running again. If you find anything out of the ordinary, please just leave a message here :)

Whenever elfyyy comes home he'll upload and add the newest changes to github, and all your includes will auto-update on script start-up!

Thank you for flying with Fitta air, hope you had a pleasant flight!

acow
06-04-2015, 04:10 PM
the only thing fitta air's flight is missing, is Flight;

yat13
06-04-2015, 04:10 PM
hey been using this forum and website for a couple months works great, was wondering what mIRC channel is I've used it before with counterstrike and other games

yat13
06-04-2015, 04:20 PM
also can we get the github link when reflections drops

Harrier
06-04-2015, 04:25 PM
hey been using this forum and website for a couple months works great, was wondering what mIRC channel is I've used it before with counterstrike and other games
#SRL (https://villavu.com/forum/usertag.php?do=list&action=hash&hash=SRL) on rizon

james10000
06-04-2015, 05:45 PM
which files do i need to alter? im trying but not succeeding!

Beoz
06-04-2015, 05:46 PM
which files do i need to alter? im trying but not succeeding!

Just be patient and wait

Kyle
06-04-2015, 09:36 PM
So yeah, the update broke my updater for finding the method that I grab some of the menu hooks from. Didn't have time today until now to fix it, which I now did. Commited the new hooks and the changes that Fitta; outlined. Should autoupdate and be ready to go! Thanks Fitta for your help!

Fitta
06-04-2015, 09:46 PM
So yeah, the update broke my updater for finding the method that I grab some of the menu hooks from. Didn't have time today until now to fix it, which I now did. Commited the new hooks and the changes that Fitta; outlined. Should autoupdate and be ready to go! Thanks Fitta for your help!

http://i1.memy.pl/obrazki/3527634602_no_problemo.jpg


To let people know, we're going to fix the minimap problem that might occur. For people not aware already, you can no longer click the outside of the minimap(now it has to be INSIDE the circle). Just give me a moment, it's been a long day :)
http://i.imgur.com/e3URnmt.png

Flight
06-04-2015, 11:53 PM
the only thing fitta air's flight is missing, is Flight;

I see what you did there. Anyways, from what I can tell, AeroLib remains unhurt from this update while running the standard display mode, regardless I do have plans to add support for resizable mode.

Hoodz
06-04-2015, 11:56 PM
I see what you did there. Anyways, from what I can tell, AeroLib remains unhurt from this update while running the standard display mode, regardless I do have plans to add support for resizable mode.

some "setting" functions might be broken.

Fitta
06-05-2015, 12:05 AM
Turns out I missed a bugger!

The widget for checking if the "Enter Amount: " was visable or not was also switched.
The new one we're going to use is (162, 32)

Example

while (not AmountWidget.IsValid(162, 32)) do


The new bank.simba



function TReflectionBank.IsOpen: Boolean; forward;
function TReflectionBank.ItemCount: Integer; forward;

function TReflectBankItem.GetName: string;
var
Line: string;
Id: Integer;
begin
Id := Self._Id;
if not InRange(Id, 0, 13067) then
Exit;
Line := ItemCache.GetStrings(Id);
Result := Between('''name'': ''', ''',', Line);
end;

function TReflectBankItem.GetInvActions: TStringArray;
var
Line, Temp: string;
Id: Integer;
begin
Id := Self._Id;
if not InRange(Id, 0, 13067) then
Exit;
Line := ItemCache.GetStrings(Id);
Temp := Between('''actions'': [''', ']', Line);
Temp := Copy(Temp, 1, Length(Temp) - 1);
Result := Explode(''',''',Temp);
end;

function TReflectBankItem.GetGroundActions: TStringArray;
var
Line, Temp: string;
Id: Integer;
begin
Id := Self._Id;
if not InRange(Id, 0, 13067) then
Exit;
Line := ItemCache.GetStrings(Id);
Temp := Between('''groundActions'': [''', ']', Line);
Temp := Copy(Temp, 1, Length(Temp) - 1);
Result := Explode(''',''',Temp);
end;

function TReflectBankItem.GetHighAlchValue: Integer;
var
Line: string;
Id: Integer;
begin
Id := Self._Id;
if not InRange(Id, 0, 13067) then
Exit;
Line := ItemCache.GetStrings(Id);
Result := StrToInt(Between('highAlchValue'': ', '}', Line));
end;

function TReflectBankItem.GetQuantity: Integer;
begin
Result := Reflect.Smart.GetFieldArrayInt(Self.Reference,
Widget_StackSizes, Self._Slot - 1);
end;

function TReflectBankItem.GetId: Integer;
begin
Result := Self._Id;
end;

function TReflectBankItem.GetSlot: Integer;
begin
Result := Self._Slot;
end;

procedure TReflectBankItemArray.GetAll;
var
TheChild, TheGrandChild: TReflectPointer;
ItemCount, I, Count: Integer;
Temp: TReflectBankItemArray;
BankWidget, BankChild: TReflectWidget;
begin
Reflect.Mem.FreeObjects(ckBankItems, False);
if not Reflect.Bank.IsOpen then
Exit;
ItemCount := Reflect.Bank.ItemCount;
SetLength(Temp, ItemCount);
BankWidget.GetWidget(Widget_Bank_Container, Widget_Bank_ItemSlots_Child);
for I := 0 to ItemCount - 1 do
begin
BankChild.GetChild(BankWidget, I);
Temp[I]._Id := BankChild.GetItemId;
HookCache[ckBankItems][I] := BankChild.Reference;
Temp[I].Reference := BankChild.Reference;
end;
Self := Temp;
BankWidget.Free;
end;

procedure TReflectBankItemArray.Get(Name: string);
var
Temp, Temp1: TReflectBankItemArray;
I, H, T: integer;
begin
Temp.GetAll;
if Length(Temp) = 0 then
Exit;
H := High(Temp);
SetLength(Temp1, H + 1);
for I := 0 to H do
begin
if (Temp[I].GetName = Name) then
begin
Temp1[T] := Temp[I];
Inc(T);
end;
end;
Setlength(Temp1, T);
Self := Temp1;
end;

procedure TReflectBankItemArray.Get(Id: Integer); overload;
var
Temp, Temp1: TReflectBankItemArray;
I, H, T: Integer;
begin
Temp.GetAll;
if Length(Temp) = 0 then
Exit;
H := High(Temp);
SetLength(Temp1, H + 1);
for I := 0 to H do
begin
if (Temp[I].GetId = Id) then
begin
Temp1[T] := Temp[I];
Inc(T);
end;
end;
Setlength(Temp1, T);
Self := Temp1;
end;

function TReflectBankItem.Find(Name: string): Boolean;
var
Temp: TReflectBankItemArray;
begin
Temp.Get(Name);
if Length(Temp) = 0 then
Exit;
Result := True;
Self := Temp[0];
end;

function TReflectBankItem.Find(Id: Integer): Boolean; overload;
var
Temp: TReflectBankItemArray;
begin
Temp.Get(Id);
if Length(Temp) = 0 then
Exit;
Result := True;
Self := Temp[0];
end;

function TReflectionInternals.WithdrawBankItem(
BankChild: TReflectWidget; Amount: Integer): Boolean;
var
TimeOut: TReflectTimer;
AmountWidget: TReflectWidget;
Box: TBox;
begin
Box := BankChild.GetBounds;
Box := [Box.X1 + 10, Box.Y1 + 10, Box.X2 - 10, Box.Y2 - 10];
if Amount = 1 then
begin
Reflect.Mouse.Move(Box, Mouse_Left);
BankChild.Free;
Exit(True);
end;
Reflect.Mouse.Move(Box, Mouse_Right);
if Amount = -1 then
begin
Result := Reflect.Text.ChooseOption('All', 200 + Random(100));
BankChild.Free;
Exit;
end;
if Reflect.Text.OptionExists(IntToStr(Amount) + ' ') then
Result := Reflect.Text.ChooseOption(IntToStr(Amount) + ' ')
else
begin
TimeOut.Start;
BankChild.Interact('X');
while (not AmountWidget.IsValid(162, 32)) do
begin
Wait(100 + Random(100));
if TimeOut.ElapsedTime > 5000 then
begin
AmountWidget.Free;
BankChild.Free;
Exit(False);
end;
end;
Wait(RandomRange(500, 750));
Reflect.KeyBoard.TypeSend(ToStr(Amount));
Result := True;
end;
BankChild.Free;
end;

function TReflectionInternals.GetBankItem(
Item: TReflectBankItem): TReflectWidget;
var
TheChild, TheGrandChild: TReflectPointer;
ItemCount, I: Integer;
BankWidget, BankChild: TReflectWidget;
Temp: TReflectBankItem;
begin
ItemCount := Reflect.Bank.ItemCount;
BankWidget.GetWidget(WIDGET_Bank_Container, WIDGET_Bank_ItemSlots_Child);
for I := 0 to ItemCount - 1 do
begin
BankChild.GetChild(BankWidget, I);
Temp._Id := BankChild.GetItemId;
if Temp._Id = Item._Id then
begin
BankWidget.Free;
Exit(BankChild);
end;
end;
end;

function TReflectBankItem.Withdraw(Amount: Integer): Boolean;
var
ItemCount, I, L: Integer;
Temp: TReflectBankItem;
BankChild, AmountWidget, SearchWidget: TReflectWidget;
TimeOut: TReflectTimer;
Center: TPoint;
begin
if (not Reflect.Bank.IsOpen) or (Self._Id = 0) then
Exit(False);
BankChild := Reflect.Internals.GetBankItem(Self);
Center := MiddleBox(BankChild.GetBounds);
if (not BankChild.IsHidden)and(PointInBox(Center,[22, 80, 480, 292])) then
Result := Reflect.Internals.WithDrawBankItem(BankChild, Amount)
else
begin
SearchWidget.GetWidget(12, 23);
SearchWidget.Interact;
SearchWidget.Free;
Wait(RandomRange(200, 500));
L = 1;
while ((BankChild.IsHidden) or
(not PointInBox(Center,[22, 80, 480, 292]))) do
begin
BankChild.Free;
Reflect.KeyBoard.TypeSend(Self.GetName, False);
Wait(RandomRange(500, 700));
BankChild := Reflect.Internals.GetBankItem(Self);
Center := MiddleBox(BankChild.GetBounds);
Inc(L);
end;
Result := Reflect.Internals.WithDrawBankItem(BankChild, Amount);
end;
end;

function TReflectionBank.IsOpen: Boolean;
var
BankWidget : TReflectWidget;
begin
Result := BankWidget.Exists(Widget_Bank_Container, 0);
end;

function TReflectionBank.ItemCount: Integer;
var
BankWidget: TReflectWidget;
begin
if not Reflect.Bank.IsOpen then
Exit;
BankWidget.GetWidget(Widget_Bank_Container, Widget_Bank_TotalItems_Child);
Result := StrToInt(BankWidget.GetText);
BankWidget.Free;
end;

function TReflectionBank.Close: Boolean;
var
BankWidget, BankChild: TReflectWidget;
Tries: Integer;
T: TReflectTimer;
begin
if not Reflect.Bank.IsOpen then
Exit(True);
BankWidget.GetWidget(Widget_Bank_Container, 3);
BankChild.GetChild(BankWidget, 11);
while (Reflect.Bank.IsOpen) and (not Result) and (Tries < 4) do
begin
If BankChild.Interact('Close', 2)then
begin
T.Start;
while (T.ElapsedTime < 2000) and (Reflect.Bank.IsOpen)do
Wait(RandomRange(50, 100));
Result := (not Reflect.Bank.IsOpen);
end;
Inc(Tries);
Wait(RandomRange(100, 200));
end;
BankChild.Free;
BankWidget.Free;
end;

function TReflectionBank.Withdraw(Name: string; Amount: Integer): Boolean;
var
Temp: TReflectBankItem;
begin
Temp.Find(Name);
Result := Temp.Withdraw(Amount);
end;

function TReflectionBank.Withdraw(
Id: Integer; Amount: Integer): Boolean overload;
var
Temp: TReflectBankItem;
begin
Temp.Find(Id);
Result := Temp.Withdraw(Amount);
end;

function TReflectionBank.Deposit(Items: TStringArray;
Amount: TIntegerArray): Boolean;
var
Inv: TReflectInvItem;
I: Integer;
TimeOut: TReflectTimer;
AmountWidget: TReflectWidget;
begin
if not Reflect.Bank.IsOpen then
Exit(False);
for I:=0 to High(Items) do
if Inv.Find(Items[I]) then
begin
if Result then
Wait(RandomRange(100, 200));
if Amount[I] = 1 then
begin
Reflect.Mouse.Move(Inv.GetBox, Mouse_Left);
Result := True;
Continue;
end;
Reflect.Mouse.Move(Inv.GetBox, Mouse_Right);
if Amount[I] = -1 then
begin
Result := Reflect.Text.ChooseOption('All', 200 + Random(100));
Continue;
end;
if Reflect.Text.OptionExists(IntToStr(Amount[I]) + ' ') then
Result := Reflect.Text.ChooseOption(IntToStr(Amount[I]) + ' ')
else
begin
TimeOut.Start;
Reflect.Text.ChooseOption('X');
while (not AmountWidget.IsValid(162, 32)) do
begin
Wait(100 + Random(100));
if TimeOut.ElapsedTime > 5000 then
begin
AmountWidget.Free;
Continue;
end;
end;
Wait(RandomRange(500, 750));
Reflect.KeyBoard.TypeSend(ToStr(Amount[I]));
Result := True;
end;
end;
end;

function TReflectionBank.Deposit(Items: TIntegerArray;
Amount: TIntegerArray): Boolean; Overload;
var
Inv: TReflectInvItem;
I: Integer;
TimeOut: TReflectTimer;
AmountWidget: TReflectWidget;
begin
if not Reflect.Bank.IsOpen then
Exit(False);
for I:=0 to High(Items) do
if Inv.Find(Items[I]) then
begin
if Result then
Wait(RandomRange(100, 200));
if Amount[I] = 1 then
begin
Reflect.Mouse.Move(Inv.GetBox, Mouse_Left);
Result := True;
Continue;
end;
Reflect.Mouse.Move(Inv.GetBox, Mouse_Right);
if Amount[I] = -1 then
begin
Result := Reflect.Text.ChooseOption('All', 200 + Random(100));
Continue;
end;
if Reflect.Text.OptionExists(IntToStr(Amount[I]) + ' ') then
Result := Reflect.Text.ChooseOption(IntToStr(Amount[I]) + ' ')
else
begin
TimeOut.Start;
Reflect.Text.ChooseOption('X');
while (not AmountWidget.IsValid(162, 32)) do
begin
Wait(100 + Random(100));
if TimeOut.ElapsedTime > 5000 then
begin
AmountWidget.Free;
Continue;
end;
end;
Wait(RandomRange(500, 750));
Reflect.KeyBoard.TypeSend(ToStr(Amount[I]));
Result := True;
end;
end;
end;

function TReflectionBank.IsPinOpen: Boolean;
var
PinWidget: TReflectWidget;
begin
Result := PinWidget.IsValid(213, 3);
end;

function TReflectionBank.EnterPin(ThePin: string): Boolean
var
PinWidget: TReflectWidget;
NumberChild: TReflectWidget;
NumberBoxChild: TReflectWidget;
PinNum, BoxNum, EnterNumber, Count, X, Y: Integer;
Entered: Boolean;
const
NumberChildIndexs: TIntegerArray = [16, 18, 20, 22, 24, 26, 28, 30, 32, 34];
begin
if Reflect.Bank.IsOpen then
Exit(True);
if not Reflect.Bank.IsPinOpen then
Exit(False);
for PinNum := 1 to 4 do
begin
for BoxNum := 0 to 9 do
begin
Entered := False;
PinWidget.GetWidget(Widget_PinScreen_Container, NumberChildIndexs[BoxNum]);
NumberChild.GetChild(PinWidget, 1);
if ThePin[PinNum] = NumberChild.GetText then
begin
NumberBoxChild.GetChild(PinWidget, 0);
NumberBoxChild.Interact;
Wait(RandomRange(250, 350));
NumberBoxChild.Free;
BoxNum := 9;
Entered := True;
end;
PinWidget.Free;
NumberChild.Free;
if (not Entered) and (BoxNum = 9) then
begin
GetMousePos(X, Y);
Reflect.Mouse.Move(Point(RandomRange((X + 60), (X + 120)),
RandomRange((Y + 60), (Y + 120))), 2, 2);
PinNum := PinNum - 1;
end;
end;
end;
Result := Reflect.Bank.IsOpen;
end;

iaks
06-05-2015, 12:37 AM
Just changing the radius in R_TileOnMM should be enough for the minimap thing? Reduced it by 5 and my scripts seem to work again, temporarily at least.

yat13
06-05-2015, 01:34 AM
has the new reflection dropped on github? if so can i get a link?

yat13
06-05-2015, 06:11 AM
Exception in Script: Unable to find file 'reflection/lib/internal/Includes.simba' used from 'C:\Simba\Includes\SRL-OSR\SRL\Reflection\Reflection.simba'
any help with this?

Aufi
06-05-2015, 07:04 AM
has the new reflection dropped on github? if so can i get a link?

https://github.com/Elfyyy/OSR-Reflection

For some reason it's not auto-updating @elfyyy

Progressive
06-05-2015, 09:19 AM
https://github.com/Elfyyy/OSR-Reflection

For some reason it's not auto-updating @elfyyy

Maybe I did something wrong but, it is not working for me either. I manually downloaded it but still got the message of outdated reflection hooks haha =/

Aufi
06-05-2015, 09:21 AM
It is not working for me either. I manually downloaded it but still got the message of outdated reflection hooks.

You sure you replaced the reflction include correctly? Make sure to rename the folder it downloads to 'Reflection' and paste it into your includes folder.

Progressive
06-05-2015, 10:08 AM
You sure you replaced the reflction include correctly? Make sure to rename the folder it downloads to 'Reflection' and paste it into your includes folder.

Hey yeah I already did all of that :P So it is working for you?

Aufi
06-05-2015, 10:22 AM
Hey yeah I already did all of that :P So it is working for you?

Partially :) It logged in fine, banked etc but some things are still off. Just gotta wait for a full fix.

Progressive
06-05-2015, 01:30 PM
Partially :) It logged in fine, banked etc but some things are still off. Just gotta wait for a full fix.

Ah I just saw it logs in indeed, only if using Lape. Pascallscript on the otherhand still gives the outdated message.

Fitta
06-05-2015, 03:44 PM
One more thing noticed

These hooks were incorrect

Client_Energy: THook = ['client.jq', 1485798329];
Client_Weight: THook = ['client.js', 295576965];

yat13
06-05-2015, 05:18 PM
You sure you replaced the reflction include correctly? Make sure to rename the folder it downloads to 'Reflection' and paste it into your includes folder.

did what u said and got "Exception in Script: Unable to find file 'reflection/lib/internal/Includes.simba' used from 'C:\Simba\Includes\SRL-OSR\SRL\Reflection\Reflection.simba'" as my error plz help if u can! thanks
i put the folder in simba/includes/srl-osr/srl!

Jurre007
06-05-2015, 09:16 PM
Ive got the same error as Yat, when running includes.simba ( with the lape function). They said somewhere in this topic, that they had some issues with the includes so that might be the problem, Or did you fix it already?

Running the include.simba gives me this error:
reflection/lib/internal/Includes.simba' not found.

WHILE its there...

MariusK
06-08-2015, 02:50 PM
To let people know, we're going to fix the minimap problem that might occur. For people not aware already, you can no longer click the outside of the minimap(now it has to be INSIDE the circle). Just give me a moment, it's been a long day :)
[IMG]http://i.imgur.com/e3URnmt.png

Can we expect any update regarding this one? :)

Fitta
06-08-2015, 02:52 PM
function TReflectionMap.TileOnMM(Tile: TTile): Boolean;
var
Temp: TPointArray;
begin
SetLength(Temp, 1);
Temp[0] := Reflect.Tiles.TileToMM(Tile);
FilterPointsPie(Temp, 0.0, 360.0, 0.0, 63.0, MMCX, MMCY);
Result := Length(Temp) = 1;
end;

That's all I did, found in MapWalk.simba

tls
06-09-2015, 12:05 AM
function TReflectionMap.TileOnMM(Tile: TTile): Boolean;
var
Temp: TPointArray;
begin
SetLength(Temp, 1);
Temp[0] := Reflect.Tiles.TileToMM(Tile);
FilterPointsPie(Temp, 0.0, 360.0, 0.0, 63.0, MMCX, MMCY);
Result := Length(Temp) = 1;
end;

That's all I did, found in MapWalk.simba

Just use distance.

kriss1993
06-09-2015, 01:26 AM
Any chance u will update pascalscript reflection?