forked from mtcontrib/bitchange
Higher factors for exchanging
This commit is contained in:
parent
bfc7a18a88
commit
a1891dbe70
@ -97,7 +97,7 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(err_msg == "") then
|
if(err_msg == "") then
|
||||||
exchange_worth = exchange_worth * 0.995
|
exchange_worth = exchange_worth / 1.0059
|
||||||
local price = round(exchange_worth - 0.1, 1) * 10
|
local price = round(exchange_worth - 0.1, 1) * 10
|
||||||
local cur_money = money.get_money(player_name)
|
local cur_money = money.get_money(player_name)
|
||||||
money.set_money(player_name, cur_money + price)
|
money.set_money(player_name, cur_money + price)
|
||||||
@ -126,7 +126,7 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
|
|||||||
money.set_money(player_name, cur_money - price)
|
money.set_money(player_name, cur_money - price)
|
||||||
bank_inv:remove_item("coins", coin_stack)
|
bank_inv:remove_item("coins", coin_stack)
|
||||||
player_inv:add_item("main", coin_stack)
|
player_inv:add_item("main", coin_stack)
|
||||||
exchange_worth = exchange_worth * 1.005
|
exchange_worth = exchange_worth * 1.006
|
||||||
changes_made = true
|
changes_made = true
|
||||||
err_msg = "Bought 10 MineCoins for "..price.." money"
|
err_msg = "Bought 10 MineCoins for "..price.." money"
|
||||||
end
|
end
|
||||||
|
@ -97,7 +97,7 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(err_msg == "") then
|
if(err_msg == "") then
|
||||||
exchange_worth = exchange_worth * 0.995
|
exchange_worth = exchange_worth / 1.0059
|
||||||
local price = round(exchange_worth - 0.1, 1) * 10
|
local price = round(exchange_worth - 0.1, 1) * 10
|
||||||
local cur_money = money.get(player_name, amount)
|
local cur_money = money.get(player_name, amount)
|
||||||
money.set(player_name, cur_money + price)
|
money.set(player_name, cur_money + price)
|
||||||
@ -126,7 +126,7 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
|
|||||||
money.set(player_name, cur_money - price)
|
money.set(player_name, cur_money - price)
|
||||||
bank_inv:remove_item("coins", coin_stack)
|
bank_inv:remove_item("coins", coin_stack)
|
||||||
player_inv:add_item("main", coin_stack)
|
player_inv:add_item("main", coin_stack)
|
||||||
exchange_worth = exchange_worth * 1.005
|
exchange_worth = exchange_worth * 1.006
|
||||||
changes_made = true
|
changes_made = true
|
||||||
err_msg = "Bought 10 MineCoins for "..price.." cr"
|
err_msg = "Bought 10 MineCoins for "..price.." cr"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user