[Mod] Trader Redo [mobs_npc]

Post Reply
User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

[Mod] Trader Redo [mobs_npc]

by everamzah » Post

Description: This is a re-working of the trader's formspec. I was having some trouble with it, so this is an attempt to make it work more simply.
Depends: mobs
License: Not really sure, whatever Sapier says, I guess.
Spoiler

Code: Select all

-------------------------------------------------------------------------------
-- Mob Framework Mod by Sapier
--
-- You may copy, use, modify or do nearly anything except removing this
-- copyright notice.
-- And of course you are NOT allow to pretend you have written it.
--
--! @file inventory.lua
--! @brief component containing mob inventory related functions
--! @copyright Sapier
--! @author Sapier
--! @date 2013-01-02
--
--! @defgroup Inventory Inventory subcomponent
--! @brief Component handling mob inventory
--! @ingroup framework_int
--! @{
--
-- Contact sapier a t gmx net
-------------------------------------------------------------------------------
Download: GitHub or master.zip

Image

Original mobs_npc can be found at https://github.com/tenplus1/mobs_npc
Attachments
screenshot_20160714_201251.png
screenshot_20160714_201251.png (103.24 KiB) Viewed 1478 times

User avatar
TenPlus1
Member
Posts: 3992
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] Trader Redo [mobs_npc]

by TenPlus1 » Post

Love the new formspec :) would it be ok to use this in the my own mobs_npc ??

User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Trader Redo [mobs_npc]

by everamzah » Post

You certainly may!

However, there seems to be some problem with traders not trading sometimes, I don't know why yet.

Martno
Member
Posts: 81
Joined: Thu May 28, 2015 07:09
Location: Hungary

Re: [Mod] Trader Redo [mobs_npc]

by Martno » Post

everamzah wrote:However, there seems to be some problem with traders not trading sometimes, I don't know why yet.
Yeah the traders don't trade after some time, and their name change to yellow (?) I can only trade with green named traders. Also, when I quit the game and rejoin, their inventory is loaded again. Is this intentional? Or does this mod have a reload feature?

Other than that, traders work awesome, very fast.

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: [Mod] Trader Redo [mobs_npc]

by maikerumine » Post

everamzah wrote:Description: This is a re-working of the trader's formspec. I was having some trouble with it, so this is an attempt to make it work more simply.
Depends: mobs
License: Not really sure, whatever Sapier says, I guess.
Spoiler

Code: Select all

-------------------------------------------------------------------------------
-- Mob Framework Mod by Sapier
--
-- You may copy, use, modify or do nearly anything except removing this
-- copyright notice.
-- And of course you are NOT allow to pretend you have written it.
--
--! @file inventory.lua
--! @brief component containing mob inventory related functions
--! @copyright Sapier
--! @author Sapier
--! @date 2013-01-02
--
--! @defgroup Inventory Inventory subcomponent
--! @brief Component handling mob inventory
--! @ingroup framework_int
--! @{
--
-- Contact sapier a t gmx net
-------------------------------------------------------------------------------
Download: GitHub or master.zip

Image

Original mobs_npc can be found at https://github.com/tenplus1/mobs_npc
You brilliant man, you! Do you also mind if I add the formspec to one of my mobs?
Maybe add a function to heal/feed npc on rightclick? This might keep their status green.
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Trader Redo [mobs_npc]

by everamzah » Post

Yep, this mod needs a lot of work. I'll try to fix them, so they don't stop working on logout/trade/restart, etc.

Ps., This mod can be added anywhere, I feel, as long as Sapier's copyright notice is honored:
Spoiler

Code: Select all

-------------------------------------------------------------------------------
-- Mob Framework Mod by Sapier
--
-- You may copy, use, modify or do nearly anything except removing this
-- copyright notice.
-- And of course you are NOT allow to pretend you have written it.
--
--! @file inventory.lua
--! @brief component containing mob inventory related functions
--! @copyright Sapier
--! @author Sapier
--! @date 2013-01-02
--
--! @defgroup Inventory Inventory subcomponent
--! @brief Component handling mob inventory
--! @ingroup framework_int
--! @{
--
-- Contact sapier a t gmx net
-------------------------------------------------------------------------------

User avatar
taikedz
Member
Posts: 698
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake
Location: Scotland, UK
Contact:

Re: [Mod] Trader Redo [mobs_npc]

by taikedz » Post

There's an easy way to get stuff for free off the trader.... needs bugfix... in the formspec?

Halve the stack (or put one item only from the stack) and put that in the item box - no price. Purchase, and you get that item free. And then the other half too, of course.
Last edited by taikedz on Wed Oct 12, 2016 17:19, edited 1 time in total.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Trader Redo [mobs_npc]

by azekill_DIABLO » Post

OOOOOHH THE THUG
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: [Mod] Trader Redo [mobs_npc]

by Fixer » Post


Post Reply