1
0
mirror of https://github.com/MinetestForFun/minercantile.git synced 2024-11-16 15:20:26 +01:00
minercantile/api.txt

63 lines
1.3 KiB
Plaintext
Raw Normal View History

2016-05-24 22:34:56 +02:00
table minercantile.stock
table minercantile.stock.items
items stock
int minercantile.stock.money
money stock
table minercantile.shop
function minercantile.shop.get_money()
return found money
function minercantile.shop.give_money(amount, bool)
param amount:amount of money, bool:save file
add money
function minercantile.shop.take_money(amount, bool)
param amount:amount of money, bool:save file
remove money
files
minercantile_stock.txt
table money and items
minercantile_stock_base.txt
table items defined by default
wallets
table minercantile.wallets[player]
int money
table transactions
table minercantile.wallet
function minercantile.wallet.load_wallet(name)
load player's money
function minercantile.wallet.save_wallet(name)
save player's money
function minercantile.wallet.get_money(name)
return player's money
function minercantile.wallet.give_money(name, amount, transaction)
add money
function minercantile.wallet.take_money(name, amount, transaction)
remove money
function minercantile.wallet.get_transactions(name)
return player's transactions
function minercantile.add_transactions(name, new_transaction)
function minercantile.send_money(sender, receiver, amount)
send money from sender to receiver