Jump to content
  • 0

How to make countitem not counting equip equipments?


rakuzas

Question


  • Group:  Members
  • Topic Count:  152
  • Topics Per Day:  0.04
  • Content Count:  459
  • Reputation:   6
  • Joined:  06/29/12
  • Last Seen:  

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

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

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

1.

use getinventorylist then check for this value

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

2.

isequipped( <itemID> )
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  152
  • Topics Per Day:  0.04
  • Content Count:  459
  • Reputation:   6
  • Joined:  06/29/12
  • Last Seen:  

 

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   8
  • Joined:  01/06/12
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

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

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  152
  • Topics Per Day:  0.04
  • Content Count:  459
  • Reputation:   6
  • Joined:  06/29/12
  • Last Seen:  

Hmm.. So its impossible.. Ok.. I think I will stick to my current temporary solution.. Thanks for guiding and give explanation.. It really helps.. ^_^

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