PDA

View Full Version : 508 Halloween Event - The only real event/quest one on 2010!



Mister Multi
November 4th, 2010, 20:31
Hello!

Welcome to my designed and coded Halloween Event to 508 servers.
This is already tested on my server, Multiscapeonline, and it's available to complete there until 7/11/2010.

1.The halloween event starts at Lumbridge Graveyard Coffin.. You can change the object yourself.
2. You will be teleported to the Draynor Manor, where you get a w.e. "radio message" from Grim Reaper.
3. He tells that you have 20 minutes to complete his game(the event).
(There is around 5 seconds, before you get to the house after clicking the coffin. You have w.e. "wtf nothing happens" or searching the coffin time.)
4. Grim Reaper gives you a book where is your jobs, which you need to do.
5. For first, you need to find 3 keys around the house. For example, you need a red key to get throught the door on the lower room.
When you have the red key and you go throught the door, there will be the second and the third keys in the around 5 rooms.
You need still the next key, a orange key to find the third key, a yellow key. When you have found the keys, there will be spawned a new box
in the house. The box will be spawned to w.e. trap room. If you go to the trap room, before you have found all the keys, you'll be locked in there
and you need to start the game again. You can't ever know when you need to go there.
6. When you are in the trap room and you have found all the keys and the new box has been spawned there. There is still other boxes, so you
can't know what is the real box. When you click the right box, you'll be teleported to the room where you got teleported before.
7. Grim Reaper talks to you sometime and says that you was a good at his jobs, but he wants you to be dead now.
So, he spawns Fear Reaper to kill you. He don't want to fight, because he want to see how you die.
8. If you killed the Fear Reaper, as you need to, you need to run out of the house in 30 seconds or you need to start the game again.
Also, if the time ends, you get out of the house or you die to the Fear Reaper, you need to start the game again.
As on the real life. If you do something wrong, there will be penalties.
9. When you got out of the house, you will get a reward, Jack Lantern mask and Scythe.


1. Initials and Timers

Open Player.java.

Add this into it:


public int halloweenevent = 0;
public int halloweencoffin = -1;
public int halloweenroom = -1;
public int halloweenfind = 0;
public int halloweentimer = -1;
public int halloweenlasttimer = -1;
public int halloweeneventcompleted = -1;

Add this to process:


if (halloweencoffin > 0) {
halloweencoffin--;
} if(halloweencoffin == 0) {
setCoords(3097, 3360, 1);
halloweenevent = 1;
halloweenroom = 5;
halloweencoffin = -1;
}
if (halloweenroom > 0) {
halloweenroom--;
} if(halloweenroom == 0 && halloweenevent == 1) {
Dialogue = 5432;
frames.showChatboxInterface(this, 241);
frames.animateInterfaceId(this, 9850, 241, 2);
frames.setNPCId(this, 6390, 241, 2);
frames.setString(this, "Grim Reaper", 241, 3);
frames.setString(this, "Hello! Welcome to my game!", 241, 4);
halloweenroom = -1;
}
if (halloweentimer > 0) {
halloweentimer--;
} if(halloweentimer == 0 && halloweenevent > 0) {
frames.sendMessage(this, "Oh no! The time ended!");
frames.showChatboxInterface(this, 241);
frames.animateInterfaceId(this, 9850, 241, 2);
frames.setNPCId(this, 6390, 241, 2);
frames.setString(this, "Grim Reaper", 241, 3);
frames.setString(this, "HAHAA! THE TIME ENDED!!", 241, 4);
Dialogue = 0;
setCoords(3221, 3219, 0);
halloweenevent = 0;
halloweentimer = -1;
}
if (halloweenlasttimer > 0) {
halloweenlasttimer--;
} if(halloweenlasttimer == 0 && halloweenevent > 0) {
frames.sendMessage(this, "Oh no! The time ended!");
frames.showChatboxInterface(this, 241);
frames.animateInterfaceId(this, 9850, 241, 2);
frames.setNPCId(this, 6390, 241, 2);
frames.setString(this, "Grim Reaper", 241, 3);
frames.setString(this, "HAHAA! THE TIME ENDED!!", 241, 4);
Dialogue = 0;
setCoords(3221, 3219, 0);
halloweenevent = 0;
halloweenlasttimer = -1;
}



2. Saving and Loading

Open FileManager.java.

Let's start with saveCharacter and savebackup voids.

Add this to the saveCharacter void:


stream.writeString("halloweenevent:" + p.halloweenevent);
stream.writeString("halloweencoffin:" + p.halloweencoffin);
stream.writeString("halloweenroom:" + p.halloweenroom);
stream.writeString("halloweenfind:" + p.halloweenfind);
stream.writeString("halloweentimer:" + p.halloweentimer);
stream.writeString("halloweenlasttimer:" + p.halloweenlasttimer);
stream.writeString("halloweeneventcompleted:" + p.halloweeneventcompleted);

Add this to the savebackup void:


stream.writeString("halloweenevent:" + p.halloweenevent);
stream.writeString("halloweencoffin:" + p.halloweencoffin);
stream.writeString("halloweenroom:" + p.halloweenroom);
stream.writeString("halloweenfind:" + p.halloweenfind);
stream.writeString("halloweentimer:" + p.halloweentimer);
stream.writeString("halloweenlasttimer:" + p.halloweenlasttimer);
stream.writeString("halloweeneventcompleted:" + p.halloweeneventcompleted);

Okey. The saving is completed.
Let's start with loadCharacter and loadbackup voids.

Add this to the loadCharacter void:


} else if (line.startsWith("halloweenevent:")) {
p.halloweenevent = Integer.parseInt(line.substring(15));
} else if (line.startsWith("halloweencoffin:")) {
p.halloweencoffin = Integer.parseInt(line.substring(16));
} else if (line.startsWith("halloweenroom:")) {
p.halloweenroom = Integer.parseInt(line.substring(14));
} else if (line.startsWith("halloweenfind:")) {
p.halloweenfind = Integer.parseInt(line.substring(14));
} else if (line.startsWith("halloweentimer:")) {
p.halloweentimer = Integer.parseInt(line.substring(15));
} else if (line.startsWith("halloweenlasttimer:")) {
p.halloweenlasttimer = Integer.parseInt(line.substring(19));
} else if (line.startsWith("halloweeneventcompleted:")) {
p.halloweeneventcompleted = Integer.parseInt(line.substring(24));

Add this to the loadbackup void:


} else if (line.startsWith("halloweenevent:")) {
p.halloweenevent = Integer.parseInt(line.substring(15));
} else if (line.startsWith("halloweencoffin:")) {
p.halloweencoffin = Integer.parseInt(line.substring(16));
} else if (line.startsWith("halloweenroom:")) {
p.halloweenroom = Integer.parseInt(line.substring(14));
} else if (line.startsWith("halloweenfind:")) {
p.halloweenfind = Integer.parseInt(line.substring(14));
} else if (line.startsWith("halloweentimer:")) {
p.halloweentimer = Integer.parseInt(line.substring(15));
} else if (line.startsWith("halloweenlasttimer:")) {
p.halloweenlasttimer = Integer.parseInt(line.substring(19));
} else if (line.startsWith("halloweeneventcompleted:")) {
p.halloweeneventcompleted = Integer.parseInt(line.substring(24));



3. Object Options

Open ObjectOption1.java.

Add this into the switch:


case 2145:
if(p.halloweencoffin < 6) {
p.halloweencoffin = 10;
}
break;

case 388:
p.frames.sendMessage(p, "Nothing interesting happens or you need to be nearer.");
break;

case 11498:
if(p.absX == 3108 && p.absY == 3361) {
p.setCoords(3108, 3366, 1);
}
if(p.absX == 3109 && p.absY == 3361) {
p.setCoords(3109, 3366, 1);
}
break;

case 11499:
if(p.absX == 3108 && p.absY == 3366) {
p.setCoords(3108, 3361, 0);
}
if(p.absX == 3109 && p.absY == 3366) {
p.setCoords(3109, 3361, 0);
}
break;

case 11470:
if(p.absX == 3106 && p.absY == 3368) {
if(Engine.playerItems.haveItem(p, 1543, 1)) {
p.setCoords(3106, 3369, 0);
} else {
p.frames.sendMessage(p, "You need a red key to go throught this door.");
return;
}
}
if(p.absX == 3106 && p.absY == 3369) {
if(Engine.playerItems.haveItem(p, 1543, 1)) {
p.setCoords(3106, 3368, 0);
} else {
p.frames.sendMessage(p, "You need a red key to go throught this door.");
return;
}
}
if(p.absX == 3119 && p.absY == 3356) {
if(Engine.playerItems.haveItem(p, 1544, 1)) {
p.setCoords(3120, 3356, 0);
} else {
p.frames.sendMessage(p, "You need an orange key to go throught this door.");
return;
}
}
if(p.absX == 3120 && p.absY == 3356) {
if(Engine.playerItems.haveItem(p, 1544, 1)) {
p.setCoords(3119, 3356, 0);
} else {
p.frames.sendMessage(p, "You need an orange key to go throught this door.");
return;
}
}
if(p.absX == 3118 && p.absY == 3356) {
if(Engine.playerItems.haveItem(p, 1544, 1)) {
p.setCoords(3119, 3356, 1);
} else {
p.frames.sendMessage(p, "You need an orange key to go throught this door.");
return;
}
}
if(p.absX == 3119 && p.absY == 3356) {
if(Engine.playerItems.haveItem(p, 1545, 1)) {
p.setCoords(3118, 3356, 1);
} else if(Engine.playerItems.haveItem(p, 1545, 0)) {
p.frames.sendMessage(p, "You need a yellow key to go throught this door.");
return;
}
}
if(p.absX == 3106 && p.absY == 3369) {
p.setCoords(3106, 3368, 0);
}
if(p.absX == 3106 && p.absY == 3368) {
p.setCoords(3106, 3369, 0);
}
if(p.absX == 3116 && p.absY == 3362) {
p.setCoords(3116, 3361, 1);
}
if(p.absX == 3116 && p.absY == 3361) {
p.setCoords(3116, 3361, 1);
}
if(p.absX == 3102 && p.absY == 3371) {
p.setCoords(3101, 3371, 0);
}
if(p.absX == 3101 && p.absY == 3371) {
p.setCoords(3102, 3371, 0);
}
if(p.absX == 3103 && p.absY == 3364) {
p.setCoords(3103, 3363, 0);
}
if(p.absX == 3103 && p.absY == 3363) {
p.setCoords(3103, 3364, 0);
}
if(p.absX == 3109 && p.absY == 3358) {
p.setCoords(3109, 3357, 0);
}
if(p.absX == 3109 && p.absY == 3357) {
p.setCoords(3109, 3358, 0);
}
break;

case 1:
if(p.absX == 3104 && p.absY == 3354) {
if(!Engine.playerItems.haveItem(p, 1543, 1)) {
Engine.playerItems.addItem(p, 1543, 1);
p.frames.sendMessage(p, "You got a red key.");
}
}
if(p.absX == 3104 && p.absY == 3355) {
if(!Engine.playerItems.haveItem(p, 1543, 1)) {
Engine.playerItems.addItem(p, 1543, 1);
p.frames.sendMessage(p, "You got a red key.");
}
}
if(p.absX == 3103 && p.absY == 3355) {
if(!Engine.playerItems.haveItem(p, 1543, 1)) {
Engine.playerItems.addItem(p, 1543, 1);
p.frames.sendMessage(p, "You got a red key.");
}
}
if(p.absX == 3097 && p.absY == 3369) {
if(!Engine.playerItems.haveItem(p, 1544, 1)) {
Engine.playerItems.addItem(p, 1544, 1);
p.frames.sendMessage(p, "You got an orange key.");
}
}
if(p.absX == 3098 && p.absY == 3369) {
if(!Engine.playerItems.haveItem(p, 1544, 1)) {
Engine.playerItems.addItem(p, 1544, 1);
p.frames.sendMessage(p, "You got an orange key.");
}
}
if(p.absX == 3098 && p.absY == 3370) {
if(!Engine.playerItems.haveItem(p, 1544, 1)) {
Engine.playerItems.addItem(p, 1544, 1);
p.frames.sendMessage(p, "You got an orange key.");
}
}
if(p.absX == 3125 && p.absY == 3356) {
if(!Engine.playerItems.haveItem(p, 1545, 1)) {
Engine.playerItems.addItem(p, 1545, 1);
p.frames.sendMessage(p, "You got a yellow key.");
p.halloweenevent = 3;
p.frames.createGlobalObject(1, 1, 3122, 3356, 0, 10);
}
}
if(p.absX == 3122 && p.absY == 3355) {
p.halloweenevent = 4;
Engine.newNPC(3649, 3094, 3358, 1, 3094 + 1, 3358 + 1, 3094 + -1, 3358 + -1, false);
p.setCoords(3100, 3358, 1);
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "I sent my impossible pet to kill you.", 241, 4);
p.Dialogue = 6432;
}
if(p.absX == 3123 && p.absY == 3356) {
p.halloweenevent = 4;
Engine.newNPC(3649, 3094, 3358, 1, 3094 + 1, 3358 + 1, 3094 + -1, 3358 + -1, false);
p.setCoords(3100, 3358, 1);
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "I sent my impossible pet to kill you.", 241, 4);
p.Dialogue = 6432;
}
if(p.absX == 3121 && p.absY == 3356) {
p.halloweenevent = 4;
Engine.newNPC(3649, 3094, 3358, 1, 3094 + 1, 3358 + 1, 3094 + -1, 3358 + -1, false);
p.setCoords(3100, 3358, 1);
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "I sent my impossible pet to kill you.", 241, 4);
p.Dialogue = 6432;
}
if(p.absX == 3122 && p.absY == 3357) {
p.halloweenevent = 4;
Engine.newNPC(3649, 3094, 3358, 1, 3094 + 1, 3358 + 1, 3094 + -1, 3358 + -1, false);
p.setCoords(3100, 3358, 1);
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "I sent my impossible pet to kill you.", 241, 4);
p.Dialogue = 6432;
}
if(p.absX != 3125 && p.absY != 3356 && p.absX != 3104 && p.absY != 3355 && p.absX != 3103 && p.absY != 3355 && p.absX != 3097 && p.absY != 3369 && p.absX != 3098 && p.absY != 3369 && p.absX != 3098 && p.absY != 3370 && p.absX != 3125 && p.absY != 3356 && p.absX != 3122 && p.absY != 3355 && p.absX != 3123 && p.absY != 3356 && p.absX != 3121 && p.absY != 3356 && p.absX != 3122 && p.absY != 3357) {
p.frames.sendMessage(p, "Nothing interesting happens or you need to be nearer.");
}
break;

case 134:
if(p.absX == 3108 && p.absY == 3354) {
if(p.halloweenevent == 5) {
p.setCoords(3108, 3353, 0);
p.frames.sendMessage(p, "Wow! You completed the event!");
p.Dialogue = 0;
p.halloweenevent = 6;
Engine.playerItems.addItem(p, 9920, 1);
Engine.playerItems.addItem(p, 1419, 1);
p.frames.showInterface(p, 277);
p.frames.setString(p, "Congratulations!", 277, 3);
p.frames.setString(p, "You have completed the Halloween event 2010!", 277, 4);
p.frames.setString(p, "", 277, 6);
p.frames.setString(p, "Rewards:", 277, 7);
p.frames.setString(p, "Jack lantern mask", 277, 10);
p.frames.setString(p, "Scythe", 277, 11);
p.frames.setString(p, "", 277, 12);
p.frames.setString(p, "", 277, 13);
p.frames.setString(p, "", 277, 14);
p.frames.setString(p, "", 277, 15);
p.frames.setString(p, "", 277, 16);
p.frames.setString(p, "", 277, 17);
p.frames.removeChatboxInterface(p);
p.halloweenlasttimer = -1;
p.halloweentimer = -1;
}
}
break;



4. Item Selecting

Open ItemSelect.java.

Add this into it:


case 292:
if(p.halloweenevent == 2) {
p.frames.showInterface(p, 275);
p.frames.setString(p, "MY GAME", 275, 2);
p.frames.setString(p, "", 275, 11);
p.frames.setString(p, "JOBS WHAT YOU NEED TO DO:", 275, 12);
p.frames.setString(p, "", 275, 13);
p.frames.setString(p, "FIRST:", 275, 14);
p.frames.setString(p, "FIND THREE KEYS. THEY ARE AROUND THE HOUSE.", 275, 15);
p.frames.setString(p, "WHEN YOU FIND THE LAST KEY..", 275, 16);
p.frames.setString(p, "THERE WILL BE A NEW BOX, WHAT YOU NEED TO OPEN.", 275, 17);
p.frames.setString(p, "", 275, 18);
p.frames.setString(p, "SECOND:", 275, 19);
p.frames.setString(p, "I WILL TELL IT LATER WHEN IM DECIDED IT. HAHAA!", 275, 20);
p.frames.setString(p, "", 275, 21);
p.frames.setString(p, "", 275, 22);
p.frames.setString(p, "THIRD:", 275, 23);
p.frames.setString(p, "I WILL TELL IT LATER WHEN IM DECIDED IT. HAHAA!", 275, 24);
p.frames.setString(p, "", 275, 25);
p.frames.setString(p, "", 275, 26);
p.frames.setString(p, "", 275, 27);
p.frames.setString(p, "", 275, 28);
p.frames.setString(p, "", 275, 29);
p.frames.setString(p, "", 275, 30);
p.frames.setString(p, "", 275, 31);
p.frames.setString(p, "", 275, 32);
p.frames.createGlobalObject(1, 1, 3103, 3354, 0, 10);
p.frames.createGlobalObject(1, 1, 3101, 3373, 0, 10);
p.frames.createGlobalObject(1, 1, 3109, 3369, 0, 10);
p.frames.createGlobalObject(1, 1, 3118, 3371, 0, 10);
p.frames.createGlobalObject(1, 1, 3113, 3362, 0, 10);
p.frames.createGlobalObject(1, 1, 3108, 3368, 0, 10);
p.frames.createGlobalObject(1, 0, 3110, 3365, 0, 10);
p.frames.createGlobalObject(1, 0, 3097, 3370, 0, 10);
p.frames.createGlobalObject(1, 0, 3117, 3373, 0, 10);
p.frames.createGlobalObject(1, 0, 3119, 3363, 0, 10);
p.frames.createGlobalObject(1, 0, 3126, 3356, 0, 10);
p.frames.createGlobalObject(1, 0, 3122, 3360, 0, 10);
p.frames.createGlobalObject(1, 0, 3104, 3362, 0, 10);
p.frames.createGlobalObject(1, 0, 3100, 3354, 0, 10);
p.frames.createGlobalObject(1, 0, 3107, 3357, 0, 10);
p.frames.createGlobalObject(1, 0, 3110, 3354, 0, 10);
p.frames.createGlobalObject(1, 1, 3111, 3359, 0, 10);
p.frames.createGlobalObject(1, 1, 3108, 3361, 0, 10);
p.frames.createGlobalObject(1, 1, 3109, 3354, 0, 10);
p.frames.createGlobalObject(1, 1, 3118, 3354, 0, 10);
}
if(p.halloweenevent == 3) {
p.frames.showInterface(p, 275);
p.frames.setString(p, "MY GAME", 275, 2);
p.frames.setString(p, "", 275, 11);
p.frames.setString(p, "JOBS WHAT YOU NEED TO DO:", 275, 12);
p.frames.setString(p, "", 275, 13);
p.frames.setString(p, "FIRST:", 275, 14);
p.frames.setString(p, "FIND THREE KEYS. THEY ARE AROUND THE HOUSE.", 275, 15);
p.frames.setString(p, "WHEN YOU FIND THE LAST KEY..", 275, 16);
p.frames.setString(p, "THERE WILL BE A NEW BOX, WHAT YOU NEED TO OPEN.", 275, 17);
p.frames.setString(p, "", 275, 18);
p.frames.setString(p, "SECOND:", 275, 19);
p.frames.setString(p, "I WILL TELL IT LATER WHEN IM DECIDED IT. HAHAA!", 275, 20);
p.frames.setString(p, "", 275, 21);
p.frames.setString(p, "", 275, 22);
p.frames.setString(p, "THIRD:", 275, 23);
p.frames.setString(p, "I WILL TELL IT LATER WHEN IM DECIDED IT. HAHAA!", 275, 24);
p.frames.setString(p, "", 275, 25);
p.frames.setString(p, "", 275, 26);
p.frames.setString(p, "", 275, 27);
p.frames.setString(p, "", 275, 28);
p.frames.setString(p, "", 275, 29);
p.frames.setString(p, "", 275, 30);
p.frames.setString(p, "", 275, 31);
p.frames.setString(p, "", 275, 32);
p.frames.createGlobalObject(1, 1, 3103, 3354, 0, 10);
p.frames.createGlobalObject(1, 1, 3101, 3373, 0, 10);
p.frames.createGlobalObject(1, 1, 3109, 3369, 0, 10);
p.frames.createGlobalObject(1, 1, 3118, 3371, 0, 10);
p.frames.createGlobalObject(1, 1, 3113, 3362, 0, 10);
p.frames.createGlobalObject(1, 1, 3108, 3368, 0, 10);
p.frames.createGlobalObject(1, 0, 3110, 3365, 0, 10);
p.frames.createGlobalObject(1, 0, 3097, 3370, 0, 10);
p.frames.createGlobalObject(1, 0, 3117, 3373, 0, 10);
p.frames.createGlobalObject(1, 0, 3119, 3363, 0, 10);
p.frames.createGlobalObject(1, 0, 3126, 3356, 0, 10);
p.frames.createGlobalObject(1, 0, 3122, 3360, 0, 10);
p.frames.createGlobalObject(1, 0, 3104, 3362, 0, 10);
p.frames.createGlobalObject(1, 0, 3100, 3354, 0, 10);
p.frames.createGlobalObject(1, 0, 3107, 3357, 0, 10);
p.frames.createGlobalObject(1, 0, 3110, 3354, 0, 10);
p.frames.createGlobalObject(1, 1, 3111, 3359, 0, 10);
p.frames.createGlobalObject(1, 1, 3108, 3361, 0, 10);
p.frames.createGlobalObject(1, 1, 3109, 3354, 0, 10);
p.frames.createGlobalObject(1, 1, 3118, 3354, 0, 10);
p.frames.createGlobalObject(1, 0, 3122, 3356, 1, 10);
}
if(p.halloweenevent == 4) {
p.frames.showInterface(p, 275);
p.frames.setString(p, "MY GAME", 275, 2);
p.frames.setString(p, "", 275, 11);
p.frames.setString(p, "JOBS WHAT YOU NEED TO DO:", 275, 12);
p.frames.setString(p, "", 275, 13);
p.frames.setString(p, "FIRST:", 275, 14);
p.frames.setString(p, "SEARCH THREE KEYS FROM BOXES.", 275, 15);
p.frames.setString(p, "WHEN YOU FIND THE LAST KEY..", 275, 16);
p.frames.setString(p, "THERE WILL BE A NEW BOX, WHAT YOU NEED TO OPEN.", 275, 17);
p.frames.setString(p, "", 275, 18);
p.frames.setString(p, "SECOND:", 275, 19);
p.frames.setString(p, "YOU NEED TO FIGHT WITH MY PET.", 275, 20);
p.frames.setString(p, "I WARN, YOU CAN NEVER KILL HIM. HAHAA!", 275, 21);
p.frames.setString(p, "", 275, 22);
p.frames.setString(p, "THIRD:", 275, 23);
p.frames.setString(p, "I WILL TELL IT LATER WHEN IM DECIDED IT. HAHAA!", 275, 24);
p.frames.setString(p, "", 275, 25);
p.frames.setString(p, "", 275, 26);
p.frames.setString(p, "", 275, 27);
p.frames.setString(p, "", 275, 28);
p.frames.setString(p, "", 275, 29);
p.frames.setString(p, "", 275, 30);
p.frames.setString(p, "", 275, 31);
p.frames.setString(p, "", 275, 32);
}
if(p.halloweenevent == 5) {
p.frames.showInterface(p, 275);
p.frames.setString(p, "MY GAME", 275, 2);
p.frames.setString(p, "", 275, 11);
p.frames.setString(p, "JOBS WHAT YOU NEED TO DO:", 275, 12);
p.frames.setString(p, "", 275, 13);
p.frames.setString(p, "FIRST:", 275, 14);
p.frames.setString(p, "SEARCH THREE KEYS FROM BOXES.", 275, 15);
p.frames.setString(p, "WHEN YOU FIND THE LAST KEY..", 275, 16);
p.frames.setString(p, "THERE WILL BE A NEW BOX, WHAT YOU NEED TO OPEN.", 275, 17);
p.frames.setString(p, "", 275, 18);
p.frames.setString(p, "SECOND:", 275, 19);
p.frames.setString(p, "I WILL TELL IT LATER WHEN IM DECIDED IT. HAHAA!", 275, 20);
p.frames.setString(p, "", 275, 21);
p.frames.setString(p, "", 275, 22);
p.frames.setString(p, "THIRD:", 275, 23);
p.frames.setString(p, "RRAAAAAARRRGGGHHH!!! RUN AWAY FROM HERE!!!", 275, 24);
p.frames.setString(p, "YOU HAVE 30 SECONDS TO RUN AWAY!!!", 275, 25);
p.frames.setString(p, "OR YOU LOSE THE GAME! RAAARRGGHH!!", 275, 26);
p.frames.setString(p, "", 275, 27);
p.frames.setString(p, "", 275, 28);
p.frames.setString(p, "", 275, 29);
p.frames.setString(p, "", 275, 30);
p.frames.setString(p, "", 275, 31);
p.frames.setString(p, "", 275, 32);
}
break;



5. Packet Managering

Open PacketManager.java.

Add this into it:


else
if(p.Dialogue == 5432) {
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "There is jobs what you need to do.", 241, 4);
p.Dialogue = 5433;
}
else
if(p.Dialogue == 5433) {
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "You have 20 minutes time to do the jobs.", 241, 4);
p.Dialogue = 5434;
}
else
if(p.Dialogue == 5434) {
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "If the time ends and the jobs aren't done..", 241, 4);
p.Dialogue = 5435;
}
else
if(p.Dialogue == 5434) {
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "..You will be fired.", 241, 4);
p.Dialogue = 5435;
}
else
if(p.Dialogue == 5435) {
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "You can start the game again..", 241, 4);
p.Dialogue = 5436;
}
else
if(p.Dialogue == 5436) {
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "..but from THE BEGINNING!", 241, 4);
p.Dialogue = 5437;
}
else
if(p.Dialogue == 5437) {
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "I will give you a book.", 241, 4);
p.Dialogue = 5438;
}
else
if(p.Dialogue == 5438) {
Engine.playerItems.addItem(p, 292, 1);
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "There is listed your jobs, but don't read it yet.", 241, 4);
p.Dialogue = 5439;
}
else
if(p.Dialogue == 5439) {
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "Okey.. If you die or escape..", 241, 4);
p.Dialogue = 5440;
}
else
if(p.Dialogue == 5440) {
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "..You need START FROM THE BEGINNING! HAHAA!", 241, 4);
p.Dialogue = 5441;
}
else
if(p.Dialogue == 5441) {
p.frames.sendMessage(p, "Read the book to see the objects.");
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "Okey. Time starts now! Go! HAHAA!", 241, 4);
p.halloweenevent = 2;
p.halloweentimer = 1800000;
p.Dialogue = 0;
}
else
if(p.Dialogue == 6432) {
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "Now I can see how you die. HAHAA!", 241, 4);
p.Dialogue = 6433;
}
else
if(p.Dialogue == 6433) {
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "Attack to my pet! HAHAA!", 241, 4);
p.Dialogue = 0;
}
else
if(p.Dialogue == 6435) {
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "RUN OUT! YOU HAVE 30 SECOND!", 241, 4);
p.Dialogue = 6436;
}
else
if(p.Dialogue == 6436) {
p.halloweenlasttimer = 60;
p.frames.sendMessage(p, "Run out of the house. You have 30 seconds!");
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "GO IDIOT!! RAARRGGHH!!", 241, 4);
p.Dialogue = 0;
}


6. Login

Open Login.java.

Add this into the login:


p.frames.createGlobalObject(1, 1, 3103, 3354, 0, 10);
p.frames.createGlobalObject(1, 1, 3101, 3373, 0, 10);
p.frames.createGlobalObject(1, 1, 3109, 3369, 0, 10);
p.frames.createGlobalObject(1, 1, 3118, 3371, 0, 10);
p.frames.createGlobalObject(1, 1, 3113, 3362, 0, 10);
p.frames.createGlobalObject(1, 1, 3108, 3368, 0, 10);
p.frames.createGlobalObject(1, 0, 3110, 3365, 0, 10);
p.frames.createGlobalObject(1, 0, 3097, 3370, 0, 10);
p.frames.createGlobalObject(1, 0, 3117, 3373, 0, 10);
p.frames.createGlobalObject(1, 0, 3119, 3363, 0, 10);
p.frames.createGlobalObject(1, 0, 3126, 3356, 0, 10);
p.frames.createGlobalObject(1, 0, 3122, 3360, 0, 10);
p.frames.createGlobalObject(1, 0, 3104, 3362, 0, 10);
p.frames.createGlobalObject(1, 0, 3100, 3354, 0, 10);
p.frames.createGlobalObject(1, 0, 3107, 3357, 0, 10);
p.frames.createGlobalObject(1, 0, 3110, 3354, 0, 10);
p.frames.createGlobalObject(1, 1, 3111, 3359, 0, 10);
p.frames.createGlobalObject(1, 1, 3108, 3361, 0, 10);
p.frames.createGlobalObject(1, 1, 3109, 3354, 0, 10);
p.frames.createGlobalObject(1, 1, 3118, 3354, 0, 10);
if(p.halloweenevent == 3) {
p.frames.createGlobalObject(1, 2, 3122, 3356, 0, 10);
}


7. PlayerNpcCombat

Open PlayerNpcCombat.java.

Add this into it:


if(n.isDead == true)
{
if(n.npcType == 3649)
{
if(p.assaultguardtimer == 0)
{
p.halloweenevent = 5;
p.frames.showChatboxInterface(p, 241);
p.frames.animateInterfaceId(p, 9850, 241, 2);
p.frames.setNPCId(p, 6390, 241, 2);
p.frames.setString(p, "Grim Reaper", 241, 3);
p.frames.setString(p, "RAAARRGGHHH!! IDIOT!!", 241, 4);
p.Dialogue = 6435;
}
}
}

It's finished. Please, post the errors here.

Stacx
November 4th, 2010, 20:36
Sir, you should stop making tutorials if you can't teach people anything.

Add this into the initials:
initials lol wtf

kaos
November 4th, 2010, 21:12
Well err this section is for less than 508 i think.... Nice quest though.

wyrelade
January 6th, 2011, 21:02
Any Screenshots?

Jess
January 6th, 2011, 21:06
Any Screenshots?

Why have you bumped a thread from 2 months ago..

Cart
January 6th, 2011, 21:11
Why have you bumped a thread from 2 months ago..

its a tutorial, get over it.

Kedo1111
January 7th, 2011, 02:23
Looks good.

Jami
October 4th, 2011, 17:29
I am improving this on this year. Feel free to use this, but you must give me credits. :)