Powerscape
Welcome to PowerScape!! ~ Please help us by Voting or Registering to the Forums


Join the forum, it's quick and easy

Powerscape
Welcome to PowerScape!! ~ Please help us by Voting or Registering to the Forums
Powerscape
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Powerscape

Welcome to Powerscape! The friendly Runescape Private Server!


You are not connected. Please login or register

How to add a Party Room!

Go down  Message [Page 1 of 1]

1How to add a Party Room! Empty How to add a Party Room! Mon Dec 22, 2008 8:28 pm

Drizzim


Owner
Owner

This tutorial shows how to add a fully working party room like in frugooscape into your server.Difficulty: 2/10
Requirements
A custom client which isnt silabsoft
Classes edited: Client.java item2.java
credits: me
Firstly, to make the balloons pop and drop when you click on them, You will need to add this in with your object cases. You can find these by searching things like 'banana' ect.


Code:

        case 115: //party balloon
          makeGlobalObject(objectX, objectY, 6951, 0, 10);
                    setAnimation(794);
          ItemHandler.addItem(Item2.randomPartyroom(), objectX, objectY, 1, playerId, false);
                    sendMessage("You Stamp on the balloon!");
            break;


        case 116: //party balloon
          makeGlobalObject(objectX, objectY, 6951, 0, 10);
                    setAnimation(794);
          ItemHandler.addItem(Item2.randomPartyroom(), objectX, objectY, 1, playerId, false);
                    sendMessage("You Stamp on the balloon!");
            break;

        case 117: //party balloon
          makeGlobalObject(objectX, objectY, 6951, 0, 10);
                    setAnimation(794);
          ItemHandler.addItem(Item2.randomPartyroom(), objectX, objectY, 1, playerId, false);
                    sendMessage("You Stamp on the balloon!");
            break;

        case 118: //party balloon
          makeGlobalObject(objectX, objectY, 6951, 0, 10);
                    setAnimation(794);
          ItemHandler.addItem(Item2.randomPartyroom(), objectX, objectY, 1, playerId, false);
                    sendMessage("You Stamp on the balloon!");
            break;

        case 119: //party balloon
          makeGlobalObject(objectX, objectY, 6951, 0, 10);
                    setAnimation(794);
          ItemHandler.addItem(Item2.randomPartyroom(), objectX, objectY, 1, playerId, false);
                    sendMessage("You Stamp on the balloon!");
            break;
Now to decide what items will come out of the balloons you will need to edit your item2.java.
You see in the last code Item2.randomPartyroom(). Thats what we'll be editing.
So add this under something similar;


Code:

    public static int Partyroom[] = { 1038, 1040, 1042, 1044, 1046,
    1048, 1050, 15334, 15336, 15333, 15335, 4716, 4718, 4720, 4722,
    14507, 14508, 14511, 2633, 2635, 2637, 2978, 2980, 2982, 2984, 2986, 2988, 2990, 2992, 2994,
    2957, 2653, 2655, 2659, 3478, 2665, 2661, 2663, 2667, 3479, 2673, 2669,
    2671, 3480, 4724, 4728, 4730, 4726, 6570, 1037, 1050, 6857, 6859, 6861,
    6863, 6856, 6858, 6860, 6862, 6818, 989};
    public static int randomPartyroom() {
        return Partyroom[(int) (Math.random() * Partyroom.length)];
    }


All the numbers are the ids of the iteams that are dropped. Change these at any time.
Lastly, you will need to make the party lever work by adding this in with your object cases too (client.java)
Code:


        case 2416: //party lever
          if (GoodDistance2 (absX, absY, objectX, objectY, 3)) {
      if (playerHasItemAmount(995, 2000000) == true) { 
                if (actionTimer == 0)
                    deleteItem(995, GetItemSlot(995), 2000000);
          makeGlobalObject(2733, 3472, 115, 0, 10);
          makeGlobalObject(2733, 3466, 115, 0, 10);
          makeGlobalObject(2734, 3466, 115, 0, 10);
          makeGlobalObject(2733, 3466, 115, 0, 10);
          makeGlobalObject(2737, 3470, 117, 0, 10);
          makeGlobalObject(2739, 3472, 119, 0, 10);
          makeGlobalObject(2743, 3472, 116, 0, 10);
          makeGlobalObject(2737, 3465, 118, 0, 10);
                    sendMessage("You pull the party lever!!!");
                    actionTimer = 5;
                    setAnimation(776);
                    addSkillXP((1 * playerLevel[2]), 2);
                    stillgfx(639, absY, absX);
                    updateRequired = true;
                    appearanceUpdateRequired = true;
      } else {
                if (actionTimer == 0)
      server.npcHandler.newSummonedNPC(660, 2735, 3468, heightLevel, 2735, 3468, 2735, 3468, 1, server.npcHandler.GetNpcListHP(765), false, playerId);
      server.npcHandler.newSummonedNPC(660, 2736, 3468, heightLevel, 2736, 3468, 2736, 3468, 1, server.npcHandler.GetNpcListHP(765), false, playerId);
      server.npcHandler.newSummonedNPC(660, 2737, 3468, heightLevel, 2737, 3468, 2737, 3468, 1, server.npcHandler.GetNpcListHP(765), false, playerId);
      server.npcHandler.newSummonedNPC(660, 2738, 3468, heightLevel, 2738, 3468, 2738, 3468, 1, server.npcHandler.GetNpcListHP(765), false, playerId);
      server.npcHandler.newSummonedNPC(660, 2739, 3468, heightLevel, 2739, 3468, 2739, 3468, 1, server.npcHandler.GetNpcListHP(765), false, playerId);
      server.npcHandler.newSummonedNPC(660, 2740, 3468, heightLevel, 2740, 3468, 2740, 3468, 1, server.npcHandler.GetNpcListHP(765), false, playerId);
      sendMessage("You Summon the dancing knights!");
                actionTimer = 20;
                }
            }
            break;

Save everything.
Now compile and run your server. Go to the camelot party room and try it out. Remember not to be on a webclient.
PLEASE POST :rolleyes: One of my first posts say if its ok xD.
[quote]

https://p-scape.forumotion.net

Back to top  Message [Page 1 of 1]

Similar topics

-

» Drop party!
» On Duty Service Room.

Permissions in this forum:
You cannot reply to topics in this forum