Jump to content
  • 0
Sign in to follow this  
Skits

Need help fixing this npc quest script i got from a tool.

Question

so i used a tool for making a script for my quest npc for (helm and wing) i  just want a quest npc wherein when you click the npc it gives you 2 options helm or wing and when you click 1 of them and enter it should show the requirements of the item and you could choose to make it or not depending if u have the required items in your inventory.

Newton.txt

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi.

 

That tool isn't even close to be compatible with Hercules, since it's designed for Cronus. Please don't use it.

Here is a syntax-fixed version of your script:

Spoiler

prontera,160,181,4	script	Newton	4W_M_03,{
	mes("[Newton]");
	mesf("Hello %s!", strcharinfo(PC_NAME));
	mes("I have some interesting items here, would you like to take a look?");
	next();
	if (select("Sure!:Maybe later ...") == 2) {
		mes("[Newton]");
		mes("Alright, I'll be here if you change your mind.");
		close();
	}
	mes("[Newton]");
	mes("Well, these are the items I have ...");
	mes("Which one would you like to know more about?");
	next();
	switch (select("Leaf Warrior Hat:Leaf Wing:None")) {
	case 1:
		mes("[Leaf Warrior Hat]");
		mes("Reward:");
		mesf("1x %s", getitemname(40007));
		mes("");
		mes("Requirement:");
		mesf("20x %s", getitemname(731));
		mesf("5x %s", getitemname(732));
		mesf("3x %s", getitemname(719));
		mesf("3x %s", getitemname(720));
		mesf("3x %s", getitemname(724));
		mesf("3x %s", getitemname(721));
		mesf("3x %s", getitemname(725));
		mesf("3x %s", getitemname(727));
		next();
		mes("[Newton]");
		mes("Do you want to do this quest?");
		next();
		if (select("Yes!:Not now ...") == 2) {
			mes("[Newton]");
			mes("Alright ... See you later!");
			close();
		}
		if (countitem(731) >= 20 && countitem(732) >= 5 && countitem(719) >= 3 && countitem(720) >= 3 && countitem(724) >= 3 && countitem(721) >= 3 && countitem(725) >= 3 && countitem(727) >= 3) {
			delitem(731, 20);
			delitem(732, 5);
			delitem(719, 3);
			delitem(720, 3);
			delitem(724, 3);
			delitem(721, 3);
			delitem(725, 3);
			delitem(727, 3);
			getitem(40007, 1);
			mes("[Newton]");
			mes("Congratulations! Here it is!");
			close();
		}
		break;
	case 2:
		mes("[Leaf Wing]");
		mes("Reward:");
		mesf("1x %s", getitemname(40006));
		mes("");
		mes("Requirement:");
		mesf("100x %s", getitemname(511));
		mesf("50x %s", getitemname(507));
		mesf("50x %s", getitemname(508));
		mesf("25x %s", getitemname(509));
		mesf("10x %s", getitemname(521));
		mesf("3x %s", getitemname(2270));
		mesf("2x %s", getitemname(2207));
		mesf("2x %s", getitemname(707));
		mesf("1x %s", getitemname(706));
		next();
		mes("[Newton]");
		mes("Do you want to do this quest?");
		next();
		if (select("Yes!:Not now ...") == 2) {
			mes("[Newton]");
			mes("Alright ... See you later!");
			close();
		}
		if (countitem(511) >= 100 && countitem(507) >= 50 && countitem(508) >= 50 && countitem(509) >= 25 && countitem(521) >= 10 && countitem(2270) >= 3 && countitem(2207) >= 2 && countitem(707) >= 2 && countitem(706) >= 1) {
			delitem(511, 100);
			delitem(507, 50);
			delitem(508, 50);
			delitem(509, 25);
			delitem(521, 10);
			delitem(2270, 3);
			delitem(2207, 2);
			delitem(707, 2);
			delitem(706, 1);
			getitem(40006, 1);
			mes("[Newton]");
			mes("Congratulations! Here it is!");
			close();
		}
		break;
	case 3:
		mes("[Newton]");
		mes("Alright, I'll be here if you change your mind.");
		close();
	}
	mes("[Newton]");
	mes("I'm sorry, but you don't have all the items needed for this quest.");
	mes("Come back when you have all the items!");
	close();
}

 

 

 

~Kenpachi

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.