Thread: Dump npcs for easy hardcoding

Results 1 to 10 of 10
  1. #1 Dump npcs for easy hardcoding 
    🍕

    Linus's Avatar
    Join Date
    Dec 2008
    Age
    26
    Posts
    2,758
    Thanks given
    903
    Thanks received
    406
    Rep Power
    0
    There's tons of these already, but this one helped me alot while making custom npcs on my server
    Easy to change to dump everything for you



    Example of dump:
    Code:
    case 1:
    entityDef.name = Man;
    entityDef.walkAnim = 819;
    entityDef.standAnim = 808;
    entityDef.models = new int[8];
    entityDef.models[0] = 215;
    entityDef.models[1] = 246;
    entityDef.models[2] = 292;
    entityDef.models[3] = 326;
    entityDef.models[4] = 151;
    entityDef.models[5] = 177;
    entityDef.models[6] = 12138;
    entityDef.models[7] = 181;
    entityDef.actions = new int[5];
    entityDef.actions[0] = Talk-to;
    entityDef.actions[1] = Attack;
    entityDef.actions[2] = Pickpocket;
    entityDef.actions[3] = null;
    entityDef.actions[4] = null;
    entityDef.originalModelColors = new int[4];
    entityDef.originalModelColors[0] = 6798;
    entityDef.originalModelColors[1] = 8741;
    entityDef.originalModelColors[2] = 25238;
    entityDef.originalModelColors[3] = 4626;
    entityDef.modifiedModelColors = new int[4];
    entityDef.modifiedModelColors[0] = 4888;
    entityDef.modifiedModelColors[1] = 43160;
    entityDef.modifiedModelColors[2] = 6430;
    entityDef.modifiedModelColors[3] = 8;
    //entityDef.anInt55:822, entityDef.anInt57:-1, entityDef.anInt58:820,  entityDef.anInt59:-1, entityDef.anInt75:-1, entity.anInt79:32, entityDef.anInt83:821, entityDef.anInt85:0, entityDef.anInt86:128, entityDef.anInt91:128, entity.anInt92:0, entity.anInt56:2 
    break;
    entityDef.models[0] = cape
    entityDef.models[1] = head
    entityDef.models[2] = plate
    entityDef.models[3] = legs
    entityDef.models[4] = weapon & arms(?)
    entityDef.models[5] = gloves
    entityDef.models[6] = boots
    entityDef.models[7] = shield
    [Only registered and activated users can see links. ]

    Code:
    public static void dump() {
    		
    		try {
    			FileWriter fw = new FileWriter(System.getProperty("user.home")+"/Desktop/dump.txt");
    			for (int i = 0; i < 6391; i++) {
    				EntityDef entity = EntityDef.forID(i);
    				
    				if(entity.combatLevel > 0){
    					stream.currentOffset = streamIndices[i];
    					entity.type = i;
    					entity.models = new int[8];
    					entity.actions = new String[5];
    					entity.originalModelColors = new int[8];
    					entity.modifiedModelColors = new int[8];
    					entity.readValues(stream);
    						
    					fw.write("case "+ i + ":");
    					fw.write(System.getProperty("line.separator"));
    					fw.write("entityDef.name = "+entity.name+";");
    					fw.write(System.getProperty("line.separator"));
    					fw.write("entityDef.walkAnim = "+entity.walkAnim+";");
    					fw.write(System.getProperty("line.separator"));
    					fw.write("entityDef.standAnim = "+entity.standAnim+";");
    					fw.write(System.getProperty("line.separator"));
    					fw.write("entityDef.models = new int["+entity.models.length+"];");
    					fw.write(System.getProperty("line.separator"));
    					for(int i3 = 0; i3 < entity.models.length; i3++){
    						fw.write("entityDef.models["+i3+"] = "+entity.models[i3]+";");
    						fw.write(System.getProperty("line.separator"));
    					}
    					fw.write("entityDef.actions = new int["+entity.actions.length+"];");
    					fw.write(System.getProperty("line.separator"));
    					for(int i3 = 0; i3 < entity.actions.length; i3++){
    						fw.write("entityDef.actions["+i3+"] = "+entity.actions[i3]+";");
    						fw.write(System.getProperty("line.separator"));
    					}
    					fw.write("entityDef.originalModelColors = new int["+entity.originalModelColors.length+"];");
    					fw.write(System.getProperty("line.separator"));
    					for(int i3 = 0; i3 < entity.originalModelColors.length; i3++){
    						fw.write("entityDef.originalModelColors["+i3+"] = "+entity.originalModelColors[i3]+";");
    						fw.write(System.getProperty("line.separator"));
    					}
    					fw.write("entityDef.modifiedModelColors = new int["+entity.modifiedModelColors.length+"];");
    					fw.write(System.getProperty("line.separator"));
    					for(int i3 = 0; i3 < entity.modifiedModelColors.length; i3++){
    						fw.write("entityDef.modifiedModelColors["+i3+"] = "+entity.modifiedModelColors[i3]+";");
    						fw.write(System.getProperty("line.separator"));
    					}
    					fw.write("//entityDef.anInt55:"+entity.anInt55+", entityDef.anInt57:"+entity.anInt57+", entityDef.anInt58:"+entity.anInt58+",  entityDef.anInt59:"+entity.anInt59+", entityDef.anInt75:"+entity.anInt75+", entity.anInt79:"+entity.anInt79+", entityDef.anInt83:"+entity.anInt83+", entityDef.anInt85:"+entity.anInt85+", entityDef.anInt86:"+entity.anInt86+", entityDef.anInt91:"+entity.anInt91+", entity.anInt92:"+entity.anInt92+", entity.anInt56:"+entity.anInt56+" ");
    					fw.write(System.getProperty("line.separator"));
    					fw.write("break;");
    					fw.write(System.getProperty("line.separator"));
    					fw.write(System.getProperty("line.separator"));
    				}
    			}
    			fw.close();
    		} catch (Exception e) {
    			System.out.println(e);
    		}
    	}
    [Only registered and activated users can see links. ]
    Spoiler for sig too large:

    ╠╬╣
    ╦╦
    ╠╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╚╩╩╩╩╩╩╝

    ╠╬╬╬╣

    Quote Originally Posted by Huey View Post
    I always applaud ppl that actually release shit. But okay me again and I'm negging your okaying ass. K homie?
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. Thankful user:


  3. #2  


    RS Wiki's Avatar
    Join Date
    Mar 2011
    Age
    25
    Posts
    9,745
    Thanks given
    1,754
    Thanks received
    3,103
    Rep Power
    5000
    Neat stuff, this'll be pretty handy actually.

    Thanks.
    All the best,
    Wiki




    coming soon
    Reply With Quote  
     

  4. #3  
    Registered Member
    Catastraphe's Avatar
    Join Date
    Sep 2015
    Posts
    53
    Thanks given
    13
    Thanks received
    9
    Rep Power
    79
    Thanks for this homie.
    Reply With Quote  
     

  5. #4  
    🍕

    Linus's Avatar
    Join Date
    Dec 2008
    Age
    26
    Posts
    2,758
    Thanks given
    903
    Thanks received
    406
    Rep Power
    0
    Glad ya liked it
    Spoiler for sig too large:

    ╠╬╣
    ╦╦
    ╠╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╚╩╩╩╩╩╩╝

    ╠╬╬╬╣

    Quote Originally Posted by Huey View Post
    I always applaud ppl that actually release shit. But okay me again and I'm negging your okaying ass. K homie?
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  6. #5  
    Registered Member
    Join Date
    Apr 2012
    Posts
    10
    Thanks given
    2
    Thanks received
    3
    Rep Power
    13
    Try using Array.toString(object[]) for your dumps rather than object[index]=blahblah
    Itll output like so
    object = {index1, index2, ect};
    Reply With Quote  
     

  7. #6  
    🍕

    Linus's Avatar
    Join Date
    Dec 2008
    Age
    26
    Posts
    2,758
    Thanks given
    903
    Thanks received
    406
    Rep Power
    0
    Quote Originally Posted by Marneus901 View Post
    Try using Array.toString(object[]) for your dumps rather than object[index]=blahblah
    Itll output like so
    object = {index1, index2, ect};
    i dont mind using it this way :^)
    Spoiler for sig too large:

    ╠╬╣
    ╦╦
    ╠╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╚╩╩╩╩╩╩╝

    ╠╬╬╬╣

    Quote Originally Posted by Huey View Post
    I always applaud ppl that actually release shit. But okay me again and I'm negging your okaying ass. K homie?
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  8. #7  
    Registered Member Text's Avatar
    Join Date
    Nov 2012
    Posts
    300
    Thanks given
    55
    Thanks received
    26
    Rep Power
    21
    Appreciate it, will use
    Reply With Quote  
     

  9. Thankful user:


  10. #8  
    Registered Member Versatile's Avatar
    Join Date
    Dec 2014
    Age
    22
    Posts
    433
    Thanks given
    245
    Thanks received
    9
    Rep Power
    9
    Quote Originally Posted by Linus View Post
    Glad ya liked it
    Help, I got this bad boy once I start up client.

    Code:
    java.lang.NullPointerException
    I have this instead.
    Code:
    private static final String FILE_PATH = "./data/dump.txt";
    	FileWriter fw = new FileWriter(FILE_PATH, true);
    It makes the folder and the dump.txt, but no code inside it
    Spoiler for Don't be a deadfool:
    Reply With Quote  
     

  11. #9  
    Registered Member
    Join Date
    Jul 2015
    Posts
    443
    Thanks given
    13
    Thanks received
    57
    Rep Power
    55
    Hey i was wondering if you have an npc dump I could use, cant seem to get this to work
    Reply With Quote  
     

  12. #10  
    Registered Member KushKings's Avatar
    Join Date
    Jul 2018
    Posts
    348
    Thanks given
    44
    Thanks received
    14
    Rep Power
    37
    what class do I make and where do I put it can anyone help me please
    OBSIDIAN
    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. RS Loaders - NPC dump loader for 377/317
    By wizzyt21 in forum RS2 Server
    Replies: 4
    Last Post: 06-20-2009, 04:39 AM
  2. Client-Applet, for easy acces!
    By Legend Rene in forum Downloads
    Replies: 19
    Last Post: 08-22-2008, 05:00 PM
  3. Replies: 13
    Last Post: 04-11-2008, 10:33 PM
  4. Dumping npc, combat level, Examine, for a list
    By william1434 in forum Tutorials
    Replies: 4
    Last Post: 03-30-2008, 09:26 PM
  5. Making Npcs Move [EASY WAY]
    By Coma Black in forum Tutorials
    Replies: 10
    Last Post: 02-22-2008, 02:09 AM
Tags for this Thread

View Tag Cloud

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