Thread: [pi] npc help

Results 1 to 8 of 8
  1. #1 [pi] npc help 
    Banned

    Join Date
    Oct 2010
    Posts
    1,312
    Thanks given
    63
    Thanks received
    257
    Rep Power
    0
    hey guys, how can i make it that when u click the mound a strykewyrm would pop up and the mound would delete? it something to do with clickNPC file if im not mistaken
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Oct 2010
    Posts
    1,312
    Thanks given
    63
    Thanks received
    257
    Rep Power
    0
    bump
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Oct 2010
    Posts
    1,312
    Thanks given
    63
    Thanks received
    257
    Rep Power
    0
    buump
    Reply With Quote  
     

  4. #4  
    Donator
    Mr Sandman's Avatar
    Join Date
    Oct 2011
    Posts
    659
    Thanks given
    176
    Thanks received
    26
    Rep Power
    38
    i think its in action handler search for firstclicknpc in actionhandler.java
    Reply With Quote  
     

  5. #5  
    Banned

    Join Date
    Oct 2010
    Posts
    1,312
    Thanks given
    63
    Thanks received
    257
    Rep Power
    0
    ^ yeah well i the srykewyrm spawns when i click on the mound but the mound doesnt delete after its spawned, is there anyway to delete the mound?
    Reply With Quote  
     

  6. #6  
    Banned

    Join Date
    Oct 2010
    Posts
    717
    Thanks given
    82
    Thanks received
    131
    Rep Power
    0
    Code:
    /**
    * @author Arno
    */
    public void deleteAndSpawn(int x, int y) {
    	c.getPA().checkObjectSpawn(-1, x, y, 2, 10);
    	server.model.npcs.NPCHandler.spawnNpc
            // Fill the below in yourself!
    	(c, NpcId, x, y, h, 100, HP, maxHit, attack, defence, isAgressive(true/false), isMarked(true/false));
    }
    Could add in more local variables to spawn the npc.
    I assumed you got more then just 1 mould, so I added in X and Y as local.
    If you want the mound to be deleted forever (upon relog/region loading), you are gonna need to save a boolean (Example : isMouldVisible).
    In that case you need to add the boolean in the aforemented method as a false value.

    Then in objectmanager (if I'm not mistaking), add in an if statement on the mould spawn.
    Reply With Quote  
     

  7. #7  
    Extreme Donator


    Join Date
    Oct 2006
    Posts
    1,371
    Thanks given
    64
    Thanks received
    197
    Rep Power
    426
    Quote Originally Posted by Arno View Post
    Code:
    /**
    * @author Arno
    */
    public void deleteAndSpawn(int x, int y) {
    	c.getPA().checkObjectSpawn(-1, x, y, 2, 10);
    	server.model.npcs.NPCHandler.spawnNpc
            // Fill the below in yourself!
    	(c, NpcId, x, y, h, 100, HP, maxHit, attack, defence, isAgressive(true/false), isMarked(true/false));
    }
    Could add in more local variables to spawn the npc.
    I assumed you got more then just 1 mould, so I added in X and Y as local.
    If you want the mound to be deleted forever (upon relog/region loading), you are gonna need to save a boolean (Example : isMouldVisible).
    In that case you need to add the boolean in the aforemented method as a false value.

    Then in objectmanager (if I'm not mistaking), add in an if statement on the mould spawn.
    The mould isn't a object, it's an NPC.
    [Only registered and activated users can see links. ]


    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Jun 2011
    Posts
    476
    Thanks given
    57
    Thanks received
    43
    Rep Power
    17
    You will need an npc transformation mask:

    [Only registered and activated users can see links. ]

    Quote Originally Posted by Boosie_ View Post

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

    examples of npcs that could be used for this

    - Tormented demons
    - Dagannoth Mother
    - any other npc that changes





    [Only registered and activated users can see links. ]
    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

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