What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

[Plugin] JoinMe! -

readonlyp

New Member
Joined
Aug 18, 2012
Messages
22
Reaction score
0
JoinMe!
latest version 1.0.1beta


Credit where credit is due - for using code from the following sources

- xsol for taking a lot of code from MyBuddy and modifying for this purpose.
- stevenr for using combatbot.xml
- shinavaka - boss notification script integrated
- I am more than HAPPY to take assistance from others on this code. I am not a programmer by trade, I typically learn from reading code and applying it as best I can. I know this feature was requested by others, so this was my hack and slash solution, maybe it will spur some better ideas.
- Giles, I read his code a lot to understand the language better


Disclaimer - This is not a "plugin that just works" - you will need to modify some files to match your specific bot setup. Limited command line / network sharing knowledge may be required. I will not support tutorials on mapping drives, sending files to remote locations etc. What you need to know is this - the .bat file that is run by autohotkey needs the ability to overwrite the cfg file I wrote to the plugins/joinme/joinme.cfg file wherever your demonbuddy is running for each bot. Please provide CONSTRUCTIVE criticism to let me know how I can improve this documentation and I will update accordingly.


Plugins / Programs Required -

Autohotkey - A Windows Hotkey program (alternative hotkey program / joystick configurations to run the .bat files will work, but will not be supported by me)
CombatBot.xml - Fight / Loot xml, nothing else

Suggested Plugins -

GilesTrinity - Because it rocks - takes care of loot sorting, stashing, combat, leaving you to play your main.





Features

Multiple bots stay in town, when hotkey pressed, they will all port to party leader (a manually played character) and assist in combat / get NV / get loot, then you can send them back to town
Supports VM clients, but you must have drives mapped for cfg file to be correctly moved.
I use this to run a WW barb in A3, with several bots in town. When I find an elite, I use my hotkeys to summon the bots, they assist with fight and then loot. They can also follow, but this is buggy currently when more than one bot is in game.





How it works -

JoinMe.cs is constantly scanning the joinme.cfg file for the value of JoinRequest. I am using autohotkey to run .bat files, which overwrite joinme.cfg with the desired function.
YOU will need to edit these .bat files to ensure the patch names match the path names of your joinme folder(s). i.e. if you are running two bots on VMs, you will need to map those drives to the environment you are running the .bat files from (i.e. map the C:\ drive on VM-1 as the Z:\ drive on your main PC, then change the .bat file to copy the cfg file to Z:\demonbuddy\profiles\joinme\joinme.cfg). This may not be the most efficient way to do it, but I wanted a way to run a main without DB and have my bots join in my looting.


Code:
My AutoHotkey.ahk

;^ = Ctrol
;+ = Shift
;t = the t key

;Sends Bot to Town
^+t:: run "gototown.bat"

;Makes bot come to player and follow nearest toon
^+f:: run "joinfollow.bat"

;Makes bot come to player only
^+s:: run "joinonly.bat"

SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

Code:
joinfollow.bat example - YOU will need to modify joinfollow.bat joinonly.bat and gototown.bat

;; the first file is the premade cfg file, the second file is the one joinme is scanning.  In this case I have two Virtual machines running, and they are mapped as Z:\ and Y:\ to the machine I am running.
copy Y:\demonbuddy\plugins\joinme\joinfollow.cfg Y:\demonbuddy\plugins\joinme\joinme.cfg
copy Z:\demonbuddy\plugins\joinme\joinfollow.cfg Z:\demonbuddy\plugins\joinme\joinme.cfg

Code:
the joinme.cfg file in your /Plugins/joinme/ folder is pretty simple, and should only read one Line of the following.

JoinRequest=join

OR
JoinRequest=follow

OR

JoinRequest=town





How you use it -

I currently have 3 hotkeys set up in my AutoHotkey script. Ctrl-Alt-S summons the bot(s), Ctrl-Alt-F summons the bot(s) and has it try to follow, Ctr-Alt-T sends the bot(s) to town. You can modify these keys in the script using the autohotkey documentation.

You should have the joinme.ahk, .cfg files and .bat files all in the same directory on the pc you are playing your manual character. Ater autohotkey is installed, you will just doubleclick joinme.ahk to load the script (at this point hotkeys will remain active until you disable autohotkey). I would recommend testing the script and verifying that when you use your follow hotkey, the joinme.cfg file in the joinme plugin folders reads "JoinRequest=follow" - when you use the joinonly hotkey, joinme.cfg should read "JoinRequest=join" and when you use the gototown hotkey, joinme.cfg should read "JoinRequest=town". Verify this in all locations you will be running demonbuddy with the joinme plugin. If this does not work, your autohotkey script is not correctly moving the files, and you should use the command line to understand how your .bat file should be modified.

The Main Character you are playing needs to start the game, this causes them to have "Banner 1" which is the only banner the bots will look for, as an effort to speed up bringing the bots to your location.

I would suggest at this point using your town autohotkey to reset whatever state you may have left the joinme.cfg file in (clrl-alt-t by default).

NOTE: Pressing START and Running Combat.XML when character is not in game WILL CRASH YOUR D3 INSTANCE

Your "bot characters" need to be invited and join your game. You will need to adjust your inactivity timer up on DB, as the bot sitting in town too long may trigger inactivity and logout, at which point combat.xml will crash d3. Now load Combat.xml, and start the bot. (verify joinme plugin is enabled)

You main character - the one you are manually playing can farm as usual (no follower unfortunately) - when you want bot support, ctrl-alt-s will cause them to click your banner. At that point DB will takeover running combat.xml and using your combat routine. If you use ctrl-alt-f the bots will attempt to also follow once they are ported down and combat is complete (buggy)

When combat is complete, ctrl-alt-t will send the bots merrily back to town.







Known Issues -

-Running "CombatBot.xml" while not in game will crash client.

-Sometimes when the bot is done fighting, it will be out of range of loot (although giles should still go back and get it). I recommend sending bots to town, then resummoning them at the loot drop spot to ensure they get the loot they so well deserve. I also recommend setting loot and combat settings very high on DB...you are not too worried about stucks, since you send them home when done.

-Follow mode with multiple bots sometimes causes bots to "follow" each other, meaning they stand next to each other fat dumb and happy - suggestions on ensuring they follow the non DB char (or player "1") only are welcome.

-Bots will release if they die on a boss.









ToDo (again, any help with these is more than welcome)

-Identify the non-bot character to follow, sometimes the bots latch onto each other to follow, and therefore stand together. I find the fix is after combat send them to town and bring them back, usually they will come at different rates so at least one will latch onto the played character.

-Add anti-idle so high inactivity timer is not required (pretty sure this will be simple, just need to sit down and do it)

-Automatically "Click Ok" button on bots when boss fight started. - I know there is a plugin for this, would like to incorporate function, or verify compatibility.(DONE I THINK)

-Provide functionality for a JoinMe! leader plugin, which could summon the other bots when elites are found, summon other bots, and then send them home on combat complete. (I have a solution, will be available next release most likely)



Code:
Changelog

1.0.1

-Added functionality to click "OK" when starting a boss fight.  
-Added ability to run joinonly.bat when accepting boss fight, preventing boss from attempting to town portal in boss fight, you can subsequently re-enable joinfollow via hotkey if you like.
-Fixed some random bug and slop.


View attachment JoinMe1.0.1.zip
 
Last edited:
First.
Looking good, keep it up :>
 
Cool idea for a plugin :)

I've no idea if the OK button you get for the Boss event is the same as that which will be in the NotificationClickOK plugin, so I'd suggest grabbing the hash yourself, just to be sure.

Example code for clicking on the OK button. This one is for when the follower leaves the party (from PartyLeader/Dude plugin)

PHP:
		    // Follower leaving message
			// need to OKAY this in order to get rid of it
            if (Zeta.Internals.UIElement.IsValidElement(0xF85A00117F5902E9) && (Button = Zeta.Internals.UIElement.FromHash(0xF85A00117F5902E9)) != null)
            {
                if (Button.IsVisible)
                {
					Log("Follower is leaving message has popped up");
					// click on the OK button
					Button.Click();
                }
            }

0xF85A00117F5902E9 is the hash for the OK button that pops up in this instance.

And you'll need a button object:

PHP:
        // Set up button object to represent the buttons in the game window
		// this can be used for any button, but only one button at a time
        private Zeta.Internals.UIElement Button = null;

Place this at the start of your code, so that you can use it throughout your code.

I nicked that code from other plugins, may have even been Notificationclick, I'm not sure. I've read through the code of soooooo many plugins :)
 
Last edited:
Hi ChuckyEgg,

Could you tell me how to find the hash code of the OK button on Disconnect dialog? It will hang DB forever unless manually closed. I'm trying to write a plugin to solve the problem.

Thank you.
 
Hi ChuckyEgg,

Could you tell me how to find the hash code of the OK button on Disconnect dialog? It will hang DB forever unless manually closed. I'm trying to write a plugin to solve the problem.

Thank you.

IN LONG WINDED DETAIL

Bring up the Info Dumping tab on Demonbuddy

There you'll see the User Interface section

In that section you'll see a small square button in the bottom right of that User Interface section

You need to go to D3 and click on the OK button

Then go to Demonbuddy, and click on that small square button in the User Interface section of the Info Dumping tab of DB.

You will then see the hash (value) appear to the right of the Last Clicked: text in the User Interface section.

This is the hash value you want. Double click on it (copied to the clipboard), then paste it somewhere safe (notepad)

IN BRIEF:

click on the OK button in D3

Click on the small square button in the User Interface section of the Info Dumping tab of DB

double click on the value that appears next to Last Clicked: in the User Interface section

paste value to somewhere safe (notepad)

:)
 
1.0.1 release incorporates boss button clicking, and fixes some bugs.
 
Awesome, I was thinking of just following the bot around instead. This is much better.

Some ideas you might like to persue.
on Goblin, Blue, Elite, and gold chest auto summon bots.

I hope to get on and try it soon!
I only have 1 bot, so maybe the follow mode works really well :) *So Excited!*

As far as your bots standing around, if they stand around for 10-30 seconds idle, you might have them port to town and go to leader again. They may as well do that as anything.
 
I cant get it work. Have verified the joinme.ahk is working, it does change the joineme.cfg content, but seems the joinme.csi not working, of coz i have checked the plugin
Whats else did i miss?
 
Back
Top