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

Coding Guide!

Status
Not open for further replies.

hiots

Forum Addict

Banned
Joined
Nov 8, 2008
Sythe Gold
0
Messages
261
Location
Wouldn't You Like To Know...
MY CODING GUIDE!
I might not finish this cause im on vacation but heres some different codings! NEED HELP WITH MAKING A SERVER LOOK AT MY GUIDE HERE!!!

http://sythe.org/showthread.php?t=502869

COMMAND CODING
PART 1 OF COMMAND CODING, ADDING ITEM COMMAND (NOT PICKUP)

Find where your command section is in your client.java
Add this ( dont add the *'s thats what you fill in later )
Code:
elseIfCommandStartswith("*commandname*") && playerrights >= *;
{
addItem(****,*);
}

The star in the last part is the thing like admin or mod or reg player or owner.
So now edit the commandname to the name that you want to make when you type ::*commandname*
Now Change playerrights to either 1,2,or 3 (IF YOU DO NOT WANT THIS FOR A MOD+ COMMAND THEN TAKE OFF THE
Code:
&& playerRights >= *
And now replace it with a ; (semi-colon)

Player Rights Chart
1 = MOD
2 = ADMIN
3 = OWNER
____________________________

Now where it says
Code:
addItem(****,*);
Replace the first **** with the item id and replace the second * with the amount of the item. TO FIND ITEM ID'S YOU SHOULD HAVE A FILE CALLED ITEM.CFG LOOK IN THAT AND SEARCH YOUR ITEM YOU WANT AND PUT IN THE ID. Now compile and test it out!

PART 2 OF COMMAND CODING, ADDING SKILL EXP!
Find the same thing as in the first one except replace the
Code:
addItem(****,*);

and replace that with
Code:
addSkillExp(**,********);

ALSO DONT FORGET TO PUT THIS IN BEFORE YOU REPLACE IT
Code:
elseIfCommandStartswith("*commandname*") && playerrights >= *;
{
addItem(****,*);
}

Change the first ** to the skill number (or skill BUT NOT NAME OF SKILL!) Find out how to find this in the extras at the end!
Now change the last ******** to the skill exp (14000000 should be good or i think it was 140000000 idk which one)

Now save client.java and compile and whala! Your done.
ANY QUESTIONS POST EM HERE!

EXTRAS: To find skill numbers go to your source and go to characters then find the character file open, find the skills, add in the skill numbers, and your done. A way to do this is Test it, meaning log on and see which skill is each skill number!

Adding and deleting Objects!

Part 1
Okay here we go. Adding objects is simple. First Find the object ID that you want to put in. I have a XML document that you can download so you can take a look at that here and find all item ids you need. I got it from moparscape and just uploaded it. http://www.mediafire.com/?sharekey=82558a799ffafdaa91b20cc0d07ba4d27b93082ac7555b24
So now open up client.java
Search for NewObjects it should go to something that says public void NewObjects
Now Look under it and find the object part. The code for adding a new object is
Code:
	       makeGlobalObject(****, ****, ****, *, 10);//*objectname*
Now Heres what you replace the stars with.
1st stars: **** replace that with the Xcoordinate
2nd stars: **** Replace that with the Ycoordinate
3rd Stars: **** replace with the object id (see above for list download link)
4th Star: * replace that with the direction you want the front of the object facing.
Direction list
0 = West
-1 = North
-2 = East
-3 = South
___________________
Now replace the *objectname* with anything really it doesn't do anything.

Part 2
Now for Deleting objects.
This is almost same thing as adding objects but just reversing the cause,but this is easier cause you dont have to add in object ID
Search for deletethatobject and keep searching until you come along the code below \/\/\/\/\/
So this is the code for deleting objects.
Code:
               deletethatobject(****, ****); //*objectname*

As always
1st Stars: Xcoords
2nd Stars: Ycoords
*objectname* = name of object but doesn't even matter if you put in one.

K well thats it for Adding and deleting objects! Wasn't That easier then it looked?

Back from vacation adding more now! I just posted the Object Adding and Deleting part. So now im workin on other parts!

HOPE THIS HELPED! (SO FAR NOT FINISHED)
 
nice dude
 
nice dude

Ya it not even close to being finished, but i dont have my server on vacation. Theres soon to come with how to make custom portals, teles, shops, and putting in Npcs, and deleting objects you dont want on the game, like theres a table and you dont want it there so you delete it.
 
Good so far :)
by the way, i'm looking forward to the stuff your adding in the future to it. i need a guide for that stuff :p
 
this is shit...

basic stuff
if you dont even know stuff like this you are wrong at rsps coding
 
this is shit...

basic stuff
if you dont even know stuff like this you are wrong at rsps coding

dont flame him... if you don't need the info, don't read it. at lease he's helping out some people.
 
Good so far :)
by the way, i'm looking forward to the stuff your adding in the future to it. i need a guide for that stuff :p

Thanks for the comment i hope this will help some people


____________________________________________________________


this is shit...

basic stuff
if you dont even know stuff like this you are wrong at rsps coding

Dude! its not even close to being done. I am on vacation so i cant include much, cause i dont have my source to look at plus parents wont let me go on computer that much. I gonna include more soon anyway


____________________________________________________________

Im gonna include Pictures when i get back also!
 
awsomeness. the adding/deleting objects rly helped me :)
 
Status
Not open for further replies.
Runescape Gamblingrunescape gambling
Back
Top