Thread: [PI] making NPCs not attack based on character appearance

Results 1 to 4 of 4
  1. #1 [PI] making NPCs not attack based on character appearance 
    Registered Member
    Join Date
    Oct 2009
    Posts
    407
    Thanks given
    123
    Thanks received
    64
    Rep Power
    0
    I'm trying to make it so an NPC will not attack if your shirt is blue, in NPC hander.java there's a switch statement for isAggressive for making Npcs aggressive

    How can I make an NPC aggressive, but not aggressive if your shirt is a certain color?

    the method for changing your shirt color should be

    c.playerAppearance[9] = torsoColour;


    but I can't figure out how to call these into npchandler without throwing errors
    Reply With Quote  
     

  2. #2  
    Registered Thanker
    MrClassic's Avatar
    Join Date
    Oct 2008
    Age
    24
    Posts
    1,859
    Thanks given
    14,198
    Thanks received
    295
    Rep Power
    5000
    Code:
    if(c.playerAppearance[9] == torsoColour) {
    ?

    What error are you receiving
    Thanks, MrClassic.

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #3  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,712
    Thanks given
    170
    Thanks received
    286
    Discord
    Arch337#1337
    Rep Power
    656
    Figure out the id on your apperance for the shirt.
    Then have that check if you do have it for that specific monster then aggressive is false.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Oct 2009
    Posts
    407
    Thanks given
    123
    Thanks received
    64
    Rep Power
    0
    Quote Originally Posted by MrClassic View Post
    Code:
    if(c.playerAppearance[9] == torsoColour) {
    ?

    What error are you receiving
    can't use those because they're in changeappearance.java and I need to check for them in npchandler and I don't know how to access them

    got it working nvm ty every1
    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. Replies: 4
    Last Post: 06-12-2017, 12:01 AM
  2. Replies: 4
    Last Post: 03-25-2012, 04:40 AM
  3. [PI] making npc not hurt by magic?
    By Propel_ in forum Help
    Replies: 0
    Last Post: 08-23-2011, 09:32 PM
  4. Help making NPC's attack on BS Source
    By Affliction in forum Help
    Replies: 1
    Last Post: 12-20-2009, 02:09 AM
  5. Replies: 0
    Last Post: 03-21-2009, 04:46 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •