youtube2
May 21st, 2011, 08:10
Here I will show you a lot of basic 562 Tuts... I will update more as I can!:p
1] Change login message
2] Adding shops
3] Change your starter
4] Change login point
5] Change death point
6] Change rights
7] Spawn npcs
8] Add drops
9] Adding objects
10] some bassic commands
-------------------------------------
1: Change login message
To change your login message you want to go to [Your server] Src-->com--->rs2hd--->net--->actionsender.java
Once you are in that file do CTRL+F and search for:
if(player.starter == 0) { // Checks for starter
Now under that you will see something like this :Note: Yours will have starters, Mine do not
player.sm("Welcome to Your server!"); // Sends a message on player login
player.sm("<col=AF0222>Type anything in this "" ");
player.starter = 1; // Gives the player the starter so the player cannot get another one
You can type anything in the player.sm("");
This is just for the starter.
Now you should see something like this
} else {
}
player.isOnline = true;
}
Under the } else { You can add something like this
Player.sm("Hello, welcome back to our server!");
When the player logs in the second time it will show this message. You can add more for Forums, Vote, Owner and more!
------2: Adding shops------
Files edited
Shopspackethandler.java
shops.java
summoningpackethandler.java
Difficulty: 3
------------------
First you want to open these files
Shopspackethandler.java
Located in....
Src--->com--->rs2hd----Content
Then you want to open
Shops.java
Src--->com--->rs2hd--->Content
Then you want to open summoingpackethandler.java
Src--->com---->rs2hd---->packethandler---->summoningpackethandler.java
------------------
Now first what you want to is go into summoiningpackethandler.java and find something like this
case 874:
GameEngine.shopHandler.openshop(p, 15);
break;
Once you find that, under the break; add something like this
case ###: // Your npc number
GameEngine.shopHandler.openshop(p, 100);// Make this 100
break;
:Note: Make sure the NPC can trade not just talk!
Now go into shophandler.java
Find something like this:
/************************************************** ************************************************** ***********/
/* ONLY EDIT THIS! */
/************************************************** ************************************************** ***********/
Under that you should see something like this
public int returnItemId(int shopid, int buttonId2) {
switch (shopid) {
case 1:
switch (buttonId2) {
case 0:return 1755;
case 1:return 590;
case 2:return 5605;
case 3:return 199;
case 4:return 201;
case 5:return 203;
case 6:return 205;
case 7:return 207;
case 8:return 209;
case 9:return 211;
case 10:return 213;
case 11:return 215;
case 12:return 217;
case 13:return 219;
case 14:return 227;
}
break;
Now, under the break; you want to add something like this
case 100:
switch (buttonId2) {
case 0:return 1755;//What item you will get, make sure it goes case 0, case 1, case 2, case 3 ECT
You can add more items under here!
}
break;
Now search for something like this:
case 1:
p.getActionSender().sendString("General Store", 620, 22);
shopopen(p, 1);
//generalStore = true;
items = GameEngine.shops.Generalshoplumb;
itemsN = GameEngine.shops.GeneralshoplumbN;
p.getActionSender().sendItems( -1, 64209, 93, p.getInventory().getContainer());
p.getActionSender().sendItems( -1, 63746, 556,items, itemsN);
Under that you want to add this
case 100:
p.getActionSender().sendString("Shop name here!", 620, 22);
shopopen(p, 100);
//generalStore = true;
items = GameEngine.shops.Shopnamehere;//HAS TO BE SAME AS BELOW
itemsN = GameEngine.shops.SopnamehereN;//HAS TO BE SAME AS TOP OR WILL NOT! WORK
p.getActionSender().sendItems( -1, 64209, 93, p.getInventory().getContainer());
p.getActionSender().sendItems( -1, 63746, 556,items, itemsN);
Close that and open shops.java
Look for something like this
public int[] Generalshoplumb = {1755, 590, 5605, 199, 201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 227};
public int[] GeneralshoplumbN = {100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100};
Under that add something like this
public int[] Shopnamehere = {4151};//Item number --Currently a whip
public int[] ShopnamehereN = {100};//Item amount --- Of an amount of 100
You can add more items by. Make sure it looks like this
public int[] Shopnamehere = {995, 995, 995, 995}; // Your going to need the ,
-------------------------------------------
--------------3: Change your starter!---------------
Files edited:
Actionsender.java
Located in..
src-->com--->rs2hd-->net-->actionsender
Look for
if (player.starter == 0) {
Under that you will see something like this
player.getInventory().addItem(995, 100000);
See the 995, 10000? You can change the amount to anything you like! the 995 stands for the item ID (Currently money) The 10000 is how much you get.
You can add as much as you want by copying and pasting this under that one
player.getInventory().addItem(4151, 1);
So it should look something like this:
player.getInventory().addItem(995, 1000000);
player.getInventory().addItem(4151, 1);
---------------------------------------
---------Change your Login point----------------
Files edited:
Entity.java
Located in..
src--->com--->rs2hd--->model--->Entity.java
-----------
Look for something like this
public static final Location DEFAULT_LOCATION = Location.location(3089, 3495, 0);
See the 3089, 3495, 0?
Change those to anything you like
3089 being X
3495 being Y
0 being H(Height) 1, 2 and 3
when you are on the server and you are a admin to `coords.
------------
--------------Change death point---------
Files edited
Entity.java
Located
src--->com---rs2hd--->model--->entity.java
Look for something like this
public static final Location DEFAULT_LOCATION = Location.location(3089, 3495, 0);
When you switch the 3089, 3495, 0 it will be the same spot for death. So will it when you login.
----------------------------------
]
---------------Change your rights!--------------
Files edited:
data--->savedgames
---
Go into saved games and look for your name.
do CTRL+F and search rights
you will find something like this
<rights>0</rights>
Change the 0 to 2
0: Player
1: Mod
2: Admin
3: Hidden
4+: ???
--------------------------------
------Adding NPCS-----
Files edited:
Data--->npc.XML
You will see something like this
<npc><id>10775</id><location><x>3495</x><y>3492</y><z>0</z></location></npc>
<id> </id> is the NPC id
<x> </x> Is the X coord
<y> </y> is the y coord
<z> </z> is the Height
do `coords and change the X and Y to where you are standing
And find a npc you want and change that!
------------------------------------
---------Add NPC drops------
Files edited:
Data--->npcdrops.CFG
You will see something like this
6260=11704,1-1,1:250;11726,1-1,1:200;11724,1-1,1:200;11728,1-1,1:100;11690,1-1,5:85;//General Graardor
:KEY:
6260: Npd id
11704: Item dropped
1-1: How many are dropped
1:250: How rare it gets droped
;= End of that item drop
----
--------------------------------------
-----Adding objects!----
Files edited:
src--->com--->rs2hd--->packethandler--->object1packethandler.java
---
Open up the file
You will see something like this
case 15653:.//Door
player.sm("This door is locked");
break;
KEY:
Case ####: Object ID
player.sm(""); Sends a message when player clicks on it
break; End of that object
----
To make a object teleport you do this
case 15653:
player.tele(3333, 3333, 0); //Random coords
player.sm("The door teleports you!");
break;
When you click on a object it will tell you the ID, you can make it do anything you want!
:Basic elements of what an object can do:
player.sm(""); Send a message
player.tele(####, ####, #); Teleport you
player.getSkills().addXp(20, 30000); Gives you xp
player.getInventory().addItem(995, 1000); gives you an item
---Check if a player has item with level---
case 26847:
if(player.getSkills().getLevel(20) < 75) {
player.sm("you need to have a runecrafting level of 75 to make teleport tablets.");
return;
}
if (player.getInventory().contains(1436, 4)) {
player.getSkills().addXp(20, 30000);
player.getInventory().deleteItem(1436, 4);
player.getInventory().addItem(Tele(), 1);
} else {
player.sm("you need 4 rune essance to make a tablet.");
}
break;
-------------------
]
------Basic commands!-------
Files edited: src--->com---->rs2hd--->packethandler--->commandspackethandler.java
Commandspackethandler (Players)
Commandpackethandler (Admin+)
----
Open up Commandspackethandler
You will see something like this
if (cmd[0].equals("::help")) {
player.getActionSender().sendInterface(174, false);
player.getActionSender().sendString("Your server name help", 174, 1);
player.getActionSender().sendString("", 174, 2);
player.getActionSender().sendString("Type your message here!", 174, 3);//Sends your message to player
player.getActionSender().sendString("Type your message here!, 174, 4);
player.getActionSender().sendString(:Type your message HERE!", 174, 5);
}
see the If (cmd[0].equals("::help")) {?
You can change the ::help to anything you want!
Like you can change it you ::maser, ::pure, ::killall anything but you have to make it work!
To make it give you a item it will be something like this
if (cmd[0].startsWith("::starter")) {
player.getInventory().addItem(995, 100000);
player.sm("Starter for you!");
player.starter = 1;
}
---------------------------
Extras:
562 loading 602 Not noszscape: Only the registered members can see the link.
Client: Only the registered members can see the link.
content
1] Change login message
2] Adding shops
3] Change your starter
4] Change login point
5] Change death point
6] Change rights
7] Spawn npcs
8] Add drops
9] Adding objects
10] some bassic commands
-------------------------------------
1: Change login message
To change your login message you want to go to [Your server] Src-->com--->rs2hd--->net--->actionsender.java
Once you are in that file do CTRL+F and search for:
if(player.starter == 0) { // Checks for starter
Now under that you will see something like this :Note: Yours will have starters, Mine do not
player.sm("Welcome to Your server!"); // Sends a message on player login
player.sm("<col=AF0222>Type anything in this "" ");
player.starter = 1; // Gives the player the starter so the player cannot get another one
You can type anything in the player.sm("");
This is just for the starter.
Now you should see something like this
} else {
}
player.isOnline = true;
}
Under the } else { You can add something like this
Player.sm("Hello, welcome back to our server!");
When the player logs in the second time it will show this message. You can add more for Forums, Vote, Owner and more!
------2: Adding shops------
Files edited
Shopspackethandler.java
shops.java
summoningpackethandler.java
Difficulty: 3
------------------
First you want to open these files
Shopspackethandler.java
Located in....
Src--->com--->rs2hd----Content
Then you want to open
Shops.java
Src--->com--->rs2hd--->Content
Then you want to open summoingpackethandler.java
Src--->com---->rs2hd---->packethandler---->summoningpackethandler.java
------------------
Now first what you want to is go into summoiningpackethandler.java and find something like this
case 874:
GameEngine.shopHandler.openshop(p, 15);
break;
Once you find that, under the break; add something like this
case ###: // Your npc number
GameEngine.shopHandler.openshop(p, 100);// Make this 100
break;
:Note: Make sure the NPC can trade not just talk!
Now go into shophandler.java
Find something like this:
/************************************************** ************************************************** ***********/
/* ONLY EDIT THIS! */
/************************************************** ************************************************** ***********/
Under that you should see something like this
public int returnItemId(int shopid, int buttonId2) {
switch (shopid) {
case 1:
switch (buttonId2) {
case 0:return 1755;
case 1:return 590;
case 2:return 5605;
case 3:return 199;
case 4:return 201;
case 5:return 203;
case 6:return 205;
case 7:return 207;
case 8:return 209;
case 9:return 211;
case 10:return 213;
case 11:return 215;
case 12:return 217;
case 13:return 219;
case 14:return 227;
}
break;
Now, under the break; you want to add something like this
case 100:
switch (buttonId2) {
case 0:return 1755;//What item you will get, make sure it goes case 0, case 1, case 2, case 3 ECT
You can add more items under here!
}
break;
Now search for something like this:
case 1:
p.getActionSender().sendString("General Store", 620, 22);
shopopen(p, 1);
//generalStore = true;
items = GameEngine.shops.Generalshoplumb;
itemsN = GameEngine.shops.GeneralshoplumbN;
p.getActionSender().sendItems( -1, 64209, 93, p.getInventory().getContainer());
p.getActionSender().sendItems( -1, 63746, 556,items, itemsN);
Under that you want to add this
case 100:
p.getActionSender().sendString("Shop name here!", 620, 22);
shopopen(p, 100);
//generalStore = true;
items = GameEngine.shops.Shopnamehere;//HAS TO BE SAME AS BELOW
itemsN = GameEngine.shops.SopnamehereN;//HAS TO BE SAME AS TOP OR WILL NOT! WORK
p.getActionSender().sendItems( -1, 64209, 93, p.getInventory().getContainer());
p.getActionSender().sendItems( -1, 63746, 556,items, itemsN);
Close that and open shops.java
Look for something like this
public int[] Generalshoplumb = {1755, 590, 5605, 199, 201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 227};
public int[] GeneralshoplumbN = {100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100};
Under that add something like this
public int[] Shopnamehere = {4151};//Item number --Currently a whip
public int[] ShopnamehereN = {100};//Item amount --- Of an amount of 100
You can add more items by. Make sure it looks like this
public int[] Shopnamehere = {995, 995, 995, 995}; // Your going to need the ,
-------------------------------------------
--------------3: Change your starter!---------------
Files edited:
Actionsender.java
Located in..
src-->com--->rs2hd-->net-->actionsender
Look for
if (player.starter == 0) {
Under that you will see something like this
player.getInventory().addItem(995, 100000);
See the 995, 10000? You can change the amount to anything you like! the 995 stands for the item ID (Currently money) The 10000 is how much you get.
You can add as much as you want by copying and pasting this under that one
player.getInventory().addItem(4151, 1);
So it should look something like this:
player.getInventory().addItem(995, 1000000);
player.getInventory().addItem(4151, 1);
---------------------------------------
---------Change your Login point----------------
Files edited:
Entity.java
Located in..
src--->com--->rs2hd--->model--->Entity.java
-----------
Look for something like this
public static final Location DEFAULT_LOCATION = Location.location(3089, 3495, 0);
See the 3089, 3495, 0?
Change those to anything you like
3089 being X
3495 being Y
0 being H(Height) 1, 2 and 3
when you are on the server and you are a admin to `coords.
------------
--------------Change death point---------
Files edited
Entity.java
Located
src--->com---rs2hd--->model--->entity.java
Look for something like this
public static final Location DEFAULT_LOCATION = Location.location(3089, 3495, 0);
When you switch the 3089, 3495, 0 it will be the same spot for death. So will it when you login.
----------------------------------
]
---------------Change your rights!--------------
Files edited:
data--->savedgames
---
Go into saved games and look for your name.
do CTRL+F and search rights
you will find something like this
<rights>0</rights>
Change the 0 to 2
0: Player
1: Mod
2: Admin
3: Hidden
4+: ???
--------------------------------
------Adding NPCS-----
Files edited:
Data--->npc.XML
You will see something like this
<npc><id>10775</id><location><x>3495</x><y>3492</y><z>0</z></location></npc>
<id> </id> is the NPC id
<x> </x> Is the X coord
<y> </y> is the y coord
<z> </z> is the Height
do `coords and change the X and Y to where you are standing
And find a npc you want and change that!
------------------------------------
---------Add NPC drops------
Files edited:
Data--->npcdrops.CFG
You will see something like this
6260=11704,1-1,1:250;11726,1-1,1:200;11724,1-1,1:200;11728,1-1,1:100;11690,1-1,5:85;//General Graardor
:KEY:
6260: Npd id
11704: Item dropped
1-1: How many are dropped
1:250: How rare it gets droped
;= End of that item drop
----
--------------------------------------
-----Adding objects!----
Files edited:
src--->com--->rs2hd--->packethandler--->object1packethandler.java
---
Open up the file
You will see something like this
case 15653:.//Door
player.sm("This door is locked");
break;
KEY:
Case ####: Object ID
player.sm(""); Sends a message when player clicks on it
break; End of that object
----
To make a object teleport you do this
case 15653:
player.tele(3333, 3333, 0); //Random coords
player.sm("The door teleports you!");
break;
When you click on a object it will tell you the ID, you can make it do anything you want!
:Basic elements of what an object can do:
player.sm(""); Send a message
player.tele(####, ####, #); Teleport you
player.getSkills().addXp(20, 30000); Gives you xp
player.getInventory().addItem(995, 1000); gives you an item
---Check if a player has item with level---
case 26847:
if(player.getSkills().getLevel(20) < 75) {
player.sm("you need to have a runecrafting level of 75 to make teleport tablets.");
return;
}
if (player.getInventory().contains(1436, 4)) {
player.getSkills().addXp(20, 30000);
player.getInventory().deleteItem(1436, 4);
player.getInventory().addItem(Tele(), 1);
} else {
player.sm("you need 4 rune essance to make a tablet.");
}
break;
-------------------
]
------Basic commands!-------
Files edited: src--->com---->rs2hd--->packethandler--->commandspackethandler.java
Commandspackethandler (Players)
Commandpackethandler (Admin+)
----
Open up Commandspackethandler
You will see something like this
if (cmd[0].equals("::help")) {
player.getActionSender().sendInterface(174, false);
player.getActionSender().sendString("Your server name help", 174, 1);
player.getActionSender().sendString("", 174, 2);
player.getActionSender().sendString("Type your message here!", 174, 3);//Sends your message to player
player.getActionSender().sendString("Type your message here!, 174, 4);
player.getActionSender().sendString(:Type your message HERE!", 174, 5);
}
see the If (cmd[0].equals("::help")) {?
You can change the ::help to anything you want!
Like you can change it you ::maser, ::pure, ::killall anything but you have to make it work!
To make it give you a item it will be something like this
if (cmd[0].startsWith("::starter")) {
player.getInventory().addItem(995, 100000);
player.sm("Starter for you!");
player.starter = 1;
}
---------------------------
Extras:
562 loading 602 Not noszscape: Only the registered members can see the link.
Client: Only the registered members can see the link.
content