Jump to content

Join our Slack

Talk to other users and have a great time
Slack Server

Welcome to our Community

Click here to get your Exiled Bot license
Donation Store
Sign in to follow this  
Yumstain

Inventory screenshot app

Recommended Posts

I made this work, and am able to check my bots inventory via screenshots. I can see all my inventories on 1 page, and it is auto-refreshing about every minute. I dedicated a VM to host the image capture service.

On the VM:

Install Firefox and Multifox extension (this allows you to login to all your account in separate browser windows) LOG THEM IN!

Install SnagIT (screen capture that supports FTP)

Lets say you have 3 bots, create 3 capture profiles in SnagIT. Each should be the same, but with a different hotkey to start it, and a different file name e.g. bot-1.jpg, bot-2.jpg.

Configure "sharing" to use FTP to "ftp.yourserver.com, choose a remote path e.g /public_html/bot_images

Now test your captures, making sure you end up with 3 unique files on your remote server. Click Firefox window 1, capture. Then do the next 2 Firefox windows the same way. You should end up with bot-1.jpg, bot-2.jpg, and bot-3.jpg on the remote server.

To capture the correct image (character's loot), you needed to make some mouse clicks manually. Let's automate it. I used Workspace Macro Pro (keyboard/mouse automation).

In SnagIT, I set my captures hotkeys to alt-1, alt-2, alt-3, and so on...

I start recording a new macro

I click on my first Firefox window via the taskbar, hit f5 to reload the page, click my character's face, wait..., alt-1 to capture image and send

Now I click on my second Firefox tab, hit f5..........alt-2 to capture and send

Repeat this process for each bot. At the end, I hit ctrl-alt S to save my macro.

I fired up my macro and made sure it was repeating and successfully updating the images - bam! working!

Now build a simple (or even complex) html page to display the images. There you have it- an image capture service running in your VM and a page to display the images.

(for anyone looking to display the inventory area only, and not the whole character screen, read more)

I used iframes and negative margins to clip my captures to only display the inventory area of the character. The index.html contains an iframe set to 585px width, 252px height, scrolling="no". The src should be bot-1.html. Repeat this for each bot changing the bot-1.html to bot-2.html and so on.

Now to create bot-1.html:

this page should contain the

Build bot-2.html, bot-3.html the same way

In the of each of these image pages, add this css to clip the image (im my case):

style="margin-top:-625px;margin-left:-555px;

Now your index.html should show the inventories only, letting you peek at all your loot at the same time. I can't wait to wrap this up into an android webview app.

I know this is a pain in the ass, but once running its fairly maintenance free. Just Suspend/Pause your VM to avoid having to re-position items for the mouse/keyboard automation.

CHEERS!

Posted Image

Share this post


Link to post
Share on other sites

For image recognition, simply use Autoit or Autohotkey. Personally I use autohotkey because it's very easy to use, and has an excellent documentation online.

Share this post


Link to post
Share on other sites

^^ Thanks for the link, it's working. Now I need to merge the sqlite databases and build a front-end. I like this solution A LOT better than my screenshot service (obviously).

Share this post


Link to post
Share on other sites

Can anyone recommend a program for image recognition? I'd like to count the orbs and report totals.

If you want to get down and dirty, download the opencv library.

This page from the OpenCV documentation details how to check for similarity. USE THE PSNR METHOD--this is a direct pixel comparison. SSIM is an adaptive similarity method, so that things which -look- similar will return a higher level of similarity confidence, but because you are comparing identical things there is no reason to go to the extra effort and put in the extra processing power required for SSIM.

You can also ignore everything about the video stream--use

cv2.imread
instead. Documentation for imread here.

You could set up an interesting method to read the next image by defining a variable that adds 1 at the end of a while() loop, and then save your images in ascending numeric count.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...