new addon for character syncronisation

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
SpiralV
Posts: 72
Joined: Sat Jun 25, 2011 10:37 am
Location: Germany

new addon for character syncronisation

#1 Post by SpiralV » Mon Aug 01, 2011 3:04 pm

Sometimes it's very usefull if the chars waiting for each other and starts moving at the same time.

I've written a small addon that makes this possible and its really quickly and easy to use, but there is one limitation it uses the filesystem so the micro-macro instances must be started from the same directory.

First, it is a good time for a backup in generally.

How to use it in your wp file:

Code: Select all

<onLoad>
syncReset() --It deletes old files
</onLoad>
and on a safe waypoint

Code: Select all

	while( not syncWait() ) do -- the char now waits for all group members
		yrest(200);
	end
hmm I think it is also possible to send messages but for now lets see how it works. :)
Attachments
userfunction_sync.lua
(1.86 KiB) Downloaded 111 times
Last edited by SpiralV on Tue Aug 02, 2011 12:33 pm, edited 2 times in total.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: new addon for character syncronisation

#2 Post by Administrator » Mon Aug 01, 2011 6:01 pm

Not a bad idea. Interesting implementation.

You are right. It is possible to send messages between MicroMacro instances. You have two choices: TCP/IP and IPC. The difference being that IPC should be quicker and easier to do, but must always be on the same machine. TCP/IP would allow you to sync bots on the same machine as well as anywhere in your network or through the internet.

I don't even think the IPC functions are documented yet. I should probably do that.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: new addon for character syncronisation

#3 Post by rock5 » Mon Aug 01, 2011 10:45 pm

Nice bit of codiing and definately a good idea.

You should have prefixed it with "userfunction_" though. "addon_" was deprecated because it causes confusion with ingame addons.

Wouldn't it be easier to just put the loop inside the function so you could just call,

Code: Select all

syncWait()
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

SpiralV
Posts: 72
Joined: Sat Jun 25, 2011 10:37 am
Location: Germany

Re: new addon for character syncronisation

#4 Post by SpiralV » Tue Aug 02, 2011 9:27 am

Administrator wrote:Not a bad idea. Interesting implementation.

You are right. It is possible to send messages between MicroMacro instances. You have two choices: TCP/IP and IPC. The difference being that IPC should be quicker and easier to do, but must always be on the same machine. TCP/IP would allow you to sync bots on the same machine as well as anywhere in your network or through the internet.

I don't even think the IPC functions are documented yet. I should probably do that.
ups sry I should express myself more clearly :|

a simple example
two bots farming the same map with randomly selected channel.
Now it may be they farming the same place, i think this is a problem which must not be.
I'm sure there are better examples ^^ but its easy to understand that a bot alone can not solve the problem without more information.
so I thought a message-system could be useful and it is easy to implement but i believe it's not necessary to use a network interface.

rock5 wrote:Nice bit of codiing and definately a good idea.

You should have prefixed it with "userfunction_" though. "addon_" was deprecated because it causes confusion with ingame addons.

Wouldn't it be easier to just put the loop inside the function so you could just call,

Code: Select all

syncWait()
Yes but if something goes wrong then there is no way to break the loop. In WP, it can easily aborted + other useful things.

User avatar
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: new addon for character syncronisation

#5 Post by grande » Tue Aug 02, 2011 1:33 pm

I know I'm assuming a lot... does this addon make it so clients in the group follow the lead member of the group around while a WP such as partyhealer or partydps controls the other group members? Can someone give specifics on what "synchronize" actually means in this application? Thanks, just wanted more clarity on this. Sounds like it could be nice for mem collecting :-)

SpiralV
Posts: 72
Joined: Sat Jun 25, 2011 10:37 am
Location: Germany

Re: new addon for character syncronisation

#6 Post by SpiralV » Wed Aug 03, 2011 9:59 am

grande wrote:Can someone give specifics on what "synchronize" actually means in this application?
If all party-bots running into the 'while' loop then the loop breaks, thats the point of synchronization in time.
grande wrote: I know I'm assuming a lot... does this addon make it so clients in the group follow the lead member of the group around while a WP such as partyhealer or partydps controls the other group members?
No it's not possible but I see the problem, thats a limitation of partyhealer and partydps they can not be interrupted.It may be Lisa change the code.
I would be careful with the ingame-follow due to stuck.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: new addon for character syncronisation

#7 Post by lisa » Wed Aug 03, 2011 9:52 pm

yeah upgrading partybot has been on my todo list for a while now, just a matter of finding the time for it.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 24 guests