[19.1]QuickBox - Tutorial and FAQ
Helleeeeooooowww,
first of all, this is not a set-up guide. This tutorial is for unconventional uses of QuickBox.
This Tutorial is written for version Beta 1 of QuickBox. There is a very high chance of me changing a lot of things in the future, so the information in this post could be outdated if you are using versions after Beta 1.
I. Master - RR Communication
(Almost) Every time the master moves, he is sending a PLAYERSHOOT packet to RR. To identify, that this packet is not a regular packet, it has the time set to 42. The x and y position of the master are then equal to the startingPos. Do with it whatever you want.
Important: Make sure to cancel the event. CANCEL THE EVENT!
II. RR - Slave Communication
To tell the slave where it should move, simply send an AOE packet to the client with the following information:
effect: has to be 42
radius: the X position where to go
duration: the Y position where to go
The location of the AOE packet will be disregarded, it doesn't matter what values you put in there.
Once sent, the slave will automatically walk to that position. This doesn't have to be a master position. It can be anything you want. Do with it whatever you want. I'm not giving you any ideas, I'm sure you got some yourself 
FAQ
Q: Why using AOE packets? You crazy?
A: Yeah I was just experimenting, but once it worked, I was too lazy to change it again. I'll change the whole system in a future version, but for now, this'll do
Q: How does RR knows the difference between master and slave?
A: Once RR receives a PLAYERSHOOT packet with the time of 42, it marks this client as master. All others will be slaves to RR
Q: Can I add paladin or warrior buffs?
A: Sure! Check if the client is a slave. Check if the client is a paladin/warrior and has the 2nd slot item equipped. Check if the one you want to buff is in range. Do it depending on time intervals or other conditions (e.g. mana). I'm doing all these steps already for priests and healing (not properly at some points, but you'll get the idea). If you need more help, just ask!
Q: How are the slaves moving? Are you faking MOVE packets?
A: I simulate keyboard input. That's also why they only move in 45° angles at the moment. 059 gave me some ideas how to improve on that
Q: Why even making a client for the master and not getting the position from the MOVE packet instead?
A: The client only sends MOVE packets every tick - not fast enough for multiboxing!
Q: I'm experimenting with this, but I'm getting Protocol error! What do I do wrong?
A: Don't send AOE packets to the master or other clients than slaves. Make sure you follow the rules in section II.
I hope this answers most of the questions. If there are still others, just ask
greetz,
Quick
first of all, this is not a set-up guide. This tutorial is for unconventional uses of QuickBox.
This Tutorial is written for version Beta 1 of QuickBox. There is a very high chance of me changing a lot of things in the future, so the information in this post could be outdated if you are using versions after Beta 1.
I. Master - RR Communication
(Almost) Every time the master moves, he is sending a PLAYERSHOOT packet to RR. To identify, that this packet is not a regular packet, it has the time set to 42. The x and y position of the master are then equal to the startingPos. Do with it whatever you want.
Code:
function onClientPacket(event) {
var packet = event.getPacket();
switch (packet.id()){
case ID_PLAYERSHOOT: {
if(packet.time == 42){
masterx = packet.startingPos.x;
mastery = packet.startingPos.y;
event.cancel();
}
break;
}
}
}
II. RR - Slave Communication
To tell the slave where it should move, simply send an AOE packet to the client with the following information:
effect: has to be 42
radius: the X position where to go
duration: the Y position where to go
The location of the AOE packet will be disregarded, it doesn't matter what values you put in there.
Code:
function sendMasterPacket(){
masterLocPacket = $.createPacket(ID_AOE);
masterLocPacket.effect = 42;
masterLocPacket.radius = masterx;
masterLocPacket.duration = mastery;
// Doesn't matter:
locDummy = $.createLocation();
locDummy.x = 0;
locDummy.y = 0;
masterLocPacket.pos = locDummy;
masterLocPacket.damage = 0;
masterLocPacket.origType = 0;
$.sendToClient(masterLocPacket);
}

FAQ
Q: Why using AOE packets? You crazy?
A: Yeah I was just experimenting, but once it worked, I was too lazy to change it again. I'll change the whole system in a future version, but for now, this'll do

Q: How does RR knows the difference between master and slave?
A: Once RR receives a PLAYERSHOOT packet with the time of 42, it marks this client as master. All others will be slaves to RR
Q: Can I add paladin or warrior buffs?
A: Sure! Check if the client is a slave. Check if the client is a paladin/warrior and has the 2nd slot item equipped. Check if the one you want to buff is in range. Do it depending on time intervals or other conditions (e.g. mana). I'm doing all these steps already for priests and healing (not properly at some points, but you'll get the idea). If you need more help, just ask!
Q: How are the slaves moving? Are you faking MOVE packets?
A: I simulate keyboard input. That's also why they only move in 45° angles at the moment. 059 gave me some ideas how to improve on that
Q: Why even making a client for the master and not getting the position from the MOVE packet instead?
A: The client only sends MOVE packets every tick - not fast enough for multiboxing!
Q: I'm experimenting with this, but I'm getting Protocol error! What do I do wrong?
A: Don't send AOE packets to the master or other clients than slaves. Make sure you follow the rules in section II.
I hope this answers most of the questions. If there are still others, just ask
greetz,
Quick


