Jump to content
  • 0

2nd item requirements not appearing


Question

Posted (edited)

Good day masters 

 

please help me on my script

 

when i click the npc only the first item requirement is showing on the message do i miss some line??

 

please help thank you this is the script

lhz_dun_n,135,264,4	script	Memory of Tears	10092,{
function Exchange;
	mes "Why you are here??";
	mes "Oh a Energy Debris and Job soul i like that give me that choose one";
	next;
switch( select( "Old Rune Circlet [1]",
				"Old Mitra [1]",
				"Old Driver Band [1]",
				"Old Driver Band (Yellow) [1]",
				"Old Shadow Crown [1]",
				"Old Minstrel Song [1]",
				"Old Midas Whisper [1]",
				"Old Magic Stone Hat [1]",
				"Old Burning Spirit [1]",
				"Old Wispers of Wind [1]",
				"Old Circlet of Bone [1]",
				"Old Guardian Crown [1]",
				"Old Camouflage of Rabbit Hood [1]" )){
// Exchange( <Item Gained>,<Amount>,<Item Required>,<Amount> );
case 1:	Exchange( 18971,1,6820,50,6814,1 );	break;
case 2:	Exchange( 18972,1,6820,50,6819,1 );	break;
case 3:	Exchange( 18973,1,6820,50,6815,1 );	break;
case 4:	Exchange( 18974,1,6820,50,6815,1 );	break;
case 5:	Exchange( 18983,1,6820,50,6816,1 );	break;
case 6:	Exchange( 18976,1,6820,50,6818,1 );	break;
case 7:	Exchange( 18977,1,6820,50,6815,1 );	break;
case 8:	Exchange( 18978,1,6820,50,6817,1 );	break;
case 9:	Exchange( 18979,1,6820,50,6819,1 );	break;
case 10:	Exchange( 18980,1,6820,50,6817,1 );	break;
case 11:	Exchange( 18982,1,6820,50,6816,1 );	break;
case 12:	Exchange( 18983,1,6820,50,6814,1 );	break;
case 13:	Exchange( 18984,1,6820,50,6818,1 );	break;
default:
	mes "Wrong Selection";	break;
}
close;

function	Exchange	{
mes "Exchange "+getarg(3)+" "+getitemname( getarg(2) )+" into "+getarg(1)+" "+getitemname( getarg(0) )+"?";
if(select("Yes","No")==1){
	if( countitem( getarg(2) ) < getarg(3) ){
		mes "Sorry you didnt have enough Items to trade.";
		close;
	}else{
		mes "Done";
		delitem getarg(2),getarg(3);
		getitem getarg(0),getarg(1);
	}
}
return;
}

}

 

Edited by Questune09

3 answers to this question

Recommended Posts

  • 0
Posted

Hello again, @Questune09 please do not use word "Masters" for greetings, instead use friends, guys 

anyway..

you forgot to use getarg(4) getarg(5)

A: manually Add & replace 

B: copy & paste the full edited script

A

step 1:

add

|| countitem( getarg(4) ) < getarg(5)

to 

if( countitem( getarg(2) ) < getarg(3) 

 

step 2:
replace 

mes "Exchange "+getarg(3)+" "+getitemname( getarg(2) )+" into "+getarg(1)+" "+getitemname( getarg(0) )+"?";

to 

mes "Exchange "+getarg(3)+" "+getitemname( getarg(2) )+" and 1 "+getitemname ( getarg(4) )+" into "+getarg(1)+" "+getitemname( getarg(0) )+"?";

 

step 3:

add

delitem getarg(4),getarg(5);

under

mes "Done";
delitem getarg(2),getarg(3);

B

for pre-edited script:

veil,120,100,4	script	Memory of Tears	10092,{
function Exchange;
	mes "Why you are here??";
	mes "Oh a Energy Debris and Job soul i like that give me that choose one";
	next;
switch( select( "Old Rune Circlet [1]",
				"Old Mitra [1]",
				"Old Driver Band [1]",
				"Old Driver Band (Yellow) [1]",
				"Old Shadow Crown [1]",
				"Old Minstrel Song [1]",
				"Old Midas Whisper [1]",
				"Old Magic Stone Hat [1]",
				"Old Burning Spirit [1]",
				"Old Wispers of Wind [1]",
				"Old Circlet of Bone [1]",
				"Old Guardian Crown [1]",
				"Old Camouflage of Rabbit Hood [1]" )){
// Exchange( <Item Gained>,<Amount>,<Item Required>,<Amount> );
case 1:	Exchange( 18971,1,6820,50,6814,1 );	break;
case 2:	Exchange( 18972,1,6820,50,6819,1 );	break;
case 3:	Exchange( 18973,1,6820,50,6815,1 );	break;
case 4:	Exchange( 18974,1,6820,50,6815,1 );	break;
case 5:	Exchange( 18983,1,6820,50,6816,1 );	break;
case 6:	Exchange( 18976,1,6820,50,6818,1 );	break;
case 7:	Exchange( 18977,1,6820,50,6815,1 );	break;
case 8:	Exchange( 18978,1,6820,50,6817,1 );	break;
case 9:	Exchange( 18979,1,6820,50,6819,1 );	break;
case 10:	Exchange( 18980,1,6820,50,6817,1 );	break;
case 11:	Exchange( 18982,1,6820,50,6816,1 );	break;
case 12:	Exchange( 18983,1,6820,50,6814,1 );	break;
case 13:	Exchange( 18984,1,6820,50,6818,1 );	break;
default:
	mes "Wrong Selection";	break;
}
close;

function	Exchange	{
mes "Exchange "+getarg(3)+" "+getitemname( getarg(2) )+" and 1 "+getitemname ( getarg(4) )+" into "+getarg(1)+" "+getitemname( getarg(0) )+"?";
if(select("Yes","No")==1){
	if( countitem( getarg(2) ) < getarg(3) || countitem( getarg(4) ) < getarg(5) ){
		mes "Sorry you didnt have enough Items to trade.";
		close;
	}else{
		next;
		mes "Done";
		delitem getarg(2),getarg(3);
		delitem getarg(4),getarg(5);
		getitem getarg(0),getarg(1);
	}
}
return;
}

}


Enjoy, Ceil phantomhive

  • Upvote 2

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...