Created
August 18, 2013 07:44
-
-
Save arctic5/6260435 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var buffer; | |
buffer = buffer_create(); | |
if ownerPlayer == -1 | |
{ | |
with Player | |
{ | |
if name == other.name | |
{ | |
other.ownerPlayer = id; | |
break; | |
} | |
} | |
if ownerPlayer == -1 | |
{ | |
write_ubyte(buffer, HELLO); | |
write_buffer(buffer, global.protocolUuid); | |
write_ubyte(buffer, PLAYER_JOIN); | |
write_ubyte(buffer, string_length(name)); | |
write_string(buffer, name); | |
} | |
} | |
else | |
{ | |
if ownerPlayer.team != global.myself.team | |
{ | |
write_ubyte(buffer, PLAYER_CHANGETEAM); | |
write_ubyte(buffer, global.myself.team); | |
} | |
else if ownerPlayer.class != class | |
{ | |
write_ubyte(buffer, PLAYER_CHANGECLASS); | |
write_ubyte(buffer, class); | |
} | |
else | |
{ | |
var keybyte; | |
keybyte = 0; | |
if global.myself.object != -1 and ownerPlayer.object != -1 | |
{ | |
if point_distance(global.myself.object.x, global.myself.object.y, ownerPlayer.object.x, ownerPlayer.object.y) < 200 | |
{ | |
keybyte = global.myself.object.keyState; | |
keybyte &= $-81 | |
} | |
else | |
{ | |
// Jump constantly | |
if iterator keybyte |= $80; | |
iterator = !iterator | |
} | |
if global.myself.object.x < ownerPlayer.object.x | |
{ | |
keybyte |= $40; // Go left | |
} | |
else | |
{ | |
keybyte |= $20; // Go right | |
} | |
} | |
else if ownerPlayer.object != -1 | |
{ | |
if ownerPlayer.team == TEAM_BLUE | |
{ | |
keybyte |= $40; // Go left | |
} | |
else | |
{ | |
keybyte |= $40; // Go left | |
} | |
// Jump constantly | |
if iterator keybyte |= $80; | |
iterator = !iterator | |
} | |
//with ownerPlayer | |
{ | |
//aimbot(buffer, keybyte); | |
} | |
} | |
} | |
write_buffer(socket, buffer); | |
socket_send(socket); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment