Jump to content
  • 0

menu that show if item is on inventory


hakuren

Question


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

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
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Try :

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

 

Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

Try :

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

 

works! thank you sir :)

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

like this

.@count = countitem( 607 );
if( .@count ){
	if( select( getitemname( 607 )+" X "+.@count,"close" ) == 1 ){
		mes "Done ??";
	}
}else{
	mes "You dont have any.";
}
close;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

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;
    }
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

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

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