Jump to content
  • 0

daily quest every 24 hours


Quesooo

Question


  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

good day master i would like to ask how to make this script to every 24 hours

 

if players finish the daily quest he/she need to wait for 24 hours to do the quest again

 

thank you

 

prt_in,82,93,2	script	Daily Quest	513,{
	if (getgmlevel() >= 80) goto GM_Menu;
L_START:
	if (getgmlevel() >= 80) next;
	mes "[Daily  Quest]";
	mes "Hello "+strcharinfo(0)+"!";
	mes "Do you want to start today's Quest?";
	mes " ";
	mes "Total Daily Quests Finished: ^008800"+$DailyQuestTotal+"^000000.";
	mes "Today Daily Quests Finished: ^0000FF"+$DailyQuestToday+"^000000.";
	menu "Yes!",-,"Nahh",L_Close;
	next;
	mes "[Daily Quest]";
	mes "You'll need these item for Today's Quest:";
	mes "^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+"";
	mes "^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+"";
	mes "^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+"";
	mes "In exchange you will get ^0000FF"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+"";
	next;
	mes "[Daily Quest]";
	mes "Do you have the items?";
	menu "Yes! I do.",-,"Gimme some time.",L_Close;
	if(countitem($QuestItem1) >= $QuestItem1HM) && (countitem($QuestItem2) >= $QuestItem2HM) && (countitem($QuestItem3) >= $QuestItem3HM) goto FinishQuest;
	next;
	mes "[Daily Quest]";
	mes "You only have "+countitem($QuestItem1HM)+" of ^FF0000"+getitemname($QuestItem1)+"^000000, "+countitem($QuestItem2HM)+" of ^FF0000"+getitemname($QuestItem2)+"^000000, "+countitem($QuestItem3HM)+" of ^FF0000"+getitemname($QuestItem3)+"^000000.";
	mes "Come back when you have it! Better get the items quickly. It's gonna change in a Day!";
	close;

L_Close:
	next;
	mes "[Daily Quest]";
	mes "Come back again! Get the Items!";
	mes "Goodbye!";
	close;

GM_Menu:
	mes "[Daily Quest]";
	mes "Hello GM "+strcharinfo(0)+"!";
	mes "What can I do for you today?";
	menu "Player Menu",L_START,"Change Today's Quest/Prize",L_ChangeQuest,"Close",L_Close;

L_ChangeQuest:
	next;
	mes "[Daily Quest]";
	mes "What will you like to change?";
	next;
	menu "Go back.",GM_Menu,"Prize [^0000FF"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+"]",L_ChangePrize,"Change Quest Randomly",L_ChangeQuestRandom,"Change Quest by Myself",L_ChangeQuestMyself;

L_ChangeQuestMyself:
	next;
	mes "[Daily Quest]";
	mes "Which item would you like to change first?";
	menu "Go Back.",L_ChangeQuest,"Item 1 [^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+"]",L_ChangeItem1,"Item 2 [^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+"]",L_ChangeItem2,"Item 3 [^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+"]",L_ChangeItem3;

L_ChangeItem1:
	next;
	mes "[Daily Quest]";
	mes "Alright. What will be the item?";
	next;
	input $QuestItem1;
	next;
	L_ChangeItem12:
	mes "[Daily Quest]";
	mes "How much of ^ff0000"+getitemname($QuestItem1)+"^000000 do you want?";
	mes "It must be in the range of ^0088001 ~ 200^000000.";
	next;
	input $QuestItem1HM;
	next;
	if ($QuestItem1HM > 200) goto L_HMItem1Denied;
	mes "[Daily Quest]";
	mes "Item 1 Set.";
	set $DailyQuestToday,0;
	mes "^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+".";
	next;
	goto L_ChangeQuest;

L_HMItem1Denied:
	mes "[Daily Quest]";
	mes "This item (^ff0000"+getitemname($QuestItem1)+"^000000) must be in a range of ^0088001 ~ 200^000000.";
	next;
	goto L_ChangeItem12;

L_ChangeItem2:
	next;
	mes "[Daily Quest]";
	mes "Alright. What will be the item?";
	next;
	input $QuestItem2;
	next;
L_ChangeItem22:
	mes "[Daily Quest]";
	mes "How much of ^ff0000"+getitemname($QuestItem2)+"^000000 do you want?";
	mes "It must be in the range of ^0088001 ~ 150^000000.";
	next;
	input $QuestItem2HM;
	next;
	if ($QuestItem2HM > 150) goto L_HMItem2Denied;
	mes "[Daily Quest]";
	mes "Item 2 Set.";
	set $DailyQuestToday,0;
	mes "^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+".";
	next;
	goto L_ChangeQuest;

L_HMItem2Denied:
	mes "[Daily Quest]";
	mes "This item (^ff0000"+getitemname($QuestItem2)+"^000000) must be in a range of ^0088001 ~ 150^000000.";
	next;
	goto L_ChangeItem22;

L_ChangeItem3:
	next;
	mes "[Daily Quest]";
	mes "Alright. What will be the item?";
	next;
	input $QuestItem3;
	next;
L_ChangeItem32:
	mes "[Daily Quest]";
	mes "How much of ^ff0000"+getitemname($QuestItem3)+"^000000 do you want?";
	mes "It must be in the range of ^0088001 ~ 50^000000.";
	next;
	input $QuestItem3HM;
	next;
	if ($QuestItem3HM > 50) goto L_HMItem3Denied;
	mes "[Daily Quest]";
	mes "Item 3 Set.";
	set $DailyQuestToday,0;
	mes "^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+".";
	next;
	goto L_ChangeQuest;

L_HMItem3Denied:
	mes "[Daily Quest]";
	mes "This item (^ff0000"+getitemname($QuestItem3)+"^000000) must be in a range of ^0088001 ~ 50^000000.";
	next;
	goto L_ChangeItem32;

L_ChangeQuestRandom:
	set $QuestItem1, rand(701,1065);
	set $QuestItem1HM, rand(1,200);
	set $QuestItem2, rand(701,1065);
	set $QuestItem2HM, rand(1,150);
	set $QuestItem3, rand(701,1065);
	set $QuestItem3HM, rand(1,50);
	set $DailyQuestToday,0;
	mes "[Daily Quest]";
	mes "This is the Daily Quest:";
	mes "^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+"";
	mes "^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+"";
	mes "^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+"";
	next;
	goto GM_Menu;

L_ChangePrize:
	next;
	mes "[Daily Quest]";
	mes "Input the Prize";
	next;
	input $DailyQuestPrize;
	next;
	mes "[Daily Quest]";
	mes "The Prize: "+getitemname($DailyQuestPrize)+" x How many?";
	next;
	input $DailyQuestPrizeHM;
	next;
	mes "[Daily Quest]";
	mes "This is what you like?";
	mes "^0000ff"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+".";
	menu "Yup, Thanks.",GM_Menu,"Noo! I made a mistake!",L_ChangePrize;

FinishQuest:
	next;
	mes "[Daily Quest]";
	mes "You got ^0000FF"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+".";
	delitem $QuestItem1,$QuestItem1HM;
	delitem $QuestItem2,$QuestItem2HM;
	delitem $QuestItem3,$QuestItem3HM;
	getitem $DailyQuestPrize,$DailyQuestPrizeHM;
	set $DailyQuestTotal,$DailyQuestTotal +1;
	set $DailyQuestToday,$DailyQuestToday +1;
	close;
}

-	script	DailyQuestItemChanger	-1,{
OnInit:
OnClock0000:
	while ( getitemname( set( $QuestItem1, rand(701,1065) ) ) == "null" );
	set $QuestItem1HM, rand(1,200);
	while ( getitemname( set( $QuestItem2, rand(701,1065) ) ) == "null" );
	set $QuestItem2HM, rand(1,150);
	while ( getitemname( set( $QuestItem3, rand(701,1065) ) ) == "null" );
	set $QuestItem3HM, rand(1,50);
	set $DailyQuestToday,0;
	end;
}

 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  152
  • Reputation:   78
  • Joined:  06/13/15
  • Last Seen:  

Hello there @Questune09,

>>>>>

step 1:

after finshing the quest, under getitem ( the prize ) add this :

set CooldownQuest,gettimetick(2);

step 2:

and before taking the quest add time check:

if(gettimetick(2) - CooldownQuest < (60 * 60 * 24)) {
	next;
	mes "[ Daily  Quest ]";
	mes "^FF0000Sorry you have to wait 24 Hours until you can do the Quest again!^000000";
	close;
	}

<<<<<

or use this 

prt_in,82,93,2	script	Daily Quest	513,{
	if (getgmlevel() >= 80) goto GM_Menu;
L_START:
	if (getgmlevel() >= 80) next;
	mes "[ Daily  Quest ]";
	mes "Total Daily Quests Finished: ^008800"+$DailyQuestTotal+"^000000.";
	mes "Today Daily Quests Finished: ^0000FF"+$DailyQuestToday+"^000000.";
	next;
	mes "[Daily  Quest]";
	mes "Hello "+strcharinfo(0)+"!";
	mes "Do you want to start today's Quest?";
	mes " ";
	menu "Yes!",-,"Nahh",L_Close;
	if(gettimetick(2) - CooldownQuest < (60 * 60 * 24)) {
	next;
	mes "[ Daily  Quest ]";
	mes "^FF0000Sorry you have to wait 24 Hours until you can do the Quest again!^000000";
	close;
	}
	next;
	mes "[Daily Quest]";
	mes "You'll need these item for Today's Quest:";
	mes "^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+"";
	mes "^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+"";
	mes "^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+"";
	mes "In exchange you will get ^0000FF"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+"";
	next;
	mes "[Daily Quest]";
	mes "Do you have the items?";
	menu "Yes! I do.",-,"Gimme some time.",L_Close;
	if(countitem($QuestItem1) >= $QuestItem1HM) && (countitem($QuestItem2) >= $QuestItem2HM) && (countitem($QuestItem3) >= $QuestItem3HM) goto FinishQuest;
	next;
	mes "[Daily Quest]";
	mes "You only have "+countitem($QuestItem1HM)+" of ^FF0000"+getitemname($QuestItem1)+"^000000, "+countitem($QuestItem2HM)+" of ^FF0000"+getitemname($QuestItem2)+"^000000, "+countitem($QuestItem3HM)+" of ^FF0000"+getitemname($QuestItem3)+"^000000.";
	mes "Come back when you have it! Better get the items quickly. It's gonna change in a Day!";
	close;

L_Close:
	next;
	mes "[Daily Quest]";
	mes "Come back again! Get the Items!";
	mes "Goodbye!";
	close;

GM_Menu:
	mes "[Daily Quest]";
	mes "Hello GM "+strcharinfo(0)+"!";
	mes "What can I do for you today?";
	menu "Player Menu",L_START,"Change Today's Quest/Prize",L_ChangeQuest,"Close",L_Close;

L_ChangeQuest:
	next;
	mes "[Daily Quest]";
	mes "What will you like to change?";
	next;
	menu "Go back.",GM_Menu,"Prize [^0000FF"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+"]",L_ChangePrize,"Change Quest Randomly",L_ChangeQuestRandom,"Change Quest by Myself",L_ChangeQuestMyself;

L_ChangeQuestMyself:
	next;
	mes "[Daily Quest]";
	mes "Which item would you like to change first?";
	menu "Go Back.",L_ChangeQuest,"Item 1 [^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+"]",L_ChangeItem1,"Item 2 [^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+"]",L_ChangeItem2,"Item 3 [^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+"]",L_ChangeItem3;

L_ChangeItem1:
	next;
	mes "[Daily Quest]";
	mes "Alright. What will be the item?";
	next;
	input $QuestItem1;
	next;
	L_ChangeItem12:
	mes "[Daily Quest]";
	mes "How much of ^ff0000"+getitemname($QuestItem1)+"^000000 do you want?";
	mes "It must be in the range of ^0088001 ~ 200^000000.";
	next;
	input $QuestItem1HM;
	next;
	if ($QuestItem1HM > 200) goto L_HMItem1Denied;
	mes "[Daily Quest]";
	mes "Item 1 Set.";
	set $DailyQuestToday,0;
	mes "^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+".";
	next;
	goto L_ChangeQuest;

L_HMItem1Denied:
	mes "[Daily Quest]";
	mes "This item (^ff0000"+getitemname($QuestItem1)+"^000000) must be in a range of ^0088001 ~ 200^000000.";
	next;
	goto L_ChangeItem12;

L_ChangeItem2:
	next;
	mes "[Daily Quest]";
	mes "Alright. What will be the item?";
	next;
	input $QuestItem2;
	next;
L_ChangeItem22:
	mes "[Daily Quest]";
	mes "How much of ^ff0000"+getitemname($QuestItem2)+"^000000 do you want?";
	mes "It must be in the range of ^0088001 ~ 150^000000.";
	next;
	input $QuestItem2HM;
	next;
	if ($QuestItem2HM > 150) goto L_HMItem2Denied;
	mes "[Daily Quest]";
	mes "Item 2 Set.";
	set $DailyQuestToday,0;
	mes "^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+".";
	next;
	goto L_ChangeQuest;

L_HMItem2Denied:
	mes "[Daily Quest]";
	mes "This item (^ff0000"+getitemname($QuestItem2)+"^000000) must be in a range of ^0088001 ~ 150^000000.";
	next;
	goto L_ChangeItem22;

L_ChangeItem3:
	next;
	mes "[Daily Quest]";
	mes "Alright. What will be the item?";
	next;
	input $QuestItem3;
	next;
L_ChangeItem32:
	mes "[Daily Quest]";
	mes "How much of ^ff0000"+getitemname($QuestItem3)+"^000000 do you want?";
	mes "It must be in the range of ^0088001 ~ 50^000000.";
	next;
	input $QuestItem3HM;
	next;
	if ($QuestItem3HM > 50) goto L_HMItem3Denied;
	mes "[Daily Quest]";
	mes "Item 3 Set.";
	set $DailyQuestToday,0;
	mes "^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+".";
	next;
	goto L_ChangeQuest;

L_HMItem3Denied:
	mes "[Daily Quest]";
	mes "This item (^ff0000"+getitemname($QuestItem3)+"^000000) must be in a range of ^0088001 ~ 50^000000.";
	next;
	goto L_ChangeItem32;

L_ChangeQuestRandom:
	set $QuestItem1, rand(701,1065);
	set $QuestItem1HM, rand(1,200);
	set $QuestItem2, rand(701,1065);
	set $QuestItem2HM, rand(1,150);
	set $QuestItem3, rand(701,1065);
	set $QuestItem3HM, rand(1,50);
	set $DailyQuestToday,0;
	mes "[Daily Quest]";
	mes "This is the Daily Quest:";
	mes "^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+"";
	mes "^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+"";
	mes "^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+"";
	next;
	goto GM_Menu;

L_ChangePrize:
	next;
	mes "[Daily Quest]";
	mes "Input the Prize";
	next;
	input $DailyQuestPrize;
	next;
	mes "[Daily Quest]";
	mes "The Prize: "+getitemname($DailyQuestPrize)+" x How many?";
	next;
	input $DailyQuestPrizeHM;
	next;
	mes "[Daily Quest]";
	mes "This is what you like?";
	mes "^0000ff"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+".";
	menu "Yup, Thanks.",GM_Menu,"Noo! I made a mistake!",L_ChangePrize;

FinishQuest:
	next;
	mes "[Daily Quest]";
	mes "You got ^0000FF"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+".";
	delitem $QuestItem1,$QuestItem1HM;
	delitem $QuestItem2,$QuestItem2HM;
	delitem $QuestItem3,$QuestItem3HM;
	getitem $DailyQuestPrize,$DailyQuestPrizeHM;
	set CooldownQuest,gettimetick(2);
	set $DailyQuestTotal,$DailyQuestTotal +1;
	set $DailyQuestToday,$DailyQuestToday +1;
	close;
}

-	script	DailyQuestItemChanger	-1,{
OnInit:
OnClock0000:
	while ( getitemname( set( $QuestItem1, rand(701,1065) ) ) == "null" );
	set $QuestItem1HM, rand(1,200);
	while ( getitemname( set( $QuestItem2, rand(701,1065) ) ) == "null" );
	set $QuestItem2HM, rand(1,150);
	while ( getitemname( set( $QuestItem3, rand(701,1065) ) ) == "null" );
	set $QuestItem3HM, rand(1,50);
	set $DailyQuestToday,0;
	end;
}

 

i recommend do adding the codes manually 

Edited by Ciel Phantomhive
  • Upvote 4
  • Love 3
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

thank you bro ^_^

working !! thank you ^_^

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  152
  • Reputation:   78
  • Joined:  06/13/15
  • Last Seen:  

15 hours ago, Questune09 said:

working !! thank you ^_^

You are welcome, please do not forget to mark as best answer

  • Upvote 3
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  07/01/12
  • Last Seen:  

1 hour ago, Ciel Phantomhive said:

You are welcome, please do not forget to mark as best answer

Thanks for your help!

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   0
  • Joined:  03/04/20
  • Last Seen:  

Hello Guys,

How to make this per IP instead of per account? Thank you!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  09/05/20
  • Last Seen:  

On 7/4/2017 at 8:46 AM, Quesooo said:

good day master i would like to ask how to make this script to every 24 hours

 

if players finish the daily quest he/she need to wait for 24 hours to do the quest again

 

thank you

 


prt_in,82,93,2	script	Daily Quest	513,{
	if (getgmlevel() >= 80) goto GM_Menu;
L_START:
	if (getgmlevel() >= 80) next;
	mes "[Daily  Quest]";
	mes "Hello "+strcharinfo(0)+"!";
	mes "Do you want to start today's Quest?";
	mes " ";
	mes "Total Daily Quests Finished: ^008800"+$DailyQuestTotal+"^000000.";
	mes "Today Daily Quests Finished: ^0000FF"+$DailyQuestToday+"^000000.";
	menu "Yes!",-,"Nahh",L_Close;
	next;
	mes "[Daily Quest]";
	mes "You'll need these item for Today's Quest:";
	mes "^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+"";
	mes "^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+"";
	mes "^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+"";
	mes "In exchange you will get ^0000FF"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+"";
	next;
	mes "[Daily Quest]";
	mes "Do you have the items?";
	menu "Yes! I do.",-,"Gimme some time.",L_Close;
	if(countitem($QuestItem1) >= $QuestItem1HM) && (countitem($QuestItem2) >= $QuestItem2HM) && (countitem($QuestItem3) >= $QuestItem3HM) goto FinishQuest;
	next;
	mes "[Daily Quest]";
	mes "You only have "+countitem($QuestItem1HM)+" of ^FF0000"+getitemname($QuestItem1)+"^000000, "+countitem($QuestItem2HM)+" of ^FF0000"+getitemname($QuestItem2)+"^000000, "+countitem($QuestItem3HM)+" of ^FF0000"+getitemname($QuestItem3)+"^000000.";
	mes "Come back when you have it! Better get the items quickly. It's gonna change in a Day!";
	close;

L_Close:
	next;
	mes "[Daily Quest]";
	mes "Come back again! Get the Items!";
	mes "Goodbye!";
	close;

GM_Menu:
	mes "[Daily Quest]";
	mes "Hello GM "+strcharinfo(0)+"!";
	mes "What can I do for you today?";
	menu "Player Menu",L_START,"Change Today's Quest/Prize",L_ChangeQuest,"Close",L_Close;

L_ChangeQuest:
	next;
	mes "[Daily Quest]";
	mes "What will you like to change?";
	next;
	menu "Go back.",GM_Menu,"Prize [^0000FF"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+"]",L_ChangePrize,"Change Quest Randomly",L_ChangeQuestRandom,"Change Quest by Myself",L_ChangeQuestMyself;

L_ChangeQuestMyself:
	next;
	mes "[Daily Quest]";
	mes "Which item would you like to change first?";
	menu "Go Back.",L_ChangeQuest,"Item 1 [^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+"]",L_ChangeItem1,"Item 2 [^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+"]",L_ChangeItem2,"Item 3 [^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+"]",L_ChangeItem3;

L_ChangeItem1:
	next;
	mes "[Daily Quest]";
	mes "Alright. What will be the item?";
	next;
	input $QuestItem1;
	next;
	L_ChangeItem12:
	mes "[Daily Quest]";
	mes "How much of ^ff0000"+getitemname($QuestItem1)+"^000000 do you want?";
	mes "It must be in the range of ^0088001 ~ 200^000000.";
	next;
	input $QuestItem1HM;
	next;
	if ($QuestItem1HM > 200) goto L_HMItem1Denied;
	mes "[Daily Quest]";
	mes "Item 1 Set.";
	set $DailyQuestToday,0;
	mes "^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+".";
	next;
	goto L_ChangeQuest;

L_HMItem1Denied:
	mes "[Daily Quest]";
	mes "This item (^ff0000"+getitemname($QuestItem1)+"^000000) must be in a range of ^0088001 ~ 200^000000.";
	next;
	goto L_ChangeItem12;

L_ChangeItem2:
	next;
	mes "[Daily Quest]";
	mes "Alright. What will be the item?";
	next;
	input $QuestItem2;
	next;
L_ChangeItem22:
	mes "[Daily Quest]";
	mes "How much of ^ff0000"+getitemname($QuestItem2)+"^000000 do you want?";
	mes "It must be in the range of ^0088001 ~ 150^000000.";
	next;
	input $QuestItem2HM;
	next;
	if ($QuestItem2HM > 150) goto L_HMItem2Denied;
	mes "[Daily Quest]";
	mes "Item 2 Set.";
	set $DailyQuestToday,0;
	mes "^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+".";
	next;
	goto L_ChangeQuest;

L_HMItem2Denied:
	mes "[Daily Quest]";
	mes "This item (^ff0000"+getitemname($QuestItem2)+"^000000) must be in a range of ^0088001 ~ 150^000000.";
	next;
	goto L_ChangeItem22;

L_ChangeItem3:
	next;
	mes "[Daily Quest]";
	mes "Alright. What will be the item?";
	next;
	input $QuestItem3;
	next;
L_ChangeItem32:
	mes "[Daily Quest]";
	mes "How much of ^ff0000"+getitemname($QuestItem3)+"^000000 do you want?";
	mes "It must be in the range of ^0088001 ~ 50^000000.";
	next;
	input $QuestItem3HM;
	next;
	if ($QuestItem3HM > 50) goto L_HMItem3Denied;
	mes "[Daily Quest]";
	mes "Item 3 Set.";
	set $DailyQuestToday,0;
	mes "^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+".";
	next;
	goto L_ChangeQuest;

L_HMItem3Denied:
	mes "[Daily Quest]";
	mes "This item (^ff0000"+getitemname($QuestItem3)+"^000000) must be in a range of ^0088001 ~ 50^000000.";
	next;
	goto L_ChangeItem32;

L_ChangeQuestRandom:
	set $QuestItem1, rand(701,1065);
	set $QuestItem1HM, rand(1,200);
	set $QuestItem2, rand(701,1065);
	set $QuestItem2HM, rand(1,150);
	set $QuestItem3, rand(701,1065);
	set $QuestItem3HM, rand(1,50);
	set $DailyQuestToday,0;
	mes "[Daily Quest]";
	mes "This is the Daily Quest:";
	mes "^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+"";
	mes "^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+"";
	mes "^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+"";
	next;
	goto GM_Menu;

L_ChangePrize:
	next;
	mes "[Daily Quest]";
	mes "Input the Prize";
	next;
	input $DailyQuestPrize;
	next;
	mes "[Daily Quest]";
	mes "The Prize: "+getitemname($DailyQuestPrize)+" x How many?";
	next;
	input $DailyQuestPrizeHM;
	next;
	mes "[Daily Quest]";
	mes "This is what you like?";
	mes "^0000ff"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+".";
	menu "Yup, Thanks.",GM_Menu,"Noo! I made a mistake!",L_ChangePrize;

FinishQuest:
	next;
	mes "[Daily Quest]";
	mes "You got ^0000FF"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+".";
	delitem $QuestItem1,$QuestItem1HM;
	delitem $QuestItem2,$QuestItem2HM;
	delitem $QuestItem3,$QuestItem3HM;
	getitem $DailyQuestPrize,$DailyQuestPrizeHM;
	set $DailyQuestTotal,$DailyQuestTotal +1;
	set $DailyQuestToday,$DailyQuestToday +1;
	close;
}

-	script	DailyQuestItemChanger	-1,{
OnInit:
OnClock0000:
	while ( getitemname( set( $QuestItem1, rand(701,1065) ) ) == "null" );
	set $QuestItem1HM, rand(1,200);
	while ( getitemname( set( $QuestItem2, rand(701,1065) ) ) == "null" );
	set $QuestItem2HM, rand(1,150);
	while ( getitemname( set( $QuestItem3, rand(701,1065) ) ) == "null" );
	set $QuestItem3HM, rand(1,50);
	set $DailyQuestToday,0;
	end;
}

 

hello there sir can i use your script?
and where can i exchange the prize instead of null?
thanks in advance

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   0
  • Joined:  03/04/20
  • Last Seen:  

13 hours ago, thobs said:

hello there sir can i use your script?
and where can i exchange the prize instead of null?
thanks in advance

once you loaded the npc you can change in there.

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...