Thread: /target snippet
View Single Post
  #1  
Old 06-01-2003, 01:57 AM
Wiz
Dragon
 
Join Date: Feb 2002
Posts: 583
Default /target snippet

This is simple enough, makes /target work.

Add this to EQ_Opcodes.h

Code:
#define	OP_Target		   0xfe41
#define	OP_Target2	   0xe401 //Opcode change, newer clients use this!
and then this to client_process.cpp

Code:
					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.
Reply With Quote