Thread: [PI] NPC Transformation

Results 1 to 4 of 4
  1. #1 [PI] NPC Transformation 
    Registered Member
    Join Date
    Dec 2009
    Posts
    84
    Thanks given
    48
    Thanks received
    25
    Rep Power
    14
    So in RuneScape, I'm not sure if this is accurate or not, but the Balance Elemental transforms in the midst of battle in order to switch between attack styles into a different NPC. I'm trying to pull this off.

    Right now, I'm just working on getting him to transform into a different style, and get him to stay that way, and I'm doing this with a command. I want to make sure I have it right before I add it in to NPCHandler.

    Code:
    if (playerCommand.equalsIgnoreCase("tf")) {
    				for (int i = 0; i < Server.npcHandler.maxNPCs; i++) {
    					if(Server.npcHandler.npcs[i] != null) {
    						if(Server.npcHandler.npcs[i].npcType == 8281) {
    							Server.npcHandler.npcs[i].forceAnim(10678);
    							Server.npcHandler.npcs[i].npcType = 8282;
    							//c.update();
    							c.sendMessage("Magic turned into Melee");
    							return;
    						}
    						if(Server.npcHandler.npcs[i].npcType == 8282) {
    							Server.npcHandler.npcs[i].forceAnim(10677);
    							Server.npcHandler.npcs[i].npcType = 8283;
    							//c.update();
    							c.sendMessage("Melee turned into Ranged");
    							return;
    						}
    						if(Server.npcHandler.npcs[i].npcType == 8283) {
    							Server.npcHandler.npcs[i].forceAnim(10679);
    							Server.npcHandler.npcs[i].npcType = 8281;
    							//c.update();
    							c.sendMessage("Ranged turned into Magic");
    							return;
    						}	
    					}
    				}							
    			}
    When I launch the command, almost everything works fine. The NPC does the transformation animation and the npcType number changes, but after the animation is done, the NPC appears to not have gone through any transformation at all. When I attack the NPC, it does the animation that corresponds to the style it transformed in to, but the client still thinks it's the NPC it spawned as (I think).

    I've tried replacing c.update() with several things, but none of them are updating the model.
    Can anyone help?
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Aug 2010
    Posts
    191
    Thanks given
    6
    Thanks received
    6
    Rep Power
    1
    Hey , Ive Been Working on it .... And what ive realised is that the npc does update but you only see if u log out and in .... ill let you know my progress
    Reply With Quote  
     

  3. #3  
    PokeNation! Xaves's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    3,476
    Thanks given
    356
    Thanks received
    788
    Rep Power
    646
    If the "npc transformation" you are talking about is what I'm thinking, it is part of the npc update block.

    Go on client, check the npc updating and check which masks you're missing.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Dec 2009
    Posts
    84
    Thanks given
    48
    Thanks received
    25
    Rep Power
    14
    I found a snipped a few days back on it that had a frame that allowed for npc transforming.

    Thanks anyways.
    Reply With Quote  
     


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. [Pi] Npc transformation mask USEFUL!
    By Boosie_ in forum Snippets
    Replies: 45
    Last Post: 05-19-2015, 02:52 AM
  2. Npc transformation mask
    By Balla in forum Help
    Replies: 0
    Last Post: 03-26-2011, 08:56 PM
  3. [PI] NPC Transformation help [PI]
    By A nipple in forum Help
    Replies: 4
    Last Post: 02-24-2011, 01:13 PM
  4. NPC transformation (should work for all)
    By shoopdawhoop in forum Snippets
    Replies: 21
    Last Post: 06-13-2010, 10:22 AM
  5. NPC Transformation
    By Galkon in forum Help
    Replies: 4
    Last Post: 04-11-2010, 08:04 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
  •