Thread: [PI] Adding and removing objects! (Beginner tutorial #1)

Page 1 of 3 123 LastLast
Results 1 to 10 of 30
  1. #1 [PI] Adding and removing objects! (Beginner tutorial #1) 
    Vitality

    Raw Envy's Avatar
    Join Date
    Dec 2010
    Posts
    3,034
    Thanks given
    869
    Thanks received
    1,186
    Rep Power
    3054
    Hello Rune-server this is my first tutorial and i will be starting to make a few new tutorials so i thought i would start off with one of the simplest but vital things that a beginner to coding will need to know.

    Files used to add and remove objects: Objectmanager.java


    Adding Objects

    Step 1: Open up objectmanager.java

    step 2: Scroll down to about the middle of the file and you will see a load of the same text but with different numbers, the add objects code should look like this: :c.getPA().checkObjectSpawn(2213, 2835, 3446, 1, 10); (This would add a bank booth to the coordinates given.)

    3. Copy and paste any of them aslong as the second last number is 0 or more and not -1, if it's -1 then that would be removing an object not adding it. This is how you should add an object:

    c.getPA().checkObjectSpawn("Object id", "X cords", "Y cords", "What way the object is facing use numbers 0-3", 10);


    Removing objects:

    Step 1: To remove an objects you must give the X and the Y cord of the object and if the object takes up more than 1 X or Y cord you must give all of the cords that the object is on.

    Step 2: This is an example of removing an object: c.getPA().checkObjectSpawn(-1, 3086, 3526, -1, 10); ~ This is removing an object which is in Y cord 3526 and X cord 3086.

    How it works: c.getPA().checkObjectSpawn("-1", "X cord", "Y cord", "-1", 10); ~ Instead of giving an object id you are removing any object that is in the given coordinates.


    I know this is a simple guide but there are always new members joining up to the community that are new to coding and don't know how to do the simple things. I am fairly new to coding and when i first joined couldn't figure out how to do this and other things so i will be making a series of "Beginner tutorials".

    I hope this helps you, please leave a comment and maybe even a Rep. PM me if you have any problems with this and i will help you via Teamviewer etc.
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Registered Member beard's Avatar
    Join Date
    Jun 2011
    Posts
    326
    Thanks given
    4
    Thanks received
    2
    Rep Power
    1
    i wanted to remove the door at pirate hut i did

    c.getPA().checkObjectSpawn(-1, 3044, 3956, -1, 10);
    and it didnt dissapear?
    Reply With Quote  
     

  4. #3  
    Vitality

    Raw Envy's Avatar
    Join Date
    Dec 2010
    Posts
    3,034
    Thanks given
    869
    Thanks received
    1,186
    Rep Power
    3054
    Quote Originally Posted by beard View Post
    i wanted to remove the door at pirate hut i did

    c.getPA().checkObjectSpawn(-1, 3044, 3956, -1, 10);
    and it didnt dissapear?
    To make a door open go to doors.cfg, uhmm and if you want to remove it you have to do something else i think. And also i think i've seen a tutorial about this have a look around mate.
    Reply With Quote  
     

  5. #4  
    Registered Member beard's Avatar
    Join Date
    Jun 2011
    Posts
    326
    Thanks given
    4
    Thanks received
    2
    Rep Power
    1
    Quote Originally Posted by Raw Envy View Post
    To make a door open go to doors.cfg, uhmm and if you want to remove it you have to do something else i think. And also i think i've seen a tutorial about this have a look around mate.
    i dont got door cfg i got pja/hyperion
    Reply With Quote  
     

  6. #5  
    Vitality

    Raw Envy's Avatar
    Join Date
    Dec 2010
    Posts
    3,034
    Thanks given
    869
    Thanks received
    1,186
    Rep Power
    3054
    Quote Originally Posted by beard View Post
    i dont got door cfg i got pja/hyperion
    Ah sorry cant help then :\
    Reply With Quote  
     

  7. #6  
    Registered Member beard's Avatar
    Join Date
    Jun 2011
    Posts
    326
    Thanks given
    4
    Thanks received
    2
    Rep Power
    1
    Quote Originally Posted by Raw Envy View Post
    Ah sorry cant help then :\
    do u know how to keep the door open then?
    Reply With Quote  
     

  8. #7  
    Registered Member
    Kobra's Avatar
    Join Date
    Dec 2009
    Posts
    652
    Thanks given
    215
    Thanks received
    84
    Rep Power
    88
    Been Released
    Reply With Quote  
     

  9. #8  
    Vitality

    Raw Envy's Avatar
    Join Date
    Dec 2010
    Posts
    3,034
    Thanks given
    869
    Thanks received
    1,186
    Rep Power
    3054
    Quote Originally Posted by DontHate View Post
    Been Released
    Oh well, i think mines most likely more clear and detailed.
    Reply With Quote  
     

  10. #9  
    Registered Member
    Join Date
    Jul 2011
    Posts
    537
    Thanks given
    25
    Thanks received
    35
    Rep Power
    0
    What if i wanted a banker? Would that be in a NPC file?
    I support Eliminate.


    [Today 06:28 PM] Scu11: Mans gotta spread his wings, to do his tings
    Reply With Quote  
     

  11. #10  
    Vitality

    Raw Envy's Avatar
    Join Date
    Dec 2010
    Posts
    3,034
    Thanks given
    869
    Thanks received
    1,186
    Rep Power
    3054
    Quote Originally Posted by Sulfur View Post
    What if i wanted a banker? Would that be in a NPC file?
    I will make a new beginner tutorial on how to spawn an NPC thanks for the idea
    And it's in spawn0config.cfg btw.
    Reply With Quote  
     

Page 1 of 3 123 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. adding/removing objects client sided.[non]
    By owner blade in forum Snippets
    Replies: 5
    Last Post: 07-29-2012, 07:35 PM
  2. Hyperion adding/removing objects
    By the323909 in forum Help
    Replies: 1
    Last Post: 07-31-2010, 06:02 PM
  3. [FASM] Beginner Tutorial
    By x ZeeKy | Thunder_h2o.^ in forum Application Development
    Replies: 0
    Last Post: 11-30-2008, 11:19 PM
  4. Adding NPC's (Beginner Tutorial)
    By Java Maniac in forum Tutorials
    Replies: 3
    Last Post: 10-09-2008, 07:56 AM
  5. [Tut] Adding/Moving/Removing Global Objects
    By XxMixTheMusicxX in forum Tutorials
    Replies: 17
    Last Post: 09-07-2007, 08:44 PM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •