PDA

View Full Version : /target snippet


Wiz
06-01-2003, 01:57 AM
This is simple enough, makes /target work.

Add this to EQ_Opcodes.h


#define OP_Target 0xfe41
#define OP_Target2 0xe401 //Opcode change, newer clients use this!


and then this to client_process.cpp


case OP_Target:
case OP_Target2:
{
GlobalID_Struct* trg = (GlobalID_Struct*)app->pBuffer;
Mob* targ = entity_list.GetMob(trg->entity_id);
if (targ && Dist(targ) <= 100)
{
target = targ;
APPLAYER* outapp = app->Copy();
FastQueuePacket(&outapp);
delete outapp;
}
else
Message(0,"Could not find any being with that name.");
break;
}


That's all.

haloboycs
06-04-2003, 12:01 PM
i tried in-game on WR server, /target (someone's full name) and it worked... then tried /target (partical name) and it worked.. then tried /target (npc name) and it worked.

works very good.

Wiz
06-04-2003, 07:18 PM
This snippet also makes /rtarget work.