Jump to content
  • 0

How to make my custom quest account bound and base lvl restriction ?


Dolphin86

Question


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  757
  • Reputation:   17
  • Joined:  01/07/12
  • Last Seen:  

as title above, i just need help to add account bound and base lvl restriction cmd in this script, and player can only retake the quest after 24 hour wait duration is finish.

Spoiler

moc_para01,39,36,5	script	Quest Manager2	732,{

	if(countitem(40056) < 1) {
	soundeffect "menu.wav",0;
	mes "[^FF7700Quest Manager2^000000]";
	mes "Oh hello, im sorry,";
	mes "it seems you are not yet a register";
	mes "as a guild member, kindly register yourself";
	mes "at front desk to start accepting quest.";
	close;
	}
	
	soundeffect "menu.wav",0;
	mes "[^FF7700Quest Manager2^000000]";
	mes "Hello, Please Select Quest";
	next();
	switch(select("- Hunting Quest:- Collecting Quest:- Nothing")){
		case 1:
			clear;
			soundeffect "menu.wav",0;
			mes "[^FF7700Quest Manager2^000000]";
			mes "Please select a quest";
			switch(select("- Prontera Field 01 (Level 1-20):- Cancel")){
				case 1:
					clear;
					soundeffect "menu.wav",0;
					mes "[^FF7700Quest Manager2^000000]";
					mes "Please hunt and kill the following";
					mes "-300 Poring";
					mes "-300 Fabre";
					mes "-300 Pupa";
					next;
					mes "=================";
					mes "Reward:";
					mes "2100 base exp";
					mes "2100 job exp";
					mes "1 GMC";
					mes "1 Supply Box";
					switch(select("- Take Quest:- Submit Completed Quest:- Cancel")){
						case 1:
							if(gettimetick(2) - CooldownQuest < (60 * 60 * 24)) {
							clear;
							soundeffect "menu.wav",0;
							mes "[^FF7700Quest Manager2^000000]";
							mes "Sorry you have to wait 24 Hours until you can do the Quest again!";
							close;
							}
							if (checkquest(120000) == -1) {
							clear;
							soundeffect "menu.wav",0;
							mes "[^FF7700Quest Manager2^000000]";
							mes "You have taken this quest, good luck !";
							setquest 120000;
							} else {
							clear;
							soundeffect "menu.wav",0;
							mes "[^FF7700Quest Manager2^000000]";
							mes "Sorry, but you already have this quest.";
							}
							break;
						case 2:
							if (checkquest(120000) == 0 || checkquest(120000) == 1) {
							clear;
							soundeffect "menu.wav",0;
							mes "[^FF7700Quest Manager2^000000]";
							mes "Well done!";
							mes "here is your rewards";
							getitem 40221,1;
							getitem 40222,1;
							getexp 2100,2100;
							erasequest 120000;
							set CooldownQuest,gettimetick(2);
							}
							else if (checkquest(120000) == -1) {
							clear;
							soundeffect "menu.wav",0;
							mes "[^FF7700Quest Manager2^000000]";
							mes "It's look like you have not take the quest";
							}
							break;
						case 3:
							end;
					}
				case 2:
					end;
			}
		case 2:
			clear;
			soundeffect "menu.wav",0;
			mes "[^FF7700Quest Manager2^000000]";
			mes "WIP";
			close;
		case 3:
			end;
	}
}

 

 

Edited by Dolphin86
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  250
  • Reputation:   114
  • Joined:  06/02/12
  • Last Seen:  

8 minutes ago, Dolphin86 said:

ok that did work, but what about account bound? dont want my player to abuse by making new char and repeat the quest over and over again..., the objective was to make it daily quest, time limitation by 24 hours and account bound, 

daily quest : done

level restriction : done

account bound : not completed yet..

which means it is account bound but when time restiction by 24 hours is done, player can take the quest again

Replace all EXCOOLDOWN with #EXCOOLDOWN

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  383
  • Reputation:   78
  • Joined:  10/30/12
  • Last Seen:  

Try this for example:

if (BaseLevel > 24) {
	if (EXCOOLDOWN > gettimetick(2)){
		mes "you need to wait for 24 hour";
		close;
	}
	EXCOOLDOWN = gettimetick(2) + 86400;
	mes "bla bla bla bla";
	mes "COMPLETE!";
	close;
}

 

Edited by mrfizi
typo
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  757
  • Reputation:   17
  • Joined:  01/07/12
  • Last Seen:  

16 hours ago, mrfizi said:

Try this for example:

if (BaseLevel > 24) {
	if (EXCOOLDOWN > gettimetick(2)){
		mes "you need to wait for 24 hour";
		close;
	}
	EXCOOLDOWN = gettimetick(2) + 86400;
	mes "bla bla bla bla";
	mes "COMPLETE!";
	close;
}

 

ok that did work, but what about account bound? dont want my player to abuse by making new char and repeat the quest over and over again..., the objective was to make it daily quest, time limitation by 24 hours and account bound, 

daily quest : done

level restriction : done

account bound : not completed yet..

which means it is account bound but when time restiction by 24 hours is done, player can take the quest again

Edited by Dolphin86
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...