Jump to content
  • 0

How to make this script daily quest only doable by 1 character per account per day


wakefield21

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  115
  • Reputation:   4
  • Joined:  08/14/16
  • Last Seen:  

Hello rAthena, can you please help me about my problem as I've stated at the title. Thank you guys very much!
 

//===== rAthena Script =======================================
//= Eden Group Quests - Mission [11 - 25]
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.5
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= Repetable Quests for Players between Baselevel 11 - 25.
//===== Additional Comments: =================================
//= 1.0 First Version.
//= 1.1 Some little optimization here and there. [Masao]
//= 1.2 Optimized. [Euphy]
//= 1.3 Bug fixes. [Capuche]
//= 1.4 Added support to Para_Team_Mark_ in Eden Group. [Ragno]
//= 1.5 Added use of F_HasEdenGroupMark function. [Ragno]
//============================================================

guildhall,44,88,5	script	Mission [11 - 25]#Tuto	4_BOARD3,{
	if (!callfunc("F_HasAdvenGuildMark")) {
		mes "- You need to have an -";
		mes "- ^4d4dff'Adventurer's Guild Mark'^000000 -";
		mes "- to receive these missions. -";
		close;
	}
	if (isbegin_quest(79101) == 1) {
		mes "- You still haven't finished -";
		mes "- the ^4d4dff'Daily Quest'^000000 -";
		mes "- introduction quest. -";
		close;
	}
	for ( .@i = 80012; .@i < 80024; .@i++ )
		if (checkquest(.@i,PLAYTIME) == 2) erasequest .@i;
	for( .@i = 80000; .@i < 80012; .@i++ ) {
		.@j = checkquest(.@i,HUNTING);
		if (.@j == 2) {
			mes " - You must collect your - ";
			mes " - reward before starting - ";
			mes " - a new mission. - ";
			mes " ";
			mes " - Quest Manager : Spike - ";
			close;
		}
		else if (.@j >= 0) {
			mes " - You can only request - ";
			mes " - one mission at a time. - ";
			mes " ";
			mes " - Quest Manager : Spike - ";
			close;
		}
	}
	if (BaseLevel < 11) {
		mes " - There are no tasks - ";
		mes " - open for you right now. - ";
		close;
	}
	if (BaseLevel > 25) {
		mes " - These missions are too - ";
		mes " - easy for your caliber - ";
		mes " - search for a more level - ";
		mes " - appropriate mission. - ";
		mes " ";
		mes " - Quest Manager : Spike -";
		close;
	}
	mes " - Daily Guild Mission Bulletin Board -";
	mes " ";
	mes " - For ^990000Rank F's^000000 - Level's ^00009911-25^000000 -";
	mes " ";
	mes " - Quest Manager : Spike -";
	next;
	switch(select("Hornet Extermination:Condor Extermination:Rocker Extermination:Worm Tail Extermination:Spore Extermination:Pest Extermination:Muka Extermination:Familiar Extermination:Peco Peco Extermination:Roda Frog Extermination:Ambernite Extermination:Aster Extermination:Cancel")) {
		case 1: callsub L_Quest,80000,"Hornet Extermination"," - Hunt 10 ^4d4dff'Hornets'^000000 - "," - northwest of Prontera - "," - and bring 10 ^4d4dffBee Stings^000000. - ";
		case 2: callsub L_Quest,80001,"Condor Extermination"," - Hunt 20 ^4d4dff'Condors'^000000 - "," - south of Morocc - "," - and bring 10 ^4d4dffTalons^000000. - ";
		case 3: callsub L_Quest,80002,"Rocker Extermination"," - Hunt 10 ^4d4dff'Rockers'^000000 - "," - southwest of Prontera - "," - and bring 10 ^4d4dffGrasshopper's Legs^000000. - ";
		case 4: callsub L_Quest,80003,"Worm Tail Extermination"," - Hunt 20 ^4d4dff'Worm Tails'^000000 - "," - southeast of Payon - "," - and bring 10 ^4d4dffPointed Scales^000000. - ";
		case 5: callsub L_Quest,80004,"Spore Extermination"," - Hunt 20 ^4d4dff'Spores'^000000 - "," - around Payon -"," - and bring 10 ^4d4dffMushroom Spores^000000. - ";
		case 6: callsub L_Quest,80005,"Pest Extermination"," - Hunt 15 ^4d4dff'Thief Bug Eggs'^000000 - "," - in the Prontera Culvert - "," - and bring 10 ^4d4dffChrysalises^000000. - ";
		case 7: callsub L_Quest,80006,"Muka Extermination"," - Hunt 20 ^4d4dff'Mukas'^000000 - "," - south of Prontera - "," - and bring 10 ^4d4dffCactus Needles^000000. - ";
		case 8: callsub L_Quest,80007,"Familiar Extermination"," - Hunt 20 ^4d4dff'Familiars'^000000 - "," - in the Culvert Sewers - "," - west of Prontera - "," - and bring 10 ^4d4dffTooth of Bats^000000. - ";
		case 9: callsub L_Quest,80008,"Peco Peco Extermination"," - Hunt 15 ^4d4dff'Peco Pecos'^000000 - "," - south of Prontera - "," - and bring 10 ^4d4dffBill of Birds^000000. - ";
		case 10: callsub L_Quest,80009,"Roda Frog Extermination"," - Hunt 20 ^4d4dff'Roda Frogs'^000000 - "," - southeast of Geffen - "," - and bring 10 ^4d4dffSticky Webfoots^000000. - ";
		case 11: callsub L_Quest,80010,"Ambernite Extermination"," - Hunt 15 ^4d4dff'Ambernites'^000000 - "," - northeast of Geffen - "," - and bring 10 ^4d4dffSnail Shells^000000. - ";
		case 12: callsub L_Quest,80011,"Aster Extermination"," - Hunt 20 ^4d4dff'Asters'^000000 - "," - southeast of Comodo - "," - and bring 10 ^4d4dffSingle Cells^000000. - ";
		case 13:
			mes " - Stopped reading the Daily Guild Mission Bulletin Board. - ";
			close;
	}

L_Quest:
	.@quest_status = checkquest(getarg(0)+12,PLAYTIME);
	if (.@quest_status == 0 || .@quest_status == 1) {
		mes " - Mission ^4d4dff"+ getarg(1) +"^000000 - ";
		mes " - is already finished for today. - ";
		mes " ";
		mes " - Quest Manager : Spike -";
		close;
	}
	mes " - Mission '"+ getarg(1) +"' - ";
	for ( .@i = 2; .@i < getargcount(); .@i++ )
		mes getarg(.@i);
	mes " ";
	mes " - Quest Manager : Spike -";
	next;
	if (select("I will do this mission.:Look for other missions.") == 2) {
		mes " - Let's search for -";
		mes " - other missions. - ";
		close;
	}
	for ( .@i = 2; .@i < getargcount(); .@i++ )
		mes getarg(.@i);
	setquest getarg(0);
	close;

OnInit:
	questinfo QTYPE_DAILYQUEST, QMARK_PURPLE, " (checkquest(79101) == 2 && BaseLevel >= 11 && BaseLevel <= 25) ";
	end;
}

guildhall,44,90,5	script	Spike	4_M_JP_RUN,{
	for( .@i = 80000; .@i < 80012; .@i++ ) {
		.@j = checkquest(.@i,HUNTING);
		if (.@j == 2) {
			switch(.@i) {
				case 80000: callsub L_Quest,.@i,"Hornet Extermination",47006,939,10;
				case 80001: callsub L_Quest,.@i,"Condor Extermination",47006,917,10;
				case 80002: callsub L_Quest,.@i,"Rocker Extermination",47006,940,10;
				case 80003: callsub L_Quest,.@i,"Worm Tail Extermination",47006,906,10;
				case 80004: callsub L_Quest,.@i,"Spore Extermination",47006,921,10;
				case 80005: callsub L_Quest,.@i,"Pest Extermination",47006,915,10;
				case 80006: callsub L_Quest,.@i,"Muka Extermination",47006,952,10;
				case 80007: callsub L_Quest,.@i,"Familiar Extermination",47006,913,10;
				case 80008: callsub L_Quest,.@i,"Peco Peco Extermination",47006,925,10;
				case 80009: callsub L_Quest,.@i,"Roda Frog Extermination",47006,918,10;
				case 80010: callsub L_Quest,.@i,"Ambernite Extermination",47006,946,10;
				case 80011: callsub L_Quest,.@i,"Aster Extermination",47006,1052,10;
			}
		}
		else if (.@j >= 0) {
			mes "[Spike]";
			mes "You haven't finished your mission yet.";
			mes "Keep up the good work. You are almost done.";
			close;
		}
	}

	if (!callfunc("F_HasAdvenGuildMark")) {
		mes "[Spike]";
		mes "Looks like you are not yet a member of the guild. Register first to ^000099Secretary Organa^000000 then we can talk. You can find her across the hallway to the right.";
		close;
	} else {
		mes "[Spike]";
		mes "I'm the administrator for the";
		mes "F rank Missions [11 - 25]";
		next;
		mes "[Spike]";
		mes "Once you finish a task within this level range, speak to me so you can claim your rewards.";
		close;
	}

L_Quest:
	.@quest_id = getarg(0);
	if (checkquest(.@quest_id,HUNTING) == 2) {
		.@item_req = getarg(3,0);
		.@req_amount = getarg(4,0);
		if (.@item_req) {
			if (countitem(.@item_req) < .@req_amount) {
				mes "[Spike]";
				mes "You don't have enough "+ getitemname(.@item_req) +".";
				mes "You need to bring "+ .@req_amount +" "+ getitemname(.@item_req) +".";
				close;
			}
		}
		mes "[Spike]";
		mes "Hmm... let me see~";
		mes "You have completed the '"+ getarg(1) +"' mission.";
		next;
		mes "[Spike]";
		mes "Good work~!!";
		mes "Our client is so happy with your work. He will appreciate what you have done.";
		mes "Please help us again. Thanks!";
		if (.@item_req)
			delitem .@item_req,.@req_amount;
		erasequest .@quest_id;
		setquest .@quest_id+12;
		getitem getarg(2),1;
		close;
	}
OnInit:	
	questinfo QTYPE_QUEST2, QMARK_YELLOW, " checkquest(80000,HUNTING) == 2 && countitem(939) >= 10 || checkquest(80001,HUNTING) == 2 && countitem(917) >= 10 || checkquest(80002,HUNTING) == 2 && countitem(940) >= 10 || checkquest(80003,HUNTING) == 2 && countitem(906) >= 10 || checkquest(80004,HUNTING) == 2 && countitem(921) >= 10 || checkquest(80005,HUNTING) == 2 && countitem(915) >= 10 || checkquest(80006,HUNTING) == 2 && countitem(952) >= 10 || checkquest(80007,HUNTING) == 2 && countitem(913) >= 10 || checkquest(80008,HUNTING) == 2 && countitem(925) >= 10 || checkquest(80009,HUNTING) == 2 && countitem(918) >= 10 || checkquest(80010,HUNTING) == 2 && countitem(946) >= 10 || checkquest(80011,HUNTING) == 2 && countitem(1052) >= 10 ";
	end;
}

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  241
  • Reputation:   18
  • Joined:  06/04/14
  • Last Seen:  

1 hour ago, wakefield21 said:

Hello rAthena, can you please help me about my problem as I've stated at the title. Thank you guys very much!
 


//===== rAthena Script =======================================
//= Eden Group Quests - Mission [11 - 25]
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.5
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= Repetable Quests for Players between Baselevel 11 - 25.
//===== Additional Comments: =================================
//= 1.0 First Version.
//= 1.1 Some little optimization here and there. [Masao]
//= 1.2 Optimized. [Euphy]
//= 1.3 Bug fixes. [Capuche]
//= 1.4 Added support to Para_Team_Mark_ in Eden Group. [Ragno]
//= 1.5 Added use of F_HasEdenGroupMark function. [Ragno]
//============================================================

guildhall,44,88,5	script	Mission [11 - 25]#Tuto	4_BOARD3,{
	if (!callfunc("F_HasAdvenGuildMark")) {
		mes "- You need to have an -";
		mes "- ^4d4dff'Adventurer's Guild Mark'^000000 -";
		mes "- to receive these missions. -";
		close;
	}
	if (isbegin_quest(79101) == 1) {
		mes "- You still haven't finished -";
		mes "- the ^4d4dff'Daily Quest'^000000 -";
		mes "- introduction quest. -";
		close;
	}
	for ( .@i = 80012; .@i < 80024; .@i++ )
		if (checkquest(.@i,PLAYTIME) == 2) erasequest .@i;
	for( .@i = 80000; .@i < 80012; .@i++ ) {
		.@j = checkquest(.@i,HUNTING);
		if (.@j == 2) {
			mes " - You must collect your - ";
			mes " - reward before starting - ";
			mes " - a new mission. - ";
			mes " ";
			mes " - Quest Manager : Spike - ";
			close;
		}
		else if (.@j >= 0) {
			mes " - You can only request - ";
			mes " - one mission at a time. - ";
			mes " ";
			mes " - Quest Manager : Spike - ";
			close;
		}
	}
	if (BaseLevel < 11) {
		mes " - There are no tasks - ";
		mes " - open for you right now. - ";
		close;
	}
	if (BaseLevel > 25) {
		mes " - These missions are too - ";
		mes " - easy for your caliber - ";
		mes " - search for a more level - ";
		mes " - appropriate mission. - ";
		mes " ";
		mes " - Quest Manager : Spike -";
		close;
	}
	mes " - Daily Guild Mission Bulletin Board -";
	mes " ";
	mes " - For ^990000Rank F's^000000 - Level's ^00009911-25^000000 -";
	mes " ";
	mes " - Quest Manager : Spike -";
	next;
	switch(select("Hornet Extermination:Condor Extermination:Rocker Extermination:Worm Tail Extermination:Spore Extermination:Pest Extermination:Muka Extermination:Familiar Extermination:Peco Peco Extermination:Roda Frog Extermination:Ambernite Extermination:Aster Extermination:Cancel")) {
		case 1: callsub L_Quest,80000,"Hornet Extermination"," - Hunt 10 ^4d4dff'Hornets'^000000 - "," - northwest of Prontera - "," - and bring 10 ^4d4dffBee Stings^000000. - ";
		case 2: callsub L_Quest,80001,"Condor Extermination"," - Hunt 20 ^4d4dff'Condors'^000000 - "," - south of Morocc - "," - and bring 10 ^4d4dffTalons^000000. - ";
		case 3: callsub L_Quest,80002,"Rocker Extermination"," - Hunt 10 ^4d4dff'Rockers'^000000 - "," - southwest of Prontera - "," - and bring 10 ^4d4dffGrasshopper's Legs^000000. - ";
		case 4: callsub L_Quest,80003,"Worm Tail Extermination"," - Hunt 20 ^4d4dff'Worm Tails'^000000 - "," - southeast of Payon - "," - and bring 10 ^4d4dffPointed Scales^000000. - ";
		case 5: callsub L_Quest,80004,"Spore Extermination"," - Hunt 20 ^4d4dff'Spores'^000000 - "," - around Payon -"," - and bring 10 ^4d4dffMushroom Spores^000000. - ";
		case 6: callsub L_Quest,80005,"Pest Extermination"," - Hunt 15 ^4d4dff'Thief Bug Eggs'^000000 - "," - in the Prontera Culvert - "," - and bring 10 ^4d4dffChrysalises^000000. - ";
		case 7: callsub L_Quest,80006,"Muka Extermination"," - Hunt 20 ^4d4dff'Mukas'^000000 - "," - south of Prontera - "," - and bring 10 ^4d4dffCactus Needles^000000. - ";
		case 8: callsub L_Quest,80007,"Familiar Extermination"," - Hunt 20 ^4d4dff'Familiars'^000000 - "," - in the Culvert Sewers - "," - west of Prontera - "," - and bring 10 ^4d4dffTooth of Bats^000000. - ";
		case 9: callsub L_Quest,80008,"Peco Peco Extermination"," - Hunt 15 ^4d4dff'Peco Pecos'^000000 - "," - south of Prontera - "," - and bring 10 ^4d4dffBill of Birds^000000. - ";
		case 10: callsub L_Quest,80009,"Roda Frog Extermination"," - Hunt 20 ^4d4dff'Roda Frogs'^000000 - "," - southeast of Geffen - "," - and bring 10 ^4d4dffSticky Webfoots^000000. - ";
		case 11: callsub L_Quest,80010,"Ambernite Extermination"," - Hunt 15 ^4d4dff'Ambernites'^000000 - "," - northeast of Geffen - "," - and bring 10 ^4d4dffSnail Shells^000000. - ";
		case 12: callsub L_Quest,80011,"Aster Extermination"," - Hunt 20 ^4d4dff'Asters'^000000 - "," - southeast of Comodo - "," - and bring 10 ^4d4dffSingle Cells^000000. - ";
		case 13:
			mes " - Stopped reading the Daily Guild Mission Bulletin Board. - ";
			close;
	}

L_Quest:
	.@quest_status = checkquest(getarg(0)+12,PLAYTIME);
	if (.@quest_status == 0 || .@quest_status == 1) {
		mes " - Mission ^4d4dff"+ getarg(1) +"^000000 - ";
		mes " - is already finished for today. - ";
		mes " ";
		mes " - Quest Manager : Spike -";
		close;
	}
	mes " - Mission '"+ getarg(1) +"' - ";
	for ( .@i = 2; .@i < getargcount(); .@i++ )
		mes getarg(.@i);
	mes " ";
	mes " - Quest Manager : Spike -";
	next;
	if (select("I will do this mission.:Look for other missions.") == 2) {
		mes " - Let's search for -";
		mes " - other missions. - ";
		close;
	}
	for ( .@i = 2; .@i < getargcount(); .@i++ )
		mes getarg(.@i);
	setquest getarg(0);
	close;

OnInit:
	questinfo QTYPE_DAILYQUEST, QMARK_PURPLE, " (checkquest(79101) == 2 && BaseLevel >= 11 && BaseLevel <= 25) ";
	end;
}

guildhall,44,90,5	script	Spike	4_M_JP_RUN,{
	for( .@i = 80000; .@i < 80012; .@i++ ) {
		.@j = checkquest(.@i,HUNTING);
		if (.@j == 2) {
			switch(.@i) {
				case 80000: callsub L_Quest,.@i,"Hornet Extermination",47006,939,10;
				case 80001: callsub L_Quest,.@i,"Condor Extermination",47006,917,10;
				case 80002: callsub L_Quest,.@i,"Rocker Extermination",47006,940,10;
				case 80003: callsub L_Quest,.@i,"Worm Tail Extermination",47006,906,10;
				case 80004: callsub L_Quest,.@i,"Spore Extermination",47006,921,10;
				case 80005: callsub L_Quest,.@i,"Pest Extermination",47006,915,10;
				case 80006: callsub L_Quest,.@i,"Muka Extermination",47006,952,10;
				case 80007: callsub L_Quest,.@i,"Familiar Extermination",47006,913,10;
				case 80008: callsub L_Quest,.@i,"Peco Peco Extermination",47006,925,10;
				case 80009: callsub L_Quest,.@i,"Roda Frog Extermination",47006,918,10;
				case 80010: callsub L_Quest,.@i,"Ambernite Extermination",47006,946,10;
				case 80011: callsub L_Quest,.@i,"Aster Extermination",47006,1052,10;
			}
		}
		else if (.@j >= 0) {
			mes "[Spike]";
			mes "You haven't finished your mission yet.";
			mes "Keep up the good work. You are almost done.";
			close;
		}
	}

	if (!callfunc("F_HasAdvenGuildMark")) {
		mes "[Spike]";
		mes "Looks like you are not yet a member of the guild. Register first to ^000099Secretary Organa^000000 then we can talk. You can find her across the hallway to the right.";
		close;
	} else {
		mes "[Spike]";
		mes "I'm the administrator for the";
		mes "F rank Missions [11 - 25]";
		next;
		mes "[Spike]";
		mes "Once you finish a task within this level range, speak to me so you can claim your rewards.";
		close;
	}

L_Quest:
	.@quest_id = getarg(0);
	if (checkquest(.@quest_id,HUNTING) == 2) {
		.@item_req = getarg(3,0);
		.@req_amount = getarg(4,0);
		if (.@item_req) {
			if (countitem(.@item_req) < .@req_amount) {
				mes "[Spike]";
				mes "You don't have enough "+ getitemname(.@item_req) +".";
				mes "You need to bring "+ .@req_amount +" "+ getitemname(.@item_req) +".";
				close;
			}
		}
		mes "[Spike]";
		mes "Hmm... let me see~";
		mes "You have completed the '"+ getarg(1) +"' mission.";
		next;
		mes "[Spike]";
		mes "Good work~!!";
		mes "Our client is so happy with your work. He will appreciate what you have done.";
		mes "Please help us again. Thanks!";
		if (.@item_req)
			delitem .@item_req,.@req_amount;
		erasequest .@quest_id;
		setquest .@quest_id+12;
		getitem getarg(2),1;
		close;
	}
OnInit:	
	questinfo QTYPE_QUEST2, QMARK_YELLOW, " checkquest(80000,HUNTING) == 2 && countitem(939) >= 10 || checkquest(80001,HUNTING) == 2 && countitem(917) >= 10 || checkquest(80002,HUNTING) == 2 && countitem(940) >= 10 || checkquest(80003,HUNTING) == 2 && countitem(906) >= 10 || checkquest(80004,HUNTING) == 2 && countitem(921) >= 10 || checkquest(80005,HUNTING) == 2 && countitem(915) >= 10 || checkquest(80006,HUNTING) == 2 && countitem(952) >= 10 || checkquest(80007,HUNTING) == 2 && countitem(913) >= 10 || checkquest(80008,HUNTING) == 2 && countitem(925) >= 10 || checkquest(80009,HUNTING) == 2 && countitem(918) >= 10 || checkquest(80010,HUNTING) == 2 && countitem(946) >= 10 || checkquest(80011,HUNTING) == 2 && countitem(1052) >= 10 ";
	end;
}

 

If you will read this thread you can identify how you can do it.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  115
  • Reputation:   4
  • Joined:  08/14/16
  • Last Seen:  

52 minutes ago, Ronald said:

If you will read this thread you can identify how you can do it.

This doesn't help me at all as that topic will permanently make the quest not doable again. This quest is a daily quest npc, all I want is to make the daily quest only doable once a day by only 1 character per account.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  241
  • Reputation:   18
  • Joined:  06/04/14
  • Last Seen:  

12 minutes ago, wakefield21 said:

This doesn't help me at all as that topic will permanently make the quest not doable again. This quest is a daily quest npc, all I want is to make the daily quest only doable once a day by only 1 character per account.

Ohh sorry. I was kinda sleepy when I replied to you. This might help you.

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