Money
#1
The plugin create in game money. Not economic model. Economic model You may create with the plugin Smile

Vesion 20160821

[UA] Якщо потрібно, можу створити опис на рідній мові.
[RU] Если необходимо - могу сделать описание на русском.

What can you do:
- Send money to other players.
- Sell items via signs (create shops).
- Bye items via signs.
- Use chests as store to keep items to sell
- Disable items to bye/sell by item ID
- Update player's balance

Plugin commands:
/money balance - show personal balance
/money pay <player name> <amount> - send money to player

Update balance:
/money set
/money set balance <player name> <amount> - set balance 100. (/money s b DrMasik 100)
/money set encBalance <player name> <amount> - enlarge the blanace 100. (/money s e DrMasik 100)
/money set decBalance <player name> <amount> - reduce the blanace 100. (/money s d DrMasik 100)

Chest commands:
/money mark - turn on chest mark (/money m)
/money mc - turn off chest mark action
/money list - list marked chests (/money l)
/money chest delete <id> - delete chest <id> (/money c d <id>)

Add permission:
money.set - Access to "/money set" command.

How to sell items:
- You must known item id
- Take a sign
-- In first row type '[buy]'
-- In second row type item ID
-- In third row type amount and price as '100:30'
-- In fourth row type your nick name. If nick name wrong - sign will be remove.
[Image: 123.png]

API function:
api_setBalance(<PlayerName>, <CurrenyCodeName>, <Sum>) - Set pplayer balans to <Sum>.
api_getBalance(<PlayerName>, <CurrenyName>) - Get player balance by currency name.

Simple function how to use
Code:
function commandGUIGetBalance()
 local status, value = cPluginManager:CallPlugin("Money", "api_getBalance", "DrMasik", "Credits")

 if status == true then
   console_log("TRUE")
   console_log(value)
 else
   console_log("FALSE")
   console_log("Returned error code: ".. value)
 end
end

function commandGUISetBalance()
 local status, value = cPluginManager:CallPlugin("Money", "api_setBalance", "DrMasik", "c", 17365)

 if status == true then
   console_log("TRUE")
   console_log(value)
 else
   console_log("FALSE")
   console_log("Returned error code: ".. value)
 end
end

Source
Download
Reply
Thanks given by: jan64 , Studiokikotv_yt
#2
Some peoples ask me for the plugin. And I'm post it is Smile
Reply
Thanks given by:
#3
Does this use Coiny or is this a standalone thing? I think Coiny is a bit oudated (would love someone to update it), but a money plugin should in my opinion be an API with which other plugins can integrate.
Reply
Thanks given by:
#4
(05-18-2016, 07:03 PM)PureTryOut Wrote: Does this use Coiny or is this a standalone thing? I think Coiny is a bit oudated (would love someone to update it), but a money plugin should in my opinion be an API with which other plugins can integrate.

It's clean project.
So, create API - it's good idea.
Reply
Thanks given by:
#5
If you're going to make an API, it should probably be just that. Don't add any player interaction other than /money balance and /money pay.
The rest should purely be plugin API.
Reply
Thanks given by:
#6
I think you should instead try to update Coiny with whatever features you are planning. I did rewrite most of it so that it stores things in a DB file and has a reasonable API, so it should be good enough to start with.

I'd very much prefer if there was only one base plugin for this, otherwise we'll get incompatible plugins in the future (plugin X uses Coiny, but plugin Y uses Money, so they cannot be used together)
Reply
Thanks given by:
#7
(05-19-2016, 05:34 PM)xoft Wrote: I'd very much prefer if there was only one base plugin for this, otherwise we'll get incompatible plugins in the future (plugin X uses Coiny, but plugin Y uses Money, so they cannot be used together)

When I look for money plugin - I'm not found it. Therefore I'm created new plugin. Plugin name "Coiny" is "marketing" wrong name and therefore some peoples does not found it. And we have 2 economic plugins now Smile Good or bad - time will tell.
Reply
Thanks given by:
#8
That's why we try to include as much description with plugins as possible - this makes them easier to find, even if the name is something different than one would expect.
Reply
Thanks given by:
#9
(05-19-2016, 10:03 PM)xoft Wrote: That's why we try to include as much description with plugins as possible - this makes them easier to find, even if the name is something different than one would expect.

In any case I open my plugins because some people contacted with me and asked for the plugin. Why they do not use other plugin - I do not know.
Reply
Thanks given by:
#10
(05-19-2016, 10:03 PM)xoft Wrote: That's why we try to include as much description with plugins as possible

Definitely not in the case of Coiny. I have no clue how to use it in a different plugin by just looking at README.md, and I see no Wiki or anything.
Reply
Thanks given by:




Users browsing this thread: 8 Guest(s)