PDA

View Full Version : [317][508] Adding Custom Wilderness Training[317][508]



Techn0fev3r
June 17th, 2010, 21:54
Difficulty: 2/10

Changes: Client.java, shop.cfg, autospawn.cfg, npchandler, item2.java, shop.cfg

Credits to: Me 50% for Editing and Testing on my server, Nol 25% for the base codes i used and 25% to My friend for finding the base
Need basic java knowledge

Client.Java

Search for "Case 409"

Add this

Code: [Select]
case 409:
case 10638:
if(actionTimer == 0) {
sendMessage("You start praying..");
addSkillXP((7000*playerLevel[5]), 5);
addItem(4832, 1);
setAnimation(1979);
actionTimer = 15;
sendMessage("The gods hear you and reward you!");

If you cant find case 409, try case 2643:

Place it after that

Step 2: Search for

public void newO

You should see something like below

makeGlobalObject(3255,3431,2213,0,10);// something

After the last one add this



makeGlobalObject(3151,3673,2213,-3,10);// Bank booth wild
makeGlobalObject(3151,3674,2213,-3,10);// Bank booth wild
makeGlobalObject(3151,3675,2213,-3,10);// Bank booth wild
makeGlobalObject(3151,3676,2213,-3,10);// Bank booth wild
makeGlobalObject(3151,3677,2213,-3,10);// Bank booth wild
makeGlobalObject(3151,3678,2213,-3,10);// Bank booth wild
makeGlobalObject(3157,3666,409,0,10);// Prayer Altar = EXP
makeGlobalObject(3139,3675,2106,0,10);// Rune Rocks
makeGlobalObject(3142,3671,2106,0,10);// Rune Rocks
makeGlobalObject(3139,3678,2106,0,10);// Rune Rocks
makeGlobalObject(3146,3667,2106,0,10);// Rune Rocks
makeGlobalObject(3146,3673,2105,0,10);// Addy rocks
makeGlobalObject(3145,3676,2105,0,10);// Addy rocks
makeGlobalObject(3143,3679,2105,0,10);// Addy rocks
makeGlobalObject(3141,3677,2105,0,10);// Addy rocks
makeGlobalObject(3139,3678,2105,0,10);// Addy rocks
makeGlobalObject(3143,3667,2103,0,10);// Mith Rocks
makeGlobalObject(3141,3667,2103,0,10);// Mith Rocks
makeGlobalObject(3143,3664,2103,0,10);// Mith Rocks
makeGlobalObject(3146,3669,2103,0,10);// Mith Rocks
makeGlobalObject(3148,3672,2103,0,10);// Mith Rocks
makeGlobalObject(3140,3671,2096,0,10);// Coal
makeGlobalObject(3145,3678,2096,0,10);// Coal
makeGlobalObject(3145,3675,2096,0,10);// Coal
makeGlobalObject(3145,3673,2096,0,10);// Coal
makeGlobalObject(3145,3671,2096,0,10);// Coal
makeGlobalObject(3142,3673,2096,0,10);// Coal
makeGlobalObject(3143,3676,2096,0,10);// Coal
makeGlobalObject(3144,3675,2096,0,10);// Coal
makeGlobalObject(3143,3673,2096,0,10);// Coal
makeGlobalObject(3143,3674,2096,0,10);// Coal
makeGlobalObject(3166,3673,1306,0,10);// Magic Tree
makeGlobalObject(3171,3662,1306,0,10);// Magic Tree
makeGlobalObject(3179,3669,1306,0,10);// Magic Tree
makeGlobalObject(3179,3679,1306,0,10);// Magic Tree
makeGlobalObject(3151,3684,2562,0,10);// Gem Stall
makeGlobalObject(3155,3673,2467,0,10);// Portal 1
makeGlobalObject(3157,3673,2467,0,10);// Portal 2
makeGlobalObject(3159,3673,2467,0,10);// Portal 3
makeGlobalObject(3159,3666,859,0,10);// Skull on post
makeGlobalObject(3156,3666,859,0,10);// skull on post

Dont forget portal 1 2 3

Autospawn.cfg

At the bottom of autospawn.cfg put this
Code: [Select]
//Wild training camp//
spawn = 557 3171 3664 0 3171 3664 3171 3664 1 Herblore Shop
spawn = 542 3179 3681 0 3179 3681 3179 3681 1 Wildy Rogue Shop
spawn = 559 3149 3668 0 3149 3668 3149 3668 1 Mining shop
spawn = 1615 3158 3678 0 3158 3678 3158 3678 2 Abyssal Demon - 87
spawn = 1615 3172 3686 0 3172 3686 3172 3686 2 Abyssal Demon - 88
spawn = 1615 3161 3683 0 3161 3683 3161 3683 2 Abyssal Demon - 89
spawn = 1615 3177 3665 0 3047 10343 3047 10343 2 Abyssal Demon - 90
spawn = 1615 3175 3660 0 3046 10341 3046 10341 2 Abyssal Demon - 91

Shops.cfg

Add these shops

Code: [Select]
shop = 19 Mining_Shop 2 2 1265 100 1267 100 1269 100 1273 100 1271 100 1275 1 5013 100
shop = 17 Herb_Shop 2 2 257 100 251 100 231 100 255 100 199 100 249 100 233 100 233 100 227 1000
shop = 27 Wilderness_Rogue_shop 2 2 5553 10 5554 10 5555 10 5556 10 5557 10 1712 100

Directing Portal 1 2 3

Now you have the portals but they need to teleport you somewhere

Client.java


Search for OBJECT CLICK ONE

Add this after
Code: [Select]
if (objectX == 3155 && objectY == 3673) // Wild Training Portal 1
{
teleportToX = THE X TELE CORD;
teleportToY = THE Y TELE CORD;
}
if (objectX == 3157 && objectY == 3673) // Wild Training Portal 2
{
teleportToX = THE X TELE CORD;
teleportToY = THE Y TELE CORD;
}
if (objectX == 3159 && objectY == 3673) // Wild Training Portal 3
{
teleportToX = THE X TELE CORD;
teleportToY = THE Y TELE CORD;
}

Now to Add drops to the abyssal demons

Open NPChandler and search for "abyssal"
If you are missing it add the code below
Code: [Select]
}
if(npcs[NPCID].npcType == 1615) {
ItemHandler.addItem(Item2.randomAbyssal(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);

Item2.java

Search for: public static int abyssal

if you dont have it add it, if you do delete it

add this in its place
Code: [Select]
public static int abyssal[] = {995,995,995,995,995,995,995,995,995,995,995,995,9 95,995,995,995,995,995,995,995,995,995,995,995,995 ,
995,995,995,995
,995,995,995,995,995,995,995,995,995,995,995,995,9 95,995,995,995,995,995,995,995,995,995,995,995,995 ,
995,995,995,995,995,995,995,3140,3140,3140
,3140,4131,4131,4131,4131,4131,4131,4131,4131,4151 ,4151,4151,4151,4151,4151,4151,4151,4151,4151,4151 ,
4151,4151,4151,4151,4151,4151,4151,4151,
4151,4151,4151,4151,4151,4151,4151,4151,4151,4151, 4151,4151,4151,4088,4088,4088,4088,4088,4088,4088, 4088,
4088,4088,4088,4088,4088};

public static int randomAbyssal()
{
return abyssal[(int)(Math.random()*abyssal.length)];
}

Now you should have a 100% working Wilderness training area!!



-Techn0fev3r

BTW im RuneSpace on MoparScape Forums

XxBryantD
June 19th, 2010, 01:45
pics?

jamie
June 19th, 2010, 05:14
I like this pretty good.

XxBryantD
June 20th, 2010, 16:46
good job