Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • wodkode: shut it down or fix it
      August 20, 2017, 10:11:28 PM
    • wodkode: dude i cant goto no links on here from google
      August 20, 2017, 10:11:13 PM
    • Dell: Greetings
      August 20, 2017, 11:56:30 AM
    • FaTe_Of_GoDs: You guys have an offline client?
      August 20, 2017, 03:25:13 AM
    • ASDss: where do u download source and clients now
      August 18, 2017, 10:39:31 PM
    • ASDss: yo
      August 18, 2017, 10:39:20 PM
    • dan v jad: click me 4 da fun ;)[link]
      August 18, 2017, 04:39:58 PM
    • stCky: Palidinho is your OpenGL (was it OpenGL?) stuff open source anywhere?
      August 16, 2017, 09:07:22 PM
    • Travas:BUILD THE WALL
      August 15, 2017, 09:28:49 PM
    • Travas: i have ass cancer
      August 15, 2017, 09:23:29 PM
    • stCky: what are the fudge are you tryna ask?
      August 15, 2017, 08:21:35 PM
    • bader: what are the rsps community alive ?
      August 15, 2017, 05:46:16 PM
    • bader: yo guys
      August 15, 2017, 05:46:08 PM
    • Spacehost:[link] Updated our thread :)
      August 15, 2017, 09:40:34 AM
    • Adaro: The client is in Download section at Homepage
      August 15, 2017, 01:09:20 AM
    • FaTe_Of_GoDs: where do i get the client?????????????
      August 14, 2017, 05:23:14 PM
    • stCky: can anyone help me? I cant login to the shoutbox
      August 13, 2017, 05:45:15 PM
    • drubrkletern: appeal denied
      August 13, 2017, 02:35:27 PM
    • King_Trout:[link]
      August 13, 2017, 11:17:12 AM
    • Cole1497: no sorry
      August 13, 2017, 10:27:14 AM

    Author Topic: [PI] Creating a custom NPC  (Read 2709 times)

    0 Members and 1 Guest are viewing this topic.

    Offlinecunniff55

    • Member
    • **
    • Posts: 14
    • Thanks: +0/-0
      • View Profile
    [PI] Creating a custom NPC
    « on: May 16, 2014, 04:32:54 PM »
    Hey guys, this is my second tutorial I though I would bring you a short and snappy guide on creating custom So lets begin.

    Files edited:
    Enitiydef.java - client sided

    OK, so now open you client folder once you're in your client folder find and open your "Enititydef.java" class file ok now we are in this folder put this code below in there:

          if(i == ####) { //NPC's ID
       stream.currentOffset = streamIndices[630];
       entitydef.aByte68 = 1;
       entitydef.readValues(stream); // Collect original NPC data
       entitydef.itemActions = new String[5];
       entitydef.itemActions[2] = "####"; //Right Click Option
       entitydef.anIntArray94 = new int[7];
       entitydef.anIntArray94[0] = ####;//Npc's Head
       entitydef.anIntArray94[1] = ####;//Npc's Plate
       entitydef.anIntArray94[2] = ####;//Npc's Legs
       entitydef.anIntArray94[3] = ####;//Npc's Weapon
       entitydef.anIntArray94[4] = ####;//Npc's Weapon/Shield
       entitydef.anIntArray94[5] = ####;//Npc's Boots
       entitydef.anIntArray94[6] = ####;//Npc's Arms(You Dont Have To Edit)
       entitydef.name = "####";//NPC's Name
       entitydef.description = "####".getBytes();//NPC's Description
       }

    Even though this is self explanatory some people still struggle so i will explain it to you bit by bit.

          if(i == ####) { //NPC's ID
    As i have labeld this is the NPC's id you can make this up to your own accord.

       entitydef.itemActions[2] = "####"; //Right Click Option
    this is your right click option you can change this to anything or even take it out for example you could use this as a shop and change the #### to "Trade"

    Even though these have all different colours they're all around the same meanings

       entitydef.anIntArray94[0] = ####;//Npc's Head
       entitydef.anIntArray94[1] = ####;//Npc's Plate
       entitydef.anIntArray94[2] = ####;//Npc's Legs
       entitydef.anIntArray94[3] = ####;//Npc's Weapon
       entitydef.anIntArray94[4] = ####;//Npc's Weapon/Shield
       entitydef.anIntArray94[5] = ####;//Npc's Boots
       entitydef.anIntArray94[6] = ####;//Npc's Arms(You Dont Have To Edit)

    as you can see where the side labels are that #### would be the helm of the npc this could be any helmet you have ingame for example "bronze full helm" this is same for all the other but their different body parts.

       entitydef.name = "####";//NPC's Name
    This is the NPC's name this what the players would see the NPC as in-game this could be anything (be imagenative)

    last but not least
       entitydef.description = "####".getBytes();//NPC's Description
    this is what would show in the chat box area is they right clicked then "examine" the npc you created as for the name you can have anything you can Imagen in here.

    Example:
          if(i == 1090) { //NPC's ID
       stream.currentOffset = streamIndices[630];
       entitydef.aByte68 = 1;
       entitydef.readValues(stream); // Collect original NPC data
       entitydef.itemActions = new String[5];
       entitydef.itemActions[2] = "Trade"; //Right Click Option
       entitydef.anIntArray94 = new int[7];
       entitydef.anIntArray94[0] = 62738;//Npc's Head
       entitydef.anIntArray94[1] = 62746;//Npc's Plate
       entitydef.anIntArray94[2] = 62743;//Npc's Legs
       entitydef.anIntArray94[3] = 14023;//Npc's Weapon
       entitydef.anIntArray94[4] = 53327;//Npc's Boots
       entitydef.anIntArray94[5] = 20147;//Npc's Arms(You Dont Have To Edit)
       entitydef.name = "Main Melee (Shop)";//NPC's Name
       entitydef.description = "The Main Melee Shop".getBytes();//NPC's Description
       }

    save and compile and then that's everything done!

    /*Note*\
    the id codes in the example are custom items to my server so they will problem not work on yours just change them around to item ids that are on your server.


    Offlineohokay

    • Member
    • ****
    • Posts: 1,214
    • Thanks: +0/-0
      • View Profile
    Re: [PI] Creating a custom NPC
    « Reply #1 on: May 16, 2014, 05:07:12 PM »
    Being critical, this does definitely not explain how to completely make your own npc, therefore useless.

    Where do the models come from? Which models are used and why?
    I don't think sk8r could be wrong because he is a god, But what do i need to do then?


    OfflineDan0194

    • Member
    • ****
    • Posts: 1,140
    • Thanks: +0/-0
      • View Profile
    Re: [PI] Creating a custom NPC
    « Reply #2 on: May 16, 2014, 05:59:01 PM »
    Being critical, this does definitely not explain how to completely make your own npc, therefore useless.

    Where do the models come from? Which models are used and why?

    It isn't useless I bet some people will use this just has been released before.
    lol who told you winterLove had bad codes
    Smart man.
    if you read this your a fagit


    Offlinefreddie griner

    • Member
    • **
    • Posts: 79
    • Thanks: +0/-0
      • View Profile
    Re: [PI] Creating a custom NPC
    « Reply #3 on: September 25, 2014, 01:54:11 PM »
    I tried this code and I get errors when I try to spawn it

    OfflineI Smoke Kush

    • Member
    • ***
    • Posts: 136
    • Thanks: +0/-0
      • View Profile
    Re: [PI] Creating a custom NPC
    « Reply #4 on: October 18, 2014, 02:27:39 PM »
    I bet you just copy pasted that code that 'even yours.

    Offlinerunescape sucks

    • Member
    • ****
    • Posts: 2,798
    • Thanks: +0/-0
      • View Profile
    Re: [PI] Creating a custom NPC
    « Reply #5 on: October 19, 2014, 02:29:44 PM »
    I bet you just copy pasted that code that 'even yours.
    *Cough* hypocrite.
    (click to show/hide)

    OfflineRandQm

    • Member
    • ****
    • Posts: 4,220
    • Thanks: +0/-0
      • View Profile
    Re: [PI] Creating a custom NPC
    « Reply #6 on: January 04, 2015, 01:02:41 PM »
    I'm wondering about these:

    Code: Java
    1. entitydef.anIntArray94[0]=62738;//Npc's Head
    2.    entitydef.anIntArray94[1]=62746;//Npc's Plate
    3.    entitydef.anIntArray94[2]=62743;//Npc's Legs
    4.    entitydef.anIntArray94[3]=14023;//Npc's Weapon
    5.    entitydef.anIntArray94[4]=53327;//Npc's Boots
    6.    entitydef.anIntArray94[5]=20147;//Npc's Arms(You Dont Have To Edit)

    How do you get those values. How do you know which value is which item.

    OfflineReaperXScape

    • Member
    • ****
    • Posts: 376
    • Thanks: +0/-0
      • View Profile
    Re: [PI] Creating a custom NPC
    « Reply #7 on: January 04, 2015, 01:49:37 PM »
    it's the item's model id
    OMFG LOOK AT SPOILERS
    (click to show/hide)

    OfflineColdmedicine

    • Member
    • ****
    • Posts: 929
    • Thanks: +0/-0
      • View Profile
    Re: [PI] Creating a custom NPC
    « Reply #8 on: January 10, 2015, 07:14:18 AM »
    Code: [Select]
            if(i == 1118) {
            stream.currentOffset = streamIndices[630];
            entitydef.aByte68 = 1;
            entitydef.readValues(stream); // Collect original NPC data
    entitydef.itemActions = new String[5];
    entitydef.itemActions[0] = "Talk To";
    entitydef.anIntArray94 = new int[9];
    entitydef.anIntArray94[0] = 65300;//Npc's Cape
    entitydef.anIntArray94[1] = 65291;//Npc's Head
    entitydef.anIntArray94[2] = 62746;//Npc's Plate
    entitydef.anIntArray94[3] = 62743;//Npc's Legs
    entitydef.anIntArray94[5] = 13319;//Npc's Gloves
    entitydef.anIntArray94[6] = 53327;//Npc's Boots
    entitydef.anIntArray94[7] = 53327;//Npc's Darkness(Shadow)
    entitydef.anIntArray94[8] = 20147;//Npc's Arms(You Dont Have To Edit)
    entitydef.anIntArray94[4] = 53327;//Weapon
    entitydef.anInt67 = 7046; //Walk anim
    entitydef.anInt58 = 7046; //Walkback anim
    entitydef.anInt83 = 7046; //Walk left anim
    entitydef.anInt55 = 7046; //walk right anim
    entitydef.name = "Max";
    entitydef.combatLevel = 138;//Combat Level
    entitydef.description = "Aggroth's completionist master.".getBytes();
    }
    (click to show/hide)

    Offlinehnco04

    • First Time Poster
    • *
    • Posts: 4
    • Thanks: +0/-0
      • View Profile
    Re: [PI] Creating a custom NPC
    « Reply #9 on: January 17, 2015, 08:35:03 AM »
    Well this is helpful for beginners if you have the ints for your custom models NPC

    sO tell me about if you have the models. but you dont have INTS <-- this is quite possible sometimes
    like getting the DAT file from the server you want .. EXAMPLE i have Spongebob model.. but i dont have the ints for him to work
    and when you spawn it its invisible.. soo.. ?? can you answer that..
    it says creating a custom npc.. but isn't this just adding an npc.. ? not creating it. well you have the models you put it in cache and just gets the int

    what about creating the npc.. like models.. and stuff.. then getting the ints?

    OfflineColdmedicine

    • Member
    • ****
    • Posts: 929
    • Thanks: +0/-0
      • View Profile
    Re: [PI] Creating a custom NPC
    « Reply #10 on: January 17, 2015, 09:52:06 AM »
    -cough- You mean that stiff npc with no animation at all which is terribly done?

    I never quite unerstood why people like those.
    (click to show/hide)

    OfflineSarwar

    • Member
    • ****
    • Posts: 2,552
    • Thanks: +0/-0
      • View Profile
    Re: [PI] Creating a custom NPC
    « Reply #11 on: January 17, 2015, 05:00:10 PM »
    Tip: Use tags :)
    /o/
     |     hail the potato
    / /
    ~ OTF Clan - Subscribe <3

    Offlinemalimt

    • Member
    • ****
    • Posts: 472
    • Thanks: +0/-0
      • View Profile
    Re: [PI] Creating a custom NPC
    « Reply #12 on: April 01, 2015, 04:42:21 PM »
    I'm sorry to say, but this isn't a tutorial for creating a custom NPC..... "Custom Npc" as in adding something, that you can modify to your expectations and doesn't already exist... /:
    Any one got any tuts for that lol?

    Offlinenemoige

    • First Time Poster
    • *
    • Posts: 1
    • Thanks: +0/-0
      • View Profile
    Re: [PI] Creating a custom NPC
    « Reply #13 on: April 07, 2015, 12:20:49 AM »
    google has tut's for that

    Offlinemalimt

    • Member
    • ****
    • Posts: 472
    • Thanks: +0/-0
      • View Profile
    Re: [PI] Creating a custom NPC
    « Reply #14 on: May 16, 2015, 04:46:32 PM »
    USE CODE TAGS SO MESSY AND CONFUSING :palm::palm::palm::palm:

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal