Jump to content
Mahdy

[NEW][PI] Removing Objects! [317][PI]

Recommended Posts

[CENTER][IMG]http://i.minus.com/ibNGEn7dHdvTn.png[/IMG]
[/CENTER]

This is my first guide getting posted. I have not seen many guides regarding this, so, I figured since I learned to do just this, why not cover it with others for them to know how, as well? I am using a PI base, 317 revision so this shall work for ALL PI bases.

[CENTER][U]Step one:[/U]
Look for a file called: [U]Open your ObjectManager.Java[/U]
[INDENT]You can search it in your folder, or look for it manually: SRC > SERVER>WORLD>ObjectManager[/INDENT]

Look for a this code
[CODE]public void loadCustomSpawns(Client c) {[/CODE]

[U]Step two:[/U]
You should see something along the lines of this:
[CODE]private int[][] customObjects = {{}};
public void loadCustomSpawns(Client c) {
c.getPA().checkObjectSpawn(OBJECT_ID, [B]TELE_X[/B], [B]TELE_Y[/B], [B]HEIGHT[/B], 10);[/CODE]

[U]Step Three:[/U]
When you have this code:
[CODE]public void loadCustomSpawns(Client c) {[/CODE]

[CENTER][U]Add the new line anywhere under it:[/U][/CENTER]
[CODE]c.getPA().checkObjectSpawn(-1, TELE_X, TELE_Y, 1, 10);[/CODE]

Replace coordinates X & Y with the object you are trying to remove. I will show you my example, below.
[IMG]http://i.gyazo.com/ad666f2bfc3e795efef0c4628a5b08f4.png[/IMG]

As you can see, my coordinates are: x- 3348 Y- 3333
Your first coordinate is your[B] X[/B], your second is your [B]Y[/B].

So, the code you will type in (or in this case, the code I will type in) would be:
[CODE]c.getPA().checkObjectSpawn(-1, 3348, 3333, 1, 10);[/CODE][/CENTER]

[U][CENTER]Step Four: [/CENTER][/U]
[CENTER]Save, compile & run! You are all set after that! [/CENTER]

If you follow this correctly, you will have NO errors.

Stay tuned for the next tutorial! There will be a tutorial on: [B]How to step an NPC and add items into it[/B].

Kind regards & thanks for reading!

-Mahdy. Edited by Mahdy

Share this post


Link to post
Share on other sites
Nice job, I'm sure you will help out some of the people that are newer to PI

Share this post


Link to post
Share on other sites
[quote name='Mahdy'][CENTER][IMG]http://i.minus.com/ibNGEn7dHdvTn.png[/IMG]
[/CENTER]

This is my first guide getting posted. I have not seen many guides regarding this, so, I figured since I learned to do just this, why not cover it with others for them to know how, as well? I am using a PI base, 317 revision so this shall work for ALL PI bases.

[CENTER][U]Step one:[/U]
Look for a file called: [U]Open your ObjectManager.Java[/U]
[INDENT]You can search it in your folder, or look for it manually: SRC > SERVER>WORLD>ObjectManager[/INDENT]

Look for a this code
[CODE]public void loadCustomSpawns(Client c) {[/CODE]

[U]Step two:[/U]
You should see something along the lines of this:
[CODE]private int[][] customObjects = {{}};
public void loadCustomSpawns(Client c) {
c.getPA().checkObjectSpawn(OBJECT_ID, TELE_X, TELE_Y, 1, 10);[/CODE]

[U]Step Three:[/U]
When you have this code:
[CODE]public void loadCustomSpawns(Client c) {[/CODE]

[CENTER][U]Add the new line anywhere under it:[/U][/CENTER]
[CODE]c.getPA().checkObjectSpawn(-1, TELE_X, TELE_Y, 1, 10);[/CODE]

Replace coordinates X & Y with the object you are trying to remove. I will show you my example, below.
[IMG]http://i.gyazo.com/ad666f2bfc3e795efef0c4628a5b08f4.png[/IMG]

As you can see, my coordinates are: x- 3348 Y- 3333
Your first coordinate is your[B] X[/B], your second is your [B]Y[/B].

So, the code you will type in (or in this case, the code I will type in) would be:
[CODE]c.getPA().checkObjectSpawn(-1, 3348, 3333, 1, 10);[/CODE][/CENTER]

[U][CENTER]Step Four: [/CENTER][/U]
[CENTER]Save, compile & run! You are all set after that! [/CENTER]

If you follow this correctly, you will have NO errors.

Stay tuned for the next tutorial! There will be a tutorial on: [B]How to step an NPC and add items into it[/B].

Kind regards & thanks for reading!

-Mahdy.[/QUOTE]

nice release, seen it a few times before but none the less its well written and easy to follow

Share this post


Link to post
Share on other sites
One thing to add
[code]c.getPA().checkObjectSpawn(-1, TELE_X, TELE_Y, [B][COLOR="#FF0000"]HEIGHT[/COLOR][/B], 10);[/code]
I believe that might be a little useful to some who are still learning

Share this post


Link to post
Share on other sites
[quote name='high105']One thing to add
[code]c.getPA().checkObjectSpawn(-1, TELE_X, TELE_Y, [B][COLOR="#FF0000"]HEIGHT[/COLOR][/B], 10);[/code]
I believe that might be a little useful to some who are still learning[/QUOTE]

Thought I had that in there, as well, lol. I wrote this at about 2AM, so my mistakes ^_^

Share this post


Link to post
Share on other sites

×