Thread: NPC help please

Results 1 to 9 of 9
  1. #1 NPC help please 
    Registered Member Pakku's Avatar
    Join Date
    Mar 2010
    Posts
    1,234
    Thanks given
    127
    Thanks received
    111
    Rep Power
    47
    Here is EXACTLY what I am doing:
    Went into RSMV and found the 5 models i needed for Flight Kilisa.
    Opened them in DatMaker, converted them to MQO, opened the MQO, pressed Make .dat
    Converted the new .dat files into .gz files
    Went to class5 and added these ints
    Code:
    		if(i == 4001) { // NPC ID
    			aClass30_Sub2_Sub2_60.anInt1406 = anIntArray72[630]; 
    			class5.method165(true, aClass30_Sub2_Sub2_60); // Collect original NPC data
    			class5.aStringArray66 = new String[5];
    			class5.aStringArray66[1] = "Attack";
    			class5.anIntArray94 = new int[5]; // Number of models the NPC uses
    
    
    			class5.anIntArray94[0] = 8012; // 28012
    			class5.anIntArray94[1] = 8015; // 28015
    			class5.anIntArray94[2] = 8025; // 28025
    			class5.anIntArray94[3] = 8066;
    			class5.anIntArray94[4] = 8067;
    			class5.aString65 = "Flight Kilisa"; // NPC name
    			class5.anInt61 = 159; //combat level
    			class5.aByteArray89 = "Graceful, bird-like creature.".getBytes(); // NPC description
    		}
    Compiled, ran server, went ingame and type add model 8012, add model 8015, add model 8025, add model 8066, add model 8067
    Closed server, went into npc.cfg, and added this
    Code:
    npc = 4001	Flight Kilisa			159	133
    Compiled everything, then went ingame and type ::npc 4001
    disconnected
    can anybody help me fix this?
    Reply With Quote  
     

  2. #2  
    Registered Member
    PSNB's Avatar
    Join Date
    Aug 2009
    Posts
    885
    Thanks given
    8
    Thanks received
    103
    Rep Power
    590
    And what caused the disconnect? An AIOOBE?

    If so, you've got to increase the size of the model cache by 1.
    Reply With Quote  
     

  3. #3  
    Registered Member Pakku's Avatar
    Join Date
    Mar 2010
    Posts
    1,234
    Thanks given
    127
    Thanks received
    111
    Rep Power
    47
    Quote Originally Posted by PSNB View Post
    And what caused the disconnect? An AIOOBE?

    If so, you've got to increase the size of the model cache by 1.
    What do you mean? I don't know what caused it. It just disconnects me whenever i spawn it.
    Reply With Quote  
     

  4. #4  
    Registered Member
    PSNB's Avatar
    Join Date
    Aug 2009
    Posts
    885
    Thanks given
    8
    Thanks received
    103
    Rep Power
    590
    Quote Originally Posted by stripies View Post
    What do you mean? I don't know what caused it. It just disconnects me whenever i spawn it.
    AIOOBE = ArrayIndexOutOfBoundsException

    Assuming the model ID (4001) is larger than the size of the model cache.

    Code:
    public static Model[] cache = new Model[3500];
    That creates a new array with index's 0 to 2499.

    If you try to get the 4001st index of the cache (Which does not exist) an AIOOBE will be thrown.

    In other words, does index 4001 exist in the cache?
    Reply With Quote  
     

  5. #5  
    Registered Member Pakku's Avatar
    Join Date
    Mar 2010
    Posts
    1,234
    Thanks given
    127
    Thanks received
    111
    Rep Power
    47
    Quote Originally Posted by PSNB View Post
    AIOOBE = ArrayIndexOutOfBoundsException

    Assuming the model ID (4001) is larger than the size of the model cache.

    Code:
    public static Model[] cache = new Model[3500];
    That creates a new array with index's 0 to 2499.

    If you try to get the 4001st index of the cache (Which does not exist) an AIOOBE will be thrown.

    In other words, does index 4001 exist in the cache?
    oh, no thats not the reason. I already increased the size to way over 4001.
    Reply With Quote  
     

  6. #6  
    Registered Member
    PSNB's Avatar
    Join Date
    Aug 2009
    Posts
    885
    Thanks given
    8
    Thanks received
    103
    Rep Power
    590
    Alright; are you getting a T2 or T1 error on your client console? Is anything even showing up?
    Reply With Quote  
     

  7. #7  
    Registered Member Pakku's Avatar
    Join Date
    Mar 2010
    Posts
    1,234
    Thanks given
    127
    Thanks received
    111
    Rep Power
    47
    Quote Originally Posted by PSNB View Post
    Alright; are you getting a T2 or T1 error on your client console? Is anything even showing up?
    On my run.bat, it only says that the player disconnected.
    Reply With Quote  
     

  8. #8  
    Registered Member
    PSNB's Avatar
    Join Date
    Aug 2009
    Posts
    885
    Thanks given
    8
    Thanks received
    103
    Rep Power
    590
    Quote Originally Posted by stripies View Post
    On my run.bat, it only says that the player disconnected.
    Your client console, not your server console.
    Reply With Quote  
     

  9. #9  
    Registered Member Pakku's Avatar
    Join Date
    Mar 2010
    Posts
    1,234
    Thanks given
    127
    Thanks received
    111
    Rep Power
    47
    Dont have one.
    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
  •