Author Topic: Construction base  (Read 414 times)

Offline AdotSells

  • Firecape Member
  • *
  • Posts: 300
  • Rep 4
    • View Profile
Construction base
« on: March 30, 2011, 09:35:24 pm »
Base:Delta cleaned
Credits: AdotSells,The Unholy,Chandlermaki

This is itemonitem And its so basic all it includes is hammer on Plank makes a bank booth.
Other players cannot see the objects made and they disapear when you log out. It uses the firemaking skilllevel at the moment Since i have not got construction skill working

This code is the itemOnitem to make it build the bank.
Quote
         if (!inConstruction()) {
            sM("You need to be in the construction area");
            } else if
            ((itemUsed == 2347) && (useWith == 960)) {

            if (playerLevel[11] >= 0) {
               setAnimation(827);
               deleteItem(960, getItemSlot(960), 1);
               makeGlobalObject(absX, absY, 2213, 0, 10);
               addSkillXP(180, 11);
               sM("You build a Bank booth");
               resetWC();
            } else {
               sM("You need a construction Level of 0 to build this");
            }

To make that code work you will need to add this

Quote
      public boolean inConstruction() {
      if(absX >= xxxx && absX <= xxxx && absY >= xxxx && absY <= xxxx)
      return true;
      else
      return false;
      }
Quote
public boolean inConstruction() {
^makes it so you cant do the item on item unless you'r at the coord range you choose.
I will not help you with the coords on the code above.

Sorry if you dont understand me.


Learning the coord's (Thanks The Unholy)
Quote
http://www.rune-kingdom.org/index.php?topic=484.0
« Last Edit: March 30, 2011, 10:17:38 pm by AdotSells »

Share on Bluesky Share on Facebook


Offline Chandlermaki

  • Rune Member
  • *
  • Posts: 129
  • Rep 6
  • You's trollin'.
  • Location: USA
    • View Profile
Re: Construction base
« Reply #1 on: March 30, 2011, 09:41:46 pm »
Not bad. Keep up the tutorials/snippets, you're doing a great job so far.
Insert clever signature here.

Offline AdotSells

  • Firecape Member
  • *
  • Posts: 300
  • Rep 4
    • View Profile
Re: Construction base
« Reply #2 on: March 30, 2011, 09:53:18 pm »
Thanks dude

Offline The Unholy

  • Steel Member
  • *
  • Posts: 36
  • Rep 4
    • View Profile
Re: Construction base
« Reply #3 on: March 30, 2011, 10:06:07 pm »
Nice, I've made a snippet helping those that wish to get the boolean working for certain areas :)

Offline Sajon

  • Rune Member
  • *
  • Posts: 166
  • Rep -1
  • Never Back down
  • Location: United Kingdom
    • View Profile
Re: Construction base
« Reply #4 on: March 31, 2011, 12:55:00 am »
nice i like a 317 server with construction

Offline Zeroeh.

  • Iron Member
  • *
  • Posts: 18
  • Rep 0
    • View Profile
Re: Construction base
« Reply #5 on: March 31, 2011, 07:35:07 am »
Looks good.
It's easy to make it into a dialog.
The part that you said "public boolean inConstruction() {"
You don't need to write that whole thing.

For example;
Code: [Select]
} // end the piece of code above, let's say it exists.
if(inConstruction() && playerLevel[11] < 0) {
triggerTele(3222, 3222, 0); // Teleports the player to lumbrudge xD.
}
Sorry if I misunderstood.
Hope you get my point, ;).

Offline AdotSells

  • Firecape Member
  • *
  • Posts: 300
  • Rep 4
    • View Profile
Re: Construction base
« Reply #6 on: March 31, 2011, 01:28:01 pm »
Thankyou :)

Offline Chandlermaki

  • Rune Member
  • *
  • Posts: 129
  • Rep 6
  • You's trollin'.
  • Location: USA
    • View Profile
Re: Construction base
« Reply #7 on: March 31, 2011, 01:41:22 pm »
Looks good.
It's easy to make it into a dialog.
The part that you said "public boolean inConstruction() {"
You don't need to write that whole thing.

For example;
Code: [Select]
} // end the piece of code above, let's say it exists.
if(inConstruction() && playerLevel[11] < 0) {
triggerTele(3222, 3222, 0); // Teleports the player to lumbrudge xD.
}
Sorry if I misunderstood.
Hope you get my point, ;).

Teleporting them to lumbridge for being in the construction area and having a skill level less than 0? I fail to see the point. Am I missing something?
Insert clever signature here.

Offline AdotSells

  • Firecape Member
  • *
  • Posts: 300
  • Rep 4
    • View Profile
Re: Construction base
« Reply #8 on: March 31, 2011, 01:50:24 pm »
Looks good.
It's easy to make it into a dialog.
The part that you said "public boolean inConstruction() {"
You don't need to write that whole thing.

For example;
Code: [Select]
} // end the piece of code above, let's say it exists.
if(inConstruction() && playerLevel[11] < 0) {
triggerTele(3222, 3222, 0); // Teleports the player to lumbrudge xD.
}
Sorry if I misunderstood.
Hope you get my point, ;).

Teleporting them to lumbridge for being in the construction area and having a skill level less than 0? I fail to see the point. Am I missing something?
I dont seem to get it either mate :/

Offline Holy

  • Adamant Member
  • *
  • Posts: 98
  • Rep 0
  • The Next Lionel Messi.
  • Location: Written in the stars,Million miles away...
    • View Profile
Re: Construction base
« Reply #9 on: March 31, 2011, 02:36:36 pm »
Keep it up son,and maybe make the base even bigger than that Bank Booth only ;)
-Holy

Offline AdotSells

  • Firecape Member
  • *
  • Posts: 300
  • Rep 4
    • View Profile
Re: Construction base
« Reply #10 on: March 31, 2011, 02:49:21 pm »
Iv completely removed it my souce, Re building it.  Bigger and better.

Offline Chandlermaki

  • Rune Member
  • *
  • Posts: 129
  • Rep 6
  • You's trollin'.
  • Location: USA
    • View Profile
Re: Construction base
« Reply #11 on: March 31, 2011, 03:58:41 pm »
And I'll be helping out with that. :D
Insert clever signature here.

Offline AdotSells

  • Firecape Member
  • *
  • Posts: 300
  • Rep 4
    • View Profile
Re: Construction base
« Reply #12 on: March 31, 2011, 04:12:43 pm »
=D  :)

Mate check out my help topic in help section please.

Offline Ferp

  • Dragon Member
  • *
  • Posts: 238
  • Rep 10001
  • Making the impossible, possible.
  • Location: Canada
    • View Profile
Re: Construction base
« Reply #13 on: March 31, 2011, 06:04:08 pm »
When I try reading these coding snippets I get so confused. You guys really are something.


Offline AdotSells

  • Firecape Member
  • *
  • Posts: 300
  • Rep 4
    • View Profile
Re: Construction base
« Reply #14 on: March 31, 2011, 06:06:20 pm »
When I try reading these coding snippets I get so confused. You guys really are something.
Takes Abit of pratice Mate I do it everyday Untill i learn :)