- script HeadgearQuests#main -1,{
if(strcharinfo(3) == "prontera") callsub OnQuest,1;
if(strcharinfo(3) == "payon") callsub OnQuest,2;
if(strcharinfo(3) == "geffen") callsub OnQuest,3;
if(strcharinfo(3) == "morocc") callsub OnQuest,4;
if(strcharinfo(3) == "izlude") callsub OnQuest,5;
end;
OnQuest:
mes .npc_name$;
switch(getarg(0)){
case 1: //prontera
switch(select("Flapping Angel Wings:Soulless Wing")){
case 1: //Flapping Angel Wing
mes getitemname(.item_pront[0]);
mes "Stats 1";
mes "Stats 2";
next;
mes .npc_name$;
mes "I will need the following: ";
for(set .@i,0; .@i < getarraysize(.item_pront_req1); .@i++){
mes .item_pront_amt1[.@i]+"x "+getitemname(.item_pront_req1[.@i]);
}
next;
for(set .@i,0; .@i < getarraysize(.item_pront_req1); .@i++){
if(countitem(.item_pront_req1[.@i]) < .item_pront_amt1[.@i]){
set .@missing,1;
set .@missing$,getitemname(.item_pront_req1[.@i]);
set .@missing_amt,countitem(.item_pront_req1[.@i]);
set .@missing_req,.item_pront_amt1[.@i];
break;
}
}
if(.@missing == 1){
mes .npc_name$;
mes "You are missing some components.";
mes .@missing$+": "+.@missing_amt+" / "+.@missing_req;
close;
end;
}
if(Zeny < .zeny_pront1){
mes .npc_name$;
mes "You do not have enough zeny.";
close;
end;
}
for(set .@i,0; .@i < getarraysize(.item_pront_req1); .@i++){
delitem .item_pront_req1[.@i],.item_pront_amt1[.@i];
}
Zeny -= .zeny_pront1;
getitem .item_pront[0],1;
close;
end;
case 2: //Soulless Wing
mes getitemname(.item_pront[1]);
mes "Stats 1";
mes "Stats 2";
next;
mes .npc_name$;
mes "I will need the following: ";
for(set .@i,0; .@i < getarraysize(.item_pront_req2); .@i++){
mes .item_pront_amt2[.@i]+"x "+getitemname(.item_pront_req2[.@i]);
}
next;
for(set .@i,0; .@i < getarraysize(.item_pront_req2); .@i++){
if(countitem(.item_pront_req2[.@i]) < .item_pront_amt2[.@i]){
set .@missing,1;
set .@missing$,getitemname(.item_pront_req2[.@i]);
set .@missing_amt,countitem(.item_pront_req2[.@i]);
set .@missing_req,.item_pront_amt2[.@i];
break;
}
}
if(.@missing == 1){
mes .npc_name$;
mes "You are missing some components.";
mes .@missing$+": "+.@missing_amt+" / "+.@missing_req;
close;
end;
}
if(Zeny < .zeny_pront2){
mes .npc_name$;
mes "You do not have enough zeny.";
close;
end;
}
for(set .@i,0; .@i < getarraysize(.item_pront_req2); .@i++){
delitem .item_pront_req2[.@i],.item_pront_amt2[.@i];
}
Zeny -= .zeny_pront2;
getitem .item_pront[1],1;
close;
end;
}
case 2: //payon
switch(select("Well Chewed Pencil:Black Musang Hat")){
case 1: //Well Chewed Pencil
mes getitemname(.item_payon[0]);
mes "Stats 1";
mes "Stats 2";
next;
mes .npc_name$;
mes "I will need the following: ";
for(set .@i,0; .@i < getarraysize(.item_payon_req1); .@i++){
mes .item_payon_amt1[.@i]+"x "+getitemname(.item_payon_req1[.@i]);
}
next;
for(set .@i,0; .@i < getarraysize(.item_payon_req1); .@i++){
if(countitem(.item_payon_req1[.@i]) < .item_payon_amt1[.@i]){
set .@missing,1;
set .@missing$,getitemname(.item_payon_req1[.@i]);
set .@missing_amt,countitem(.item_payon_req1[.@i]);
set .@missing_req,.item_payon_amt1[.@i];
break;
}
}
if(.@missing == 1){
mes .npc_name$;
mes "You are missing some components.";
mes .@missing$+": "+.@missing_amt+" / "+.@missing_req;
close;
end;
}
if(Zeny < .zeny_payon1){
mes .npc_name$;
mes "You do not have enough zeny.";
close;
end;
}
for(set .@i,0; .@i < getarraysize(.item_payon_req1); .@i++){
delitem .item_payon_req1[.@i],.item_payon_amt1[.@i];
}
Zeny -= .zeny_payon1;
getitem .item_payon[0],1;
close;
end;
case 2: //Black Musang Hat
mes getitemname(.item_payon[1]);
mes "Stats 1";
mes "Stats 2";
next;
mes .npc_name$;
mes "I will need the following: ";
for(set .@i,0; .@i < getarraysize(.item_payon_req2); .@i++){
mes .item_payon_amt2[.@i]+"x "+getitemname(.item_payon_req2[.@i]);
}
next;
for(set .@i,0; .@i < getarraysize(.item_payon_req2); .@i++){
if(countitem(.item_payon_req2[.@i]) < .item_payon_amt2[.@i]){
set .@missing,1;
set .@missing$,getitemname(.item_payon_req2[.@i]);
set .@missing_amt,countitem(.item_payon_req2[.@i]);
set .@missing_req,.item_payon_amt2[.@i];
break;
}
}
if(.@missing == 1){
mes .npc_name$;
mes "You are missing some components.";
mes .@missing$+": "+.@missing_amt+" / "+.@missing_req;
close;
end;
}
if(Zeny < .zeny_payon2){
mes .npc_name$;
mes "You do not have enough zeny.";
close;
end;
}
for(set .@i,0; .@i < getarraysize(.item_payon_req2); .@i++){
delitem .item_payon_req2[.@i],.item_payon_amt2[.@i];
}
Zeny -= .zeny_payon2;
getitem .item_payon[1],1;
close;
end;
}
case 3: //geffen
switch(select("Book Hat:Charming Ribbon")){
case 1: //Book Hat
mes getitemname(.item_geffen[0]);
mes "Stats 1";
mes "Stats 2";
next;
mes .npc_name$;
mes "I will need the following: ";
for(set .@i,0; .@i < getarraysize(.item_geffen_req1); .@i++){
mes .item_geffen_amt1[.@i]+"x "+getitemname(.item_geffen_req1[.@i]);
}
next;
for(set .@i,0; .@i < getarraysize(.item_geffen_req1); .@i++){
if(countitem(.item_geffen_req1[.@i]) < .item_geffen_amt1[.@i]){
set .@missing,1;
set .@missing$,getitemname(.item_geffen_req1[.@i]);
set .@missing_amt,countitem(.item_geffen_req1[.@i]);
set .@missing_req,.item_geffen_amt1[.@i];
break;
}
}
if(.@missing == 1){
mes .npc_name$;
mes "You are missing some components.";
mes .@missing$+": "+.@missing_amt+" / "+.@missing_req;
close;
end;
}
if(Zeny < .zeny_geffen1){
mes .npc_name$;
mes "You do not have enough zeny.";
close;
end;
}
for(set .@i,0; .@i < getarraysize(.item_geffen_req1); .@i++){
delitem .item_geffen_req1[.@i],.item_geffen_amt1[.@i];
}
Zeny -= .zeny_geffen1;
getitem .item_geffen[0],1;
close;
end;
case 2: //Charming Ribbon
mes getitemname(.item_geffen[1]);
mes "Stats 1";
mes "Stats 2";
next;
mes .npc_name$;
mes "I will need the following: ";
for(set .@i,0; .@i < getarraysize(.item_geffen_req2); .@i++){
mes .item_geffen_amt2[.@i]+"x "+getitemname(.item_geffen_req2[.@i]);
}
next;
for(set .@i,0; .@i < getarraysize(.item_geffen_req2); .@i++){
if(countitem(.item_geffen_req2[.@i]) < .item_geffen_amt2[.@i]){
set .@missing,1;
set .@missing$,getitemname(.item_geffen_req2[.@i]);
set .@missing_amt,countitem(.item_geffen_req2[.@i]);
set .@missing_req,.item_geffen_amt2[.@i];
break;
}
}
if(.@missing == 1){
mes .npc_name$;
mes "You are missing some components.";
mes .@missing$+": "+.@missing_amt+" / "+.@missing_req;
close;
end;
}
if(Zeny < .zeny_geffen2){
mes .npc_name$;
mes "You do not have enough zeny.";
close;
end;
}
for(set .@i,0; .@i < getarraysize(.item_geffen_req2); .@i++){
delitem .item_geffen_req2[.@i],.item_geffen_amt2[.@i];
}
Zeny -= .zeny_geffen2;
getitem .item_geffen[1],1;
close;
end;
}
case 4: //morocc
switch(select("Flying Evil Wing:Angel Spirit")){
case 1: //Flying Evil Wing
mes getitemname(.item_morocc[0]);
mes "Stats 1";
mes "Stats 2";
next;
mes .npc_name$;
mes "I will need the following: ";
for(set .@i,0; .@i < getarraysize(.item_morocc_req1); .@i++){
mes .item_morocc_amt1[.@i]+"x "+getitemname(.item_morocc_req1[.@i]);
}
next;
for(set .@i,0; .@i < getarraysize(.item_morocc_req1); .@i++){
if(countitem(.item_morocc_req1[.@i]) < .item_morocc_amt1[.@i]){
set .@missing,1;
set .@missing$,getitemname(.item_morocc_req1[.@i]);
set .@missing_amt,countitem(.item_morocc_req1[.@i]);
set .@missing_req,.item_morocc_amt1[.@i];
break;
}
}
if(.@missing == 1){
mes .npc_name$;
mes "You are missing some components.";
mes .@missing$+": "+.@missing_amt+" / "+.@missing_req;
close;
end;
}
if(Zeny < .zeny_morocc1){
mes .npc_name$;
mes "You do not have enough zeny.";
close;
end;
}
for(set .@i,0; .@i < getarraysize(.item_morocc_req1); .@i++){
delitem .item_morocc_req1[.@i],.item_morocc_amt1[.@i];
}
Zeny -= .zeny_morocc1;
getitem .item_morocc[0],1;
close;
end;
case 2: //Angel Spirit
mes getitemname(.item_morocc[1]);
mes "Stats 1";
mes "Stats 2";
next;
mes .npc_name$;
mes "I will need the following: ";
for(set .@i,0; .@i < getarraysize(.item_morocc_req2); .@i++){
mes .item_morocc_amt2[.@i]+"x "+getitemname(.item_morocc_req2[.@i]);
}
next;
for(set .@i,0; .@i < getarraysize(.item_morocc_req2); .@i++){
if(countitem(.item_morocc_req2[.@i]) < .item_morocc_amt2[.@i]){
set .@missing,1;
set .@missing$,getitemname(.item_morocc_req2[.@i]);
set .@missing_amt,countitem(.item_morocc_req2[.@i]);
set .@missing_req,.item_morocc_amt2[.@i];
break;
}
}
if(.@missing == 1){
mes .npc_name$;
mes "You are missing some components.";
mes .@missing$+": "+.@missing_amt+" / "+.@missing_req;
close;
end;
}
if(Zeny < .zeny_morocc2){
mes .npc_name$;
mes "You do not have enough zeny.";
close;
end;
}
for(set .@i,0; .@i < getarraysize(.item_morocc_req2); .@i++){
delitem .item_morocc_req2[.@i],.item_morocc_amt2[.@i];
}
Zeny -= .zeny_morocc2;
getitem .item_morocc[1],1;
close;
end;
}
case 5: //izlude
switch(select("Gentleman's Pipe:Blush of Groom")){
case 1: //Gentleman's Pipe
mes getitemname(.item_izlude[0]);
mes "Stats 1";
mes "Stats 2";
next;
mes .npc_name$;
mes "I will need the following: ";
for(set .@i,0; .@i < getarraysize(.item_izlude_req1); .@i++){
mes .item_izlude_amt1[.@i]+"x "+getitemname(.item_izlude_req1[.@i]);
}
next;
for(set .@i,0; .@i < getarraysize(.item_izlude_req1); .@i++){
if(countitem(.item_izlude_req1[.@i]) < .item_izlude_amt1[.@i]){
set .@missing,1;
set .@missing$,getitemname(.item_izlude_req1[.@i]);
set .@missing_amt,countitem(.item_izlude_req1[.@i]);
set .@missing_req,.item_izlude_amt1[.@i];
break;
}
}
if(.@missing == 1){
mes .npc_name$;
mes "You are missing some components.";
mes .@missing$+": "+.@missing_amt+" / "+.@missing_req;
close;
end;
}
if(Zeny < .zeny_izlude1){
mes .npc_name$;
mes "You do not have enough zeny.";
close;
end;
}
for(set .@i,0; .@i < getarraysize(.item_izlude_req1); .@i++){
delitem .item_izlude_req1[.@i],.item_izlude_amt1[.@i];
}
Zeny -= .zeny_izlude1;
getitem .item_izlude[0],1;
close;
end;
case 2: //Blush of Groom
mes getitemname(.item_izlude[1]);
mes "Stats 1";
mes "Stats 2";
next;
mes .npc_name$;
mes "I will need the following: ";
for(set .@i,0; .@i < getarraysize(.item_izlude_req2); .@i++){
mes .item_izlude_amt2[.@i]+"x "+getitemname(.item_izlude_req2[.@i]);
}
next;
for(set .@i,0; .@i < getarraysize(.item_izlude_req2); .@i++){
if(countitem(.item_izlude_req2[.@i]) < .item_izlude_amt2[.@i]){
set .@missing,1;
set .@missing$,getitemname(.item_izlude_req2[.@i]);
set .@missing_amt,countitem(.item_izlude_req2[.@i]);
set .@missing_req,.item_izlude_amt2[.@i];
break;
}
}
if(.@missing){
mes .npc_name$;
mes "You are missing some components.";
mes .@missing$+": "+.@missing_amt+" / "+.@missing_req;
close;
end;
}
if(Zeny < .zeny_izlude2){
mes .npc_name$;
mes "You do not have enough zeny.";
close;
end;
}
for(set .@i,0; .@i < getarraysize(.item_izlude_req2); .@i++){
delitem .item_izlude_req2[.@i],.item_izlude_amt2[.@i];
}
Zeny -= .zeny_izlude2;
getitem .item_izlude[1],1;
close;
end;
}
}
end;
OnPCLoadMapEvent:
if(strcharinfo(3) == "prontera" || strcharinfo(3) == "payon" || strcharinfo(3) == "geffen" || strcharinfo(3) == "morocc" || strcharinfo(3) == "izlude")
showevent QTYPE_QUEST,1;
end;
OnInit:
//NPC Name
set .npc_name$, "[ Name here please ]";
//prontera quests
//Headgear 1
setarray .item_pront,5210,5257; //item id number
setarray .item_pront_req1,2254,7063,949,916,982,31024; // requirements
setarray .item_pront_amt1,2,50,200,200,10,1; //amoun
set .zeny_pront1,2000000; //zeny if required you can delete this btw
Zeny -= .zeny_pront1; //zeny formula
.@rand = rand(1,100); //random function
if(.@rand <= 50) //random function
getitem .item_pront[0],1; //reward ofcourse, Note that if you gonna do it on Headgear to the array should be adjusted so example headgear 1 is item_pront[0] headgear 2 should be item_pront[1]
else
mes "Failed Sorry."; //fail XD
//Headgear 2
setarray .item_pront_req2,2282,1059,916,969,1059,31024; //double 1059 please check
setarray .item_pront_amt2,1,150,100,10,100,1;
set .zeny_pront2,300000;
//payon quests
setarray .item_payon,5574,18613;
setarray .item_payon_req1,738,4004,1068,1066,1067,7186,31024;
setarray .item_payon_amt1,1,1,100,100,100,50,1;
set .zeny_payon1,300000;
setarray .item_payon_req2,2264,5046,609,1094,901,31024;
setarray .item_payon_amt2,1,1,50,200,200,1;
set .zeny_payon2,2500000;
//geffen quests
setarray .item_geffen,5422,5140;
setarray .item_geffen_req1,1553,1554,1555,1556,1006,31024;
setarray .item_geffen_amt1,1,1,1,1,50,1;
set .zeny_geffen1,300000;
setarray .item_geffen_req2,2244,2209,1059,31024;
setarray .item_geffen_amt2,1,1,1,1;
set .zeny_geffen2,200000;
//morocc quests
setarray .item_morocc,5376,5389;
setarray .item_morocc_req1,2255,4010,949,916,983,31024;
setarray .item_morocc_amt1,2,5,200,200,10,1;
set .zeny_morocc1,300000;
setarray .item_morocc_req2,2264,5046,609,1094,901,31024;
setarray .item_morocc_amt2,1,1,50,200,200,1;
set .zeny_morocc2,2500000;
//izlude quests
setarray .item_izlude,5377,5800;
setarray .item_izlude_req1,2267,2268,7201,7035,999,1003,998,7098,31024;
setarray .item_izlude_amt1,1,1,300,10,100,100,50,50,1;
set .zeny_izlude1,300000;
setarray .item_izlude_req2,5040,732,970,975,31024;
setarray .item_izlude_amt2,2,10,100,10,1;
set .zeny_izlude2,2500000;
end;
}
prontera,103,77,5 duplicate(HeadgearQuests#main) Headgear Quest#1 123
payon,172,174,5 duplicate(HeadgearQuests#main) Headgear Quest#2 123
geffen,130,115,5 duplicate(HeadgearQuests#main) Headgear Quest#3 123
morocc,166,109,5 duplicate(HeadgearQuests#main) Headgear Quest#4 123
izlude,95,122,5 duplicate(HeadgearQuests#main) Headgear Quest#5 123
prontera mapflag loadevent
payon mapflag loadevent
geffen mapflag loadevent
morocc mapflag loadevent
izlude mapflag loadevent