Thread: 4 in 1 tut, global object's starting outfit, npc spawn and create shops All explained

Results 1 to 7 of 7
  1. #1 4 in 1 tut, global object's starting outfit, npc spawn and create shops All explained 
    max hit bob
    Guest
    This is my first Tutorial so please don't flame
    This Tutorial Took me 45 minutes to make and a lot of hard work went in to this i tried to make it the best i could for you...
    Peace

    Ok, well today I'm going to teach you how to


    • 1. Make && Delete global objects

    • 2. Change the starting outfit.

    • 3. Spawn npc's without ::npc ####

    • 4. How to create shop's



    Always remember to make backups before you change anything [/size]


    Soo, Let's get started Shall we.

    Chapter 1,

    Making Global Objects

    Classes Modified
    • Client.Class


    Open up your client.java and search (ctrl+f)
    Code:
        public void NewObjects() {
    You should see something like this
    Code:
        public void NewObjects() {
    
            makeGlobalObject(2445, 3097, 4156, 0, 10);//portal
            makeGlobalObject(2510, 3863, 2783, -3, 10);// Anvil
            makeGlobalObject(2843, 2964, 61, -3, 10); // Ancient Alter
            makeGlobalObject(3042, 4843, 2781, 0, 10);// Furnace 
            makeGlobalObject(3205, 3274, 2287, -1, 10);// Obstacle Pipe
    Explaining the code..

    Code:
            makeGlobalObject
    Tell's the server to create a new object.

    The first two sets of number's are the X and Y Co-ordinates so in the case of the portal it would be
    Code:
    2445, 3097,
    soo basically its
    Code:
    XXXX, YYYY,
    The third set of number's is the Id of the object so in the case of the portal it would be
    Code:
    4156
    The 4th Number is the direction (with a portal it doesn't matter what direction you face it)
    so on the portal it is
    Code:
    0
    The Direction's are
    Code:
    0 north
    -1 east
    -2 south
    -3 west
    and the final number at the end of the code should always be kept as 10.

    so if we wanted to make a portal on the tutorial island we would do this
    Code:
            makeGlobalObject(3094,3107, 4387, 0, 10);// saradomin portal at tutorial island
    and then we would just add it to the rest of our Global object's so it would be like this
    Code:
        public void NewObjects() {
    
            makeGlobalObject(2445, 3097, 4156, 0, 10);//portal
            makeGlobalObject(2510, 3863, 2783, -3, 10);// Anvil
            makeGlobalObject(2843, 2964, 61, -3, 10); // Ancient Alter
            makeGlobalObject(3042, 4843, 2781, 0, 10);// Furnace 
            makeGlobalObject(3205, 3274, 2287, -1, 10);// Obstacle Pipe
            makeGlobalObject(3094,3107, 4387, 0, 10);// saradomin portal tut island
    That's the end of adding Global Object's...

    Chapter 1.5,

    Deleting Global object's

    Ok this chapter is easy so i'm just going to rush through it.

    Open up your client.Java and search (ctrl+f)
    Code:
        public void Deleteobjects() {
    You should see something like this

    Code:
        public void Deleteobjects() {
    
            deletethatobject(2895, 3513); // Stairs
            deletethatobject(2885, 3515); // Tree
            deletethatobject(2883, 3511); // Tree
            deletethatobject(2886, 3514); // Tree
    Explaining the code

    Code:
            deletethatobject
    Tell's the server to delete an object

    Code:
    (2895, 3513);
    These are the X and Y Co-ordinates so basically
    Code:
    (XXXX, YYYY);
    and the // stairs at the end is just for your reference

    So say we wanted to delete a door at the tutorial island

    we would do
    Code:
            deletethatobject(3097,3107); // Door At tut isle
    and then we would just add it to our void so it would look like this
    Code:
        public void Deleteobjects() {
    
            deletethatobject(2895, 3513); // Stairs
            deletethatobject(2885, 3515); // Tree
            deletethatobject(2883, 3511); // Tree
            deletethatobject(2886, 3514); // Tree
            deletethatobject(3097,3107); // Door At tut isle
    End Of Chapter 1



    Chapter 2.

    Change the starting outfit.

    Classes modified
    • Player.Class


    Lets get started then...

    Open up your Player.Java and search for
    Code:
            // Giving the player an unique look
    You should see something like this.
    Code:
            // Giving the player an unique look
            playerEquipment[playerHat]=2595;
    	playerEquipment[playerCape]=1052;
    	playerEquipment[playerAmulet]=6585;
    	playerEquipment[playerChest]=2591;
    	playerEquipment[playerShield]=2597;
    	playerEquipment[playerLegs]=2593;
    	playerEquipment[playerHands]=775;
    	playerEquipment[playerFeet]=1837;
    	playerEquipment[playerRing]=-1;
    	playerEquipment[playerArrows]=-1;
    	playerEquipment[playerWeapon]=4151;
    This means When the player first log's on he will be wearing
    Code:
            playerEquipment[playerHat]=2595; //Black g helm
    	playerEquipment[playerCape]=1052; // legends cape
    	playerEquipment[playerAmulet]=6585; // amulet of fury
    	playerEquipment[playerChest]=2591; // Black g body
    	playerEquipment[playerShield]=2597; // black g shield
    	playerEquipment[playerLegs]=2593; // Black g legs
    	playerEquipment[playerHands]=775; // Cooking gauntlets
    	playerEquipment[playerFeet]=1837; // Desert boot's
    	playerEquipment[playerRing]=-1; // No ring
    	playerEquipment[playerArrows]=-1; // No arrows
    	playerEquipment[playerWeapon]=4151; // Abbysal whip
    If you didnt want your player to be wearing anything you'd change everthing to -1 so

    Code:
            playerEquipment[playerHat]=-1;
    	playerEquipment[playerCape]=-1;
    	playerEquipment[playerAmulet]=-1;
    	playerEquipment[playerChest]=-1;
    	playerEquipment[playerShield]=-1;
    	playerEquipment[playerLegs]=-1;
    	playerEquipment[playerHands]=-1;
    	playerEquipment[playerFeet]=-1;
    	playerEquipment[playerRing]=-1;
    	playerEquipment[playerArrows]=-1;
    	playerEquipment[playerWeapon]=-1;
    End of chapter 2



    Chapter 3.

    Adding Npc's without ::npc ###

    Classes Modified
    • Autospawn.cfg


    Open up your autospawn.cfg *some of you may get this error*



    If you do get this problem you can use editplus 3 to open it ... You can download this tool [Only registered and activated users can see links. ]

    Anyway, When you have Your autospawn.cfg open you should see something like this

    Code:
    spawn = 2821	3202	3267	0	0	0	0	0	1	fishing 
    spawn = 1596	2698	3396	0	0	0	0	0	1	PK rewards
    spawn = 2475	2768	3409	0	0	0	0	0	1	Frog
    spawn = 0	2737	3468	0	0	0	0	0	1	hans
    spawn = 0	2738	3468	0	0	0	0	0	1	hans
    Explaining the code

    Code:
    spawn =
    Tell's the server to spawn an npc

    Code:
    2821
    Tell's the server wich npc to spawn

    Code:
    3202	3267
    Is the X and Y Co-ordinates

    Code:
    0
    After the X and Y Co-ordinates is the height

    Code:
    0	0	0	0
    after the Height is the range
    (RangeX1-RangeY1-RangeX2-RangeY2)

    Code:
     1
    after the range is the walk type (leave this as 1)

    Code:
    	fishing
    Is the description


    So if i wanted to make a Kalphite queen (2nd form)
    i would do this

    Code:
    spawn = 1160	3483	9490	1	3480	9490	3890	9500	1183	Kalph Queen (2nd form)
    and then i would add it on to my autospawn.cfg

    Code:
    spawn = 2821	3202	3267	0	0	0	0	0	1	fishing 
    spawn = 1596	2698	3396	0	0	0	0	0	1	PK rewards
    spawn = 2475	2768	3409	0	0	0	0	0	1	Frog
    spawn = 0	2737	3468	0	0	0	0	0	1	hans
    spawn = 0	2738	3468	0	0	0	0	0	1	hans
    spawn = 1160	3483	9490	1	3480	9490	3890	9500	1	Kalph Queen (2nd form)
    End of Chapter 3.



    Chapter 4.

    How to create shop's

    Classes Modified
    • Autospawn.cfg
      shops.cfg
      Client.class


    Ok firstly open up your Autospawn.cfg
    add a npc that u wish to be a shop keeper
    ###########################
    # Follow Chapter 3 for adding a Npc #
    ###########################

    as an example we'll chose 520 (shop keeper)

    So say we want the shop keeper in varrock centre general store

    we'd add this to our Autospawn.cfg
    Code:
    spawn =	520	3217	3417	0	0	0	0	0	1	Shop_keeper
    Then we'd save that and close it

    then open shops.cfg

    say we wanted the shop keeper to sell

    • bronze arrows

    • iron axe

    • tinderbox

    • chisel

    • hammer



    We'd need to add this to our shop's.cfg

    Code:
    shop =	1	general_store					2	2	590	10	1349	10	882	1000	1755	10	2347	10
    Explaining the code

    Code:
    shop =	1
    is the shop id

    Code:
    	general_store
    Is the shop name (and the name that will show at the top of the shop screen)

    Code:
    2	2
    Is the Buy & sell

    Code:
    590	10	1349	10	882	1000	1755	10	2347	10
    is the item id then the amount you want to sell


    then we save and go into client.java

    do ctrl+f and search for
    Code:
    Wanneshop
    Keep searching untill you find something like this

    Code:
     else if (NPCID == ###) { // description
    PutNPCCoords = true;
    WanneShop = ***; // description
    }
    Explaining the code

    Code:
    NPCID
    is the npc id

    Code:
    WanneShop = ***;
    is the part from the shops.cfg where we put the shop = 1

    so our code would be
    Code:
     else if (NPCID == 520) { // general store
    PutNPCCoords = true;
    WanneShop = 1; //Varrock General store
    }
    Then save and compile.

    End of chapter 4

    End of Tutorial

    Always remember to Compile
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Nov 2008
    Posts
    2,180
    Thanks given
    148
    Thanks received
    99
    Rep Power
    2004
    Lol? Cfg's can be opened with notepad pal.

    Umm.. Nice Tutorial if isn't Leeched!

    Thanks I guess?

    Ohh well.
    Reply With Quote  
     

  3. #3  
    Registered Member
    xxbarragexx's Avatar
    Join Date
    Oct 2008
    Posts
    307
    Thanks given
    1
    Thanks received
    3
    Rep Power
    286
    sorry to say but Ive seen this on another site...
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Nov 2008
    Posts
    2,180
    Thanks given
    148
    Thanks received
    99
    Rep Power
    2004
    Yup.. Knew it.

    This is just ridiculous.. What is the need of leeching?
    Reply With Quote  
     

  5. #5  
    Austin_
    Guest
    You wasted all your time making this big ass tutorial when 99.9999% of us know how to do this already?
    Reply With Quote  
     

  6. #6  
    Member
    Join Date
    Apr 2008
    Posts
    58
    Thanks given
    0
    Thanks received
    1
    Rep Power
    0
    Quote Originally Posted by iMerkedJesus View Post
    Lol? Cfg's can't be opened with notepad pal.

    Umm.. Nice Tutorial if isn't Leeched!

    Thanks I guess?

    Ohh well.
    Ye lol why get that tool if you can open it with a program wich is on every windows system ffs
    Reply With Quote  
     

  7. #7  
    Austin_
    Guest
    Quote Originally Posted by iMerkedJesus View Post
    Lol? Cfg's can be opened with notepad pal.

    Umm.. Nice Tutorial if isn't Leeched!

    Thanks I guess?

    Ohh well.
    You slow? CFG can be opened with NotePad .. Der Da Derrrr.
    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
  •