Jump to content
  • 0

Monthly Quest Headgear Need Help...


cozzy09

Question


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   0
  • Joined:  01/30/12
  • Last Seen:  

Can you guys help me fix this script?

I'm trying to make a monthly quest headgear that every month the quest headgear that can be made changes but when I tried this script all npc appears even if I put some to disabled please help me to fix this script thanks /ok

- script QH#disable -1,{

OnInit:
disablenpc "January Quest Headgear";
disablenpc "February Quest Headgear";
disablenpc "October Quest Headgear";

end;
}

- script QH -1,{

OnClock0001:
goto startmonthlyqh;

startmonthlyqh:
enablenpc $Quest$;
initnpctimer;
end;
}
//---------------------------------------------------------------------------------------
//--------------------------------------- January ---------------------------------------
//---------------------------------------------------------------------------------------

prontera,140,180,7 script January Quest Headgear  408,{

mes "[January Quest Headgear]";
mes "Choose which headgear do you want to make.";
next;
goto H_top;

H_top:
menu "*Flower Lily",h_flowerlily,"No Thanks",h_no;

h_flowerlily:
mes "[January Quest Headgear]";
mes "To make a ^FF0000Flower Lily^000000 headgear you will need the following items";
mes "^3355FF1 White Dyestuff^000000";
mes "^3355FF2 Valhalla's Flower^000000";
mes "^3355FF5 Fancy Flower^000000";
mes "^3355FF100 Flower^000000";
mes "^3355FF200 Illusion Flower^000000";
next;
menu "Yes",m_flowerlily,"No thanks",h_no;

m_flowerlily:
if ((countitem(982)<1) && (countitem(7510)<2) && (countitem(2207)<5) && (countitem(712)<100) && (countitem(710)<200)) {
goto m_noitem;}
else if (checkweight(5302,1)) {
mes "[January Quest Headgear]";
mes "Here's your item";
delitem 982,1;  //White Dyestuff
delitem 7510,2;  //Valhalla's Flower
delitem 2207,5;  //Fancy Flower
delitem 712,100;  //Flower
delitem 710,200;  //Illusion Flower
getitem 5302,1; // Flower Lily
} else {goto m_nospace;}
emotion e_thx;
close;

h_no:
next;
mes "[January Quest Headgear]";
mes "Ah, alright. Just tell me when you want it.";
mes "See you soon~";
emotion e_heh;
close;

m_noitem:
next;
mes "[January Quest Headgear]";
mes "Don't Make me laugh !";
mes "You don't all the required items to the the headgear";
emotion e_e4;
//atcommand "@die";
close;

m_nospace:
next;
mes "[January Quest Headgear]";
mes "You are overweight.";
mes "Can't carry the headgear.";
emotion e_heh;
close;

timer:
initnpctimer;
end;

m_none:
disablenpc "Banker";
pvpoff "guild_vs1";
end;

}

//---------------------------------------------------------------------------------------
//-------------------------------------- February ---------------------------------------
//---------------------------------------------------------------------------------------


prontera,140,180,7 script February Quest Headgear  408,{

mes "[February Quest Headgear]";
mes "This month available headgears are.";
mes "^FF0000Romantic White Flower^000000";
mes "--";
mes "--";
next;
mes "Which headgear do you want to make?";
next;
goto H_top;

H_top:
menu "*Romantic White Flower",h_rwhiteflower,"No Thanks",h_no;

h_flowerlily:
mes "[February Quest Headgear]";
mes "To make a ^FF0000Romantic White Flower^000000 headgear you will need the following items";
mes "^3355FF5 Romantic Flower^000000";
mes "^3355FF5 Vital Flower^000000";
mes "^3355FF300 Flower^000000";
next;
menu "Yes",m_rwhiteflower,"No thanks",h_no;

m_flowerlily:
if ((countitem(2269)<5) && (countitem(6110)<5) && (countitem(712)<300)) {
goto m_noitem;}
else if (checkweight(5206,1)) {
mes "[February Quest Headgear]";
mes "Here's your item";
delitem 2269,5;  //Romantic Flower
delitem 6110,5;  //Vital Flower
delitem 712,300;  //Flower
getitem 5206,1; //Romantic White Flower
} else {goto m_nospace;}
emotion e_thx;
close;

h_no:
next;
mes "[February Quest Headgear]";
mes "Ah, alright. Just tell me when you want it.";
mes "See you soon~";
emotion e_heh;
close;

m_noitem:
next;
mes "[February Quest Headgear]";
mes "Don't Make me laugh !";
mes "You don't all the required items to the the headgear";
emotion e_e4;
//atcommand "@die";
close;

m_nospace:
next;
mes "[February Quest Headgear]";
mes "You are overweight.";
mes "Can't carry the headgear.";
emotion e_heh;
close;

timer:
initnpctimer;
end;

m_none:
disablenpc "Banker";
pvpoff "guild_vs1";
end;
}

//---------------------------------------------------------------------------------------
//--------------------------------------- October ---------------------------------------
//---------------------------------------------------------------------------------------


prontera,140,180,7 script October Quest Headgear  408,{

mes "[January Quest Headgear]";
mes "Choose which headgear do you want to make.";
next;
goto H_top;

H_top:
menu "*Dokebi's Wig",a_dokebiwig,"No Thanks",h_no;


h_dokebiwig:
mes "[October Quest Headgear]";
mes "To make a ^FF0000Dokebi's Wig^000000 headgear you will need the following items";
mes "^3355FF1 Scarlet Dyestuff^000000";
mes "^3355FF1 Lemon Dyestuff^000000";
mes "^3355FF1 Cobaltblue Dyestuff^000000";
mes "^3355FF5 Wig^000000";
mes "^3355FF300 Glossy Hair^000000";
next;
menu "Yes",m_dokebiwig,"No thanks",a_no;

m_dokebiwig:
if ((countitem(975)<1) && (countitem(976)<1) && (countitem(978)<1) && (countitem(10005)<5) && (countitem(7152)<300)) {
goto m_noitem;}
else if (checkweight(5258,1)) {
mes "[January Quest Headgear]";
mes "Here's your item";
delitem 975,1; // Scarlet Dyestuff
delitem 976,1; // Lemon Dyestuff
delitem 978,1; // Cobaltblue Dyestuff
delitem 10005,5; // Wig
delitem 7152,300; // Glossy Hair
getitem 5258,1; // Dokebi's Wig
} else {goto m_nospace;}
emotion e_thx;
close;


h_no:
next;
mes "[October Quest Headgear]";
mes "Ah, alright. Just tell me when you want it.";
mes "See you soon~";
emotion e_heh;
close;

m_noitem:
next;
mes "[October Quest Headgear]";
mes "Don't Make me laugh !";
mes "You don't all the required items to the the headgear";
emotion e_e4;
//atcommand "@die";
close;

m_nospace:
next;
mes "[October Quest Headgear]";
mes "You are overweight.";
mes "Can't carry the headgear.";
emotion e_heh;
close;


}

//---------------------------------------------------------------------------------------
//------------------------------------ Month Setting ------------------------------------
//---------------------------------------------------------------------------------------


- script Setting -1,{
if ($Quest$=="") donpcevent "Setting::OnClock0001";
OnInit:
OnClock0001:
switch(gettime(6)) {
Case 0:// January
set $Quest$, "January Quest Headgear";
break;
Case 1:// February
set $Quest$, "February Quest Headgear";
break;
Case 2:// March
Case 3:// April
Case 4:// May
Case 5:// June
Case 6:// July
Case 7:// August
Case 8:// September
Case 9:// October
set $Quest$, "October Quest Headgear";
break;
Case 10:// November
Case 11:// December

}
end;

}

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

how about merge all into 1 NPC ?


prontera,155,181,5 script Sample 757,{
function RequiredItems;
setarray .MonthReward[0],
 5001,
 5002,
 5003,
 5004,
 5005,
 5006,
 5007,
 5008,
 5009,
 5010,
 5011,
 5012;
mes "Would you like to make 1 ^FF0000"+getitemname( .MonthReward[ gettime(6) - 1 ] )+"^000000 for the "+( gettime(6) )+"th Month of this year ?";
next;
if( select( "Yes:No" ) == 2 ) close;
switch( gettime(6) ){
// RequiredItems( ItemID,Amount,ItemID,Amount,............ );
Case 1: RequiredItems( 501,1,502,2,503,3,504,4,505,5,506,6 ); break;
Case 2: RequiredItems( 501,1,502,2,503,3,504,4,505,5,506,6 ); break;
Case 3: RequiredItems( 501,1,502,2,503,3,504,4,505,5,506,6 ); break;
Case 4: RequiredItems( 501,1,502,2,503,3,504,4,505,5,506,6 ); break;

// Until December...add to your like....
}
mes "Gained ^FF0000"+getitemname( .MonthReward[ gettime(6) - 1 ] )+"^000000 for this month.";
getitem .MonthReward[ gettime(6) - 1 ],1;
close;
function RequiredItems {
mes "[   ^0000FF  Required Items  ^000000   ]";
mes "^FFFFFF________________________________^000000";
for( set .@i,0; getarg( .@i,0 ); set .@i,.@i + 2 ){
 mes (( countitem( getarg( .@i ) ) < getarg( .@i + 1 ) )?"^FF0000":"^00FF00" )+"[ "+countitem( getarg( .@i ) )+" / "+getarg( .@i + 1 )+" ] ^0000FF "+getitemname( getarg( .@i ) )+"^000000";
 if( countitem( getarg( .@i ) ) < getarg( .@i + 1 ) )
  set .@InComplete,.@InComplete + 1;
}
mes "^FFFFFF________________________________^000000";
if( .@InComplete ){
 mes "[   ^FF0000InComplete^000000   ]	 ^FF0000"+.@InComplete+"^000000 Items ";
 close;
}
next;
if( select("^FF0000Continue^000000:Cancel") == 2 ) close;
for( set .@i,0; getarg( .@i,0 ); set .@i,.@i + 2 )
 delitem getarg( .@i ),getarg( .@i + 1 );
return;
}
}

Edit the Item Required here.

// RequiredItems( ItemID,Amount,ItemID,Amount,............ );
Case 1: RequiredItems( 501,1,502,2,503,3,504,4,505,5,506,6 ); break;

Item List for each Month :

setarray .MonthReward[0],
 5001,
 5002,
 5003,
 5004,
 5005,
 5006,
 5007,
 5008,
 5009,
 5010,
 5011,
 5012;

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   0
  • Joined:  01/30/12
  • Last Seen:  

thanks emistry tried it and it's working fine. I will just edit it now :D

another thing how can I make it 2-3 items per month?

Edited by cozzy09
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...