diff --git a/Auto-Tune/dependency-reduced-pom.xml b/Auto-Tune/dependency-reduced-pom.xml
index 0e4c424..4b4682e 100644
--- a/Auto-Tune/dependency-reduced-pom.xml
+++ b/Auto-Tune/dependency-reduced-pom.xml
@@ -4,7 +4,7 @@
unprotesting.com.github
Auto-Tune
Auto-Tune
- 0.10.3
+ 0.10.4
The automatic pricing plugin for minecraft
https://github.com/Unprotesting/Auto-Tune
diff --git a/Auto-Tune/pom.xml b/Auto-Tune/pom.xml
index 36c64a0..db98a9c 100644
--- a/Auto-Tune/pom.xml
+++ b/Auto-Tune/pom.xml
@@ -9,7 +9,7 @@
unprotesting.com.github
Auto-Tune
- 0.10.3
+ 0.10.4
Auto-Tune
https://github.com/Unprotesting/Auto-Tune
diff --git a/Auto-Tune/src/resources/config.yml b/Auto-Tune/src/resources/config.yml
index 2e6f7a2..8a5edbe 100644
--- a/Auto-Tune/src/resources/config.yml
+++ b/Auto-Tune/src/resources/config.yml
@@ -19,6 +19,7 @@ email: 'xyz@gmail.com'
web-server-enabled: true
## Port for integrated Web Server (If enabled)
+## Make sure to port-forward and disable firewalls for this port.
port: 8123
## The maximum length in data points that the trade-short.html will show (this doesn't affect data)
@@ -65,7 +66,7 @@ auto-sell-profit-update-period: 1200
Volatility-Algorithim: 'Variable'
## Percentage difference in sell price to buy price
-sell-price-difference: 2.5
+sell-price-difference: 5.0
## Maximum Volatility per Time Period for the Fixed Volatility price calculation algorithim in economy units
Fixed-Max-Volatility: 2.00
@@ -88,7 +89,7 @@ data-selection-m: 0.05
## 'z' in equation: y=m(x^z)+c
data-selection-z: 1.6
## 'c' in equation: y=m(x^z)+c
-data-selection-c: 1.25
+data-selection-c: 1.05
## -- Other Econonomy Settings --
@@ -145,4 +146,11 @@ checksum-header-bypass: false
economy-shop-config: 'default'
## Percentage value sell prices have on new price when converting GUIShop to Auto-Tune
-shop-config-guishop-sell-value: 20.00
\ No newline at end of file
+shop-config-guishop-sell-value: 20.00
+
+## Enable the Auto-Tune tutorial for players
+## Keep this on to encourage purchasing turn it off if its distracting
+tutorial: true
+
+## Time in seconds between messages
+tutorial-message-period: 300
\ No newline at end of file
diff --git a/Auto-Tune/src/resources/plugin.yml b/Auto-Tune/src/resources/plugin.yml
index d8f0265..529909e 100644
--- a/Auto-Tune/src/resources/plugin.yml
+++ b/Auto-Tune/src/resources/plugin.yml
@@ -56,20 +56,28 @@ permssions:
description: Login to an Auto-Tune account |(active soon)|
at.shop:
description: Open the GUI shop
+ default: true
at.sell:
description: Open the sell GUI
+ default: true
at.autosell:
description: Open the Auto-Sell GUI and Auto-Sell
+ default: true
at.loan:
description: Loan money from the bank
+ default: true
at.increase:
description: Increase price of an item
at.decrease:
description: Decrease price of an item
at.gdp:
description: View GDP info
+ default: true
at.atconfig:
description: View and change plugin config settings
+ at.tutorial:
+ description: Allow players to view tutorial messages
+ default: true
diff --git a/Auto-Tune/src/resources/shops.yml b/Auto-Tune/src/resources/shops.yml
index c29c8da..322b8fb 100644
--- a/Auto-Tune/src/resources/shops.yml
+++ b/Auto-Tune/src/resources/shops.yml
@@ -23,10 +23,252 @@
## Options: "locked: " set the price to be locked or variable (variable by default).
## Options: "sell-difference: " set a custom sell-price-difference (default set in config).
+ ## Example:
+ ## GRASS_BLOCK:
+ ## price: 50.00
+ ## locked: true <- Example of a locked item
+ ## sell-difference: 0.0 <- Example of a set sell-difference item
+
shops:
+ COAL:
+ price: 8.00
+ COAL_ORE:
+ price: 30.00
+ IRON_INGOT:
+ price: 15.00
+ IRON_ORE:
+ price: 12.00
+ GOLD_INGOT:
+ price: 40.00
+ GOLD_ORE:
+ price: 30.00
+ DIAMOND:
+ price: 250.00
+ DIAMOND_ORE:
+ price: 600.00
+ LAPIS_LAZULI:
+ price: 8.00
+ LAPIS_ORE:
+ price: 60.00
+ EMERALD:
+ price: 100.00
+ EMERALD_ORE:
+ price: 270.00
+ QUARTZ:
+ price: 10.00
+ NETHER_QUARTZ_ORE:
+ price: 40.00
+ REDSTONE:
+ price: 4.00
+ REDSTONE_ORE:
+ price: 40.00
+ NETHERITE_INGOT:
+ price: 6500.00
+ NETHERITE_SCRAP:
+ price: 2000.00
+ GLOWSTONE_DUST:
+ price: 5.00
+ DIRT:
+ price: 1.00
+ GRASS_BLOCK:
+ price: 4.00
+ MYCELIUM:
+ price: 8.00
+ COBBLESTONE:
+ price: 1.00
+ STONE:
+ price: 2.00
+ GRANITE:
+ price: 0.80
+ DIORITE:
+ price: 0.80
+ ANDESITE:
+ price: 1.00
+ GRAVEL:
+ price: 3.00
+ SAND:
+ price: 1.00
+ SANDSTONE:
+ price: 4.00
+ GLASS:
+ price: 3.00
+ SNOWBALL:
+ price: 1.50
+ CLAY_BALL:
+ price: 2.50
+ ICE:
+ price: 5.50
+ PRISMARINE:
+ price: 9.00
+ PRISMARINE_BRICKS:
+ price: 10.00
+ DARK_PRISMARINE:
+ price: 12.50
+ OBSIDIAN:
+ price: 15.00
+ END_STONE:
+ price: 3.50
+ NETHERRACK:
+ price: 1.00
+ NETHER_BRICKS:
+ price: 8.00
+ BLACKSTONE:
+ price: 2.25
+ SOUL_SAND:
+ price: 4.00
+ WHITE_WOOL:
+ price: 6.50
+ OAK_LOG:
+ price: 8.00
+ SPRUCE_LOG:
+ price: 8.50
+ BIRCH_LOG:
+ price: 8.50
+ DARK_OAK_LOG:
+ price: 8.75
+ ACACIA_LOG:
+ price: 8.25
+ JUNGLE_LOG:
+ price: 8.25
+ CACTUS:
+ price: 3.00
+ VINE:
+ price: 2.00
+ CARROT:
+ price: 4.00
+ EGG:
+ price: 3.50
+ MELON_SLICE:
+ price: 1.75
APPLE:
- price: 100.00 ## <- Example of a variable item
- STICK:
+ price: 6.00
+ WHEAT:
+ price: 2.00
+ SUGAR_CANE:
+ price: 1.50
+ BEEF:
+ price: 2.50
+ PORKCHOP:
+ price: 2.25
+ CHICKEN:
+ price: 1.45
+ RABBIT:
+ price: 2.50
+ MUTTON:
+ price: 2.00
+ PUMPKIN:
+ price: 8.00
+ RED_MUSHROOM:
+ price: 6.00
+ BROWN_MUSHROOM:
+ price: 6.00
+ WHEAT_SEEDS:
+ price: 1.25
+ NETHER_WART:
+ price: 4.00
+ FLINT:
+ price: 4.00
+ GUNPOWDER:
+ price: 12.50
+ LEATHER:
+ price: 20.00
+ INK_SAC:
+ price: 2.50
+ FEATHER:
+ price: 4.00
+ BONE:
+ price: 6.00
+ BONE_MEAL:
+ price: 2.00
+ STRING:
+ price: 4.00
+ ROTTEN_FLESH:
+ price: 0.50
+ SPIDER_EYE:
+ price: 7.00
+ SLIME_BALL:
+ price: 25.00
+ ENDER_PEARL:
+ price: 35.00
+ NETHER_STAR:
+ price: 20000.00
+ GHAST_TEAR:
+ price: 125.00
+ MAGMA_CREAM:
price: 50.00
- ##locked: true <- Example of a locked item
- ##sell-difference: 0.0 <- Example of a set sell-difference item
\ No newline at end of file
+ BLAZE_ROD:
+ price: 45.00
+ ARROW:
+ price: 2.00
+ SADDLE:
+ price: 100.00
+ NAME_TAG:
+ price: 50.00
+ CHORUS_FRUIT:
+ price: 1.25
+ HONEY_BOTTLE:
+ price: 5.00
+ CHEST:
+ price: 20.00
+ MINECART:
+ price: 110.00
+ TORCH:
+ price: 4.0
+ NOTE_BLOCK:
+ price: 36.0
+ BUCKET:
+ price: 40.0
+ FURNACE:
+ price: 8.5
+ TNT:
+ price: 125.0
+ SPONGE:
+ price: 60.00
+ PHANTOM_MEMBRANE:
+ price: 45.00
+ OAK_LEAVES:
+ price: 1.0
+ BIRCH_LEAVES:
+ price: 1.0
+ SPRUCE_LEAVES:
+ price: 1.0
+ JUNGLE_LEAVES:
+ price: 1.0
+ DARK_OAK_LEAVES:
+ price: 1.0
+ ACACIA_LEAVES:
+ price: 1.0
+ OAK_PLANKS:
+ price: 0.5
+ BIRCH_PLANKS:
+ price: 0.5
+ SPRUCE_PLANKS:
+ price: 0.5
+ JUNGLE_PLANKS:
+ price: 0.5
+ DARK_OAK_PLANKS:
+ price: 0.5
+ ACACIA_PLANKS:
+ price: 0.5
+ OAK_SAPLING:
+ price: 2.5
+ BIRCH_SAPLING:
+ price: 2.5
+ SPRUCE_SAPLING:
+ price: 2.5
+ JUNGLE_SAPLING:
+ price: 2.5
+ DARK_OAK_SAPLING:
+ price: 2.5
+ ACACIA_SAPLING:
+ price: 2.5
+ DISPENSER:
+ price: 58.0
+ CAKE:
+ price: 180.0
+ MILK_BUCKET:
+ price: 60.00
+ STICK:
+ price: 0.25
+ BOOK:
+ price: 45.0
\ No newline at end of file
diff --git a/Auto-Tune/src/unprotesting/com/github/Main.java b/Auto-Tune/src/unprotesting/com/github/Main.java
index f5a94fb..1d3002c 100644
--- a/Auto-Tune/src/unprotesting/com/github/Main.java
+++ b/Auto-Tune/src/unprotesting/com/github/Main.java
@@ -72,6 +72,7 @@
import unprotesting.com.github.util.MathHandler;
import unprotesting.com.github.util.StaticFileHandler;
import unprotesting.com.github.util.TextHandler;
+import unprotesting.com.github.util.TutorialHandler;
public final class Main extends JavaPlugin implements Listener {
@@ -212,6 +213,7 @@ public void onEnable() {
if (vaildAPIKey) {
log("API-Key found in database. Continuing to load Auto-Tune on " + Config.getServerName());
}
+ TutorialHandler.loadMessages();
this.getCommand("at").setExecutor(new AutoTuneCommand());
this.getCommand("shop").setExecutor(new AutoTuneGUIShopUserCommand());
this.getCommand("sell").setExecutor(new AutoTuneSellCommand());
@@ -231,6 +233,7 @@ public void onEnable() {
scheduler.scheduleSyncRepeatingTask(this, new AutoTunePlayerAutoSellEventHandler(),
Config.getAutoSellProfitUpdatePeriod() + 20, Config.getAutoSellProfitUpdatePeriod());
}
+ scheduler.scheduleAsyncRepeatingTask(this, new TutorialHandler(), (Config.getTutorialMessagePeriod()*20), (Config.getTutorialMessagePeriod()*20));
scheduler.scheduleAsyncRepeatingTask(this, new LoanEventHandler(), Config.getIntrestRateUpdateRate(),
Config.getIntrestRateUpdateRate());
runnable();
diff --git a/Auto-Tune/src/unprotesting/com/github/util/Config.java b/Auto-Tune/src/unprotesting/com/github/util/Config.java
index 932717e..5b7f8b3 100644
--- a/Auto-Tune/src/unprotesting/com/github/util/Config.java
+++ b/Auto-Tune/src/unprotesting/com/github/util/Config.java
@@ -16,7 +16,8 @@ public final class Config {
sellPriceDifferenceVariationEnabled,
inflationEnabled,
autoSellEnabled,
- calculateGlobalGDP;
+ calculateGlobalGDP,
+ tutorial;
@Getter
@Setter
@@ -29,7 +30,8 @@ public final class Config {
autoSellProfitUpdatePeriod,
dynamicInflationUpdatePeriod,
maximumShortTradeLength,
- intrestRateUpdateRate;
+ intrestRateUpdateRate,
+ tutorialMessagePeriod;
@Getter
@Setter
@@ -63,8 +65,9 @@ public final class Config {
public static void loadDefaults() {
- Config.setSellPriceDifferenceVariationEnabled(Main.getMainConfig().getBoolean("sell-price-difference-variation-enabled", false));
- Config.setWebServer(Main.getMainConfig().getBoolean("web-server-enabled", false));
+ Config.setSellPriceDifferenceVariationEnabled(Main.getMainConfig().getBoolean("sell-price-difference-variation-enabled", true));
+ Config.setWebServer(Main.getMainConfig().getBoolean("web-server-enabled", true));
+ Config.setTutorial(Main.getMainConfig().getBoolean("tutorial", true));
Config.setCalculateGlobalGDP(Main.getMainConfig().getBoolean("calculate-global-GDP", true));
Config.setAutoSellEnabled(Main.getMainConfig().getBoolean("auto-sell-enabled", true));
Config.setInflationEnabled(Main.getMainConfig().getBoolean("inflation-enabled", true));
@@ -76,6 +79,7 @@ public static void loadDefaults() {
Config.setAutoSellUpdatePeriod(Main.getMainConfig().getInt("auto-sell-update-period", 10));
Config.setTimePeriod(Main.getMainConfig().getInt("time-period", 10));
Config.setMenuRows(Main.getMainConfig().getInt("menu-rows", 3));
+ Config.setTutorialMessagePeriod(Main.getMainConfig().getInt("tutorial-message-period", 300));
Config.setIntrestRateUpdateRate(Main.getMainConfig().getInt("intrest-rate-update-period", 1200));
Config.setDynamicInflationUpdatePeriod(Main.getMainConfig().getInt("dynamic-inflation-update-period", 5000));
Config.setSellPriceVariationTimePeriod(Main.getMainConfig().getInt("sell-price-variation-time-period", 10800));
@@ -93,17 +97,17 @@ public static void loadDefaults() {
Config.setNoPermission(ChatColor.translateAlternateColorCodes('&', Main.getMainConfig().getString("no-permission", "You do not have permission to perform this command")));
Config.setEconomyShopConfig(Main.getMainConfig().getString("economy-shop-config", "default"));
Config.setBasicMaxFixedVolatility(Main.getMainConfig().getDouble("Fixed-Max-Volatility", 2.00));
- Config.setBasicMaxVariableVolatility(Main.getMainConfig().getDouble("Variable-Max-Volatility", 2.00));
+ Config.setBasicMaxVariableVolatility(Main.getMainConfig().getDouble("Variable-Max-Volatility", 1.50));
Config.setBasicMinFixedVolatility(Main.getMainConfig().getDouble("Fixed-Min-Volatility", 0.05));
Config.setBasicMinVariableVolatility(Main.getMainConfig().getDouble("Variable-Min-Volatility", 0.05));
Config.setDataSelectionM(Main.getMainConfig().getDouble("data-selection-m", 0.05));
- Config.setDataSelectionC(Main.getMainConfig().getDouble("data-selection-c", 1.25));
+ Config.setDataSelectionC(Main.getMainConfig().getDouble("data-selection-c", 1.05));
Config.setDynamicInflationValue(Main.getMainConfig().getDouble("dynamic-inflation-value", 0.0025));
Config.setInflationValue(Main.getMainConfig().getDouble("static-inflation-value", 0.1));
Config.setDataSelectionZ(Main.getMainConfig().getDouble("data-selection-z", 1.6));
Config.setSellPriceDifference(Main.getMainConfig().getDouble("sell-price-difference", 2.5));
Config.setIntrestRate(Main.getMainConfig().getDouble("intrest-rate", 0.001));
- Config.setMaxDebt(Main.getMainConfig().getDouble("max-debt-value", -1000.00));
+ Config.setMaxDebt(Main.getMainConfig().getDouble("max-debt-value", -5000.00));
Config.setSellPriceDifferenceVariationStart(Main.getMainConfig().getDouble("sell-price-difference-variation-start", 25.0));
Config.setShopConfigGUIShopSellValue(Main.getMainConfig().getDouble("shop-config-guishop-sell-value", 20.00));
}
diff --git a/Auto-Tune/src/unprotesting/com/github/util/TutorialHandler.java b/Auto-Tune/src/unprotesting/com/github/util/TutorialHandler.java
new file mode 100644
index 0000000..53b5367
--- /dev/null
+++ b/Auto-Tune/src/unprotesting/com/github/util/TutorialHandler.java
@@ -0,0 +1,57 @@
+package unprotesting.com.github.util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.bukkit.Bukkit;
+import org.bukkit.ChatColor;
+import org.bukkit.entity.Player;
+
+public class TutorialHandler implements Runnable{
+
+ public static List messages = new ArrayList();
+ public ConcurrentHashMap playerList = new ConcurrentHashMap();
+
+
+ @Override
+ public void run() {
+ if (Config.isTutorial()){
+ Collection players = (Collection)(Bukkit.getOnlinePlayers());
+ for (Player player : players){
+ if (playerList.get(player) == null){
+ playerList.put(player, 0);
+ }
+ if (!player.hasPermission("at.tutorial") && !player.isOp()){
+ continue;
+ }
+ if (player != null && player.isOnline()){
+ if (playerList.get(player) > messages.size()-1){
+ playerList.put(player, 0);
+ }
+ player.sendMessage(messages.get(playerList.get(player)));
+ playerList.put(player, (playerList.get(player)+1));
+ }
+ }
+ }
+ }
+
+ public static void loadMessages(){
+ messages.add(ChatColor.YELLOW + "Do /shop to open the shop and start exchanging items.");
+ messages.add(ChatColor.YELLOW + "Do /sell to sell items quickly.");
+ messages.add(ChatColor.YELLOW + "Control the market! Your purchases rise prices.");
+ messages.add(ChatColor.YELLOW + "Control the market! Your sales lower prices.");
+ messages.add(ChatColor.YELLOW + "Do /autosell to sell items automatically.");
+ messages.add(ChatColor.YELLOW + "Do /trade to view item prices over time.");
+ messages.add(ChatColor.YELLOW + "Do /loan to loan money. Do /loans to check your loans. Do /payloan to payback loan");
+ messages.add(ChatColor.YELLOW + "Do /gdp to view the server GDP.");
+ messages.add(ChatColor.YELLOW + "Inflation means prices for items generally rise. Put your money in assets (items) to make more money");
+ messages.add(ChatColor.YELLOW + "Watch the prices of items! They can go up and down.");
+ messages.add(ChatColor.YELLOW + "There are big profits to be made when prices change..");
+ messages.add(ChatColor.YELLOW + "Loan money to take leverage of the rise in prices.");
+ messages.add(ChatColor.YELLOW + "Sell items that have high demand to make the most money selling.");
+ messages.add(ChatColor.YELLOW + "Using /autosell is an easy way to make money quickly and easily");
+ messages.add(ChatColor.YELLOW + "Viewing prices with /trade allows you to judge the markets.");
+ }
+}