Jump to content

Using Scraps not working for me

Closed 0.2

papi
papi

Posted

I use scrap as currency and the purchase page does see the scrap in inventory when set to scraps in the config however does not deduct scrap and complete the transaction.  clicking purchase has not effect.

Also bug introduced for splitting stacks in inventory and backpacks when conflicting with Stack Modifier

                        case "scraps":
                            if (RemoveItem(player, "scrap", int.Parse(cost)))
                                success = true;

                            /*var itemScrap = player.inventory.FindItemID("scrap");
                            if (itemScrap != null && itemScrap.amount >= costInt)
                            {
                                itemScrap.UseItem(costInt);
                                success = true;
                            }*/

                            break;

papi

Posted

On 7/6/2022 at 3:34 PM, AhigaO said:

I added the ability to change, for example, the $ to the € or any other

Economics works ok

On 7/13/2022 at 9:19 AM, BoobleJ said:

changing to economics worked

 

 

 

SRten

Posted

Use 'scraps' in the config not 'scrap'

Nod Js

Posted

Changed Status from Pending to Closed

papi

Posted

Scraps didnt work either

 

Nod Js

Posted

share your configuration

papi

Posted

Don't worry about it i switched to economics anyway.

papi

Posted

{
  "Basic Settings": {
    "Hours From The Dealers Will Be Available": 20.0,
    "Hours Till The Dealers Will Be Available": 24.0,
    "Loading Screen Update Rate (Seconds) [Don't make it too small]": 0.035,
    "Loading Screen Anchor Shifting [Left - Right]": 0.001
  },
  "VPN Settings": {
    "Item Info": {
      "Display Name": "VPN Flash Drive",
      "Skin ID": 2645299478,
      "Require In Belt": true,
      "Spawn Command": "db.vpn"
    }
  },
  "Drug Settings": {
    "Use (Economics / Server Rewards / Scraps)": "Scraps",
    "Currency Symbol": "$",
    "Marijuana Seeds": {
      "Cost per seed": 40.0
    },
    "Peruvian Coca Seeds": {
      "Cost per seed": 40.0
    }
  },
  "Drone Settings": {
    "Drone Spawn Distance (Default: 210)": 210,
    "Drone Spawn Height (Default: 78)": 78,
    "Drone Delivery Height (Default: 40)": 40
  },
  "Crafting Settings": {
    "Cocaine Leaves Required": 5,
    "Cocaine Powder Required": 10,
    "Cannabis Required": 5,
    "Marijuana Required": 10
  },
  "Dealer Settings": {
    "Maximum Dealers at a time (will pick random from the data)": 3,
    "Dealer Name": "Dealer",
    "Announce when the dealer arrive/leave": true,
    "Default Outfit": [
      {
        "Item": "tshirt",
        "Skin": 838212999
      },
      {
        "Item": "pants",
        "Skin": 866948432
      },
      {
        "Item": "hat.beenie",
        "Skin": 814355387
      },
      {
        "Item": "shoes.boots",
        "Skin": 1889769313
      },
      {
        "Item": "mask.bandana",
        "Skin": 2312147084
      }
    ],
    "Weed Brick": {
      "Bricks Sell Quantity": 1,
      "Time Taken For Single Trade (Seconds)": 30,
      "Brick Selling Price": 520
    },
    "Cocaine Brick": {
      "Bricks Sell Quantity": 1,
      "Time Taken For Single Trade (Seconds)": 30,
      "Brick Selling Price": 560
    }
  }
}

papi

Posted

Plugin won't take Scraps

papi

Posted

Changed value of seeds to $0 which proceeded to the buy screen, drone arrives and then crashes with error
 

Failed to run a 1.00 timer in 'DrugBusiness v0.35.0' (OverflowException: Value was either too large or too small for an Int32.)

at System.Convert.ToInt32 (System.Double value) [0x00084] in <fb001e01371b4adca20013e0ac763896>:0

at Oxide.Plugins.DrugBusiness+<BeginDelivery>c__AnonStorey10.<>m__0 () [0x0004e] in <a0d7a881af43423c8900a233dc87c174>:0

at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <bae5f1223fce49c493b01571c99dce02>:0

 

papi

Posted (edited)

Changing value to $1 even though balance at top of screen displays Scrap in inventory correctly process cannot proceed.

The Plugin is also dependent on Economics even if you aren't using it.  This isn't shown in the Plugin Description.

Could not load plugin 'Disabled\Economics' (no plugin found with that file name)

Edited by strand
papi

Posted

Fixed it myself one month later.  Have you actually tested this code???

In your code you have commented out the transaction to remove the scrap from the players inventory?  Has nobody else noticed this?

                            /*var itemScrap = player.inventory.FindItemID("scrap");
                            if (itemScrap != null && itemScrap.amount >= costInt)
                            {
                                itemScrap.UseItem(costInt);
                                success = true;
                            }*/

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.3k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.