Thread: change into a npc when you equip something

Results 1 to 7 of 7
  1. #1 change into a npc when you equip something 
    Registered Member ninja's Avatar
    Join Date
    Aug 2006
    Age
    80
    Posts
    400
    Thanks given
    0
    Thanks received
    1
    Rep Power
    44
    Im almost sure this has been posted before, and its extremley easy. but someone in the help section said that they couldnt find it, so here it is:
    Description: make the player turn into a npc when it equips an item

    Difficulty: 0

    Assumed Knowledge: an iq above 11

    Tested Server: anything with basic methods and a public void writebonus

    Files/Classes Modified
    : client
    Step 1: (the only step)
    search for
    Code:
    public void WriteBonus() {
    somewhere in that void add:
    Code:
    if (playerEquipment[playerRing] == Itemid) {
    npcId = npcidk;
    isNpc = true;
    updateRequired = true;
    appearanceUpdateRequired = true;
    }
    change playerRing to whatever you want (playerWeapon playerCape, etc)
    change the itemid to the itemid that the player equips.
    change npcidk to the id of the npc you want the player to turn into.
    simple stuff.
     

  2. #2  
    Banned
    Join Date
    Mar 2008
    Posts
    546
    Thanks given
    1
    Thanks received
    1
    Rep Power
    0
    this is easy you can make them into an object this way this was posted with the Christmas and Halloween event by somebody but good job i guess rep+
     

  3. #3  
    Banned

    Join Date
    Feb 2007
    Posts
    1,578
    Thanks given
    16
    Thanks received
    20
    Rep Power
    0
    And it will not work people dont have that void if you acutally did want it to work then

    Code:
    public void npcSwap() {
    if (playerEquipment[playerRing] == Itemid) {
    npcId = npcidk;
    isNpc = true;
    updateRequired = true;
    appearanceUpdateRequired = true;
    }
    In boolean proccess add
    Code:
    npcSwap();
     

  4. #4  
    M4 Carbine
    Guest
    Quote Originally Posted by Josh1337 View Post
    And it will not work people dont have that void if you acutally did want it to work then

    Code:
    public void npcSwap() {
    if (playerEquipment[playerRing] == Itemid) {
    npcId = npcidk;
    isNpc = true;
    updateRequired = true;
    appearanceUpdateRequired = true;
    }
    In boolean proccess add
    [/CODE]npcSwap();[/CODE]
    In process?? no thanks, how about case 41: (wear item method)
     

  5. #5  
    Banned

    Join Date
    Feb 2007
    Posts
    1,578
    Thanks given
    16
    Thanks received
    20
    Rep Power
    0
    :O that will work to but the new people at server might not know where to add but in boolean process then people would know where to add it
     

  6. #6  
    M4 Carbine
    Guest
    Quote Originally Posted by Josh1337 View Post
    :O that will work to but the new people at server might not know where to add but in boolean process then people would know where to add it
    That would be true mate
     

  7. #7  
    Registered Member ninja's Avatar
    Join Date
    Aug 2006
    Age
    80
    Posts
    400
    Thanks given
    0
    Thanks received
    1
    Rep Power
    44
    the method i posted works just fine. . .
     


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
  •