Jump to content
  • 0

menu that show if item is on inventory


Question

Posted (edited)

how to make an npc that with the item is on the inventory the name and amount of that item will show on the menu

 

ex.

yggseed

yggberry

 

if in the inventory with you talk to npc the menu will show those item

if not in the inventory or didnt have it will not show

Edited by hakuren

6 answers to this question

Recommended Posts

Posted

Try :

prontera,150,150,0    script    Sample    100,{
    select ( ( countitem( 607 ) ) ? getitemname( 607 )+ " is there" : "" );
    end;
}

 

  • 1
Posted

Try :

prontera,150,150,0    script    Sample    100,{
    select ( ( countitem( 607 ) ) ? getitemname( 607 )+ " is there" : "" );
    end;
}

 

works! thank you sir :)

Posted

like this

.@count = countitem( 607 );
if( .@count ){
	if( select( getitemname( 607 )+" X "+.@count,"close" ) == 1 ){
		mes "Done ??";
	}
}else{
	mes "You dont have any.";
}
close;
Posted (edited)

setarray .@Position$[1],"Top","Mid","Low";
setarray .@Position[1], 1, 9, 10;
set .@Menu$,"";
for( set .@i, 1; .@i < 5; set .@i, .@i + 1 )
{
if( getequipisequiped(.@Position[.@i]) )
set .@Menu$, .@Menu$ + .@Position$[.@i] + "-" + "[" + getequipname(.@Position[.@i]) + "]";
set .@Menu$, .@Menu$ + ":";
}
set .@Part, .@Position[ select(.@Menu$) ];
if( !getequipisequiped(.@Part) )
{
mes "[Clown]";
mes "Your not wearing anything there...";
close;
}
mes "You want to Costume your " + getitemname(getequipid(.@Part)) + "?";
next;
if( select("Yes, proceed:No, I am sorry.") == 2 )
{
mes "Need some time to think about it, huh?";
mes "Alright, I can understand.";
close;
}

 

like this it in the menu it will show the item on the equipment

what i need it will show the ygg if it is on the inventory if not blank

Edited by Capuche
in BBCode
Posted

how to make an npc that with the item is on the inventory the name and amount of that item will show on the menu

 

ex.

yggseed

yggberry

 

if in the inventory with you talk to npc the menu will show those item

if not in the inventory or didnt have it will not show

Like this? 

prontera,150,150,0    script    Sample    100,{   
    if ( select ( ( countitem( 607 ) ) ? countitem(607)+ "x " +getitemname(607)+ ":Close" : "Close" ) - 1 ) {
        mes "Test";
        close;
    }
}
Posted

how to make an npc that with the item is on the inventory the name and amount of that item will show on the menu

 

ex.

yggseed

yggberry

 

if in the inventory with you talk to npc the menu will show those item

if not in the inventory or didnt have it will not show

Like this? 

prontera,150,150,0    script    Sample    100,{   
    if ( select ( ( countitem( 607 ) ) ? countitem(607)+ "x " +getitemname(607)+ ":Close" : "Close" ) - 1 ) {
        mes "Test";
        close;
    }
}

no what i mean like on .@menu$ or the menu or switch(select("name menu:name menu") it tell if the ygg is there if not it not show on the menu

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