Mod Request: Currency

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

Mod Request: Currency

by jordan4ibanez » Wed Mar 07, 2012 02:17

Here's a little snippet of my idea:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_on_newplayer will check if a person has a "bank account" if the search for the file is nil then it creates a "bank account" file and a "savings account" file in the format YOURNAME:savings YOURNAME:account

bank block - basically an ATM ..looks like an ATM, functions like an ATM

/balance - displays balance in $ from the "bank account" file

/deposit - deposit money into the "bank" if a person is pointed at a "bank block"
(this would store it in the "savings" file, and every time TIME = 0 then it would add on 10% into the "savings")

store block - this is an ABM
-If pointed to, you can type in /store FOLDER:BLOCKNAME buy/sell , which in a real world scenario would look like /store default:dirt 10/5
(but if pointed_thing = NIL then return "minetest.chat_send_player(player:get_player_name(), "There is no way to sell this!")"
-When the command "/store" is sent, the player who sent the command will become the "store owner" of the store block
-When the command "/store" sent to the server, the store block will react by creating another store block on top of it with a sign that will read Buy:THEBUYNUMBER Sell:THESELLNUMBER on the front of it, also an unbreakable representation of the block youve posted to sell will be created in front of the original store block
-The sign created is not editable
-All parts of the store block (as a whole when its "in use") are indestructible by anyone who is not the "store owner" (they will break it and it will reappear just as it was)
-If the bank blocks sign is broken by the "store owner", then the bank block ABM will remove the sign,the top bank block, and the representation, and anyone will be able to claim the blank store block
-On right click of the store block sign, it will check if that block is in your inventory, if this is true, then that item will be "sold" at to the store block (aka it will remove 1 of that block from your inventory and then it will add in the "SELL" amount that the store block is defined as)
-On left click (aka punch) of the store block sign, the server will check your inventory, if you do not have enough money then  the server will do:
minetest.chat_send_player(player:get_player_name(), "Not enough money!")
else if there is enough money, then it will deduct the amount of money in the "BUY" amount that the block is defined as and it will add in 1 of that block into your inventory

Jobs too?

any mod dev's want to take this challenge up?
Last edited by jordan4ibanez on Wed Mar 07, 2012 02:27, edited 1 time in total.
If you can think it, you can make it.
 

User avatar
RabbiBob
Member
 
Posts: 335
Joined: Sat Jan 28, 2012 22:40

by RabbiBob » Wed Mar 07, 2012 02:30

You may want to drop Jachoo a line. I would suggest building it on top of its own sqlite db to manage the money storage and he was openly looking for projects.
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Wed Mar 07, 2012 02:32

well hopefully he sees this and gives it a shot
If you can think it, you can make it.
 

bob
Member
 
Posts: 66
Joined: Thu Feb 16, 2012 00:59

by bob » Wed Mar 07, 2012 03:11

oi im having a look at something similar in the future for mese_advanced_kit!
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Wed Mar 07, 2012 03:43

oooo :D
If you can think it, you can make it.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Wed Mar 07, 2012 15:47

jordan4ibanez wrote:Here's a little snippet of my idea:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_on_newplayer will check if a person has a "bank account" if the search for the file is nil then it creates a "bank account" file and a "savings account" file in the format YOURNAME:savings YOURNAME:account

bank block - basically an ATM ..looks like an ATM, functions like an ATM

/balance - displays balance in $ from the "bank account" file

/deposit - deposit money into the "bank" if a person is pointed at a "bank block"
(this would store it in the "savings" file, and every time TIME = 0 then it would add on 10% into the "savings")

store block - this is an ABM
-If pointed to, you can type in /store FOLDER:BLOCKNAME buy/sell , which in a real world scenario would look like /store default:dirt 10/5
(but if pointed_thing = NIL then return "minetest.chat_send_player(player:get_player_name(), "There is no way to sell this!")"
-When the command "/store" is sent, the player who sent the command will become the "store owner" of the store block
-When the command "/store" sent to the server, the store block will react by creating another store block on top of it with a sign that will read Buy:THEBUYNUMBER Sell:THESELLNUMBER on the front of it, also an unbreakable representation of the block youve posted to sell will be created in front of the original store block
-The sign created is not editable
-All parts of the store block (as a whole when its "in use") are indestructible by anyone who is not the "store owner" (they will break it and it will reappear just as it was)
-If the bank blocks sign is broken by the "store owner", then the bank block ABM will remove the sign,the top bank block, and the representation, and anyone will be able to claim the blank store block
-On right click of the store block sign, it will check if that block is in your inventory, if this is true, then that item will be "sold" at to the store block (aka it will remove 1 of that block from your inventory and then it will add in the "SELL" amount that the store block is defined as)
-On left click (aka punch) of the store block sign, the server will check your inventory, if you do not have enough money then  the server will do:
minetest.chat_send_player(player:get_player_name(), "Not enough money!")
else if there is enough money, then it will deduct the amount of money in the "BUY" amount that the block is defined as and it will add in 1 of that block into your inventory

Jobs too?

any mod dev's want to take this challenge up?

Awesome Idea!
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Wed Mar 07, 2012 18:55

This is already done. Although, it's no longer supported by its original creator. He deleted the post for some reason.

http://www.mediafire.com/?d41zp5zinzdcba8

this is the download link which still works.

It contains a simple currency mod, + an atm mod added to it. The atm mod does exactly what you're wanting.

Proof of it being real, read this post


Edit: Note that the atm mod that was added was not by the original create of the currency (aka money) mod.
Last edited by Gatharoth on Wed Mar 07, 2012 18:57, edited 1 time in total.
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Wed Mar 07, 2012 19:04

Gatharoth wrote:This is already done. Although, it's no longer supported by its original creator. He deleted the post for some reason.

http://www.mediafire.com/?d41zp5zinzdcba8

this is the download link which still works.

It contains a simple currency mod, + an atm mod added to it. The atm mod does exactly what you're wanting.

Proof of it being real, read this post


Edit: Note that the atm mod that was added was not by the original create of the currency (aka money) mod.

no what i mean is just having currency...like the minecraft server mod..no coins.. like if you hit /balance it states your current balance
If you can think it, you can make it.
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Wed Mar 07, 2012 19:15

jordan4ibanez wrote:no what i mean is just having currency...like the minecraft server mod..no coins.. like if you hit /balance it states your current balance


Currency with out a physical form is nothing then but a bunch of numbers. So if you don't want coins, change it then. But the basics are all there. You can change how you check the balance by replacing hitting the check block, to a chat event.

Everything you want is there. You just have to change the base to get it.

Plus, the currency mod I found for minecraft anyway, uses coins and tokens. So I doubt it's the one your talking about so I don't know.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Wed Mar 07, 2012 19:34

jordan4ibanez means something like iConomy for Bukkit
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Wed Mar 07, 2012 19:50

sfan5 wrote:jordan4ibanez means something like iConomy for Bukkit



Still, the base for it is still there. Take out the money mod, and modify the atm mod.

The atm mod will help him get started, he just needs to finish it. :P All of the database stuff is done, he'll just need to add chat commands.


So something like this to check balance.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_on_chat_message(function(name, message)
    if message == '/balance' then
          GetAccountBalance(name)
        end
end)


The GetAccountBalance is a function inside the atm mod, which requires the player's name.

You can also add chat commands to adding to account, as well as taking from account for say paying.

The rest is just some modding you need to do.

You know what, hell with it, I'll mod it and send it XP
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Wed Mar 07, 2012 19:50

Gatharoth wrote:
sfan5 wrote:jordan4ibanez means something like iConomy for Bukkit



Still, the base for it is still there. Take out the money mod, and modify the atm mod.

The atm mod will help him get started, he just needs to finish it. :P All of the database stuff is done, he'll just need to add chat commands.


So something like this to check balance.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_on_chat_message(function(name, message)
    if message == '/balance' then
          GetAccountBalance(name)
        end
end)


The GetAccountBalance is a function inside the atm mod, which requires the player's name.

You can also add chat commands to adding to account, as well as taking from account for say paying.

The rest is just some modding you need to do.

You know what, hell with it, I'll mod it and send it XP

Good Idea
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Wed Mar 07, 2012 20:27

Alright, chat messages are done. Now the question I have, is what do you mean by store block?

Like the AuTomated Trader mod from tinoesroho?

For the signs that is easy, I'll just make another "sign" item that isn't craft-able, that way it will display the buy/sell names, but isn't editable.
Last edited by Gatharoth on Wed Mar 07, 2012 20:35, edited 1 time in total.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 8 guests

cron