• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • CowStats 3.0 (Honorbuddy web monitor) - HonorBuddy >= 1.945

    Discussion in 'Archives' started by cowdude, Jul 4, 2010.

    1. cowdude

      cowdude Active Member

      Joined:
      Feb 17, 2010
      Messages:
      337
      Likes Received:
      27
      Trophy Points:
      28
      Hi folks,

      Here's my latest beta build of CowStats. Currently running fine, does not crash HB anymore. It has been fully rewritten to be a LOT less dependant on LUA and threads. I currently lack of money but decided to work hours in order to update/upgrade this wonderful tool for the community. Hope you'll enjoy it.

      Current: CowStats 3.0.2
      Latest update: 7/15/2010
      Reason: HB 1.9.50 compat.

      If you're too lazy to read this page and think things just work out of the box, I suggest you get the **** out of here. Hint: Here.

      cowstats3.jpg

      Features
      Displays stats: player name, class and level, XP, XP/hour, time to level up, gold/hour, and much more
      Takes a screenshot of the game window
      customizable layout (drag-and-drop)
      "beep" on some chat events (flash 9 needed)
      Shows a map with the player location
      Chat logging
      Displays Honorbuddy log
      Logs anything your bot loots
      Remote control (see below)
      New: Fake live monitoring (max 4fps on localhost, else ~max 2fps)
      New: Shows your toon and current target portraits
      New (3.0.1): Supports sending accents/Unicode chars in remote commands, including chat messages
      (New: Less goddamn bugs)


      About remote control
      Well, this has nothing to do with real freaking live remote control yet. It's a very basic command line interface. But still, it allows you to :
      - Remote execute any LUA code, function or macro (complete list at http://www.wowwiki.com/World_of_Warcraft_API)
      - Send any chat message
      - Reply to whispers
      - Shutdown HB and WoW
      - New: reply to latest whisper
      It still needs to be improved (which functions/macro could be helpful?)
      Lua examples:
      lua OpenAllBags() - Open all your bags
      lua SendChatMessage("Hello world" ,"GUILD" ,GetDefaultLanguage("player")); - send a guild message
      lua ForceQuit() - Close the game
      lua return GetCoinText(GetMoney(),", ") - prints how much gold, silver and copper pieces you have

      Install guide
      • I don't have an HTTP server yet
        1. Downloads: CowStats.zip and CowStats_http.zip
        2. Unzip both files into your Plugins/ folder. Check that this path is correct: "Plugins/CowStats_http/www", NOT "Plugins/CowStats_http/CowStats_http/www"...
        3. Close HB.
        4. Check that ports 1234 and 8080 are available (see "configuration" to change ports once you completed this install guide)
        5. Open HB, go to the Plugins tab. Enable both CowStats addons.
        6. Start HB. Any error message? I guess you should read and fix them.
        7. Go to http://localhost:8080/auth.htm and submit the form. Don't worry about the fields for the moment.
        8. You should have been redirected to http://localhost:8080/index.htm. If everything worked, you should see your bot in action. :rolleyes:
      • Duh, what if I dont know wtf is an HTTP server?
        You mostly don't have one, then. Read "I don't have an HTTP server yet".
      • I have an HTTP server (can be on a remote host)
        1. Downloads: CowStats.zip and CowStats_http.zip (just keep the www/ folder)
        2. Install the www folder somewhere on your HTTP server.
        3. Install CowStats plugin inside your Plugins/ directory.
        4. Start reading "I don't have an HTTP server yet" at step 3 and follow the instructions.
          Note: If you're using a different computer to host the HTTP client and run HB, ensure that you fill the HTML form correctly (default settings are fine, just check the host IP, which must be the computer's IP on which you run HB.

      Configuration
      • CowStats core
        Just go to the Plugins tab of HB, select CowStats and click on the config button. Simple as that. yay.​
      • CowStats HTTP Server
        You cannot configure it with HB at the moment, because I'm a bit lazy. Once you started HB with this plugin installed, you can edit the Plugins/CowStats_http/config.txt file and set a different port for your HTTP server.​
      • CowStats client (well, the webpage itself)
        If you made a mistake when you configured your client, ie. you set a wrong password or whatever, you can reset your settings by going back on the auth.htm webpage or erase your cookies.​

      How does it work (technical stuff)
      CowStats core opens a TCP port on your computer (1234 by default), which is password protected.
      You can connect to it and fetch CowStats data using a simple ASCII "line-per-line" protocol. You can even get the screenshot (base64 encoded) or execute remote LUA code with it! Note that HB fails sometimes, which leads CowStats to answer "NAK" (not acknowledge) is something went wrong.

      CowStats HTTP Server is a very, very basic HTTP server that only send files from the Plugins/CowStats_http/www/ folder. It uses by default the TCP port 8080. You can change it if you want: see "configuration".

      Bugs
      • CowStats core runs as long as it is installed into your Plugins folder
      • Causes ~3.14^42 memread errors if you let the client run with a high refresh rate
      • Loots tracking broken once the bot sells/mails his stuff
      • Cannot send remote commands with non-ASCII chars..................................... Solved
      • Wrong float format Solved
      • Some maps don't have abs offsets to compute relative map coords (like Dalaran)

      TODO
      • CowStats Remote server + CowStats Remote (allow you to use CowStats even if you cannot open ports)
      • Fix teh damn bugz
      • Have a life and get a real job.

      If you have any intelligent question, feel free to ask.

      If you're smart enough to write an install guide for kids, (feel free)? to publish it somewhere on this board.

      Currently working on HB 1.945 @ localhost. Couldnt test it on a remote computer, please give me any constructive feedback.

      Thanks to everyone from the Dev board who answered my questions. ;)

      "Enjoy"
       

      Attached Files:

      Last edited: Jul 15, 2010
      znuffie likes this.
    2. JackieMoon

      JackieMoon New Member

      Joined:
      Apr 16, 2010
      Messages:
      181
      Likes Received:
      1
      Trophy Points:
      0
      Awesome dude! Will definitely use this!
       
    3. MrNemo

      MrNemo New Member

      Joined:
      Jan 15, 2010
      Messages:
      34
      Likes Received:
      0
      Trophy Points:
      0
      Dude, this is the sickest plugin out there for HB right now. Amazing work!
       
    4. Cracktomte

      Cracktomte Member

      Joined:
      Mar 7, 2010
      Messages:
      430
      Likes Received:
      13
      Trophy Points:
      18
      Hi, first of all, amazing work mate!

      Now the bugs that I'm experiencing.
      * Detecting chat messages works okay, but it messes the message up with previous messages(?). If someone says "Hi" it becomes "Hi! ome Ulduar with us?" Don't know how to explain but yeah.
      * Seems like it can't get the current amount of gold, silver and copper.
      * The dot on the "minimap" is in the upper left corner. Might be that bug you already mentioned?

      These bugs aren't really destroying the plugin, but it would ofc be good if they worked properly. And once again, awesome work :)

      Edit: Running on localhost and remote (Using a domain). Both seems to work fine.
       
    5. cowdude

      cowdude Active Member

      Joined:
      Feb 17, 2010
      Messages:
      337
      Likes Received:
      27
      Trophy Points:
      28
      Great news!

      I know what you mean about chat messages. It's an HB bug which seems to show up once you jump into a BG (maybe something related to loading screens). Can't do anything about this.

      Gold error: post a short log after you opened the html page showing 0g0s0c :)

      Minimap dot: currently doesnt work inside instances and some few maps. Could be fixed by looking at DBC files, which would piss me off.
       
    6. Cracktomte

      Cracktomte Member

      Joined:
      Mar 7, 2010
      Messages:
      430
      Likes Received:
      13
      Trophy Points:
      18
      Actually, i haven't ran any bg's while using HB, so bgs ain't the problem. Only loading screen would be when my toon died.

      Only error I can see in the log would be
      And I'm currently at level 79 in Sholazar Basin, where the minimap doesn't get the position correctly.

      Hope this helps :)


      Edit:
      CowStats tells me this
      Haven't looted any coins so that explains gold/hour tho

      Edit 2: Found this error
       
      Last edited by a moderator: Jul 5, 2010
    7. dj_hype

      dj_hype New Member

      Joined:
      May 15, 2010
      Messages:
      72
      Likes Received:
      0
      Trophy Points:
      0
      This is awesome. Amazingly, I got it working right out of the box. Then, I tried to get remote connection working (just by port fowarding and such) and then it broke. And now, it won't even work locally. Been getting this when trying to connect to localhost:8080

      Code:
      [10:57:33 PM:546] [CowStats<WWW>]: Could not send file...System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\HB\Profiles\Plugins\CowStats_http\www\index.htm'.
         at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
         at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
         at System.IO.FileStream..ctor(String path, FileMode mode)
         at CowStats.Server.ListenerCallback(IAsyncResult ar) in c:\HB\HB 1.9.4.5\Plugins\CowStats_http\Server.cs:line 103
      Could not find a part of the path 'C:\HB\Profiles\Plugins\CowStats_http\www\index.htm'.
      mscorlib
         at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
         at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
         at System.IO.FileStream..ctor(String path, FileMode mode)
         at CowStats.Server.ListenerCallback(IAsyncResult ar) in c:\HB\HB 1.9.4.5\Plugins\CowStats_http\Server.cs:line 103
      [10:57:33 PM:546] [CowStats<WWW>]: Connection closed.
      
      I completely removed cowstats and copied the stuff back over but no bueno. Hope that error report helps.

      EDIT: Got it working locally again by copying the cowstats_http folder to the area where it couldn't find it. Still can't get it to work remotely (it loads the pages but never loads character name, stats, etc...) By remotely, I mean a different machine on my local network. I know you said you haven't been able to test remote monitoring yet, so it's no biggie :D
       
      Last edited: Jul 5, 2010
    8. cowdude

      cowdude Active Member

      Joined:
      Feb 17, 2010
      Messages:
      337
      Likes Received:
      27
      Trophy Points:
      28
      That's the famous error that used to crash everything.... :3. The plugin runs fine with it. If you experience a lot of that kind of error (readuint failed/blackmagic blahblah) try lowering the refresh rate on the html page.

      ---------------------------------

      Gold "NaN" error: check that you got HB 1.945 and please submit a log. Are you running HB with en-US recommended culture settings?

      ---------------------------------

      dj_hype:
      Check that the www/ folder exists...
       
      Last edited: Jul 5, 2010
    9. dj_hype

      dj_hype New Member

      Joined:
      May 15, 2010
      Messages:
      72
      Likes Received:
      0
      Trophy Points:
      0
      I fixed it by just copying the CowStats folders to that path, but the strange thing is that the plug-in isn't installed into there. This should have been the correct path: c:\HB\HB 1.9.4.5\Plugins\CowStats_http\www\

      At any rate, I was able to fix it just by copying things to the path it wanted. Wuzzery how did you get it to work remotely?
       
    10. Cracktomte

      Cracktomte Member

      Joined:
      Mar 7, 2010
      Messages:
      430
      Likes Received:
      13
      Trophy Points:
      18
      Uploading the requested log!

      I'm running with swedish settings, has worked fine so far. Can try with en-US tho. Editing this post in a while then!

      Edit: Changing to en-US seems to be working. My bad :) Not optimal for me tho, but that's not your problem. I'm not dying or anything!
       

      Attached Files:

      Last edited by a moderator: Jul 5, 2010
    11. Cracktomte

      Cracktomte Member

      Joined:
      Mar 7, 2010
      Messages:
      430
      Likes Received:
      13
      Trophy Points:
      18
      Well, the way you are supposed to. Port forwarding 1234 and 8080 to the correct computer. When you input the settings on the webpage (server, port, username and password) you have to enter the external ip/domain there as well!
       
    12. dj_hype

      dj_hype New Member

      Joined:
      May 15, 2010
      Messages:
      72
      Likes Received:
      0
      Trophy Points:
      0
      Oh man, I feel like such a nub. Thanks!!
       
    13. cowdude

      cowdude Active Member

      Joined:
      Feb 17, 2010
      Messages:
      337
      Likes Received:
      27
      Trophy Points:
      28
      Looks fine, must be a number formatting/parsing error.

      Once you're on the CowStats html page, paste this in the address bar:
      Mine looks like this (en-US on fr-CH win7):
      Your error could happen if gold is NAK, "" or something like "42,666" instead of "42.666"
       
    14. Cracktomte

      Cracktomte Member

      Joined:
      Mar 7, 2010
      Messages:
      430
      Likes Received:
      13
      Trophy Points:
      18
      Should have thought of that, lol... We use "," instead of "." here in sweden!

      But isn't that kinda easy to fix tho? Would be awesome not having to change settings every time i bot :p

      Edit: Changing to en-US also fixed minimap!
       
      Last edited by a moderator: Jul 5, 2010
    15. cowdude

      cowdude Active Member

      Joined:
      Feb 17, 2010
      Messages:
      337
      Likes Received:
      27
      Trophy Points:
      28
      You're supposed to have it set to en-US according to HB setup guide, y'know... :3

      Anyway, I guess I'll have to fix it, nothing really hard.
       
    16. Cracktomte

      Cracktomte Member

      Joined:
      Mar 7, 2010
      Messages:
      430
      Likes Received:
      13
      Trophy Points:
      18
      Yeah, I know! But I tried it with swedish settings, and it worked without any problem, so never really thought about it. :p
      Ofc nothing you have to do, but you'll have my thanks! :D
       
    17. dj_hype

      dj_hype New Member

      Joined:
      May 15, 2010
      Messages:
      72
      Likes Received:
      0
      Trophy Points:
      0
      Just an update, this is running fabulously remotely now. Even on my phone (G1 running Android) it works great and I'm able to reply to whispers. Thanks a bunch. Do you have a paypal I could donate to for this?
       
    18. cowdude

      cowdude Active Member

      Joined:
      Feb 17, 2010
      Messages:
      337
      Likes Received:
      27
      Trophy Points:
      28
      There was a light version that could be viewed on phones, I'll update it when I got time.
       
    19. sikair27

      sikair27 Member

      Joined:
      Feb 28, 2010
      Messages:
      182
      Likes Received:
      2
      Trophy Points:
      18
      so the original only required one port to be open, whereas this version requires 2 ports open?
       
    20. cowdude

      cowdude Active Member

      Joined:
      Feb 17, 2010
      Messages:
      337
      Likes Received:
      27
      Trophy Points:
      28
      Yes, unless you put the www/ content from CowStats HTTP Server on a web server (you can find a lot of them for free).

      Both solutions will give you the same performances as the html files are a 'simple' AJAX client like a kind of .exe file.
       

    Share This Page