Jump to content
  • 0

How to make countitem not counting equip equipments?


Question

Posted

Hi,

I make some script that trade items.. But my script, the NPC countitem all items including our equips.. So.. My question is, how to make NPC just count item in iventory only? And leaving the equip as it is.. 

Or

How to make delitem just in iventory only? Really confuse right now.. Please advise me.. Thank you in advance..

5 answers to this question

Recommended Posts

  • 0
Posted

 

1.

use getinventorylist then check for this value

if (@inventorylist_equip[.@i] == 0)

2.

isequipped( <itemID> )

Hmm..

I make script like example :

Player can trade knife for some token.. But my current script is, the NPC will trade all knife including the equipped one.. My temporary solution is player need to un-equip any equipment to start trading..

  • 0
Posted

There's no way unless modified in source. Even if you use getinventorylist;  and loop through the items, there's no third argument for delitem to specify the inventory index.

  • 0
Posted

@Rakuzas

that's because you didnt use a correct checking which mentioned earlier.

 

and this is script support section, if you want other member to help check what's wrong with your script

at least post it here .... save the time to keep guessing on what you have done to your script.

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