Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Runescape
You last visited: Today at 13:33

  • Please register to post and access all features, it's quick, easy and FREE!

 

How to add commands to rsps and edit

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2012
Posts: 30
Received Thanks: 4
Thumbs up How to add commands to rsps and edit

~


Recommended tools that you should have before you consider proceeding:
NotePad++
WinRar
Java JDK
Java
Co-ordinates (custom made by me)
Item ID list
NPC ID list
Original 'Project Insanity' + All dupes fixed - CLIENT - SERVER -




Guide Legend
-Introduction
-Changing Stating Location
-Changing Starting Package
-Spawning NPC's
-Adding Shops
-How to add NPC drops and change drop-rates
-How to change Prices
-Adding/Changing Global Objects
-Changing XP Rate
-Changing the Max skill level from 99
-Enabling/disabling Administrator's from trading, selling or dropping any item
-How to edit player in-game attributes (Skill level, rights, bank items etc...)
-How to make various Commands
*Teleportation commands
*Item Commands
*How to add player rights to commands
-TIPS



-Introduction (Skip if needed)
Does you 'Favourites' bar look like this? Crowded with multiple guides that are an absolute nessesity to your Project Insanity developments? Would it be a shit load more simple if they were all compiled and easy to read and follow? Well lucky for you, you have come to the right place...
This guide will in fact include many guides that have already been posted multiple times in the past and no doubt the future, but this guide differs from all of those one hit wonders by having everything you could possibly need all-in-one!




-Changing the Starting location
Possibly One of the Two main things that attract first time users to your server, your starting zone should be vibrant & welcoming to users, it should be the hub of your server, containing the many things that your players require, so make sure you choose a nice and large area that should be able to contain things like shops & portals, so basically the general HUB of your server!

Location of were new players log-in for the first time
1. To get started, you will want to open up your server folder and look for config.java, and open it.
2. Press Control+F and search for:
Code:
public static final int START_LOCATION_X = #### //Defult Starting Location
public static final int START_LOCATION_Y = ####
3. Change the #### with the X and Y co-ordinates of your desired Home co-ordinates

Location of were players spawn if they die
1. Open up your server folder and look for config.java, and open it.
2. Search for:
Code:
public static final int RESPAWN_X =
There you will see two lines of code like this:
Code:
public static final int RESPAWN_X = ####
public static final int RESPAWN_Y = ####
3. Change #### With the co-ordinates of your death spawn location

How to change the Home Teleport (Spell book)
Does you home teleport take you to a location other than 'your' home spot? A simple fix will solve that problem

1. Open up your server folder and look for config.java, and open it.
2. Search for this line:
Code:
public static final int LUMBY_X =
There you will see two lines that look like this:
Code:
public static final int LUMBY_X = ####
public static final int LUMBY_Y = ####
3. Change #### with the X & Y co-ordinates of your home location.




-Changing Starting Package
Maybe the second most important aspect to getting your new players interested in your server is the humble starter pack, I say this because it is what give's your players the tools needed to gain levels, earn money etc... The starter package should contain the bear minimums without it becoming too much of a challenge for players to earn Gold, or too valuable in which you will get people repeatability drop-trading the riches and what-not...

1. First you are going to want to open up your server folder and search for your PlayerAssistant.java, and open it.
2. Press Control+F and search for:
Code:
public void addStarter() {
You will see something like this underneath it
Code:
c.getItems().addItem(995,5000000);
c.getItems().addItem(1731, 1);
c.getItems().addItem(554,600);
c.getItems().addItem(555,600);
c.getItems().addItem(556,600);
c.getItems().addItem(558,1800);
c.getItems().addItem(1381,1);
c.getItems().addItem(1323,1);
c.getItems().addItem(841,1);
c.getItems().addItem(882,1000);
c.getItems().addItem(380,500);
}
Here is a basic explanation:
Code:
c.getItems().addItem(##,####);
##= Item ID
####= Amount of that Item




-Spawning NPC's
NPC's are the backbone of any RSPS, with out them, the game would only consist of skilling and would be rather boring. So lets get Started...

1. Open up your server folder and search for spawn-config.CFG, and open it.
2. You will see a whole line of codes similar to this
Code:
// npc spawnX spawnY height walk maxhit attack defence description
//Bosses
spawn = 2881 2907 4445 0 1 38 500 200 Supreme
spawn = 2882 2915 4456 0 1 67 500 200 Prime
spawn = 2883 2922 4444 0 1 36 500 100 Rex
spawn = 3200 3275 3914 0 1 40 450 550 Chaos Ele
spawn = 50 2271 4698 0 1 25 500 350 King Black Dragon
[ENDOFSPAWNLIST]
(Maybe not as tidy, but similar.)

Explination
Code:
// npc spawnX spawnY height walk maxhit attack defence description
spawn = 2881 X Cord Y Cord 0=Ground 1=walks/0=Still Maxhit att Lv. def Lv. " "
[ENDOFSPAWNLIST]
Code:
height walk
0= Ground level 0= Can't walk
1+= Goin up levels 1= Can walk
3. Too add a NPC, just work off the explanations given to you.




-Adding Shops
Adding shops to your server is vital to it's economy by supplying players with the equipment they need to thrive on your server, while it could also be the worst thing to it if you start adding rare's to a shop, so don't go to over board.
Originally Posted by :
e.g keeping 'rares' as monster drops
1. Open up your server folder and search for ActionHandler.java, and open it.
2. Press cotrol+F and search for:
Code:
case 683:
And under it add
Code:
case ##:
c.getShops().openShop(####);
Explination
## = The NPC ID of the Shopkeeper
#### = The Shop ID that will be used in shops.cfg (make sure that this number is unique or you will get some errors!)

3. Open up your server folder and search for Shops.cfg, and open it.
2. You will see lines of code similar to this
Code:
//-----ShopID---ShopName--------------------------------Sell----Buy-----Item----Amount--Item----Amount
shop = 1 General_Store 1 1 590 100 1755 100
shop = 2 Aubury's_Magic_Store 2 2 554 50000 555 500000
Explination
Code:
//-----ShopID-----------ShopName------------------------Sell----Buy-----Item------------Amount
shop = Your shop ID SHOP_Name ## ## Item ID amount of that item
## = Change to 1 to only buy and sell what the shop has stocked - Change to 2 to buy and sell anything!




-How to add NPC drops and change drop-rates
Have you found that your NPC's are not dropping an item too regularly, too often or not at all? Just follow these simple steps to change all that!

1. Open up your server folder and search for NPCDrops.TSM, and open it. (remember to right click and select edit!)
2. You will see lines of code like this:
Code:
#Man drops
1:1 995:100 554:100
#Guard drops
9:1 995:200 555:100
#general graardor
2550:40 829:1 391:2 385:2 564:50 1249:1 3052:3 892:75 1303:1
11712:1 11728:1 11714:1 11724:1 11704:1 11710:1
#sergeant grimspike
2551:100 995:50000 1303:1 385:2 3024:3 564:75 3052:3
11728:1 11710:1 11724:1 11712:1 11726:1 11714:1 11714:1 11710:1 11712:1
Explanation.
Code:
#NPC NAME here
####:## ####:## ####:## ####:## ####:## ####:##
#### = Item ID you want to be dropped
## = The rate of which the item is dropped
3. So just change it as stated above and you should be fine.


-How to change Prices
Having the power to change the prices of items plays a big part in your server, you wouldn't want to play a server were the prices are jacked up high
Originally Posted by :
e.g Rune Platebody = 100K, neither would you want to play a server were they are only 1k each.
1. Open your server folder and search for prices.txt, and open.
2. You will see lines and lines of numbers like this:
Code:
0 1
1 1
2 5
3 1
4 5
5 10
6 187500
7 187500
8 187500
9 187500
Explanation
The numbers on the left column correspond to the item ID while the numbers on the right column correspond to the price of that item
3. So as explained above, search for your item ID then change the price of that item via the right hand column




-Adding/Changing Global Objects
*TO BE ADDED




-Changing XP Rate
The XP rate on a server can make or break a player, whether it is because it was to difficult/easy for him or her to level up, because just like in RuneScape gaining the max skill is an accomplishment, an idea length of time taken to get say 99 should be around about 1-7 day's, I'll leave it up to you to figure out a nice rate.

Combat
1. Open up your server folder and search for config.java, and open.
2. There you will need to search for:
Code:
public static final int MELEE_EXP_RATE =
You will see these Three lines
Code:
public static final int MELEE_EXP_RATE = ####; // damage * exp rate
public static final int RANGE_EXP_RATE = ####;
public static final int MAGIC_EXP_RATE = ####;
3. Change #### to the rate you wish to gain XP at (I hit damage = XP that you set)

Skill's
1. Open up your server folder and search for config.java, and open it.
2. Press control+F and search for:
Code:
public static final int WOODCUTTING_EXPERIENCE =
You will see some lines of code like this
Code:
public static final int WOODCUTTING_EXPERIENCE = ####;
public static final int MINING_EXPERIENCE = ####;
public static final int SMITHING_EXPERIENCE = ####;
public static final int FARMING_EXPERIENCE = ####;
public static final int FIREMAKING_EXPERIENCE = ####;
public static final int HERBLORE_EXPERIENCE = ####;
public static final int FISHING_EXPERIENCE = ####;
public static final int AGILITY_EXPERIENCE = ####;
public static final int PRAYER_EXPERIENCE = ####;
public static final int RUNECRAFTING_EXPERIENCE = ####;
public static final int CRAFTING_EXPERIENCE = ####;
public static final int THIEVING_EXPERIENCE = ####;
public static final int SLAYER_EXPERIENCE = ####;
public static final int COOKING_EXPERIENCE = ####;
public static final int FLETCHING_EXPERIENCE = ####;
3. Change #### to the rate you wish to gain XP at (Decrease to make harder, Increase to make easier)




-Changing the Max skill level from 99
Is gaining level 99 in your skills seem a bit too low or easy? You can amp up the game by super-charging you players with higher skill ability's to either flaunt off, 0wn up or to gain access to secret content that is only accessible at it's highest peaks!

1. Open up your server folder and search for PlayerAssistant.java, and open it
2. Press control+F and search for:
Code:
public int getLevelForXP(int exp) {
You will see this below
Code:
public int getLevelForXP(int exp) {
int points = 0;
int output = 0;
if (exp > ####)
return ##;
for (int lvl = 1; lvl <= ##; lvl++) {
points += Math.floor((double) lvl + 300.0
* Math.pow(2.0, (double) lvl / 7.0));
output = (int) Math.floor(points / 4);
if (output >= exp) {
return lvl;
}
}
return 0;
}
3. Change the #'s to what it says in the below sentence...
## = The value you would like your max level to be (135 is the un-confirmed max value)
#### = The value you would like the amount of XP needed to gain that level (2,147,483,647 is the max number stored in a 32-bit signed integer)
4. While still in your server files, search for player.java, and open it.
5.Press Control+F and search for:
Code:
public int getLevelForXP(int exp) {
And under that you should see:
Code:
public int getLevelForXP(int exp) {
int points = 0;
int output = 0;

for (int lvl = 1; lvl <= ##; lvl++) {
points += Math.floor((double)lvl + 300.0 * Math.pow(2.0, (double)lvl / 7.0));
output = (int)Math.floor(points / 4);
if (output >= exp)
return lvl;
}
return ##;
}
6. Change ## With your max level you entered on step 3




-Enabling/disabling Administrator's from trading, selling or dropping any item
If you have any valuable items in a Admin only shop, or if they are getting an unfair advantage to normal player and you cannot trust them to not ruin your servers ecconnomy, this may be the thing for you

1. Open up your server folder and search for config.java, and open it.
2. Search for this line:
Code:
static final boolean ADMIN_CAN_TRADE =
You should see 3+ Lines that look like this
Code:
public static final boolean ADMIN_CAN_TRADE = ####
public static final boolean ADMIN_CAN_SELL_ITEMS = ####
public static final boolean ADMIN_DROP_ITEMS = ####
Explination.
#### will either be true or false, meaning yes or no
3. Change #### to either true or false



-How to edit player in-game attributes (Skill level, rights, bank items etc...)
1. Open up your server folder and search for your character folder & locate the desired user you would like to edit, and open it.
2. It should look like something similar to this
Code:
[ACCOUNT]
character-username = test //In-game username
character-password = testing //In-game password

[CHARACTER]
character-height = 0 //Hight on map- 0=Ground level
character-posx = 3087 //X position on map
character-posy = 3500 //Y Position on map
character-rights = 0 //Player Rights
crystal-bow-shots = 0
skull-timer = 0 //Time left untill Skull wares off
magic-book = 0 //What magic book is being used 0=Modern - 1=Ancient - 2=Lunar
special-amount = 0.0 //Ammount of special left in special bar
barrows-killcount = 0 //Barrows Kill-Count
teleblock-length = 0 //Time untill tele blook wares off
pc-points = 0 //Amount of pest controll points
taskAmount = 0 //Amount of slayer tasks left ot complete?
magePoints = 0 //Mage arena points
autoRet = 0 //auto retaliate on/off
barrowskillcount = 0 //Barrows kill-count
wave = 0 //Fight pit wave

[EQUIPMENT] //Items equipted on player
character-equip = 0 -1 1
character-equip = 1 -1 1
character-equip = 2 -1 1
character-equip = 3 -1 0
character-equip = 4 -1 1
character-equip = 5 -1 1
character-equip = 6 -1 0
character-equip = 7 -1 1
character-equip = 8 -1 0
character-equip = 9 -1 1
character-equip = 10 -1 1
character-equip = 11 -1 0
character-equip = 12 -1 1
character-equip = 13 -1 0

[LOOK] //Defult clothing worn by player
character-look = 0 0
character-look = 1 7
character-look = 2 25
character-look = 3 29
character-look = 4 35
character-look = 5 39
character-look = 6 44
character-look = 7 14
character-look = 8 7
character-look = 9 8
character-look = 10 9
character-look = 11 5
character-look = 12 0

[SKILLS]
character-skill = 0 1 0 //character-skill = # ## ###
character-skill = 1 1 0 // #=Skill no. - ##=Skill Level - ## Skill XP
character-skill = 2 1 0
character-skill = 3 10 1300
character-skill = 4 1 0
character-skill = 5 1 0
character-skill = 6 1 0
character-skill = 7 1 0
character-skill = 8 1 0
character-skill = 9 1 0
character-skill = 10 1 0
character-skill = 11 1 0
character-skill = 12 1 0
character-skill = 13 1 0
character-skill = 14 1 0
character-skill = 15 1 0
character-skill = 16 1 0
character-skill = 17 1 0
character-skill = 18 1 0
character-skill = 19 1 0
character-skill = 20 1 0
character-skill = 21 1 0
character-skill = 22 1 0
character-skill = 23 1 0
character-skill = 24 1 0

[ITEMS]
character-item = 0 996 100000 //character-item = # ## ###
character-item = 1 1732 1 //#=Item no. - ##=Item ID - ### Amount of Item
character-item = 2 555 200
character-item = 3 556 200
character-item = 4 557 200
character-item = 5 559 600
character-item = 6 1382 1
character-item = 7 1324 1
character-item = 8 842 1
character-item = 9 883 500
character-item = 10 381 100

[BANK]
character-Bank = 0 381 100 //character-Bank = # ## ###
//#=Bank no. - ##=Item ID - amount of Item

[FRIENDS]

[EOF]
I wont go into this too much, but if you have followed this guide so far, the rest is self explanatory




-How to make various Commands
What is a private server without commands? Like literally one of the key aspects of what defines a private server, that and the easy skills and money :P So now I am going to show you the basic formats of the commands so you can start implementing them your selves!

*Teleportation commands (My be hard to follow, so be warned!)
1. Open up your server folder and search for commands.java, and open it.
2. It shouldn't be too long to find it, but you should be looking for lines similar to this:
Code:
if (playerCommand.startsWith
3. Possibly a few lines under you should see a bracket like this }
And under the } press enter to make a new line, then add this line: (making sure you are keeping to the format)
Code:
if (playerCommand.equals("####")) {
c.getPA().startTeleport(##, ##, 0, "modern");
}
4. Changed these values as so.
#### = The name of your command (DO NOT put :: at the beginning, it will load it automatically)
## = The X & Y co-ordinate of your teleport destination

*Give item commands (e.g Starter Packs, barrage runes etc...)
1. Open up your server folder and search for commands.java, and open it.
2. It shouldn't be too long to find it, but you should be looking for lines similar to this:
Code:
if (playerCommand.startsWith
3. Possibly a few lines under you should see a bracket like this }
And under the } press enter to make a new line, then add this line: (making sure you are keeping to the format)
Code:
if (playerCommand.startsWith("####")
c.getItems().addItem(###, ##);
c.getItems().addItem(555, 2000);
c.getItems().addItem(556, 2000);
c.getItems().addItem(557, 2000);
4. Change these values as so.
#### = The name of your command (DO NOT put :: at the beginning, it will load it automatically)
### = Item ID
## = Amount of the item you wish to have (remember to input the ID as noted if it is a large amount of unstackerble items!)

*how to add player rights to commands
1. Open up your server folder and search for commands.java, and open it.
2. Search for the command you wish to add a players right to e.g
Code:
if (playerCommand.startsWith("RANDOM")
c.getItems().addItem(995, 1000)
3. Add this line
Code:
&& c.playerRights >= ####) {
To the end of your command like so:
Code:
if (playerCommand.startsWith("RANDOM") && c.playerRights >= ####) {
c.getItems().addItem(995, 1000)
4. Replace #### with the player right e.g 0,1,2,3,4,5








-TIPS
* Always remember to compile either your Server and/or Client (depending on witch file was modified) via the compiler.bat
* I would suggest spending at least 1-2 weeks playing around with various sources that other players have made, these can be found in the 317 download section
* I would suggest having some sort of brain on your shoulders, what I mean is, being rather good at mathematics & good'ish English skills
* You are expected to blow up a few sources, but it's all part of your learning experience
* If you are thinking about running/maintaining a good server, I would suggest reading through a java book e.g 'java for dummies'
* If you are confident enough to edit values in your server the most resourceful files are your client.java, config.java, CFG Folder etc
* Always keep a back-up, I would suggest backing up your source after any major successful updates
* To Find Item ID's, try looking in item.cfg in the CFG file! (95% of the time, the ID's are incorrect) Portable Item ID list included with tutorial)
* To Find NPC ID's, try looking in NPC.cfg in the CFG folder! (95% of the time, the ID's are incorrect) Portable NPC ID list included with tutorial)
*











I WILL COMPLETE/TIDY-UP THIS GUIDE LATER!!!!
Please suggest and tutorial you would like to see implemented below, I will be updating continually

I hope you like and this is not the complete guide since I'm using an Ipod



SwagCoder is offline  
Thanks
1 User
Old   #2
 
elite*gold: 0
Join Date: Apr 2011
Posts: 91
Received Thanks: 19
very useful for beginners thanks
but most of the servers are totally different^^ still good


hausdrache5 is offline  
Old   #3
 
elite*gold: 0
Join Date: May 2011
Posts: 227
Received Thanks: 35
ob mir bitte über skype jemand erklären könnte wie man scripts bei rsbot added? D
ich hab mir recht viele tutorials angesehn aber lesen .. neh dazu bin ich zu faul D
wäre echt nett von euch wenn mir jemand erklärn könnte wie

skype :r0nr0n3
ronrocks123 is offline  
Old   #4
 
elite*gold: 0
Join Date: May 2012
Posts: 30
Received Thanks: 4
Thank you haudrache5 and ronrock in not German or whatever language that is I'm English, Spanish And French(Starting)


SwagCoder is offline  
Old   #5
 
elite*gold: 0
Join Date: Jun 2014
Posts: 34
Received Thanks: 6
I really like this guide, I have everything in it, but nothing I do saves, I think it's because my compiler broke.
It is called !Builder, but when I run it, it says javac is not known as an external or internal command
It says this


@echo off
Title Project Insanity Server - Building...
Javac -classpath deps/log4j-1.2.15.jar;deps/jython.jar;deps/xstream.jar;deps/mina.jar;deps/mysql.jar;deps/poi.jar;deps/slf4j.jar;deps/slf4j-nop.jar -d bin src\server\event\*.java src\server\model\items\*.java src\server\model\minigames\*.java src\server\model\npcs\*.java src\server\model\objects\*.java src\server\model\players\*.java src\server\model\players\skills\*.java src\server\model\players\packets\*.java src\server\model\shops\*.java src\server\net\*.java src\server\task\*.java src\server\util\*.java src\server\world\*.java src\server\util\log\*.java src\server\*.java src\server\world\map\*.java
pause


SkyKnightScape is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
World Edit Command ( Single Player Commands )
Hi epvpers, ich habe eine Frage. Und zwar : Wie kann man bei dem Single Player Commands mod Berge wegmachen, damit man eine flache Fläche hat?!?!...
2 Replies - Minecraft
World Edit Commands funktionieren nicht
Hallo, Auf meinem Hamachi Server funktionieren leider einige World Edit Commands nicht. Zum Beispiel "/item compass 1" funktioniert nicht,...
1 Replies - Minecraft
[Hilfe]World Edit Commands funktionieren nicht!
Ich hab alles so installiert wie in Tutorial auf der Website von SPC und WorldEdit beschrieben tausende Videos geguckt wie man das installiert aber...
3 Replies - Minecraft
[Help] Add/Edit Commands
i dont know how to add or edit commands i would be realy greatfull if any of you would help me post a guild or something thet would help me Thank You...
0 Replies - CO2 PServer - Discussions / Questions
How Can i Edit Qoproxy, and Change Commands
Hello everyone.. How can i edit the Jar file of Qoproxy .. I know i have to use it as a zip file... But as u know if i edited something and...
5 Replies - CO2 Main - Discussions / Questions



All times are GMT +2. The time now is 13:33.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.