Page 1 of 1

6.7.0 pascal] do you know how to delete artefacts

Posted: 17.10.2016 12:40
by epsilon2
i wrote the following code

Code: Select all

Program New;
var
i          : integer;
x          : integer;
list2      : TStringList;
UserList   : TStringList;
 
BEGIN

ClearShopList;
SetAutoSellDelay($0001);
AutoSell($1EFD,$0000,999);
UOSay('Hello World');
FindDistance:= 9;
FindVertical:= 9;
list2 := TStringList.Create;
FindType($0190,Ground);
wait(100);
UserList := TStringList.Create;
GetFindedList(UserList);
for i:= 0 to UserList.count -1 do
begin
    FillNewWindow(GetTooltip(StrToInt('$'+UserList[i])));
    if  0 < pos('tailor', GetTooltip(StrtoInt('$'+UserList[i]))) then
    begin
        ClearContextMenu;
        RequestContextMenu(StrtoInt('$'+UserList[i]));
        wait(1000);        
        GetContextMenu(list2);
        for x:= 1 to list2.count do
        begin
            if  0 < pos('Sell', list2[x]) then
            begin
                SetContextMenuHook(StrToInt('$'+UserList[i]), x);                    
            end;
            ClearShopList;
        end;
        ClearContextMenu;        
    end;
end;
UserList.free;
list2.free;

End.
My expirience is about not closing sell gump and context menue.
Do You have an idea how to gump free client window?
BTW. After executeing the code and clicking by mouse on the used NPC. I get an autosell, contextmenue or random gump.

Re: 6.7.0 pascal] do you know how to delete artefacts

Posted: 19.10.2016 12:08
by Vizit0r
http://stealth.od.ua/Doc:Api/CloseClientUIWindow
but have no idea - available in 6.7 or not.