MOD HOUSE !!! --------------------------------------------------------------------------------
Purpose : Mod House V2.5 By Green Dude
Difficulty : 3
Assumed Knowledge : C&P,Search in notepad,Java Basics
Server Base : ProjectXmas ( should work on most )
Classes Modified : Client.Java
NOTE : You must have installed Mod House V2 - located HERE
--------------------------------------------------------------------------------
Mod House V1 Feautures
Only players with rights of 1++ can get into the house.
Mod House V2 Feautures
A HelpMenu Created
Getting To the entrance by a command
Only admins,staff and pmods can use a special key on a door to get in
When they get it,they get another - exit key and use it on the same door to exit.
Full security ( no players with rights less of 1 can get in - theres NO way ! )
Mod House V2.5 Feautures
HelpMenu Upgradi
All basic V1 & V2 feautures
When a metal key is used on a ring of stone it creates a portal
When you click the portal you will be teleported to the entrance
( You can still use the command tho )
--------------------------------------------------------------------------------
Procedure
--------------------------------------------------------------------------------
Step 1
Open your client.java and search for :
Code:
public class client extends Player implements Runnable {
Right under it,press Enter and add this code :
Code:
public void AddGlobalObject(int x, int y, int typeID, int orientation, int tileObjectType)
{
outStream.createFrame(85);
outStream.writeByteC(y - (mapRegionY * 8));
outStream.writeByteC(x - (mapRegionX * 8));
outStream.createFrame(151);
//outStream.writeByteA(((x&7) << 4) + (y&7));
outStream.writeByteA(0);
outStream.writeWordBigEndian(typeID);
outStream.writeByteS((tileObjectType<<2) +(orientation&3));
}
And right after that add :
Code:
public void ModPortal() {
AddGlobalObject(currentX, currentY, 8987, 0, 10);//modportal by Green Dude
}
Then search for boolean process.Right after it add this :
Code:
ModPortal();
So the thing should look like :
Code:
public boolean process() { // is being called regularily every 500ms
ModPortal();
if((IsAttackingNPC || IsAttacking) && FullGuthanEquipped()) {
int chance = 0;
chance = misc.random(10);
And etc...
--------------------------------------------------------------------------------
Step 2
Search for :
Code:
if(itemUsed == 985 && useWith == 987)
You should see this :
Code:
if(itemUsed == 985 && useWith == 987)
{
deleteItem(985,getItemSlot(985),1);
deleteItem(987,getItemSlot(987),1);
addItem(989,1);
sendMessage("You attach the two key halves to make a crystal key!");
}
Now right after the last } add this :
Code:
if(itemUsed == 1839 && useWith == 6583)//Use Metal Key On Ring Of Stone - Mod House V2.5 By Green Dude
{
ModPortal();
sendMessage("You found a secret whole in the ring and put the key there...!");
}
--------------------------------------------------------------------------------
Step 3
Search for :
Code:
//Search banana tree
You should see this :
Code:
//Search banana tree
if (objectID == 2073 || objectID == 2074 || objectID == 2075 || objectID == 2076 || objectID == 2077 || objectID == 2078) {
addItem(1963, 1);
sendMessage("You pick a banana.");
}
Right after the last } press Enter and add :
Code:
//Mod House By Green Dude
if (objectID == 8987)
{
if(playerRights >= 1
{
teleportToX = 3315;
teleportToY = 3386;
inwildy = false;
sendMessage("Mod "+playerName+" , use the golden key on the door to get in!");
addItem(2944, 1);
}
else if(playerRights) <= 1)
{
sendMessage("You need to have rights 1++ to get into the house!");
}
}
--------------------------------------------------------------------------------
Step 3
If you have done V2 Properly , when you search for :
Code:
public void ModHouseHelpMenu()
You should see this :
Code:
public void ModHouseHelpMenu()
{
sendQuest("Mod Houses!", 8144);
clearQuestInterface();
sendQuest("@dbl@The Mod House is a place where", 8147);
sendQuest("@dbl@the mods,player mods and admins", 8148);
sendQuest("@dbl@can be alone.", 8149);
sendQuest("@dbl@Type ::modhouse or use a metal key on a ring of stone to go the the house.", 8150);
sendQuest("@dbl@You will need to have Rights of 1+ to get in.", 8151);
sendQuest("@red@-+= Credits =+-", 8154);
sendQuest("@gre@Green Dude", 8155);
sendQuest("@blu@PeterMan", 8156);
sendQuest("@whi@Many other people.", 8157);
sendQuestSomething(8143);
showInterface(8134);
flushOutStream();
}
And you got it!
tom- 04-11-2007
sounds awesome,although im not a mod,lol.
Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.