SRL Archive - General Botting Help

Need help with a function


Alpha11833

2015-02-03 14:07:53

Hello! I got this function:
function R_GetInventoryItems2: TInventoryItemArray2;
var
_Inventory, _InventorySlot, _ItemID, _ItemQuantity: Integer;
begin
_Inventory := R_GetWidget2(149, 0);
SetLength(Result, 28);
for _InventorySlot := 0 to 27 do begin
_ItemID := SmartGetFieldArrayInt(SmartCurrentTarget, _Inventory, Widget_getItems, _InventorySlot);
if (_ItemID > 0) then begin
_ItemQuantity := SmartGetFieldArrayInt(SmartCurrentTarget, _Inventory, Widget_getStackSizes, _InventorySlot);
with Result[_InventorySlot] do begin
ID := _ItemID;
Quantity := _ItemQuantity;
Slot := _InventorySlot + 1;
end;
end;
end;
SmartFreeObject(SmartCurrentTarget, _Inventory);
end;

I think Widget_getItems is outdated? I can't really find anything in the api cause there is no real structure (classes, documentatio, etc).

Thx for help!

Kyle

2015-02-03 14:11:49

Well that entire include, reflection for pascal script is not being developed any longer. I would suggest you check out the lape include in the reflection forum which is being actively developed. If you have an questions on it you can post about it there. The link to the forum is in my signature.

Alpha11833

2015-02-03 14:17:34

Thx. One question: Does a pascal script work with lape reflection?

Kyle

2015-02-03 14:21:39

From: Alpha11833
Thx. One question: Does a pascal script work with lape reflection?


Lape works with Lape reflection and pascal script works with pascal script reflection

KeepBotting

2015-02-03 19:41:11

From: Alpha11833
Thx. One question: Does a pascal script work with lape reflection?


To clarify a bit on elfyyy's post, PascalScript and Lape (as referred to in this case) are interpreters. They're kind of like what reads the code to your computer so it can understand it.
The old Reflection was written with PascalScript, which is completely incompatible with Lape. The new Reflection is written in Lape, which is completely incompatible with PascalScript.

If you ever run a RS3 script - they run under SRL-6 which is written in Lape. Currently, all components of SRL use Lape with the exception of SRL-OSR.

riwu

2015-02-03 19:58:44

U can easily convert any script that supports PS to Lape within a minute, only some minor changes needed….