Originally Posted by
elfyyy
Hooks updated to Rev 68
Nice keeping this updated, however you removed 'Client_PlayerIndex' which I used with
Simba Code:
function R_GetMyIndex: Integer;
begin
Result := Reflect.Smart.GetInt(0, Client_PlayerIndex) + 32768;
end;
To do:
Simba Code:
procedure dismissAllRandoms;
var i, j:integer;
_npcs:TReflectNPCArray;
randoms:tstringarray;
begin
randoms := ['molly', 'niles', 'miles', 'giles', 'sandwich lady',
'drunken dwarf', 'genie', 'highwayman', 'dr jekyll', 'cap''n hand', 'security guard',
'rick turpentine', 'mysterious old man', 'frog', 'null', 'mime', 'sergeant damien', 'freaky forester',
'postie pete', 'tilt', 'flippa', 'leo', 'pillory guard', 'evil bob'];
_npcs.GetAll;
for i:=0 to high(_npcs) do begin
if (_npcs[i].Interacting = R_GetMyIndex) then begin
for j:=0 to high(randoms) do begin
if (pos(randoms[j], lowercase(_npcs[i].Name)) > 0) then begin
R_InteractTile(_npcs[i].Tile, 'Dismiss', 0, 0, 50);
sleep(2500+random(1000));
end;
end;
end;
end;
end;