This is a small instructional on how to get two scripts on seperate computers to communicate with eachother. This is only for LAN. This method can be used for several things, namely creating a bot gold farmer/storing script.
First you need to get Synergy.
[Only registered and activated users can see links. Click Here To Register...]
Read the documentation to connect your two computers together. It's a very easy process. For my example I have my Server computer on the left, and my Client computer on the right. Basicly my desktop is in front of me and my laptop is on the desk to the right. Synergy allows you to use one keyboard and mouse to control 2 computers by moving your mouse to the edge of the screen, as if the second computer was another monitor.
Now that you have Synergy setup correctly lets move onto the AutoHotKey scripts. The idea would be that on your server you would be running a bot script on a farmer character, and on your client you would be running a script that is waiting for a signal to tell it to input commands that result in a trade with the server character.
Provided here is NOT a bot for farming, nor a script to automate a trade. What you will find here is pieces that you would use to communicate between the two scripts that you would make yourself.
For these examples I have set the functions up as hotkeys, of course in a real script these functions would be called dynamicly. These are just working examples.
The script on the server:
The script on the client:
The method here is to first move the mouse to ALMOST the top right corner of the servers screen (all the way up, almost all the way to the right). Next is to move the mouse to the right relative to its current position by X pixels (a number which will move it farther than the screen extends). This will put the mouse at the very farthest top right pixel. At that moment synergy moves the mouse 1 pixel to the right onto the client machine. Meaning when the mouse is on 1279x0 (there is no pixel number 1280, the first pixel is number zero), it will move onto the client machine at 0x0. If the mouse was at 1279x1 it will move onto the client machine at 0x1.
The mouse will always land on the 0 X axis pixel on the client machine, and always the same Y pixel (up and down) as it was on the server. If your server has 1024 pixels on the Y axis, and your client has 800 pixel on the Y axis, when you move from 1279x1000 (or any Y pixel larger than 799) you will land on 0x799.
Okay so on the client script you can see that the script is simply waiting for the mouse to be at 0x0. When it sees the mouse at 0x0 it does something, in this case displays a message box.
Now what to do with it?
With this method, you have X number of possible unique signals that can be sent. Where X is the number of Y pixels you have on your client machine.
On my laptop I have 966 Y pixels. That means I can send and reply to 966 unique messages. For example:
Bot script on server fills its inventory up with rares, moves mouse to position 1279x0, mouse then is sent via synergy to 0x0 on client machine. Client machine sees mouse on 0x0 and then moves to predefined coords and then initiates trade with the server script via return signals using the mouse move method.
This method is almost limitless in its uses for communicating scripts.
Now that you understand how it works, I'll let you know that you can configure synergy to connect your server/client in several ways. Example:
Server is Left of Client
Client is Right of Server
Server is Top of Client
Client is Bottom of Server
This allows you to move your mouse to the bottom of the server, and end up at the top of the client. Using this connection will give you X number of extra unique messages, where X is the number of X axis pixel on your client machine minus one (0x0).
So if your client machine had the resolution of 1280x1024 you would have a total of 2,303 pixels to use as messages.
:mofo: :pimp: :mofo: :pimp: :mofo: :pimp: :mofo: :pimp: :mofo: :pimp: :mofo: :pimp: :mofo: :pimp: :mofo: :pimp: :mofo: :pimp: :mofo:
Gimme thanks if you liked it!
.
First you need to get Synergy.
[Only registered and activated users can see links. Click Here To Register...]
Read the documentation to connect your two computers together. It's a very easy process. For my example I have my Server computer on the left, and my Client computer on the right. Basicly my desktop is in front of me and my laptop is on the desk to the right. Synergy allows you to use one keyboard and mouse to control 2 computers by moving your mouse to the edge of the screen, as if the second computer was another monitor.
Now that you have Synergy setup correctly lets move onto the AutoHotKey scripts. The idea would be that on your server you would be running a bot script on a farmer character, and on your client you would be running a script that is waiting for a signal to tell it to input commands that result in a trade with the server character.
Provided here is NOT a bot for farming, nor a script to automate a trade. What you will find here is pieces that you would use to communicate between the two scripts that you would make yourself.
For these examples I have set the functions up as hotkeys, of course in a real script these functions would be called dynamicly. These are just working examples.
The script on the server:
Code:
;;;; NOTE: This is on 1280x1024 resolution. The move positions could be defined earlier on for dynamic use. ^Left:: SetTimer,MoveMouse,On return MoveMouse: MouseMove, 1270, 0, , MouseMove, 12, 0, , R SetTimer,MoveMouse,off Return
Code:
CoordMode, Mouse, Screen
^Left::
SetTimer,GetMouse, On
Return
^Right::
SetTimer,GetMouse,Off
Return
GetMouse:
MouseGetPos, xmousepos, ymousepos
If xmousepos = 0
{
If ymousepos = 0
{
MsgBox Message Received!!!
Return
}
}
return
The mouse will always land on the 0 X axis pixel on the client machine, and always the same Y pixel (up and down) as it was on the server. If your server has 1024 pixels on the Y axis, and your client has 800 pixel on the Y axis, when you move from 1279x1000 (or any Y pixel larger than 799) you will land on 0x799.
Okay so on the client script you can see that the script is simply waiting for the mouse to be at 0x0. When it sees the mouse at 0x0 it does something, in this case displays a message box.
Now what to do with it?
With this method, you have X number of possible unique signals that can be sent. Where X is the number of Y pixels you have on your client machine.
On my laptop I have 966 Y pixels. That means I can send and reply to 966 unique messages. For example:
Bot script on server fills its inventory up with rares, moves mouse to position 1279x0, mouse then is sent via synergy to 0x0 on client machine. Client machine sees mouse on 0x0 and then moves to predefined coords and then initiates trade with the server script via return signals using the mouse move method.
This method is almost limitless in its uses for communicating scripts.
Now that you understand how it works, I'll let you know that you can configure synergy to connect your server/client in several ways. Example:
Server is Left of Client
Client is Right of Server
Server is Top of Client
Client is Bottom of Server
This allows you to move your mouse to the bottom of the server, and end up at the top of the client. Using this connection will give you X number of extra unique messages, where X is the number of X axis pixel on your client machine minus one (0x0).
So if your client machine had the resolution of 1280x1024 you would have a total of 2,303 pixels to use as messages.
:mofo: :pimp: :mofo: :pimp: :mofo: :pimp: :mofo: :pimp: :mofo: :pimp: :mofo: :pimp: :mofo: :pimp: :mofo: :pimp: :mofo: :pimp: :mofo:
Gimme thanks if you liked it!
.