SRL Archive - Reflection Development

R_MoveItem(ID, WhichSlot);


**BANNED The Man

2011-02-11 18:20:41

With the addition of this:
http://villavu.com/forum/showthread.php?p=778486

This will work:

Function R_MoveItem(ID, WhichSlot):Boolean;
var
i: integer;
TB, NB : TPoint;
begin
for i := 1 to 28 do
if(GetItemIDAt(i) = ID)then
begin
TB := InvBox(i);
MouseBoxEx(TB.X1, TB.Y1, TB.X2, TB.Y2,14, 4);
NB := InvBox(WhichSlot)
MouseBoxEx(NB.X1, NB.Y1, NB.X2, NB.Y2,14,3);
GetMousePos(mp.x, mp.y);
ReleaseMouse(mp.x, mp.y, MouseAction(true));
end;
Result := GetItemIDAt(WhichSlot) = ID;
end;

It will find the item in the inventory and move it to the desired slot, good for Alching scripts.

-Boom

KingKong

2011-02-11 23:58:07

There's already a function called DragItem in the includes.

P.S. I think think the 'R_' prefix is used for reflection functions/procedures.

kitchenrange

2011-02-12 01:40:33

"GetItemIDAt"

KingKong

2011-02-12 01:51:04

From: kitchenrange
"GetItemIDAt"


Yes, thats a reflection function, but I didn't say that all reflections func/proc have a 'R_' prefix. I said that all functions with 'R_' prefix are reflection funcs/procs.(Or thats what i tried to tell anyway)

Sex

2011-02-12 01:58:31

He meant that that function is Reflection and this function uses that so this should be R_MoveItem. GetItemIDAt is obviously a Reflection function.
Anyways, this shouldn't be added. Very simple.