Jump to content
  • 0

Help with my script, how to add if conditions and dialogs after a quest is given (checkquest)


drifterxxxx2

Question


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.02
  • Content Count:  83
  • Reputation:   3
  • Joined:  10/22/17
  • Last Seen:  

Hi

I'm trying to make this script work

The problem is the after I accept quest 8507 the NPC doesn't go to line 13 

It simply repeat the line 56

prontera,72,165,4	script	NPC	509,{
if (BaseLevel < 120) {
	mes .n$;
	mes "you're not allowed";
	mes "go level";
	close;
} 

if (checkquest(8507) == 2) && (checkquest(8508) == 2) && (checkquest(8508) == 2) && (checkquest(8510) == 2) {
	mes "you're really good at hunting!";
	close;
} else {
	if (checkquest(8507) != -1) {
		if (checkquest(8507,HUNTING) != 2) {
			mes .n$;
			mes "i'm glad you helped us.";
			mes "go hunt.";
			close2;
			emotion ET_OK;
			end;
		}
	}
	
	if (checkquest(8508) != -1) {
		if (checkquest(8508,HUNTING) != 2) {
			mes .n$;
			mes "i'm glad you helped us.";
			mes "go hunt.";
			close2;
			emotion ET_OK;
			end;
		}
	}
	
	if (checkquest(8509) != -1) {
		if (checkquest(8509,HUNTING) != 2) {
			mes .n$;
			mes "i'm glad you helped us.";
			mes "go hunt";
			close2;
			emotion ET_OK;
			end;
		}
	}
	
	if (checkquest(8510) != -1) {
		if (checkquest(8510,HUNTING) != 2) {
			mes .n$;
			mes "i'm glad you helped us.";
			mes "go hunt.";
			close2;
			emotion ET_OK;
			end;
		}
	}
	else {
	mes .n$;
	mes "finally you're more than 120";
	mes "please help us";
	next;
		switch(select("yes","no.")) {
			case 1:
				mes .n$;
				mes "yay!";
				setquest 8507;
				close2;
				emotion ET_OK;
				end;
			case 2:
				next;
				mes .n$;
				mes "bleh.";
				close2;
				emotion ET_CRY;
				end;
		}
	}
}
}

How can I make the NPC check if i'm in the middle of a quest and say string "I'm glad you helped us"....

Accepting all kind of tips! 

/thx 

Edited by Rolf
changed title
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 1

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

you can just use checkquest(number) = 1 = Quest has been given and state is active. something like this
 

	if(checkquest(8507) = 1 || checkquest(8508) = 1 || checkquest(8509) = 1 || checkquest(8510) = 1){
		mes "Im glad you helped us please hunt";
		close;
		}

 

  • Like 1
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...