Thread: All NPC Masks 100%

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 36
  1. #1 All NPC Masks 100% 
    Magic Trickster
    DefNotVastico's Avatar
    Join Date
    Jan 2009
    Age
    29
    Posts
    214
    Thanks given
    0
    Thanks received
    1
    Rep Power
    135
    Enjoy it.

    EDIT:

    Clear flags.

    If you want the NPC to not continously face the entity, then uncomment the lines that are commented out.

    Code:
    /**
         * Clears the update flags.
         */
        public void clearUpdateFlags() {
            updateRequired = false;
            textUpdateRequired = false;
            secondHitUpdateRequired = false;
            gfxUpdateRequired = false;
            animUpdateRequired = false;
            hitUpdateRequired = false;
            faceToEntityUpdateRequired = false;
            transformUpdateRequired = false;
            faceToUpdateRequired = false;
            //if (rawDirection != -1) {
                //rawDirection = -1;
                //faceToEntityUpdateRequired = true;
                //updateRequired = true;
            //}
            hit = 0;
            direction = -1;
        }
    Code:
    public void appendSecondHitUpdate(NPC npc, Stream str) {
            str.writeByteA(npc.hit); // hit
            str.writeByteC(npc.hitType); // type
            str.writeByteA(Misc.getCurrentHP(npc.hp, npc.maxHP, 100)); // current HP
            str.writeByte(100); // max HP
        }
    
        public void npcGfxHigh(NPC npc, int gfx) {
            npc.gfxId = gfx;
            npc.gfxDelay = 6553600;
            npc.gfxUpdateRequired = true;
            npc.updateRequired = true;
        }
    
        public void npcGfxLow(NPC npc, int gfx) {
            npc.gfxId = gfx;
            npc.gfxDelay = 0;
            npc.gfxUpdateRequired = true;
            npc.updateRequired = true;
        }
    
        public void npcGfx(NPC npc, int id, int delay) {
            npc.gfxId = id;
            npc.gfxDelay = delay;
            npc.gfxUpdateRequired = true;
            npc.updateRequired = true;
        }
    
        public void appendGfxUpdate(NPC npc, Stream str) {
            str.writeWord(npc.gfxId);
            str.writeDWord(npc.gfxDelay);
        }
        
        public void appendFaceToEntity(NPC npc, Stream str) {
            str.writeWord(npc.rawDirection);
        }
        
        public void faceTo(NPC npc, int playerId) {
            npc.rawDirection = 32768 + playerId;
            npc.faceToEntityUpdateRequired = true;
            npc.updateRequired = true;
        }
        
        public void face(NPC npc, int dir) {
            npc.rawDirection = dir;
            npc.faceToEntityUpdateRequired = true;
            npc.updateRequired = true;
        }
    
        public void requestTransform(NPC npc, int id) {
            npc.transformId = id;
            npc.transformUpdateRequired = true;
            npc.updateRequired = true;
        }
    
        public void appendTransformUpdate(NPC npc, Stream str) {
            str.writeWordBigEndianA(npc.transformId);
        }
    
        public void requestAnimation(NPC npc, int id, int delay) {
            npc.animNumber = id;
            npc.animDelay = delay;
            npc.animUpdateRequired = true;
            npc.updateRequired = true;
        }
    
        public void requestFaceCoords(NPC npc, int x, int y) {
            npc.faceX = x;
            npc.faceY = y;
            npc.faceToUpdateRequired = true;
            npc.updateRequired = true;
        }
    
        public void appendFaceToUpdate(NPC npc, Stream str) {
            str.writeWordBigEndian(npc.faceX);
            str.writeWordBigEndian(npc.faceY);
        }
        
        public void appendAnimUpdate(NPC npc, Stream str) {
            str.writeWordBigEndian(npc.animNumber);
            str.writeByte(npc.animDelay);
        }
    
        public void appendDirUpdate(NPC npc, Stream str) {
            str.writeWord(npc.rawDirection);
        }
        
        public void appendHitUpdate(NPC npc, Stream str) {
            str.writeByteC(npc.hit); // What the npc got 'hit' for
            str.writeByteS(npc.hitType); // 0: red hitting - 1: blue hitting
            str.writeByteS(Misc.getCurrentHP(npc.hp, npc.maxHP, 100)); // Their current HP, for HP bar
            str.writeByteC(100); // Their max HP, for HP bar
        }
        
        public void appendNPCUpdateBlock(NPC npc, Stream str) {
            if (!npc.updateRequired)
                return;
            int updateMask = 0;
            if (npc.animUpdateRequired)         updateMask |= 0x10;
            
            if (npc.secondHitUpdateRequired)     updateMask |= 8;
            
            if (npc.gfxUpdateRequired)             updateMask |= 0x80;
            
            if (npc.faceToEntityUpdateRequired) updateMask |= 0x20;
            
            if (npc.textUpdateRequired)         updateMask |= 1;
            
            if (npc.hitUpdateRequired)             updateMask |= 0x40;
            
            if (npc.transformUpdateRequired)    updateMask |= 2;
            
            if (npc.faceToUpdateRequired)         updateMask |= 4;
    
            str.writeByte(updateMask);
    
            if (npc.animUpdateRequired)            appendAnimUpdate(npc, str);
            
            if (npc.secondHitUpdateRequired)    appendSecondHitUpdate(npc, str);
            
            if (npc.gfxUpdateRequired)             appendGfxUpdate(npc, str);
            
            if (npc.faceToEntityUpdateRequired) appendFaceToEntity(npc, str);
            
            if (npc.textUpdateRequired)            str.writeString(npc.textUpdate);
            
            if (npc.hitUpdateRequired)            appendHitUpdate(npc, str);
            
            if (npc.transformUpdateRequired)     appendTransformUpdate(npc, str);
            
            if (npc.faceToUpdateRequired)         appendFaceToUpdate(npc, str);
        }
    For my custom shard rev masks
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #2  
    Expert Programmer


    Join Date
    Dec 2007
    Posts
    2,018
    Thanks given
    52
    Thanks received
    84
    Rep Power
    986
    Nice =D but arent clearupdateflag needed
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Jun 2008
    Posts
    734
    Thanks given
    8
    Thanks received
    14
    Rep Power
    148
    Good job m8
    S Quare Quxx: Raul > paladin end of the story
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Sep 2007
    Age
    29
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    wow u can transform npcs without spawning new ones never knew you could do that not even in rs lol
    Hyperion V2 Martin's Updates.
    [Only registered and activated users can see links. ]

    Scar says:
    i hate it when it hits your face
    Reply With Quote  
     

  5. #5  




    Scu11's Avatar
    Join Date
    Aug 2007
    Age
    27
    Posts
    16,200
    Thanks given
    7,190
    Thanks received
    12,174
    Discord
    View profile
    Rep Power
    5000
    Quote Originally Posted by mad turnip View Post
    wow u can transform npcs without spawning new ones never knew you could do that not even in rs lol
    jesus thanks for pointing that out, i didnt notice .

    maagic trick = win

    [Only registered and activated users can see links. ]



    Reply With Quote  
     

  6. #6  
    Respected Member


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    12,549
    Thanks given
    177
    Thanks received
    5,784
    Discord
    View profile
    Rep Power
    5000
    Transforming wdf lol :O

    Reply With Quote  
     

  7. #7  




    Scu11's Avatar
    Join Date
    Aug 2007
    Age
    27
    Posts
    16,200
    Thanks given
    7,190
    Thanks received
    12,174
    Discord
    View profile
    Rep Power
    5000
    Quote Originally Posted by Luke132 View Post
    Transforming wdf lol :O
    it owns its so gonna help me and alot of others.

    [Only registered and activated users can see links. ]



    Reply With Quote  
     

  8. #8  
    I Sell 07 Gold PM Me

    Join Date
    Jan 2007
    Age
    21
    Posts
    1,522
    Thanks given
    48
    Thanks received
    79
    Rep Power
    280
    This has private NPC mask? Like only you can see an NPC etc.
    Remember buying your first rune set with rune chain at W1 Varrock?
    Remember the excitement you got being Members for the first time?

    Want to re-live the good old days of RuneScape 2006 at its fullest?


    Then try:
    Spoiler for 2006 Old Days:


    Comes in many flavors.
    Reply With Quote  
     

  9. #9  
    Fuckin PRO

    Tyler's Avatar
    Join Date
    Jan 2008
    Age
    30
    Posts
    6,023
    Thanks given
    46
    Thanks received
    507
    Rep Power
    3330
    Quote Originally Posted by mad turnip View Post
    wow u can transform npcs without spawning new ones never knew you could do that not even in rs lol
    If its what i think it is then i think thats how they did KQ lol?
    Reply With Quote  
     

  10. #10  
    Registered Member
    hayzie's Avatar
    Join Date
    Nov 2007
    Posts
    364
    Thanks given
    0
    Thanks received
    17
    Rep Power
    462
    thats some sexy stuff good job
    packet size does matter
    Reply With Quote  
     

Page 1 of 4 123 ... LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

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