Initial Deployment

This commit is contained in:
Patrick Ulrich 2024-09-24 14:45:25 -04:00 committed by GitHub
parent c32eddc966
commit 7300ce474b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1258 additions and 0 deletions

21
LICENSE.txt Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 Patrick Ulrich
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

1125
Orangemart.cs Normal file

File diff suppressed because it is too large Load Diff

112
README.md Normal file
View File

@ -0,0 +1,112 @@
## Overview:
The **Orangemart** plugin allows players on your Rust server to buy and sell in-game units and VIP status using Bitcoin payments through the Lightning Network. This plugin integrates LNBits into the game, enabling secure transactions for game items and services.
---
## Features
- **In-Game Currency Purchase:** Players can purchase in-game currency using Bitcoin payments.
- **Send In-Game Currency:** Players can send currency to others, facilitating peer-to-peer transactions.
- **VIP Status Purchase:** Players can purchase VIP status through Bitcoin payments, unlocking special privileges.
- **Configurable:** Server admins can set up command names, currency items, prices, and more through the configuration file.
---
## Commands
The following commands are available to players:
- **`/buyblood`**
Players can purchase in-game currency using Bitcoin. The amount purchased is configurable.
- **`/sendblood <amount> <targetPlayer>`**
Players can send a specified amount of in-game currency to another player.
- **`/buyvip`**
Players can purchase VIP status using Bitcoin. The VIP price and associated permission group are configurable.
---
## Configuration
Below is a list of key configuration variables that can be customized in the plugin:
- **`CurrencyItemID`**
The item ID used for in-game currency transactions.
- **`BuyCurrencyCommandName`**
The name of the command players use to buy in-game currency.
- **`SendCurrencyCommandName`**
The name of the command players use to send in-game currency to other players.
- **`BuyVipCommandName`**
The name of the command players use to purchase VIP status.
- **`VipPrice`**
The price (in satoshis) for players to purchase VIP status.
- **`VipPermissionGroup`**
The Oxide permission group that VIP players are added to.
- **`CurrencyName`**
The name of the in-game currency.
- **`SatsPerCurrencyUnit`**
The conversion rate between satoshis and in-game currency units.
- **`PricePerCurrencyUnit`**
The price (in satoshis) per unit of in-game currency.
- **`CheckIntervalSeconds`**
Interval time (in seconds) for checking pending Bitcoin transactions.
---
## Installation
1. **Download the Plugin**
Place the `Orangemart.cs` file in your server's `oxide/plugins` folder.
2. **Configuration**
Modify the plugins configuration file to fit your servers settings (currency item, prices, VIP group, etc.). The configuration file will be automatically generated upon running the plugin for the first time.
3. **Create VIP Group (Optional)**
Create a VIP group to assign permssions to.
4. **Reload the Plugin**
Once configured, reload the plugin using the command:
```
oxide.reload Orangemart
```
---
## Permissions
The plugin uses the following permissions:
- **`orangemart.buycurrency`**
Grants permission to players who are allowed to buy your currency item via Bitcoin.
- **`orangemart.sendcurrency`**
Grants permission to players who are allowed to send Bitcoin for your in-game currency unit.
- **`orangemart.buyvip`**
Grants permission to players to purchase VIP via Bitcoin.
---
## Logging and Troubleshooting
- **Logs:**
Transaction details, such as purchases and currency sends, are logged for auditing purposes. Logs can be found in the `oxide/data/Orangemart` directory.
- **Troubleshooting:**
If any issues arise, check the server logs for errors related to the plugin. Ensure that the configuration file is correctly set up and that Bitcoin payment services are running as expected.
---
## License
This plugin is licensed under the MIT License.