• Log in or sign up for an account here: https://www.sythe.org/login

How to tutorials for your p server!

black-pure-4-lyfe

Forum Addict

$5 USD Donor
Joined
Mar 8, 2007
Sythe Gold
0
Messages
325
If you though this was a tutorial for makeing your own private server, its not, its only for people who already have a private server and are look ways to do these things, if you need a source go
to my thread ----->http://www.sythe.org/showthread.php?t=270336
and if you want to make your own theres a stickie on how to make your own thank you!


Purpose: To teach members how to add NPC's.

Difficulty: Easy.

Assumed Knowledge: Basic java.

Server Base: PimpScape.

Classes Modified: autospawn.cfg.

Procedure
Step 1: First, open up your autospawn.cfg. Search for:

Code:
[ENDOFSPAWNLIST]

. Right above it, type the following code:

Code:
spawn = NPCIDHERE

. spawn basically tells the program that you want to spawn something on your server. Instead of NPCIDHERE, replace it with the ID of the NPC you wish to spawn. Now, click TAB once after the ID of your NPC. IN THE EXACT SPOT, type in the following code:

Code:
NPCSPAWNLOCATIONX	NPCSPAWNLOCATIONY	0	NPC LOCATIONTOWALKTOX	NPCLOCATIONTOWALKTOY	NPCLOCATIONTOWALKTOX		NPCLOCATIONTOWALKTOY

Make sure to have TABS between every part of the code. For NPCSPAWNLOCATIONX. replace it with the X coordinate of where you want your NPC to be spawned. For NPCSPAWNLOCATIONY, replace it with the Y coordinate of where you want your NPC spawned. For the NPCLOCATIONTOWALKTOX's, replace it with the X coordinate where you want your NPC to be able to walk to. For the NPCLOCATIONTOWALKTOY's, replace it with the Y coordinate of where you want your NPC to be able to walk to.

Now, type in the following code:

Code:
NPCWALKTYPE	NPCNAME

Make sure to have TABS between every part of the code. Replace NPCWALKTYPE by using the following chart:

[li]1 = human[/li]
[li]2 = monster[/li]

. For NPCNAME, make a name for the NPC you are adding.
--------------------------------------------------------------------------------------------------
Post any questions/problems/concerns! :D
---------------------------------------------------------------------------------------------------

Purpose: To teach members how to make NPC's talk.

Difficulty: Easy.

Assumed Knowledge: Basic java.

Server Base: PimpScape

Classes Modified: npchandler.java

Procedure
Step 1: We will be using Santa Claus as an example. Open up your npchandler.java. Search for:

Code:
Moo

. Press enter after the last }, and type/paste in the following code:

Code:
if (npcs[i].npcType == 1552)
				{
					if (misc.random2(30) <= 3)
					{
						npcs[i].updateRequired = true;
						npcs[i].textUpdateRequired = true;
						npcs[i].textUpdate = "Merry Christmas!";
					}
				}[/b] The 1552 is the npc ID that you want to talk. The Merry Christmas! is what you want the npc ID to say. The (misc.random2(30) <= 3) means that the npc ID will say what you tell it to say every 3 seconds or so. I suggest not to change that but you can play around with it if you want.

-------------------------------------------------------------------------------------------------------

Post any problems/questions/concerns.:D
-------------------------------------------------------------------------------------------------------

Purpose: I made this tutorial to help out other servers by teaching them how to change the EXP given from objects.

Difficulty: Easy

Length: 5-10 minutes

Server Base: PimpScape

Files Modified: Client.Java



Procedure
Step 1: Open up your Client.Java
Step 2: Now find the id of the object that you want to change the xp given for (if you have the latest MoparScape you can use the help tab)
Step 3: Go to your Client.Java and search for the id that you just found. I am using a range target as an example so you should see something similar to the following but with your id in it:

Code:
case 2513:
case 2514:
if(actionTimer == 0) {
sendMessage("You shoot at the target.");
actionName = "range1";
actionTimer = 30;
setAnimation(426);
addSkillXP((15*playerLevel[4]), 4);
addSkillXP((5*playerLevel[18]), 18);
addItem(3272, 1);
updateRequired = true; 
appearanceUpdateRequired = true;
}
break;

Step 4 Now change the number before the * to the number of xp you want given every time a person clicks on it. If you only have one addSkillXP in your code, its okay. It just means that by default your server source only wanted to add xp to one skill.
-----------------------------------------------------------------------------------------------------

Post any problems you get. :D
------------------------------------------------------------------------------------------------------

Purpose: To make items turn you into NPC's when you wear them and make you turn back when you take it off.

Difficulty: Easy.

Assumed Knowledge: How to read.

Server Base: Any.

Classes Modified: Client.Java

Procedure
Step 1: I will be using a santa hat as an example. Search for:

Code:
public boolean process()

. Press enter, and type/paste the following code:

Code:
if(playerEquipment[playerHat] == 1050 == true)
{
npcId = 1552;
isNpc = true;
updateRequired = true;
appearanceUpdateRequired = true;
}

playerHat basically means that if you wear a santa hat in the hat/helmet spot, it will turn into the npc id 1552. You can change playerHat to:

[li]playerCape[/li]
[li]playerFeet[/li]
[li]playerHands[/li]
[li]playerShield[/li]
[li]playerAmulet[/li]
[li]playerArrows[/li]
[li]playerRing[/li]
[li]playerChest[/li]
[li]playerLegs[/li]
[li]playerWeapon[/li]

depending on where the item is worn/wielded. The 1050 is the item ID. The 1552 is the npc ID.
Step 2: Now, hit enter after the last } and type/paste in the following code:

Code:
else if (playerEquipment[playerHat] == 1050 == false)
	{
		isNpc = false;
		updateRequired = true;
		appearanceUpdateRequired = true;
	}

The playerHat is once again where the item is worn (read the last step for a list). The 1050 is the item ID. isNpc basically means that when you take off a santa hat, it won't be the Npc anymore.
--------------------------------------------------------------------------------------------------------

You can use this guide for any item. It is useful for holiday events and celebrations. Post any problems/questions/concerns. :D

--------------------------------------------------------------------------------------------------------
Purpose: This tutorial is for helping out newcomers by teaching them the most basic coding of all. Making people administrators/moderators.

Difficulty: Easy.

Assumed Knowledge: How to open up files, how to search, and how to type.

Server Base: Every server source.

Classes Modified:
Client.java.

Procedure
Step 1: Firstly, open up client.java. Next, search for:

Code:
playerRights = 3;

If you fail to find anything with that code, try changing the 3 to a 2 or 1 when you search. After you find it, change the 3 to what you want by using the following chart:

[li]3 - Owner[/li]
[li]2 - Administrator (Gold Crown)[/li]
[li]1 - Moderator (Silver Crown)[/li]

. Now, you should see the following on top of the code you just searched for:

Code:
if (playerName.equalsIgnoreCase("SOMEUSERNAME"))

Code:
SOMEUSERNAME

would be the username that the source maker put into it. Just change

Code:
SOMEUSERNAME

to the username you want to make administrator/moderator. An example of a working code for making someone administrator/moderator is:

Code:
				if (playerName.equalsIgnoreCase
				{
					playerRights = 3; 
				}
----------------------------------------------------------------------------------------------
Post any questions/concerns:D

Hopefully this will help you begginer coders :D
 
No i dont know how but hmmm ill try to find a way because my privat server that im currently working on doesnt have spec bars lemme try with my server first then ill post it
 
Runescape Gamblingrunescape gambling
Back
Top