Author Topic: A construction area! [For AdotSells's construction!]  (Read 125 times)

Offline The Unholy

  • Steel Member
  • *
  • Posts: 36
  • Rep 4
    • View Profile
A construction area! [For AdotSells's construction!]
« on: March 30, 2011, 10:05:37 pm »
Well after reading his tutorial it had come to my attention that many people won't understand how to add a 'construction' area so allow me.

First open up client.java and add this command anywhere underneath and existing command
Code: [Select]
if (command.startsWith("construction") && playerLevel[11] > 0){ //need at least 0 firemaking, you can change this if you want.
triggerTele(2069, 3221, 0);
} else {
("You need a firemaking level of 0 to teleport there!");
}
}

Then, search for:
Code: [Select]
public boolean pickUpItem(int item, int amount) {

Now replace his boolean for construction area with this:
Code: [Select]
public boolean inConstruction() {
      if(absX >= 2048 && 2108 <= 3250 && absY >= 3136 && absY <= 3263)
      return true;
      else
      return false;
      }

If your XCoord is between 2048 and 2108 and your YCoord is between 3136 and 3263 you can build objects, if it's not, you can't! That's what the command is for! Have fun! :) If you get 100 errors adding the command, remove one of the braces. I've typed this by hand so it probably fails  :tf:

Share on Bluesky Share on Facebook


Offline AdotSells

  • Firecape Member
  • *
  • Posts: 300
  • Rep 4
    • View Profile
Thankyou , Im actuely Using this area.

Offline Sajon

  • Rune Member
  • *
  • Posts: 166
  • Rep -1
  • Never Back down
  • Location: United Kingdom
    • View Profile
can anyone give me a a clean server pm me it please

Offline The Unholy

  • Steel Member
  • *
  • Posts: 36
  • Rep 4
    • View Profile
Haha, you're welcome bro. And Sajon check my source released, it's delta, so you'll find it easy to work with.