Jump to content
  • 0

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


Question

Posted (edited)

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

1 answer to this question

Recommended Posts

  • 1
Posted

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...