Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Illuna-Minetest
bitchange
Commits
a1891dbe
Commit
a1891dbe
authored
Jan 17, 2014
by
SmallJoker
Browse files
Higher factors for exchanging
parent
bfc7a18a
Changes
2
Hide whitespace changes
Inline
Side-by-side
bank_money.lua
View file @
a1891dbe
...
...
@@ -97,7 +97,7 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
end
end
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
cur_money
=
money
.
get_money
(
player_name
)
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
)
bank_inv
:
remove_item
(
"coins"
,
coin_stack
)
player_inv
:
add_item
(
"main"
,
coin_stack
)
exchange_worth
=
exchange_worth
*
1
.
00
5
exchange_worth
=
exchange_worth
*
1
.
00
6
changes_made
=
true
err_msg
=
"Bought 10 MineCoins for "
..
price
..
" money"
end
...
...
bank_money2.lua
View file @
a1891dbe
...
...
@@ -97,7 +97,7 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
end
end
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
cur_money
=
money
.
get
(
player_name
,
amount
)
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
)
bank_inv
:
remove_item
(
"coins"
,
coin_stack
)
player_inv
:
add_item
(
"main"
,
coin_stack
)
exchange_worth
=
exchange_worth
*
1
.
00
5
exchange_worth
=
exchange_worth
*
1
.
00
6
changes_made
=
true
err_msg
=
"Bought 10 MineCoins for "
..
price
..
" cr"
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment