EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   /target snippet (https://www.eqemulator.org/forums/showthread.php?t=7604)

Wiz 06-01-2003 01:57 AM

/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.

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.


All times are GMT -4. The time now is 08:53 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.