Coding Guide!

Discussion in 'RuneScape Miscellaneous' started by hiots, Nov 25, 2008.

Thread Status:
Not open for further replies.
Coding Guide!
  1. Unread #1 - Nov 25, 2008 at 11:37 AM
  2. hiots
    Joined:
    Nov 8, 2008
    Posts:
    261
    Referrals:
    1
    Sythe Gold:
    0

    hiots Forum Addict
    Banned

    Coding Guide!

    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)
     
  3. Unread #2 - Nov 27, 2008 at 3:44 PM
  4. donkiescape1
    Joined:
    Sep 7, 2008
    Posts:
    39
    Referrals:
    0
    Sythe Gold:
    0

    donkiescape1 Member

    Coding Guide!

    nice dude
     
  5. Unread #3 - Nov 27, 2008 at 5:46 PM
  6. hiots
    Joined:
    Nov 8, 2008
    Posts:
    261
    Referrals:
    1
    Sythe Gold:
    0

    hiots Forum Addict
    Banned

    Coding Guide!

    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.
     
  7. Unread #4 - Nov 28, 2008 at 12:56 AM
  8. psychokid718
    Joined:
    Dec 29, 2007
    Posts:
    315
    Referrals:
    0
    Sythe Gold:
    0

    psychokid718 Forum Addict
    Banned

    Coding Guide!

    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
     
  9. Unread #5 - Nov 28, 2008 at 11:32 AM
  10. NeedHoster
    Referrals:
    0

    NeedHoster Guest

    Coding Guide!

    this is shit...

    basic stuff
    if you dont even know stuff like this you are wrong at rsps coding
     
  11. Unread #6 - Nov 28, 2008 at 5:05 PM
  12. psychokid718
    Joined:
    Dec 29, 2007
    Posts:
    315
    Referrals:
    0
    Sythe Gold:
    0

    psychokid718 Forum Addict
    Banned

    Coding Guide!

    dont flame him... if you don't need the info, don't read it. at lease he's helping out some people.
     
  13. Unread #7 - Nov 28, 2008 at 9:46 PM
  14. hiots
    Joined:
    Nov 8, 2008
    Posts:
    261
    Referrals:
    1
    Sythe Gold:
    0

    hiots Forum Addict
    Banned

    Coding Guide!

    Thanks for the comment i hope this will help some people


    ____________________________________________________________


    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!
     
  15. Unread #8 - Nov 30, 2008 at 7:41 PM
  16. hiots
    Joined:
    Nov 8, 2008
    Posts:
    261
    Referrals:
    1
    Sythe Gold:
    0

    hiots Forum Addict
    Banned

    Coding Guide!

    Back from vacation so now adding pics and even more info!
     
  17. Unread #9 - Dec 1, 2008 at 8:50 AM
  18. psychokid718
    Joined:
    Dec 29, 2007
    Posts:
    315
    Referrals:
    0
    Sythe Gold:
    0

    psychokid718 Forum Addict
    Banned

    Coding Guide!

    awsomeness. the adding/deleting objects rly helped me :)
     
  19. Unread #10 - Dec 24, 2008 at 12:34 PM
  20. hiots
    Joined:
    Nov 8, 2008
    Posts:
    261
    Referrals:
    1
    Sythe Gold:
    0

    hiots Forum Addict
    Banned

    Coding Guide!

    No problem
     
< The newest server | Rs private server help! >

Users viewing this thread
1 guest
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site