Before anyone says this could be improved, yes I do agree, but this is strictly made for beginners.
Alright, firstly go to DialogueHandler.java
Code:
case 310:
sendNpcChat2("Thank you for helping me with the quest.",
"I no longer need help!", c.talkingNpc, "Cook");
c.nextChat = 0;
break;
case 309:
sendNpcChat(
"'Maybe, but I won't be holding my breath.", c.talkingNpc, "Cook");
c.nextChat = 0;
c.getPA().showInterface(12140);
c.getItems().addItem(995, 2000000);
c.Quest = 2;
break;
case 308:
sendNpcChat2("Well, maybe one day I'll be important enough to sit on",
"the Duke's table.", c.playerId, ""+c.playerName+"");
c.nextChat = 309;
break;
case 307:
sendNpcChat2("I'm afraid not, only the big cheeses get to dine with the",
"Duke.", c.talkingNpc, "Cook");
c.nextChat = 308;
break;
case 306:
sendNpcChat(
"So do I get to go to the Duke's Party?", c.playerId, ""+c.playerName+"");
c.nextChat = 307;
break;
case 305:
sendNpcChat2("You've brought me everything I need! I am saved!",
"thank you!", c.talkingNpc, "Cook");
c.nextChat = 306;
break;
case 304:
sendNpcChat(
"Yes, I have them here!", c.playerId, ""+c.playerName+"");
c.nextChat = 305;
break;
case 303:
sendNpcChat(
"'How are you getting on with finding the ingredients?", c.talkingNpc, "Cook");
c.nextChat = 304;
break;
case 302:
sendNpcChat2("I am a real cook! I haven't got time to be chatting",
"about Culinary Fashion. I am in desperate need of help!", c.talkingNpc, "Cook");
c.nextChat = 279;
break;
case 301:
sendNpcChat2("The whole hat, apron, stripey trousers ensemble - it",
"works. It makes you look like a real cook.", c.playerId, ""+c.playerName+"");
c.nextChat = 302;
break;
case 300:
sendNpcChat(
"'It's all standard cook's issue uniform...", c.talkingNpc, "Cook");
c.nextChat = 301;
break;
case 299:
sendNpcChat(
"Still, suits you. The trousers are pretty special to.", c.playerId, ""+c.playerName+"");
c.nextChat = 300;
break;
case 298:
sendNpcChat(
"'Err thank you. It's pretty ordinary cooks hat really.", c.talkingNpc, "Cook");
c.nextChat = 299;
break;
case 297:
sendNpcChat(
"Nice hat!", c.playerId, ""+c.playerName+"");
c.nextChat = 298;
break;
case 296:
sendNpcChat2("No, I'm not. The world is caving in around me - I am",
"overcome by dark feelings of implending doom.", c.talkingNpc, "Cook");
c.nextChat = 279;
break;
case 295:
sendNpcChat(
"You don't look very happy.", c.playerId, ""+c.playerName+"");
c.nextChat = 296;
break;
case 294:
sendNpcChat(
"*sniff* Don't talk to me about cakes...", c.talkingNpc, "Cook");
c.nextChat = 279;
break;
case 293:
sendNpcChat(
"You're a cook, why don't you bake me a cake?", c.playerId, ""+c.playerName+"");
c.nextChat = 294;
break;
case 292:
sendNpcChat(
"I've got all the information I need, Thanks.", c.playerId, ""+c.playerName+"");
c.Quest = 1;
c.nextChat = 0;
break;
case 291:
sendNpcChat(
"But any chicken should lay eggs.", c.talkingNpc, "Cook");
c.nextChat = 286;
break;
case 290:
sendNpcChat2("I normally get my eggs from the Groats' farm, on the",
"other side of the river.", c.talkingNpc, "Cook");
c.nextChat = 291;
break;
case 289:
sendNpcChat2("Talk to Gillie Groats, she looks after the Dairy cows",
"she'll tell you everything you need to know about milking cows.", c.talkingNpc, "Cook");
c.nextChat = 286;
break;
case 288:
sendNpcChat2("There is a cattle field on the other side of the river,",
"just across the road from the Groats' Farm.", c.talkingNpc, "Cook");
c.nextChat = 289;
break;
case 287:
sendNpcChat(
"I think there just might be some flour laying around here.", c.talkingNpc, "Cook");
c.nextChat = 286;
break;
case 285:
sendNpcChat(
"So where do I find these ingredients then?", c.playerId, ""+c.playerName+"");
c.nextChat = 286;
break;
case 284:
sendNpcChat2("Oh, thank you, thank you. I need milk, an egg and",
"flour. I'd be very grateful if you can get them for me.", c.talkingNpc, "Cook");
c.nextChat = 285;
break;
case 283:
sendNpcChat(
"Yes, I'll help you.", c.playerId, ""+c.playerName+"");
c.nextChat = 284;
break;
case 282:
sendOption2("I'm always happy to help a cook in distress.", "I can't right now. Maybe later.");
c.dialogueAction = 282;
c.nextChat = 0;
break;
case 281:
sendNpcChat4(
"I've forgotten to buy the ingredients. I'll never get",
"them in time now. He'll sack me! What will I do? I have",
"four children and a goat to look after. Would you help",
"me? please?", c.talkingNpc, "Cook");
c.nextChat = 282;
break;
case 280:
sendNpcChat3(
"Oh dear, oh dear, oh dear, I'm in a terrible terrible",
"mess! It's the Duke's birthday today, and I should be",
"making him a lovely big birthday cake.", c.talkingNpc, "Cook");
c.nextChat = 281;
break;
case 279:
sendNpcChat(
"What's wrong?", c.playerId, ""+c.playerName+"");
c.nextChat = 280;
break;
case 278:
sendNpcChat(
"What am I to do?", c.talkingNpc, "Cook");
c.nextChat = 274;
break;
case 286:
sendOption4("Where do I find some flour?","How about milk?", "And eggs? Where are they found?", "Actually, I know where to find this stuff.");
c.dialogueAction = 286;
c.teleAction = -1;
break;
case 274:
sendOption4("What's wrong?","Can you make me a cake?", "You don't look very happy.", "Nice hat!");
c.dialogueAction = 274;
c.teleAction = -1;
break;
If you don't have NpcChat 1, 2 and 3, find
Code:
/*
* Npc Chatting
*/
Under that add:
Code:
private void sendNpcChat2(String s, String s1, int ChatNpc, String name) {
c.getPA().sendFrame200(4888, 591);
c.getPA().sendFrame126(name, 4889);
c.getPA().sendFrame126(s, 4890);
c.getPA().sendFrame126(s1, 4891);
c.getPA().sendFrame75(ChatNpc, 4894);
c.getPA().sendFrame164(4887);
}
private void sendNpcChat3(String s, String s1, String s2, int ChatNpc, String name) {
c.getPA().sendFrame200(4894, 591);
c.getPA().sendFrame126(name, 4895);
c.getPA().sendFrame126(s, 4896);
c.getPA().sendFrame126(s1, 4897);
c.getPA().sendFrame126(s2, 4898);
c.getPA().sendFrame75(ChatNpc, 4894);
c.getPA().sendFrame164(4893);
}
private void sendNpcChat(String s, int ChatNpc, String name) {
c.getPA().sendFrame200(4883, 591);
c.getPA().sendFrame126(name, 4884);
c.getPA().sendFrame126(s, 4885);
c.getPA().sendFrame75(ChatNpc, 4883);
c.getPA().sendFrame164(4882);
}
Now go to ActionHandler.java, and under "public void firstClickNpc(int i) {" add
Code:
case 278:
if (c.Quest == 0) {
c.getDH().sendDialogues(278, i);
}
if (c.getItems().playerHasItem(1933, 1)) {
if (c.getItems().playerHasItem(1927, 1)) {
if (c.getItems().playerHasItem(1944, 1)) {
c.getDH().sendDialogues(303, i);
}
}
}
if (c.Quest == 2) {
c.getDH().sendDialogues(310, i);
}
break;
Now go to Client.java, and under public int lowMemoryVersion = 0; , add
Code:
public int Quest = 0;
Now to to ClickingButtons.java, and under case 9178, and under that add
Code:
npcType = 278; //cook
if(c.dialogueAction == 286) {
c.getDH().sendDialogues(287, npcType);
}
npcType = 278; //cook
if(c.dialogueAction == 274) {
c.getDH().sendDialogues(279, npcType);
}
Now find case 9179, and under that add
Code:
npcType = 278; //cook
if(c.dialogueAction == 274) {
c.getDH().sendDialogues(293, npcType);
}
npcType = 278; //cook
if(c.dialogueAction == 286) {
c.getDH().sendDialogues(288, npcType);
}
Now find case 9180, and under that add
Code:
npcType = 278; //cook
if(c.dialogueAction == 274) {
c.getDH().sendDialogues(295, npcType);
}
npcType = 278; //cook
if(c.dialogueAction == 286) {
c.getDH().sendDialogues(290, npcType);
}
Now find case 9181, and under that add
Code:
npcType = 278; //cook
if(c.dialogueAction == 274) {
c.getDH().sendDialogues(297, npcType);
}
npcType = 278; //cook
if(c.dialogueAction == 286) {
c.getDH().sendDialogues(292, npcType);
}
Now find case 9157, and under that add
Code:
npcType = 278; //cook
if(c.dialogueAction == 282) {
c.getDH().sendDialogues(283, npcType);
}
Now find c.dialogueAction = 0; and under that you should find
Code:
c.getPA().removeAllWindows();
Delete that because it will close your dialogue interface once you click continue.
Now go to PlayerSave.java, and under p.heightLevel = Integer.parseInt(token2); add
Code:
} else if (token.equals("character-Quest")) {
p.Quest = Integer.parseInt(token2);
Now find .toString(p.heightLevel).length()); and under that add
Code:
characterfile.newLine();
characterfile.write("character-Quest= ", 0, 16);
characterfile.write(Integer.toString(p.Quest), 0, Integer
.toString(p.Quest).length());
Now for the last, go to spawn-config.cfg and add this somewhere:
Code:
spawn = 278 3208 3215 0 1 0 0 0 0 Cook
Now, if you get any errors please post them here and I will help you.
DO NOT PM ME FOR HELP!