Jump to content
  • 0

[SOLVED] Simple quest won't read required items


Rivers

Question


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  236
  • Reputation:   47
  • Joined:  12/04/13
  • Last Seen:  

Good day,
 I am trying to get this basic quest to check for both Items and Zeny, as a simple gathering quest. When I go to the NPC with only zeny in-hand, he accepts it and finishes the quest for me without checking the items, even though I think I have the check items there and then he goes to a blank dialogue box with no options to close.
Any ideas?
 

//===== Heroes of Vanaheim Online =======================================
//= Poring Ring Quest
//============================================================

prontera,147,211,3	script	Recovery Project	419,{

	setarray .@Items[0],itemID,qnty;
	set .@n$,"[Project Operator]";

	mes .@n$;
	if(f_ring == 1) {
		mes "I appreciate your assistance, soldier.";
		close; }
	mes "Would you like to contribute to the Morocc Support Funds?";
	next;
	if(select("Yes!:Not today")==2) goto M_Leave;

	mes .@n$;
	mes "That's great to hear! There's a few things we need to help rebuild Morocc.";
	next;
	mes .@n$;
	mes "Do you think you're up for the task?";
	next;
	if(select("Absolutely!:Not now")==2) goto M_Leave;

	mes .@n$;
	mes "I'll give you ^FF0000Poring Ring^000000. !";
	next;
	mes .@n$;
	mes "This is what our camp needs to continue rebuilding:";
        mes "~ 300.000.000 Zeny";
	for(set .@i,0; .@i<getarraysize(.@Items); set .@i,.@i+2) {
		mes " ~ "+.@Items[.@i+1]+"x "+getitemname(.@Items[.@i]);
		if (countitem(.@Items[.@i]) < .@Items[.@i+1]) set .@nr,1; }
	next;
	if(select("I got it all!:I'll go now.")==2) goto M_Leave;

	mes .@n$;
	if (.@nr) {
			if(countitem(.@Items[.@i], .@Items[.@i+1]) < 1) goto Leave;
            if(Zeny < 300000000) goto Leave;
		mes "You trying to fool me or something?";
		close; }
	for(set .@i,0; .@i<getarraysize(.@Items); set .@i,.@i+2)
		delitem .@Items[.@i], .@Items[.@i+1];
        set Zeny, Zeny - 300000000;
	getitem 35153,1;
        announce "Congratulations!! ["+ strcharinfo(0) +"] has finished Item quest.",0;
	set f_ring, 1;
	mes "Great job! You have all the items. Here are your ^FF0000Poring Ring^000000, as promised.";
	emotion ET_CONGRATULATION;
	close;

Leave:
mes .n$;
mes "Don't forget, we especially need Zeny to buy medical building materials.";
next;

M_Leave:
	mes .@n$;
	mes "Good day.";
	close;

OnInit:
waitingroom "Poring Ring",0;
end;
}

 

Edited by Rivers
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  68
  • Reputation:   8
  • Joined:  05/12/20
  • Last Seen:  

You have to set your item id and amount here
 

setarray .@Items[0],itemID,qnty;

ex.

setarray .@Items[0],909,5;

 

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  236
  • Reputation:   47
  • Joined:  12/04/13
  • Last Seen:  

Oh my gosh, thanks for pointing that out. I thought I already filled that in... xD

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