After you talk to the npc and once you have accepted the quest, I don't want the npc to repeat everything from the beginning when you talk to it again. Currently, even after you have accepted the quest the npc will repeat everything from the beginning and make you select the options again (Hold on: Yes).
Everything is working fine, but it is just unprofessional/annoying when the Npc repeats from the beginning although you have the quest accepted/or have the items.
How I want this script to be: Once the quest is accepted and when the player talks to the npc, I want the npc to be like "Have you brought the items yet?" [option] Yes or No. If it's yes the npc will check if all the items are there and complete the quest and if not, the npc will give the list of items again and tell the player to hurry up and bring them.
Here is the script:
function script patienceTest {
setarray .@pt_4096[0], 606,100, 914,50; // Job_Baby_Rune
setarray .@pt_4097[0], 606,100, 914,50; // Job_Baby_Warlock
setarray .@pt_4098[0], 606,100, 914,50; // Job_Baby_Ranger
setarray .@pt_4099[0], 606,100, 914,50; // Job_Baby_Bishop
setarray .@pt_4100[0], 606,100, 914,50; // Job_Baby_Mechanic
setarray .@pt_4101[0], 606,100, 914,50; // Job_Baby_Cross
setarray .@pt_4102[0], 606,100, 914,50; // Job_Baby_Guard
setarray .@pt_4103[0], 606,100, 914,50; // Job_Baby_Sorcerer
setarray .@pt_4104[0], 606,100, 914,50; // Job_Baby_Minstrel
setarray .@pt_4105[0], 606,100, 914,50; // Job_Baby_Wanderer
setarray .@pt_4106[0], 606,100, 914,50; // Job_Baby_Sura
setarray .@pt_4107[0], 606,100, 914,50; // Job_Baby_Genetic
setarray .@pt_4108[0], 606,100, 914,50; // Job_Baby_Chaser
set .@jobID, getarg(0);
set .@npc$, getarg(1);
set .@qID, (25000+.@jobID-4030);
if(Class != .@jobID || checkquest(.@qID) == 2)
return;
mes .@npc$;
mes "Good. We will start with the ^0042FFPatience Test^000000.";
mes "You are still very young, which is why you must complete this task in order to prove me that you got what it takes to become one of us.";
next;
mes .@npc$;
mes "Shall we begin then?";
next;
if(select("Hold on:Yes!") == 1) {
mes .@npc$;
mes "You must complete the ^0042FFPatience Test^000000 in order to change your job.";
mes "Let me know when you are ready.";
close;
}
mes .@npc$;
set .@j3, roclass(eaclass()|EAJL_THIRD);
if (checkquest(.@qID) == 1) {
set .@invalid, 0;
for(set .@i,0; .@i < getarraysize(getd(".@pt_"+ .@j3)); set .@i,.@i+2) {
if(countitem(getd(".@pt_"+ .@j3 +"["+ .@i +"]")) < getd(".@pt_"+ .@j3 +"["+ (.@i+1) +"]")) {
mes "- "+ getd(".@pt_"+ .@j3 +"["+ (.@i+1) +"]") +" "+ getitemname(getd(".@pt_"+ .@j3 +"["+ .@i +"]"));
set .@invalid, 1;
}
}
if(.@invalid) {
mes "You are missing some items. Please come again when you have all the items I asked you to bring.";
close;
}
mes "Congratulations~! You have completed the ^0042FFPatience Test^000000!";
mes "Now we can get started.";
for(set .@i,0; .@i < getarraysize(getd(".@pt_"+ .@j3)); set .@i,.@i+2)
delitem getd(".@pt_"+ .@j3 +"["+ .@i +"]"), getd(".@pt_"+ .@j3 +"["+ (.@i+1) +"]");
completequest .@qID;
next;
} else if (checkquest(.@qID) < 1) {
mes "Your ^0042FFPatience Test^000000 is to bring me the following items:";
for(set .@i,0; .@i < getarraysize(getd(".@pt_"+ .@j3)); set .@i,.@i+2)
mes "- "+ getd(".@pt_"+ .@j3 +"["+ (.@i+1) +"]") +" "+ getitemname(getd(".@pt_"+ .@j3 +"["+ .@i +"]"));
setquest .@qID;
close;
}
return;
}
Question
Dori
I need help to modify this script.
After you talk to the npc and once you have accepted the quest, I don't want the npc to repeat everything from the beginning when you talk to it again.
Currently, even after you have accepted the quest the npc will repeat everything from the beginning and make you select the options again (Hold on: Yes).
Everything is working fine, but it is just unprofessional/annoying when the Npc repeats from the beginning although you have the quest accepted/or have the items.
How I want this script to be:
Once the quest is accepted and when the player talks to the npc, I want the npc to be like "Have you brought the items yet?" [option] Yes or No. If it's yes the npc will check if all the items are there and complete the quest and if not, the npc will give the list of items again and tell the player to hurry up and bring them.
Here is the script:
Any help would be greatly appreciated~ Thank you!
Edited by PhenexLink to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.