Jump to content

A way to dupe turrets by selling them (with fix)


Rinart73

Recommended Posts

If you have two identical turrets, you can mark them as trash and sell to the Equipment Dock via "Sell Trash" button.

Then after you'll buy them back, there will be a turret with -1 amount and you will be able to buy it again and again..

 

This happens because we're using the same "SellableInventoryItem" table for all these items. So when player buys 1 back, we get amount = 0. And when player buys the second back, we get -1.

 

How to Fix

"data\scripts\lib\shop.lua" - function 'Shop:buyTrashFromPlayer()', line ~727.

Replace this:

        local item = SellableInventoryItem(iitem, index, buyer)
        item.amount = 1

        for i = 1, slotItem.amount do

with this:

        local item

        for i = 1, slotItem.amount do
            item = SellableInventoryItem(iitem, index, buyer)
            item.amount = 1

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...