Jump to content

Scripting.. Can I group some objects (not all) in the "OBJECT" inventory to randomly give 1?


Anakin Adonide
 Share

You are about to reply to a thread that has been inactive for 4633 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I have an "OBJECT" with 75 objects in it.

These objects can be group in 4 different lists... gold, silver, common, unique

What I want is to write an script that separates those items into these 4 categories and when the "OBJECT" is touch, give 1 random unique + 1 random gold + 3 random silver (different from each other) + 10 random common (different from each other)

The problem is that I don't know how to do it.... lol



Link to comment
Share on other sites

One way to do it might be to have your four lists and then, each time someone touches the object, use llListRandomize to re-order each of them.   Then add the first item from "unique", the first from "gold," the first three from "silver" and the first ten from "common" to a temporary list, "temp", using llList2List, and then use llGiveInventoryList to give them that.

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4633 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...