MMOCoin

Likes Likes:  0
Results 1 to 2 of 2

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Grunt
    xepher's Avatar
    Join Date
    Jan 2009
    Posts
    41
    Post Thanks / Like
    Rep Power
    18
    Reputation
    15

    hunter pet trainer

    This C++ script will give a hunter a pet when they talk to the npc

    All credits to Deathdude for finding summit, but some people i know DO NOT want to download it for fear or virus's. I don't know people are just weird so i am providing them with the scripts in it.




    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    #define SendQuickMenu(textid) objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), textid, Plr); \
        Menu->SendTo(Plr);
    
    void SpawnPet(Player * pPlayer, uint32 petId)
    {
        if(pPlayer->getClass() == HUNTER)
        {
            uint32 Entry = petId;
            CreatureProto * pTemplate = CreatureProtoStorage.LookupEntry(Entry);
            CreatureInfo * pCreatureInfo = CreatureNameStorage.LookupEntry(Entry);
            Creature * pCreature = new Creature(0xF1300000);
            CreatureSpawn * sp = new CreatureSpawn;
            sp->id = 1;
            sp->bytes = 0;
            sp->bytes2 = 0;
            sp->displayid = pCreatureInfo->Male_DisplayID;
            sp->emote_state = 0;
            sp->entry = pCreatureInfo->Id;
            sp->factionid = 35;
            sp->flags = 0;
            sp->form = 0;
            sp->movetype = 0;
            sp->o = pPlayer->GetOrientation();
            sp->x = pPlayer->GetPositionX();
            sp->y = pPlayer->GetPositionY();
            sp->channel_spell=sp->channel_target_creature=sp->channel_target_go=0;
            pCreature->Load(sp, (uint32)NULL, NULL);
            Pet *old_pet = pPlayer->GetSummon();
            if(old_pet != NULL)
                old_pet->Dismiss(true);
    
            Pet * pPet = objmgr.CreatePet();
            pPet->SetInstanceID(pPlayer->GetInstanceID());
            pPet->SetMapId(pPlayer->GetMapId());
            pPet->SetFloatValue(OBJECT_FIELD_SCALE_X, pTemplate->Scale / 2);





  2. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

  3. #2
    Contributor
    LiLLeCarl's Avatar
    Join Date
    Jan 2009
    Posts
    106
    Post Thanks / Like
    Rep Power
    19
    Reputation
    84
    this is an ooooooolllllddddd script

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •