#1
4 in 1 tut, global object's starting outfit, npc spawn and create shops All explained
max hit bob
Guest
04-22-2009, 04:51 PM
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]
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
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