Thread: [Pi] Npc transformation mask USEFUL!

Page 1 of 5 123 ... LastLast
Results 1 to 10 of 46
  1. #1 [Pi] Npc transformation mask USEFUL! 
    Banned
    Join Date
    Oct 2009
    Age
    30
    Posts
    320
    Thanks given
    43
    Thanks received
    45
    Rep Power
    0
    ok i recently added the transformation mask for tormented demons and for the dagannoth mother found it very useful instead of spawning different ids repeatedly

    Note i know there was one released but his was t2ing and i thought that people should have this mask

    First open up your npc class
    and add these

    Code:
    public boolean transformUpdateRequired = false;
    public int transformId;
    Code:
    public void requestTransform(int Id) {
            	transformId = Id;
            	transformUpdateRequired = true;
            	updateRequired = true;
        	}
    Code:
    public void appendTransformUpdate(Stream str) {
            	str.writeWordBigEndianA(transformId);
        	}
    now replace your
    Code:
    public void appendNPCUpdateBlock(Stream str) {
    with

    Code:
    public void appendNPCUpdateBlock(Stream str) {
            if(!updateRequired) return ;        
            int updateMask = 0;
            if(animUpdateRequired) updateMask |= 0x10; 
            if(hitUpdateRequired2) updateMask |= 8;
            if(mask80update) updateMask |= 0x80;
            if(dirUpdateRequired) updateMask |= 0x20;
            if(forcedChatRequired) updateMask |= 1;
            if(hitUpdateRequired) updateMask |= 0x40; 
            if (transformUpdateRequired) updateMask |= 2;
            if(FocusPointX != -1) updateMask |= 4;        
                
            str.writeByte(updateMask);
                    
            if (animUpdateRequired) appendAnimUpdate(str);
            if (hitUpdateRequired2) appendHitUpdate2(str);
            if (mask80update)       appendMask80Update(str);
            if (dirUpdateRequired)  appendFaceEntity(str);
            if(forcedChatRequired) {
                str.writeString(forcedText);
            }
            if (hitUpdateRequired)	appendHitUpdate(str);
            if (transformUpdateRequired)	appendTransformUpdate(str);
            if(FocusPointX != -1) appendSetFocusDestination(str);
            
        }
    and replace this

    Code:
    public void clearUpdateFlags() {
            updateRequired = false;
            forcedChatRequired = false;
            hitUpdateRequired = false;
            hitUpdateRequired2 = false;
            animUpdateRequired = false;
            dirUpdateRequired = false;
            transformUpdateRequired = false;
            mask80update = false;
            forcedText = null;
            moveX = 0;
            moveY = 0;
            direction = -1;
            FocusPointX = -1;
            FocusPointY = -1;
        }
    how it would be used?

    NPCHandler.npcs[i].requestTransform(NPCID HERE);

    examples of npcs that could be used for this

    - Tormented demons
    - Dagannoth Mother
    - any other npc that changes
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Banned

    Join Date
    Feb 2008
    Posts
    592
    Thanks given
    0
    Thanks received
    21
    Rep Power
    0
    GJ if this work.!
    Reply With Quote  
     

  4. #3  
    Community Veteran


    Join Date
    Jun 2007
    Posts
    1,683
    Thanks given
    302
    Thanks received
    309
    Rep Power
    481
    Pretty cool, already had this tho. I use it for rock crabs, wouldn't work for Kalphite Queen because the second form emerges before the first one disappears.
    Reply With Quote  
     

  5. #4  
    Donator


    Join Date
    Feb 2009
    Age
    30
    Posts
    2,128
    Thanks given
    261
    Thanks received
    280
    Rep Power
    563
    Quote Originally Posted by Russian View Post
    Pretty cool, already had this tho. I use it for rock crabs, wouldn't work for Kalphite Queen because the second form emerges before the first one disappears.
    already had this but yeah i forgot about rock crabs thanks lol
    Reply With Quote  
     

  6. #5  
    Registered Member
    Mr.Client's Avatar
    Join Date
    Jun 2010
    Posts
    2,094
    Thanks given
    100
    Thanks received
    317
    Rep Power
    259
    Quote Originally Posted by Balla_ View Post
    already had this but yeah i forgot about rock crabs thanks lol
    same
    Reply With Quote  
     

  7. #6  
    Learner

    Kaiser Btw's Avatar
    Join Date
    Dec 2010
    Posts
    2,420
    Thanks given
    509
    Thanks received
    445
    Rep Power
    209
    ****
    Reply With Quote  
     

  8. #7  
    Registered Member
    Mr.Client's Avatar
    Join Date
    Jun 2010
    Posts
    2,094
    Thanks given
    100
    Thanks received
    317
    Rep Power
    259
    Quote Originally Posted by Revain View Post
    wait were do we add
    Code:
    NPCHandler.npcs[i].requestTransform(NPCID HERE);
    would we add it in npchandler.java under
    stuff like
    Code:
    if (npcs[i].npcType == 3493) {
    c.Agrith = true;
    c.getPA().movePlayer(3087,3484,0);
    }
    ?
    thats the usage >.> you add it where ever u need to use this.
    Reply With Quote  
     

  9. #8  
    Super Donator

    Benji's Avatar
    Join Date
    Feb 2010
    Age
    29
    Posts
    1,525
    Thanks given
    920
    Thanks received
    503
    Rep Power
    570
    Yea nigga

    Reply With Quote  
     

  10. Thankful user:


  11. #9  
    Banned
    Join Date
    Oct 2009
    Age
    30
    Posts
    320
    Thanks given
    43
    Thanks received
    45
    Rep Power
    0
    Revain I don't think rfd monsters would use transformation mask
    Reply With Quote  
     

  12. #10  
    Registered Member
    Join Date
    Oct 2008
    Posts
    39
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    i cant seem to get this to work with kalphite queen? anyone wanna help me?
    Reply With Quote  
     

Page 1 of 5 123 ... LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Npc transformation mask
    By Balla in forum Help
    Replies: 0
    Last Post: 03-26-2011, 08:56 PM
  2. [PI] NPC Transformation help [PI]
    By A nipple in forum Help
    Replies: 4
    Last Post: 02-24-2011, 01:13 PM
  3. NPC Transformation
    By Galkon in forum Help
    Replies: 4
    Last Post: 04-11-2010, 08:04 PM
  4. How does npc transformation mask work?
    By shoopdawhoop in forum Help
    Replies: 2
    Last Post: 03-18-2010, 08:04 PM
  5. Npc Transformation Mask.
    By Bando in forum Help
    Replies: 9
    Last Post: 10-09-2009, 08:18 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •