Jump to content
  • 0
Disgaea

Script doesn't work parse ln

Question

einbroch,55,200,4	script	Herald	123,{
if( !#onetimeitem ){
set #onetimeitem,1;
	mes "Hello youngster. Want to know a secret?";
	next;
	switch(select("Yes:No")) {
	case 1:
	mes "[Herald]";
	mes "You made the right choice. Do you know that the toughest material in Rune Midgard is called Mithril? The best part is, I know how to get it.";
	next;
	mes " If you're willing to prove me you can handle a tough excursion, I'll direct you to my friend, and from that moment on, you're his problem. Will you do it?";
	next;
	OnMenu:
	switch(select("Yes I will do it!:Wait, what's the material for?")) {
	
	case 1:
	mes "[Herald]";
	mes "Outstanding! I will need you to collect two pieces of Pure Bradium, an excellent mineral from Bradium Golems in Manuk Fields. Bring me these two, and I will give you something so that my friend grants you passage to the mines.";
	next; 
	mes "So ,do you have the items?";
	next;
	switch(select("Yes,Here They are:No")) {
	
	case 1:
	mes "[Herald]";
	mes "Well done, I wasn't thinking you could do it. But be careful, the place where you'll be headed is very tough.";
	if (countitem(512) < 20)
	delitem 7233,
getbounditem 1244 1
	close;
	}

				mes "[Herald]";
				mes "Let me know when you're done. I will reward you for your efforts.";
				close;
				}
	case 2:
	mes "[Herald]";
	mes " Don't make me regret this. Bring me the damn Bradium!";
	close;
				
	
	
	
	case 2:
	mes "[Herald]";
	mes "I can't properly answer that. You will have to find someone willing to use it on anything. But hey, it's the toughest material in Rune-Midgard, it's gotta be useful, right?";
	goto OnMenu;
	}
	}
	}
	}

What Am I doing wrong? my head is just literally on fire right now, I dont even know what I'am doing anymore lol

3.png

Share this post


Link to post
Share on other sites

18 answers to this question

Recommended Posts

  • 0

missing argument with delitem and missing semicolon

 

for getbounditem you are missing a comma, an argument and a semicolon, and it should be "getitembound"

Share this post


Link to post
Share on other sites
  • 0
51 minutes ago, meko said:

missing argument with delitem and missing semicolon

 

for getbounditem you are missing a comma, an argument and a semicolon, and it should be "getitembound"

 now this <-< @meko

d.png

Edited by Disgaea

Share this post


Link to post
Share on other sites
  • 0

I tried to re-construct your script as best as I could, but it's one of the messiest I have ever seen.

Here goes:

einbroch,55,200,4	script	Herald	123,{

	if (#onetimeitem) {
		mes("I hope you like your reward.");
		close;
	}

	mes("Hello youngster. Want to know a secret?");
	next();

	if (select("Yes:No") == 1) {
		mes("[Herald]");
		mes("You made the right choice. Do you know that the toughest material in Rune Midgard is called Mithril? The best part is, I know how to get it.");
		next();
		mes("If you're willing to prove me you can handle a tough excursion, I'll direct you to my friend, and from that moment on, you're his problem. Will you do it?");
		next();

		do {
			if (select("Yes I will do it!:Wait, what's the material for?") == 1) {
				mes("[Herald]");
				mes("Outstanding! I will need you to collect two pieces of Pure Bradium, an excellent mineral from Bradium Golems in Manuk Fields. Bring me these two, and I will give you something so that my friend grants you passage to the mines.");
				next();
				mes("So ,do you have the items?");
				next();

				switch(select("Yes, Here They are:No")) {
				case 1:
					mes("[Herald]");
					mes("Well done, I wasn't thinking you could do it. But be careful, the place where you'll be headed is very tough.");

					if (countitem(512) < 20) {
						mes("[Herald]");
						mes("Don't make me regret this. Bring me the damn Bradium!");
						close;
					}

					delitem(512, 20);
					getitembound(1244, 1, 1);
					#onetimeitem = 1;
					break;

				case 2:
					mes("[Herald]");
					mes("Let me know when you're done. I will reward you for your efforts.");
					break;
				}
				close;

			} else {
				mes("[Herald]");
				mes("I can't properly answer that. You will have to find someone willing to use it on anything. But hey, it's the toughest material in Rune-Midgard, it's gotta be useful, right?");
			}
		} while (true);
	}
}

 

Share this post


Link to post
Share on other sites
  • 0
32 minutes ago, meko said:

I tried to re-construct your script as best as I could, but it's one of the messiest I have ever seen.

Here goes:


einbroch,55,200,4	script	Herald	123,{

	if (#onetimeitem) {
		mes("I hope you like your reward.");
		close;
	}

	mes("Hello youngster. Want to know a secret?");
	next();

	if (select("Yes:No") == 1) {
		mes("[Herald]");
		mes("You made the right choice. Do you know that the toughest material in Rune Midgard is called Mithril? The best part is, I know how to get it.");
		next();
		mes("If you're willing to prove me you can handle a tough excursion, I'll direct you to my friend, and from that moment on, you're his problem. Will you do it?");
		next();

		do {
			if (select("Yes I will do it!:Wait, what's the material for?") == 1) {
				mes("[Herald]");
				mes("Outstanding! I will need you to collect two pieces of Pure Bradium, an excellent mineral from Bradium Golems in Manuk Fields. Bring me these two, and I will give you something so that my friend grants you passage to the mines.");
				next();
				mes("So ,do you have the items?");
				next();

				switch(select("Yes, Here They are:No")) {
				case 1:
					mes("[Herald]");
					mes("Well done, I wasn't thinking you could do it. But be careful, the place where you'll be headed is very tough.");

					if (countitem(512) < 20) {
						mes("[Herald]");
						mes("Don't make me regret this. Bring me the damn Bradium!");
						close;
					}

					delitem(512, 20);
					getitembound(1244, 1, 1);
					#onetimeitem = 1;
					break;

				case 2:
					mes("[Herald]");
					mes("Let me know when you're done. I will reward you for your efforts.");
					break;
				}
				close;

			} else {
				mes("[Herald]");
				mes("I can't properly answer that. You will have to find someone willing to use it on anything. But hey, it's the toughest material in Rune-Midgard, it's gotta be useful, right?");
			}
		} while (true);
	}
}

 

When I talk with him he only say this xD

 

ffffffffff2.png

Edited by Disgaea

Share this post


Link to post
Share on other sites
  • 0

that's because your #onetimeitem variable is already set for this account

 

to reset, type in chat:

@set #onetimeitem 0

Share this post


Link to post
Share on other sites
  • 0
3 minutes ago, meko said:

that's because your #onetimeitem variable is already set for this account

 

to reset, type in chat:

@set #onetimeitem 0

When I click the that question it just resets and dont happen nothing, and if i put that I have the items it says 2 things at the same time 

2.png

3333333.jpg

Share this post


Link to post
Share on other sites
  • 0

that's because you do not have in your inventory 20 of item id 512

to not show the two messages at the same time just add a next(); before the mes() that says don't make me regret

Share this post


Link to post
Share on other sites
  • 0
50 minutes ago, meko said:

that's because you do not have in your inventory 20 of item id 512

to not show the two messages at the same time just add a next(); before the mes() that says don't make me regret

But in the wait whats the material for, even if I have the items or not, when i click it just resets, he dont say nothing, And when I say "no" in the beginning it get bugged

no.png

Edited by Disgaea

Share this post


Link to post
Share on other sites
  • 0

Another thing xd, could u just tell me how to put "You dont have the items!", when I say that I have the items but i dont have? because now even if i dont have the items she says congrats

Share this post


Link to post
Share on other sites
  • 0

That's just two missing next() statements...

 

Here you go:

einbroch,55,200,4	script	Herald	123,{

	if (#onetimeitem) {
		mes("I hope you like your reward.");
		close;
	}

	mes("Hello youngster.");
	mex("Want to know a secret?");
	next();

	if (select("Yes", "No") == 1) {
		mes("[Herald]");
		mes("You made the right choice.");
		mes("Do you know that the toughest material in Rune Midgard is called Mithril?");
		mes("The best part is, I know how to get it.");
		next();
		mes("If you're willing to prove me you can handle a tough excursion, I'll direct you to my friend, and from that moment on, you're his problem.");
		mes("Will you do it?");
		next();

		do {
			if (select("Yes I will do it!", "Wait, what's the material for?") == 1) {
				mes("[Herald]");
				mes("Outstanding!");
				mesf("I will need you to collect %i pieces of %s, an excellent mineral from Bradium Golems in Manuk Fields.", .request_amount, getitemname(.request_item));
				mes("Bring me these, and I will give you something so that my friend grants you passage to the mines.");
				next();
				mes("So, do you have the items?");
				next();

				switch(select("Yes, Here They are", "No")) {
				case 1:
					if (countitem(.request_item) < .request_amount) {
						mes("[Herald]");
						mes("Don't make me regret this.");
						mesf("Bring me the damn %s!", getitemname(.request_item));
						close;
					}

					mes("[Herald]");
					mes("Well done, I wasn't thinking you could do it.");
					mes("But be careful, the place where you'll be headed is very tough.");

					delitem(.request_item, .request_amount);
					getitembound(.reward_item, .reward_amount, 1);
					#onetimeitem = 1;
					break;

				case 2:
					mes("[Herald]");
					mes("Let me know when you're done. I will reward you for your efforts.");
					break;
				}
				close;

			} else {
				mes("[Herald]");
				mes("I can't properly answer that.");
				mes("You will have to find someone willing to use it on anything.");
				mes("But hey, it's the toughest material in Rune-Midgard, it's gotta be useful, right?");
				next();
			}
		} while (true);
	}
	close;


OnInit:

	// << YOUR CONFIGURATION GOES HERE >>
	.request_item = Apple;
	.request_amount = 20;

	.reward_item = Holy_Dagger;
	.reward_amount = 1;
	// << END OF CONFIGURATION >>
}

 

Make sure to change the items and amounts in OnInit to the items you want

Share this post


Link to post
Share on other sites
  • 0
11 hours ago, meko said:

That's just two missing next() statements...

 

Here you go:


einbroch,55,200,4	script	Herald	123,{

	if (#onetimeitem) {
		mes("I hope you like your reward.");
		close;
	}

	mes("Hello youngster.");
	mex("Want to know a secret?");
	next();

	if (select("Yes", "No") == 1) {
		mes("[Herald]");
		mes("You made the right choice.");
		mes("Do you know that the toughest material in Rune Midgard is called Mithril?");
		mes("The best part is, I know how to get it.");
		next();
		mes("If you're willing to prove me you can handle a tough excursion, I'll direct you to my friend, and from that moment on, you're his problem.");
		mes("Will you do it?");
		next();

		do {
			if (select("Yes I will do it!", "Wait, what's the material for?") == 1) {
				mes("[Herald]");
				mes("Outstanding!");
				mesf("I will need you to collect %i pieces of %s, an excellent mineral from Bradium Golems in Manuk Fields.", .request_amount, getitemname(.request_item));
				mes("Bring me these, and I will give you something so that my friend grants you passage to the mines.");
				next();
				mes("So, do you have the items?");
				next();

				switch(select("Yes, Here They are", "No")) {
				case 1:
					if (countitem(.request_item) < .request_amount) {
						mes("[Herald]");
						mes("Don't make me regret this.");
						mesf("Bring me the damn %s!", getitemname(.request_item));
						close;
					}

					mes("[Herald]");
					mes("Well done, I wasn't thinking you could do it.");
					mes("But be careful, the place where you'll be headed is very tough.");

					delitem(.request_item, .request_amount);
					getitembound(.reward_item, .reward_amount, 1);
					#onetimeitem = 1;
					break;

				case 2:
					mes("[Herald]");
					mes("Let me know when you're done. I will reward you for your efforts.");
					break;
				}
				close;

			} else {
				mes("[Herald]");
				mes("I can't properly answer that.");
				mes("You will have to find someone willing to use it on anything.");
				mes("But hey, it's the toughest material in Rune-Midgard, it's gotta be useful, right?");
				next();
			}
		} while (true);
	}
	close;


OnInit:

	// << YOUR CONFIGURATION GOES HERE >>
	.request_item = Apple;
	.request_amount = 20;

	.reward_item = Holy_Dagger;
	.reward_amount = 1;
	// << END OF CONFIGURATION >>
}

 

Make sure to change the items and amounts in OnInit to the items you want

Now I cant talk with the npc xd, he just dont talk, this npc really dont want to work

Share this post


Link to post
Share on other sites
  • 0

Nvm I solved the error, btw can you tell me how to but that when I click that I have the items, she say something like "you dont have the items"? because if I say that I have even if I dont have she says congrats, if you already did that it doesnt work @meko

 

 

Edited by Disgaea

Share this post


Link to post
Share on other sites
  • 0

 

2 hours ago, Disgaea said:

And When I say that I have the items it get bugged, there is no close button

eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.png

@Disgaea

Replace

.request_item = Apple;

.to

.request_item = 512;

 

Share this post


Link to post
Share on other sites
  • 0
7 minutes ago, Legend said:

 

@Disgaea

Replace


.request_item = Apple;

.to


.request_item = 512;

 

wow dude it worked thx <3, only 1 question more to finish, when I say in the beginning "no" he dont say nothing, its blank, it stay like this @Legend

 

ssssssssssssssssssssssssssssssss.png

Edited by Disgaea

Share this post


Link to post
Share on other sites
  • 0
19 minutes ago, Legend said:

 

@Disgaea

Replace


.request_item = Apple;

.to


.request_item = 512;

 

Hercules should automatically generate constants based on the AegisName of items in your database. If Apple evaluates to 0 it means you are either using a very old version of Hercules, or you don't have an item named Apple in your item db

 

13 minutes ago, Disgaea said:

wow dude it worked thx <3, only 1 question more to finish, when I say in the beginning "no" he dont say nothing, its blank, it stay like this @Legend

 

ssssssssssssssssssssssssssssssss.png

Simply add a mes("your message here") before the close; that is above the OnInit

Share this post


Link to post
Share on other sites
  • 0
2 minutes ago, meko said:

Hercules should automatically generate constants based on the AegisName of items in your database. If Apple evaluates to 0 it means you are either using a very old version of Hercules, or you don't have an item named Apple in your item db

 

Simply add a mes("your message here") before the close; that is above the OnInit

It worked, really thanks for all the help!

Share this post


Link to post
Share on other sites
  • 0
54 minutes ago, meko said:

Hercules should automatically generate constants based on the AegisName of items in your database. If Apple evaluates to 0 it means you are either using a very old version of Hercules, or you don't have an item named Apple in your item db

@meko Yea, I thought of the same thing.

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

×
×
  • Create New...

Important Information

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