All pastes #391279 Raw Edit

Someone

public text v1 · immutable
·published 2007-03-12 00:40 UTC
rendered paste body
char MalahUID[5];
int MalahCoords[2];

if (packetId == 0x6d)
{
	int Monster_X = ((int)bytes[5] + ((int)bytes[6])*256);
	int Monster_Y = ((int)bytes[7] + ((int)bytes[8])*256);
	if ((static_cast<char>(bytes[1]) == MalahUID[0]) && (static_cast<char>(bytes[2]) == MalahUID[1]) && (static_cast<char>(bytes[3]) == MalahUID[2]) && (static_cast<char>(bytes[4]) == MalahUID[3]))
	{
		MalahCoords[0] = Monster_X;
		MalahCoords[1] = Monster_Y;
	}
}

if (packetId == 0xac) //Monster tracking
{
	int MonsterID = ((int)bytes[5] + ((int)bytes[6])*256);
	int Monster_X = ((int)bytes[7] + ((int)bytes[8])*256);
	int Monster_Y = ((int)bytes[9] + ((int)bytes[10])*256);
	if (MonsterID == 513)
	{
		MalahUID[0] = bytes[1];
		MalahUID[1] = bytes[2];
		MalahUID[2] = bytes[3];
		MalahUID[3] = bytes[4];
		MalahUID[4] = '1';
		MalahCoords[0] = Monster_X;
		MalahCoords[1] = Monster_Y;
	}
}