PDA

View Full Version : All barrows tunnels z508/525



Nathan'
June 19th, 2010, 06:14
30% credits go to soul banner. I decided to further develop the code

Difficulty : 1/10 - Copy and Paste
Files : Itemselect.java,player.java, objectoption1.java

Ok in itemselect.java
add this

public boolean veracTomb;
public boolean ahrimTomb;
public boolean karilTomb;
public boolean guthanTomb;
public boolean dharokTomb;
public boolean toragTomb;;

Then Underneath any break; add

case 952:
if(VeracTomb == true){
p.teleportTo(3571, 9705, 3, 4, 0, 831, -1, -1, 0, -1, 0); // change this your own to set coords instead to make it work :D
}
if(AhrimTomb == true){
p.teleportTo(3557, 9699, 3, 4, 0, 831, -1, -1, 0, -1, 0); // change this your own to set coords instead to make it work :D
}
if(DharokTomb == true){
p.teleportTo(3553, 9174, 3, 4, 0, 831, -1, -1, 0, -1, 0); // change this your own to set coords instead to make it work :D
}
if(GuthanTomb == true){
p.teleportTo(3535, 9705, 3, 4, 0, 831, -1, -1, 0, -1, 0); // change this your own to set coords instead to make it work :D
}
if(ToragTomb == true){
p.teleportTo(3572, 9688, 3, 4, 0, 831, -1, -1, 0, -1, 0); // change this your own to set coords instead to make it work :D
}
if(KarilTomb == true){
p.teleportTo(3553, 9684, 3, 4, 0, 831, -1, -1, 0, -1, 0); // change this your own to set coords instead to make it work :D
}
break;

^ means if you clicked on the spade ( item id 952 )
you will do the dig emote ( 831 )
and then teleport to chosen chamber

in player.java
add this


public boolean veracTomb() {
return (absX >= 3569 && absX <= 3578 && absY >= 3292 && absY <= 3302);
}
public boolean karilTomb() {
return (absX >= 3562 && absX <= 3569 && absY >= 3271 && absY <= 3280);
}
public boolean guthancTomb() {
return (absX >= 3573 && absX <= 3582 && absY >= 3279 && absY <= 3286);
}
public boolean ahrimTomb() {
return (absX >=3562 && absX <= 3569 && absY >= 3286 && absY <= 3293);
}
public boolean toragTomb() {
return (absX >= 3551 && absX <= 3557 && absY >= 3820 && absY <= 3286);
}
public boolean dharokTomb() {
return (absX >= 3571 && absX <= 3579 && absY >= 3292 && absY <= 3301);
}


Now to make the stairs work

Open ObjectOption1.java and add

//Start of barrows stairs
case 6707://verac
p.setCoords(3557, 3296, 0);
break;
case 6706://torag
p.setCoords(3554, 3283, 0);
break;
case 6705://karil
p.setCoords(3566, 3276, 0);
break;
case 6704://guthan
p.setCoords(3577, 3283, 0);
break;
case 6703://dharok
p.setCoords(3575, 3298, 0);
break;
case 6702://ahrim
p.setCoords(3565, 3289, 0);
break;
//End of barrows stairs

Also Add in ObjectOption1 this - it spawns the brothers when the coffin is clicked


//Start of barrows
case 6821://ahrim
p.getActionsender().sendMessage(p, "Ahrim appears out of the coffin!");
Server.engine.newNPC(2025, 3553, 96*** 3, 0, 0, 0, 0, false);
break;
case 6772://torag
p.getActionsender().sendMessage(p, "Torag appears out of the coffin!");
Server.engine.newNPC(2029, 3566, 9686, 3, 0, 0, 0, 0, false);
break;
case 6822://karil
p.getActionsender().sendMessage(p, "Karil appears out of the coffin!");
Server.engine.newNPC(2028, 3554, 9682, 3, 0, 0, 0, 0, false);
break;
case 6773://guthan
p.getActionsender().sendMessage(p, "Guthan appears out of the coffin!");
Server.engine.newNPC(2027, 3536, 9701, 3, 0, 0, 0, 0, false);
break;
case 6823://verac
p.getActionSender().sendMessage(p, "Verac appears out of the coffin!");
Server.engine.newNPC(2030, 3570, 9706, 3, 0, 0, 0, 0, false);
break;
case 6771://Dharok
p.getActionSender().sendMessage(p, "Verac appears out of the coffin!");
Server.engine.newNPC(2026, 3553, 9714, 3, 0, 0, 0, 0, false);
break;


Add the drops to the monsters by editing the Npcdrops.CFG file

If you want me to further continue on this tutorial please leave a comment.



Constructive feedback is crucial

aTime
June 19th, 2010, 06:44
Constructive feedback

-Don't post things without testing.

I'm not even sure if this works 100% of if it works at all. I simply done this off the top of my head

-Lowercase the first letter of your feilds/methods:


VeracTomb


Should be


veracTomb


-Redundancy


public boolean VeracTomb = false;
public boolean AhrimTomb = false;
public boolean KarilTomb = false;
public boolean GuthanTomb = false;
public boolean DharokTomb = false;
public boolean ToragTomb = false;


The


= false;


is not needed


public boolean veracTomb;
public boolean ahrimTomb;
public boolean karilTomb;
public boolean guthanTomb;
public boolean dharokTomb;
public boolean toragTomb;


^ Is just fine.

Again with this statement:


public boolean guthanctomb() {
if((absX >= xxxx && absX <= xxxx && absY >= yyyy && absY <= yyyy))
return true;
else
return false;
}


Return the actual statement,


public boolean guthanctomb() {
return (absX >= xxxx && absX <= xxxx && absY >= yyyy && absY <= yyyy);
}


Besides that encapsulation and conventions would help.

With all that said, its a incredibly small base not worthy of the copy and paste section. (Dont take it the wrong way). Seeing as you didn't even add the actual coordinates. all you did was tell people the height(teleport method), dig emote, and create some sub par methods.

Nathan'
June 19th, 2010, 06:46
Yeah im kinda new so all feedback is great. Ill edit the post.

aTime
June 19th, 2010, 06:48
Yeah im kinda new so all feedback is great. Ill edit the post.

Yep. Keep learning.

EDIT:


public boolean veractomb() {
if((absX >= 3553 && absX <= 3559 && absY >= 3301 && absY <= 3294));
}


You read my post wrong :/, return the statement,


public boolean veractomb() {
return(absX >= 3553 && absX <= 3559 && absY >= 3301 && absY <= 3294);
}


also capitalize the second word on in the feild/method.


private void superSexyUber() {
}

Nathan'
June 19th, 2010, 07:19
removed

Nathan'
June 19th, 2010, 09:11
Bump ~~~

Break
June 19th, 2010, 09:13
I love it, Will defintly use when I will move to 508 loading 525 cache.
Great job, gg 9/10.

Nathan'
June 19th, 2010, 09:14
If you want i can add a method where each monster drops keys. And in the last chamber u go into the chest room :P jus a suggestion

Break
June 19th, 2010, 09:18
I can do it, I was just thinking that if I will make a new project, A 508 loading 525 cache, I'll use the coords that you gave :P.
I needed them last time I coded a 508 loading 525 cache server.

So thanks.

Nathan'
June 19th, 2010, 09:19
No problem

Nathan
June 20th, 2010, 13:08
wtf i released better 1. with random barrow chest loot. working killcount with interface. . This isnt close to being finished sorry. pfftscape released but i fixed it up much better.

Nathan'
June 20th, 2010, 14:14
I didnt wana spoonfead the working chest. and as you stated the kill count didnt work. And the interface isnt really hard to show

Nathan
June 20th, 2010, 14:25
I didnt wana spoonfead the working chest. and as you stated the kill count didnt work. And the interface isnt really hard to show

my killcount works perfect....

XxBryantD
June 20th, 2010, 16:03
looks great

Gary
October 11th, 2010, 01:46
public boolean veracTomb;
public boolean ahrimTomb;
public boolean karilTomb;
public boolean guthanTomb;
public boolean dharokTomb;
public boolean toragTomb;;


That's going to throw a lot of noobs off course.

Nathan
October 11th, 2010, 02:17
That's going to throw a lot of noobs off course.

randomer?