Thread: [PI] Max NPC

Results 1 to 4 of 4
  1. #1 [PI] Max NPC 
    Registered Member
    Karma_K's Avatar
    Join Date
    Nov 2012
    Posts
    4,283
    Thanks given
    152
    Thanks received
    610
    Rep Power
    108
    Alright, i tried making max a boss in which after defeating him you'd obtain a max cape and max hood and it would send a dialogue saying blah blah blah, you've defeated me, congratulations, just like if you were to have killed jad. but for some reason.. if you kill max it nulls the server and throws this error

    Code:
    [8/5/13 1:52 PM]: karma - actionbutton: 29113
    Aug 05, 2013 1:52:13 PM engine.event.TaskScheduler run
    SEVERE: Exception during task execution.
    java.lang.NullPointerException
            at game.entity.npc.NPCHandler.handleMaxDeath(NPCHandler.java:102)
            at game.entity.npc.NPCHandler.process(NPCHandler.java:5658)
            at game.Server$1.execute(Server.java:168)
            at engine.event.Task.tick(Task.java:118)
            at engine.event.TaskScheduler.run(TaskScheduler.java:103)
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
            at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
    
            at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    access$301(Unknown Source)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    run(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)
    Code:
    	public void handleMaxDeath(int i) {
    		Player p = PlayerHandler.players[npcs[i].spawnedBy];
    		p.getDH().sendDialogues(152, 3373);
    		p.getPA().movePlayer(2720, 3471, 0);
    		p.hasKilledMax = true;
    	}
    Reply With Quote  
     

  2. #2  
    Registered Member
    Karma_K's Avatar
    Join Date
    Nov 2012
    Posts
    4,283
    Thanks given
    152
    Thanks received
    610
    Rep Power
    108
    Quote Originally Posted by Bronze Pro View Post
    Set an int in player.java for Max,
    like jad has waveid.
    then at the end of handleMaxDeath reset the int('waveid') for Max. Also you don't reward the max cape in your code, did you mean to do this? or is that handled in the dialogue.
    Just remembered that, but yeah its handled in the dialogue
    Reply With Quote  
     

  3. #3  
    Registered Member
    Karma_K's Avatar
    Join Date
    Nov 2012
    Posts
    4,283
    Thanks given
    152
    Thanks received
    610
    Rep Power
    108
    Quote Originally Posted by Bronze Pro View Post
    Have you resolved your issue yet?
    Nah, I'm not on a computer atm
    Reply With Quote  
     

  4. #4  
    Donator


    Join Date
    Nov 2008
    Posts
    885
    Thanks given
    13
    Thanks received
    35
    Rep Power
    100
    ill fix this

    tomorrow....
    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. increasing max npcs
    By jh_angel in forum Help
    Replies: 0
    Last Post: 03-28-2010, 07:24 PM
  2. Max npc number?
    By TrollCount++ in forum Help
    Replies: 1
    Last Post: 02-06-2010, 10:41 AM
  3. increasing max npc id
    By jh_angel in forum Help
    Replies: 0
    Last Post: 01-25-2010, 08:22 PM
  4. Max NPC
    By Zebex in forum Requests
    Replies: 0
    Last Post: 12-06-2009, 02:23 AM
  5. Max Npc
    By Leanbow in forum Configuration
    Replies: 2
    Last Post: 11-07-2009, 03:13 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
  •