|
|

A WoodCutters Nightmare
What is needed to complete this quest (10 mins Top): The monsters needed to start the quest aren't included. Please take the time to spawn one of this: 1395. You must also make some more NPC's that drop goblin mail. (ID 288). You also need to make it so you can click the button on the quest tab to show what you have to do it. (All of this is very simple)
About the Quest: This is a simple kill and gather quest with extensive NPC Dialogue. You can actually choose to do the quest. Basically, all you have to do to finish building this quest is make a place where there is many Goblins as the reward is access to the Gnome Stronghold and some wood cutting experience. Anyways don't get me wrong this is a pretty cool quest. Oh yeah, nothing is stuck in the process so you won't get so much lag from this. It just calls upon the method that changes the colors on the quest bar on initialization and when an update on the quest is called. This is also unique!
Step 1: Declare these integers
Declare these integers.
Step 2: Proper Dialogue SwitchingCode:public int PlrQuest2Choice = 0; public int PlrQuest2 = 0; public int PlrQuest2Choice2 = 0;
Add this in packet 40.
Step 3: First ClickingCode:if (NpcDialogue == 3010 || NpcDialogue == 3011) { // Quest 2 NpcDialogue += 1; NpcDialogueSend = false; } else if ((NpcDialogue == 3012)) { NpcDialogue = 0; NpcDialogueSend = false; RemoveAllWindows(); } else { closeInterface(); } if (NpcDialogue == 3015 || NpcDialogue == 3016) { // Quest 2 NpcDialogue += 1; NpcDialogueSend = false; } else if ((NpcDialogue == 3017)) { NpcDialogue = 0; NpcDialogueSend = false; RemoveAllWindows(); } else { closeInterface(); } if (NpcDialogue == 3005 || NpcDialogue == 3006 || NpcDialogue == 3007) { // Quest 2 NpcDialogue += 1; NpcDialogueSend = false; } else if ((NpcDialogue == 3008)) { NpcDialogue = 0; NpcDialogueSend = false; RemoveAllWindows(); } else { closeInterface(); } if (NpcDialogue == 3000 || NpcDialogue == 3001) { // Quest 2 NpcDialogue += 1; NpcDialogueSend = false; } else if ((NpcDialogue == 3002)) { NpcDialogue = 0; NpcDialogueSend = false; RemoveAllWindows(); } else { closeInterface(); }
Add this in you're first click NPC section (packet 155)
Step 4: Multiple Choice YesCode:if (NPCID == 1395) { // Quest 2 if (PlrQuest2 == 0) { sSh(); NpcWanneTalk = 3000; } if (PlrQuest2 == 1) { sSh(); NpcWanneTalk = 3010; } if (PlrQuest2 == 1 && playerHasItem(288, 20)) { sSh(); NpcWanneTalk = 3015; } if (PlrQuest2 == 1 && !playerHasItem(288, 20)) { sSh(); NpcWanneTalk = 3013; } if (PlrQuest2 == 2) { sSh(); NpcWanneTalk = 3018; } }
Add this in packet 9157.
Step 5: Multiple Choice NoCode:if (PlrQuest2Choice2 == 1) { // Quest 2 PlrQuest2Choice2 = 0; NpcDialogueSend = false; NpcDialogue = 3013; RemoveAllWindows(); } if (PlrQuest2Choice == 1) { //Quest 2 PlrQuest2Choice = 0; NpcDialogueSend = false; NpcDialogue = 3005; RemoveAllWindows(); }
Add this in packet 9158.
Step 6: Npc DialogueCode:if (PlrQuest2Choice2 == 1) { // Quest 2 PlrQuest2Choice = 0; NpcDialogue = 0; RemoveAllWindows(); NpcDialogueSend = false; } if (PlrQuest2Choice == 1) { // Quest 2 PlrQuest2Choice = 0; NpcDialogue = 3003; RemoveAllWindows(); }
Where ever you're Npc Dialogue section is, add this.
Step 7: Adding the methodsCode:case 3000: // Quest 2 npt(); sendFrame126("Hello, can you help me defend my forest from these goblins?", 4885); break; case 3001: // Quest 2 sendFrame171(1, 2465); sendFrame171(0, 2468); sendFrame126("What would you like to say?", 2460); sendFrame126("Alright, I'll help you!", 2461); sendFrame126("No thanks, I have better things to do.", 2462); sendFrame164(2459); NpcDialogueSend = true; PlrQuest2Choice = 1; break; case 3003: // Quest 2 - Said no npt(); sendFrame126("Alright, run along now!", 4885); break; case 3005: // Quest 2 - Said yes sendFrame200(4901, 591); sendFrame126(GetNpcName(NpcTalkTo), 4902); sendFrame126("a plentiful forest that had many yews!", 4906); sendFrame126("Thank you! But it won't be all too easy you see...", 4903); sendFrame126("Those goblins were destroying my forest, eating the", 4904); sendFrame126("leaves and almost everything! Before, this use to be", 4905); sendFrame75(NpcTalkTo, 4901); sendFrame164(4900); NpcDialogueSend = true; break; case 3006: // Quest 2 sendFrame200(4901, 591); sendFrame126(GetNpcName(NpcTalkTo), 4902); sendFrame126("access to the Goblin Stronghold.", 4906); sendFrame126("So, I hope you can kill these goblins and bring me", 4903); sendFrame126("back their mail. In turn for successfully gathering,", 4904); sendFrame126("I will give you some experience in woodcutting, and", 4905); sendFrame75(NpcTalkTo, 4901); sendFrame164(4900); NpcDialogueSend = true; PlrQuest2 = 1; QuestTab(); break; case 3007: // Quest 2 npt(); sendFrame126("Please get 20 goblin mail order to receive your reward.", 4885); break; case 3010: // Quest 2 npt(); sendFrame126("Did you forget what you were assigned to do?", 4885); break; case 3011: // Quest 2 sendFrame171(1, 2465); sendFrame171(0, 2468); sendFrame126("What would you like to say?", 2460); sendFrame126("Yeah, please tell me what to do.", 2461); sendFrame126("No, I didn't forget.", 2462); sendFrame164(2459); NpcDialogueSend = true; PlrQuest2Choice2 = 1; break; case 3013: // Quest 2 npt(); sendFrame126("Please get 20 goblin mail to receive your reward.", 4885); break; case 3015: // Quest 2 npt(); sendFrame126("Thank you for giving me 20 goblin mail.", 4885); break; case 3016: // Quest 2 npt(); deleteItem(288, 20); sendFrame126("You have saved my forest and I must reward you!", 4885); PlrQuest2 = 2; addSkillXP(20000, 8); sendMessage("You have just finished the quest: A Woodcutters Nightmare"); PlrQuestPoints += 2; QuestTab(); addItem(605, 1); break; case 3018: // Quest 2 npt(); sendFrame126("To get to the Goblin Stronghold, go near the jail.", 4885); break;
Declare these methods in the respectable place in the client class.
(May need to change which line this quest is on)
Step 8: Calling upon the method QuestTab.Code:public void QuestTab() { if (PlrQuest2 == 0) { sendQuest("A Woodcutters Nightmare", 7332); } if (PlrQuest2 == 1) { sendQuest("@[email protected] Woodcutters Nightmare", 7332); } if (PlrQuest2 == 2) { sendQuest("@[email protected] Woodcutters Nightmare", 7332); } } public void npt() { sendFrame200(4883, 591); sendFrame126(GetNpcName(NpcTalkTo), 4884); sendFrame75(NpcTalkTo, 4883); sendFrame164(4882); NpcDialogueSend = true; } public void sSh() { skillX = server.npcHandler.npcs[NPCSlot].absX; skillY = server.npcHandler.npcs[NPCSlot].absY; }
Add this in your welcome message area.
Step 9: Saving the questCode:QuestTab();
Search for case 2, and find the right place to put this in.
Scroll down a bit and put this in.Code:else if (token.equals("character-2ndQuest")) { PlrQuest2 = Integer.parseInt(token2); }
Code:characterfile.write("character-2ndQuest = ", 0, 21); characterfile.write(Integer.toString(PlrQuest2), 0, Integer.toString(PlrQuest2).length()); characterfile.newLine();

Your packet 40 is way to big, it doesnt need to be that long
Ugly code, way too messy
1 stage? ...if (PlrQuest2 == 0) {
sendQuest("A Woodcutters Nightmare", 7332);
}
if (PlrQuest2 == 1) {
sendQuest("@[email protected] Woodcutters Nightmare", 7332);
}
if (PlrQuest2 == 2) {
sendQuest("@[email protected] Woodcutters Nightmare", 7332);
}
ALSO, It doesnt save..?
Sorry bro, /fail
Oh Really?
Well maybe you can tell me where it saves?
public int PlrQuest2Choice = 0;
public int PlrQuest2 = 0;
public int PlrQuest2Choice2 = 0;if (NpcDialogue == 3010 || NpcDialogue == 3011) { // Quest 2
NpcDialogue += 1;
NpcDialogueSend = false;
} else if ((NpcDialogue == 3012)) {
NpcDialogue = 0;
NpcDialogueSend = false;
RemoveAllWindows();
} else {
closeInterface();
}
if (NpcDialogue == 3015 || NpcDialogue == 3016) { // Quest 2
NpcDialogue += 1;
NpcDialogueSend = false;
} else if ((NpcDialogue == 3017)) {
NpcDialogue = 0;
NpcDialogueSend = false;
RemoveAllWindows();
} else {
closeInterface();
}
if (NpcDialogue == 3005 || NpcDialogue == 3006 || NpcDialogue == 3007) { // Quest 2
NpcDialogue += 1;
NpcDialogueSend = false;
} else if ((NpcDialogue == 3008)) {
NpcDialogue = 0;
NpcDialogueSend = false;
RemoveAllWindows();
} else {
closeInterface();
}
if (NpcDialogue == 3000 || NpcDialogue == 3001) { // Quest 2
NpcDialogue += 1;
NpcDialogueSend = false;
} else if ((NpcDialogue == 3002)) {
NpcDialogue = 0;
NpcDialogueSend = false;
RemoveAllWindows();
} else {
closeInterface();
}if (PlrQuest2Choice2 == 1) { // Quest 2
PlrQuest2Choice2 = 0;
NpcDialogueSend = false;
NpcDialogue = 3013;
RemoveAllWindows();
}
if (PlrQuest2Choice == 1) { //Quest 2
PlrQuest2Choice = 0;
NpcDialogueSend = false;
NpcDialogue = 3005;
RemoveAllWindows();
}if (PlrQuest2Choice2 == 1) { // Quest 2
PlrQuest2Choice = 0;
NpcDialogue = 0;
RemoveAllWindows();
NpcDialogueSend = false;
}
if (PlrQuest2Choice == 1) { // Quest 2
PlrQuest2Choice = 0;
NpcDialogue = 3003;
RemoveAllWindows();
}case 3000: // Quest 2
npt();
sendFrame126("Hello, can you help me defend my forest from these goblins?", 4885);
break;
case 3001: // Quest 2
sendFrame171(1, 2465);
sendFrame171(0, 2468);
sendFrame126("What would you like to say?", 2460);
sendFrame126("Alright, I'll help you!", 2461);
sendFrame126("No thanks, I have better things to do.", 2462);
sendFrame164(2459);
NpcDialogueSend = true;
PlrQuest2Choice = 1;
break;
case 3003: // Quest 2 - Said no
npt();
sendFrame126("Alright, run along now!", 4885);
break;
case 3005: // Quest 2 - Said yes
sendFrame200(4901, 591);
sendFrame126(GetNpcName(NpcTalkTo), 4902);
sendFrame126("a plentiful forest that had many yews!", 4906);
sendFrame126("Thank you! But it won't be all too easy you see...", 4903);
sendFrame126("Those goblins were destroying my forest, eating the", 4904);
sendFrame126("leaves and almost everything! Before, this use to be", 4905);
sendFrame75(NpcTalkTo, 4901);
sendFrame164(4900);
NpcDialogueSend = true;
break;
case 3006: // Quest 2
sendFrame200(4901, 591);
sendFrame126(GetNpcName(NpcTalkTo), 4902);
sendFrame126("access to the Goblin Stronghold.", 4906);
sendFrame126("So, I hope you can kill these goblins and bring me", 4903);
sendFrame126("back their mail. In turn for successfully gathering,", 4904);
sendFrame126("I will give you some experience in woodcutting, and", 4905);
sendFrame75(NpcTalkTo, 4901);
sendFrame164(4900);
NpcDialogueSend = true;
PlrQuest2 = 1;
QuestTab();
break;
case 3007: // Quest 2
npt();
sendFrame126("Please get 20 goblin mail order to receive your reward.", 4885);
break;
case 3010: // Quest 2
npt();
sendFrame126("Did you forget what you were assigned to do?", 4885);
break;
case 3011: // Quest 2
sendFrame171(1, 2465);
sendFrame171(0, 2468);
sendFrame126("What would you like to say?", 2460);
sendFrame126("Yeah, please tell me what to do.", 2461);
sendFrame126("No, I didn't forget.", 2462);
sendFrame164(2459);
NpcDialogueSend = true;
PlrQuest2Choice2 = 1;
break;
case 3013: // Quest 2
npt();
sendFrame126("Please get 20 goblin mail to receive your reward.", 4885);
break;
case 3015: // Quest 2
npt();
sendFrame126("Thank you for giving me 20 goblin mail.", 4885);
break;
case 3016: // Quest 2
npt();
deleteItem(288, 20);
sendFrame126("You have saved my forest and I must reward you!", 4885);
PlrQuest2 = 2;
addSkillXP(20000, 8);
sendMessage("You have just finished the quest: A Woodcutters Nightmare");
PlrQuestPoints += 2;
QuestTab();
addItem(605, 1);
break;
case 3018: // Quest 2
npt();
sendFrame126("To get to the Goblin Stronghold, go near the jail.", 4885);
break;public void QuestTab() {
if (PlrQuest2 == 0) {
sendQuest("A Woodcutters Nightmare", 7332);
}
if (PlrQuest2 == 1) {
sendQuest("@[email protected] Woodcutters Nightmare", 7332);
}
if (PlrQuest2 == 2) {
sendQuest("@[email protected] Woodcutters Nightmare", 7332);
}
}
public void npt() {
sendFrame200(4883, 591);
sendFrame126(GetNpcName(NpcTalkTo), 4884);
sendFrame75(NpcTalkTo, 4883);
sendFrame164(4882);
NpcDialogueSend = true;
}
public void sSh() {
skillX = server.npcHandler.npcs[NPCSlot].absX;
skillY = server.npcHandler.npcs[NPCSlot].absY;
}Fucken ******QuestTab();
I fixed my post noob before u posted that O_O
Hope you like my programming! 

Haha, I forgot about that. On my source, it was saving via SQL.
| « (Detla) Delta Based Blackmark System! [Noob Friendly!] | [TUT4] Changing player equipment- startpoint ~Lemonslayor~ » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |