Jump to content
  • 0

help for chain quest (limiting given items or zeny to one time only per player character)


Revolted

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   0
  • Joined:  04/12/13
  • Last Seen:  

Hi, I'm new at scripting and I'm making a chain quest, that part is easy enough but I whould like to limit items an zeny given by npc's to one time only, I'd also like to make it so players can only do those chain quest one time and in a sequence.

 

Any help is apreciated, thank you.

Edited by Revolted
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  410
  • Reputation:   29
  • Joined:  04/04/12
  • Last Seen:  

Just make a player variable like playerprogress, set it to 0 to begin with.

 

Set it to 1 when they're on step 1, 2 on step 2, etc.


Make the NPC only do what it's supposed to when they are on the correct step by checking the variable.  You can also use this to make sure they only get a reward once.

 

The code for step 3, for example, would look like

 

 

If (playerprogress < 3) {
mes "You dont have business with me yet.";
close;
}

if (playerprogress == 3) {
do whatever step 3 is,
give the reward,
then set playerprogress to 4 so this part cant be repeated.
}

if (playerprogress > 3) {
mes "I'm done with you!  Go see the next guy!";
close;
}
 
Edited by michaelsoftman
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   0
  • Joined:  04/12/13
  • Last Seen:  

Oh, thanks michaelsoftman, I'm going to give it a try /no1

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