this is moving the mouse to the upper right corner instead of where the NPC is, and it does the same with NPCs[i].Pixel.x and NPCs[i].Pixel.y:
what am i doing wrong? I need to make it move the mouse to the NPCCode:procedure GetFight; var NPCs : array of TNPC; TPoints : TPointArray; i,j,tries,checkFight : integer; begin if not (LoggedIn) then Exit; NPCs := SortNPCs(GetNPCs(false)); If GetArrayLength(NPCs) = 0 then begin writeln('No mobs'); Exit; end; for i := 0 to High(NPCs) do begin for j:= 0 to High(Players[0].Strings) do If NPCs[i].Name = Players[0].Strings[j] then begin If (NPCs[i].Interacting = 0) then begin MMouse( TileToMS(NPCs[i].Tile,NPCs[i].Height).x , TileToMS(NPCs[i].Tile,NPCs[i].Height).y ,3,3); //ChooseOption('ttack'); NPCKill := NPCs[i]; writeln('Got a fight'); wait(2000); end; end; end; end;


Reply With Quote













