Jump to content
  • 0

R>Custom Quest npc with choosable answer?


Rocky Road

Question


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  72
  • Reputation:   0
  • Joined:  11/08/14
  • Last Seen:  

Hi guys!!

 

i just wanna ask if someone have an quest npc or any npc that have 3 choosable answer??

 

like

 

NPC: what do you want to do?

 

answer is

 

>i want to hear the story of etc etc etc

>i want to do the quest!!

>nothing

 

then the player will choose if i want to hear the story the npc will tell the story of something etc

 

if i want to do the quest the npc will ask the player to bring the letter to bring to another npc? (this letter will given by the npc to a player)

 

if nothing then the npc will end convo with the player like THEN GET LOST!

 

i wish someone have this T=T this is like a chain quest after the player send the letter to the next npc the npc will ask the player to hunt some items to to make him some keys to enter to some dungeons?

 

please help T_T

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  545
  • Reputation:   220
  • Joined:  03/01/13
  • Last Seen:  

The best thing you can do is read the wiki page about scripting. Once you've done that, look at existing quests (ones you've played in-game and see how they work by reading the script. After that, play around with some stuff until you feel comfortable. For this NPC, 'testque' is your quest variable. It is the variable that will link all subsequent NPCs in that quest chain. Next NPC would do the following or an equivalent statement.

if (testque > 0) {

Not tested. 

prontera,163,195,3	script	TestNPC	50,1,1,{//NPC info including location, sprite, and name.
if (testque < 1) {//quest variable
	mes "[Test]";
	mes "How long have you been there?";
	mes "Were do you want from me?";
	next;
	switch(select("I want to hear the story.:Let me help:Nothing")){ //options
		case 1://story
			mes "[Test]";
			mes "Insert story here.";
			next;
			mes "[Test]";
			mes "More story...";
			next;
			mes "[Test]";
			mes "Help with quest?";
			if (select("No.:Yes.") == 1) {
				next;
				mes "[Test]";
				mes "Come back when you are ready.";
				end;
			}
			set testque,1;
			next;
			mes "[Test]";
			mes "Good luck.";
			end;
		case 2://start quest
			mes "[Test]";
			mes "Begin the quest.";
			next;
			mes "[Test]";
			mes "Talk more.";
			set testque,1;//start of quest, sets variable to 1
                        getitem 512,1;//quest item (I used an apple here)
			end;
		case 3://do nothing
			end;
	}
}
if (testque > 0) {//if quest has been started
	mes "[Test]";
	mes "How is the quest going?";
	next;
	mes "[Test]";
	mes "Talk more.";
	end;
}
else {//anything else; since quest can only be started or not started, this will never trigger.
	mes "[Test]";
	mes "Sample.";
	end;
}
}

Hope this helps,
~Azura Skyy

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  72
  • Reputation:   0
  • Joined:  11/08/14
  • Last Seen:  

The best thing you can do is read the wiki page about scripting. Once you've done that, look at existing quests (ones you've played in-game and see how they work by reading the script. After that, play around with some stuff until you feel comfortable. For this NPC, 'testque' is your quest variable. It is the variable that will link all subsequent NPCs in that quest chain. Next NPC would do the following or an equivalent statement.

if (testque > 0) {

Not tested. 

prontera,163,195,3	script	TestNPC	50,1,1,{//NPC info including location, sprite, and name.
if (testque < 1) {//quest variable
	mes "[Test]";
	mes "How long have you been there?";
	mes "Were do you want from me?";
	next;
	switch(select("I want to hear the story.:Let me help:Nothing")){ //options
		case 1://story
			mes "[Test]";
			mes "Insert story here.";
			next;
			mes "[Test]";
			mes "More story...";
			next;
			mes "[Test]";
			mes "Help with quest?";
			if (select("No.:Yes.") == 1) {
				next;
				mes "[Test]";
				mes "Come back when you are ready.";
				end;
			}
			set testque,1;
			next;
			mes "[Test]";
			mes "Good luck.";
			end;
		case 2://start quest
			mes "[Test]";
			mes "Begin the quest.";
			next;
			mes "[Test]";
			mes "Talk more.";
			set testque,1;//start of quest, sets variable to 1
                        getitem 512,1;//quest item (I used an apple here)
			end;
		case 3://do nothing
			end;
	}
}
if (testque > 0) {//if quest has been started
	mes "[Test]";
	mes "How is the quest going?";
	next;
	mes "[Test]";
	mes "Talk more.";
	end;
}
else {//anything else; since quest can only be started or not started, this will never trigger.
	mes "[Test]";
	mes "Sample.";
	end;
}
}

Hope this helps,

~Azura Skyy

cool thanks it works

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