Jump to content

Comparing item scripts


wjslk

Recommended Posts

I want to remove from the reference's inventory exactly the items that have a given script, say myScript. So, I have something like this


let items := getItems



foreach aItem <- items

  let itemRef := aItem["value"]

  let scriptID := itemRef.getScript



  if ( scriptID == myScript )

    RemoveItemNS itemRef 99999

  endif;



loop

This doesn't work unfortunately. I've tried to do this in a few different ways, too, but without any success. How do I do this properly?

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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