Random Loot

FEATURES
1. Set chests to give random loot through a customizable script. These random items are based on item rarity value with min and max level restrictions.
2. Tag items as “lucky” that will increase the chance of getting rarer loot from chests when equipped.
3. Set a troop ID and Monster-in-a-box chance. Set if it’s possible to escape monsters or not.

DOWNLOAD:
Get it here >

Advertisements

5 thoughts on “Random Loot

  1. Malagar says:

    hey there galv,
    i really like your scripts and use many of them. but there seems to be a bug in your random loot script. i spent the evening doing like 50 testplays of my project and the result is always the same:

    the higher up a item is in the database, the more likely it is to show up. this goes so far, that the lower listed items never appear – even though they have the same rarity.

    can you try to fix that please? i have like 5 different potions with the same rarity in my project, and all 50 testplays keep showing up only the first one. this must be a big!

    thanks, and keep it up!

    • Galv says:

      This is one of my really early scripts. Are you using the notetags correctly?
      Unfortunately I am really busy at the moment and don’t have time to look into this but I will re-write this script one day.
      In the meantime I suggest looking for another random loot if there is a bug :)

  2. Malagar says:

    Thank you for the quick reply.

    I think its all correctly set up – basically the script is working. Its just the issue that many items never appear due to the sorting of the database.

    No problem. Maybe I find another one. Should I be able to fix the bug, I will report it here.

  3. darkaura12 says:

    Yeah I’d appreciate it if you ever got back to it! As would probably many that just dont want to post. I keep getting the first item in the list if its set to 10 and if i set it to 20 i get a ton of empties haha but it balances out how many you actually obtain which is weird.

  4. Malagar says:

    Well, it seems like I finally found a solution to the problem. its actually quite easy. This line is causing the error (assumption):

    line 180: i = i – i + begin_count

    in a large database with lots of empty item slots or items without matching rarity tags, it happens that the scripts restarts often. As the begin_count is 1, it will start from the very first item in the database. enough restarts given, the rarity roll will sooner or later match this very first item and nothing else.

    the trick is to simply change the line, so that the script chooses another random item to continue (instead of the 1st item in the database). something like this could help:

    line 180: i = i – i + (rand(no_items) +1)

    still have to test this more, just stumbled upon it by accident and wanted to let you know.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s