[Mod] Vending Machines [1.02] [vendor] - Minetest Commerce

Bad_Command_
Member
 
Posts: 30
Joined: Sat Jun 23, 2012 01:17

[Mod] Vending Machines [1.02] [vendor] - Minetest Commerce

by Bad_Command_ » Wed Sep 12, 2012 23:21

Vending Machines
The the vending mod adds vending machines and depositing machines (deposit boxes) to Minetest.

Vending and depositing machines allow for players to buy and sell items out of locked chests. A mix of Vending machines and depositing machines can stack with multiple chests to create an automated shop. The machines can even limit how many times they can be used: this can be used to make limited-quantity sales.

Image

The mod is on github, and is now running on mt1.gameboom.net 30000.

Dependencies:
money2 download (replaces money mod)|default

Downloads:
Version 1.02
Version 1.01
Version 1.00

License:
LGPL 2.1 for code
CC-BY 3.0/CC-BY-SA 3.0/GPL 3.0/GPL 2.0 for sounds
LGPL 2.1 for textures

Crafting:
A vending and a depositing machine can be crafted using the following recipes:

Image
Image

This recipe uses wood and steel ingots, and is similar to the locked chest recipe.

Connecting Machines and Chests
Vending machines and locked chests can be stacked together in any order, as long as the machines and chests all stack in a line. You can even hide your chests from your customers by embedding them in a wall or the floor. A stack of machines looks like this:
Image

Configuring a machine:
To configure a machine, right click on the machine. A dialog box will open up. You must enter 3 numbers to configure the machine. The first number is the number of items to sell, the second number is the price to sell them at, and the third number is the sale limit. Set the third number to 0 to make an unlimited machine. The machines will search for connected locked chests, and will sell the first type of item found in them.
Image

Using a Machine
Hold your cursor over the machine to see what it is selling, and for how much money. To use the machine, you must simply punch the box. If it is properly configured, and both parties have enough money, space, and inventory, then you will make a purchase.
Last edited by Bad_Command_ on Sun Sep 16, 2012 00:11, edited 1 time in total.
 

User avatar
Topywo
Member
 
Posts: 1720
Joined: Fri May 18, 2012 20:27

by Topywo » Thu Sep 13, 2012 08:03

Tried it off-line, tried negative numbers etc... Works smoothly.

Great!
 

Phirebolter
Member
 
Posts: 24
Joined: Sat Sep 01, 2012 00:20

by Phirebolter » Fri Sep 14, 2012 04:46

Great mod, but there is a glitch, on the depositing machine it says buy instead of sell.
 

Phirebolter
Member
 
Posts: 24
Joined: Sat Sep 01, 2012 00:20

by Phirebolter » Fri Sep 14, 2012 04:57

Whoops, my bad, lol, I got confused, not a glitch.
 

User avatar
YouKingGameTube
Member
 
Posts: 10
Joined: Fri Sep 14, 2012 08:11
Location: ITALIA
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Fri Sep 14, 2012 08:39

added pull request - provide a formspec form for entering sales info
[img]http:///cornernote.net/minetest/screenshots/screenshot_2342342.png[/img]
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Fri Sep 14, 2012 08:43

request - would like to see the inventory in the machine, so that i can buy/sell by dragging/dropping into the machine itself

that way you won't need 2 machines, could even setup multiple items at different prices
 

Bad_Command_
Member
 
Posts: 30
Joined: Sat Jun 23, 2012 01:17

by Bad_Command_ » Sat Sep 15, 2012 00:03

cornernote wrote:added pull request - provide a formspec form for entering sales info

Nice work cornernote, I've incoporated the changes and released a new version. Thanks!
 

Bad_Command_
Member
 
Posts: 30
Joined: Sat Jun 23, 2012 01:17

by Bad_Command_ » Sun Sep 16, 2012 00:13

Ver. 1.02 released. It fixes some minor bugs with sounds and messages.
 

keyxmakerx
Member
 
Posts: 104
Joined: Mon Apr 08, 2013 23:53

by keyxmakerx » Sat Jun 29, 2013 07:09

Any upcoming updates in the future maybe? There are alot of mods that still use this one. I'd like to see it get some new features that the other money currently has like admin only and such.
 

NiQo
New member
 
Posts: 6
Joined: Sat Aug 17, 2013 20:20

by NiQo » Sat Aug 31, 2013 09:43

I have a suggestion for a little modification to allow vendor/deposidor one beside the other. That not change for use that users have (for what i see) and improves the possibilities.


in vendor.lua, line 344, change vendor.is_traversable and vendor.neighboring_nodes

Code: Select all
vendor.is_traversable = function(pos, name)
    local node = minetest.env:get_node_or_nil(pos)
    if ( node == nil ) then
        return false
    end
    for i=1,#vendor.traversable_node_types do
        if (node.name == vendor.traversable_node_types[i] and node.name ~= name) then
            return true
        end
    end
    return false
end

vendor.neighboring_nodes = function(pos)
    local node = minetest.env:get_node_or_nil(pos)
    local check = {{x=pos.x+1, y=pos.y, z=pos.z},
        {x=pos.x-1, y=pos.y, z=pos.z},
        {x=pos.x, y=pos.y+1, z=pos.z},
        {x=pos.x, y=pos.y-1, z=pos.z},
        {x=pos.x, y=pos.y, z=pos.z+1},
        {x=pos.x, y=pos.y, z=pos.z-1}}
    local trav = {}
    for i=1,#check do
        if vendor.is_traversable(check[i], node.name) then
            trav[#trav+1] = check[i]
        end
    end
    return trav       
end
 

User avatar
BrunoMine
Member
 
Posts: 1020
Joined: Thu Apr 25, 2013 17:29
Location: SP-Brasil
GitHub: BrunoMine

by BrunoMine » Sat Aug 31, 2013 12:37

I have a suggestion!
The market has many such machines.
The problem is that I need to put a sample block above the machine.
The machine has two units high. with the third block is very high.
It would be better if there was a third machine.
A machine sale and purchase.
So the player to access this machine, you can choose to buy or sell!
The problem is that it would take the simple model in which atuamente buying or selling items.
It's great fun simply hit the machine.
Another sigestão!
A board could follow this mod. A plate showing the item that sells the machine. A frame which shows whether it has to be inserted. This board should also have an arrow (pointer) to somewhere.
This mod is very good!
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

User avatar
fairiestoy
Member
 
Posts: 191
Joined: Sun Jun 09, 2013 19:25
Location: Germany

by fairiestoy » Sun Sep 22, 2013 20:19

NiQo wrote:I have a suggestion for a little modification to allow vendor/deposidor one beside the other. That not change for use that users have (for what i see) and improves the possibilities.


in vendor.lua, line 344, change vendor.is_traversable and vendor.neighboring_nodes

Code: Select all
code sample


Since this mod seems not to be updated since a year, here the version with the changes of NiQo as well as a new node which allows a user to buy mesecon signals. This might be usefull to allow exclusive access to areas or similiar (makes only sense on server with protection mods, or trustful players)

Repo Link
Download Link

brunob.santos:
unfortunately i didn't really get what your suggestion is, otherwise i would have made another branch of it. Try to explain a bit more detailed what you meant and the changes might be available then.
Last edited by fairiestoy on Sun Sep 22, 2013 20:22, edited 1 time in total.
Interesting about new things is, to figure out how it works ...
 

User avatar
LuxAtheris
Member
 
Posts: 169
Joined: Fri Oct 25, 2013 00:54
Location: Aether

by LuxAtheris » Tue Dec 24, 2013 04:54

So how do you earn money here?
Believe you can and you’re halfway there.
 

User avatar
Krock
Developer
 
Posts: 4141
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

by Krock » Tue Dec 24, 2013 10:24

LuxAtheris wrote:So how do you earn money here?

3 months ago was last post..
Anyway,

1) set up vending machine with locked chest below
2) configure it
3) other players should slap it
4) look into your /money
5) see it you have more than before
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
LuxAtheris
Member
 
Posts: 169
Joined: Fri Oct 25, 2013 00:54
Location: Aether

by LuxAtheris » Tue Dec 24, 2013 14:52

Ohh,but is there a way to earn money by killing mobs?
Believe you can and you’re halfway there.
 

User avatar
balthazariv
Member
 
Posts: 214
Joined: Mon Apr 07, 2014 15:48

Re: [Mod] Vending Machines [1.02] [vendor] - Minetest Commer

by balthazariv » Wed Aug 13, 2014 13:16

Hello,

This mod looks abandoned and does not work on 0.4.10 minetest.
I have this error.

Code: Select all
15:10:24: ERROR[main]: ========== ERROR FROM LUA ===========
15:10:24: ERROR[main]: Failed to load and run script from
15:10:24: ERROR[main]: L:\Minetest\minetest - Copie\bin\..\mods\vendor\init.lua:
15:10:24: ERROR[main]: cannot open L:\Minetest\minetest - Copie\bin\..\mods\vendor\init.lua: No such file or directory
15:10:24: ERROR[main]: ======= END OF ERROR FROM LUA ========
15:10:24: ERROR[main]: Server: Failed to load and run L:\Minetest\minetest - Copie\bin\..\mods\vendor\init.lua
15:10:24: ERROR[main]: ModError: ModError: Failed to load and run L:\Minetest\minetest - Copie\bin\..\mods\vendor\init.lua


Can anyone make a correction?

Thanks
 

User avatar
Topywo
Member
 
Posts: 1720
Joined: Fri May 18, 2012 20:27

Re: [Mod] Vending Machines [1.02] [vendor] - Minetest Commer

by Topywo » Wed Aug 13, 2014 14:48

balthazariv wrote:Hello,

I have this error.

Code: Select all
15:10:24: ERROR[main]: cannot open L:\Minetest\minetest - Copie\bin\..\mods\vendor\init.lua: No such file or directory


- Strange, because in the download, there is a init.lua file.
- Did you also install the dependency money2 ?
 

User avatar
balthazariv
Member
 
Posts: 214
Joined: Mon Apr 07, 2014 15:48

Re: [Mod] Vending Machines [1.02] [vendor] - Minetest Commer

by balthazariv » Wed Aug 13, 2014 18:52

Topywo wrote:- Strange, because in the download, there is a init.lua file.
- Did you also install the dependency money2 ?


no I had not seen. I'm sorry.
I just did a search on the forum and I can not find this mod "Money2." where can I find

Thanks
 

User avatar
Topywo
Member
 
Posts: 1720
Joined: Fri May 18, 2012 20:27

Re: [Mod] Vending Machines [1.02] [vendor] - Minetest Commer

by Topywo » Thu Aug 14, 2014 08:25

No need to be sorry and you're welcome.

There's a working link to money2 in the first post of this thread (click download, under dependencies):
viewtopic.php?f=11&t=3039&p=151018#p42352
 

User avatar
balthazariv
Member
 
Posts: 214
Joined: Mon Apr 07, 2014 15:48

Re: [Mod] Vending Machines [1.02] [vendor] - Minetest Commer

by balthazariv » Thu Aug 14, 2014 16:38

Hello,

I understand when extracting the file should not just rename "vendor-master" to "vendor" but take the "vendor" folder that is still inside.

Thanks
 

erwin.maximilian
New member
 
Posts: 6
Joined: Sat Mar 07, 2015 10:53
GitHub: erwin8086

Re: [Mod] Vending Machines [1.02] [vendor] - Minetest Commer

by erwin.maximilian » Sat Jan 02, 2016 13:48

Here is a patch for fairiestoy's version.
So signal vendor now works witch recent mesecons version.
Attachments
vendor_signalvendor_update.patch.gz
The Patch
(577 Bytes) Downloaded 38 times
 


Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 6 guests