Recycle

Recycle crafted items to base resources

Total Downloads: 3,965 - First Release: Aug 11, 2015 - Last Update: Apr 1, 2018

5/5, 12 likes
  1. Calytic

    Calytic Community Admin Community Mod

    Deicide666ra submitted a new resource:

    MoegicBox - Allows admins to setup trade boxes and players to setup recycling boxes

    Read more about this resource...
     
  2. The Moegic Box can be used at least 3 ways!
    1. As a Quest Rewards Box. ie: "Bring me the sacred 'Small Battery' and you will be rewarded"
    2. As a Barter Tradebox to provide 'brick and mortar' stores without an economy
    3. As a Recycler - an opportunity to do something with all those excess items
    Enjoy!

    I would like to thank Deicide for making a basic idea into reality. I am very pleased with the results. I hope you are too!
     
  3. as a server owner this is interesting. I like to have maze and buildings defended by NPCs and loot chest but I have to replenish the chest each time and that part sucks.

    So can I say if you put in an item (battery for example) you get a BP for AK or Supply Signal? if so that would be cool.
     
  4. Absolutely! That's what it was designed to do. You can also define a LIST of items you can receive WHEN you place the battery in the box. Like: 1 AK and 64 rounds of ammo. Or a complete set of metal armor.

    The lists are done in the json file, it's just editing. You can use ANY item in the game as a input or output item. There can be multiple output items for each "Trade", but the plugin is limited to a single input item (due to the way the plugin works) per trade. Each list can have several available "Trades". ie: 100 mushrooms = 10 cooked wolf meat; 500 wood = 1 hatchet; 250 iron ore = 1 pick axe; etc....

    OR you can make "conversion boxes" - where ANYTHING going in results in a single type of output. Adjust your barter economy by allowing players to "trade-in" resources for a "common currency". Box1 converts everything to frags. Box2 converts everything to sulfer. etc... No more, "I've got Stone" - "I don't NEED stone, I want Ore!" Like a curency conversion.


    "Future Enhancement" possibilities:

    I originally wanted to tie this plugin into HumanNPC, where you HAD to talk to the NPC to access the box. (If you killed or harmed him you would loose access to the box) This proved beyond our scope and was shelved for future enhancement.

    Another initial plan was to be able to "Reward" HuntRPG XP. "Bring me the battery and I will give you 10,000 XP". The answer to this one eluded us during development, so it was released without.

    We also looked into the ability to have multiple input items per trade, but we would have had to change the entire processing method to make that happen. Sure would have been nice to be able to have a "scavenger list" for more involved quests. "Bring me these THREE items..."
     
  5. It's a first version, it could take many directions once I get more feedback :)
     
  6. http://prntscr.com/843cuh
    [DOUBLEPOST=1439457407][/DOUBLEPOST]
    That error aside might i suggest rather then listing whats for sale in the chat, Instead using a gui overlay so that it may be visible whilst having the box open, I suggest looking at the quicksort plugin for guidance.
    [DOUBLEPOST=1439457454][/DOUBLEPOST]
    also the ability to chose whether to allow players to have the recycle box in the config might be wise
     
  7. Code:
    player.ChatMessage($"Successfully recycled <color=yellow>{item.info.displayName.english}</color> to base materials!");
    Is it possible to change the language items?
     
  8. Yeah the warning is not very important but I guess I could go out of my way to fix it. I don't even know why Oxide is tripping on this.. it's no big deal.

    As for blocking the recycler, I'll keep it in mind for the next version.
    [DOUBLEPOST=1439471323][/DOUBLEPOST]
    I could change the .english to .translated for that specific message but making it "all" adaptive would require a lot more work. I opted for long names in the config for configuration complicity and it also allows me to be lazy on item lookups all over the plugin. I'll see if I can change that in a future version.
     
  9. BaK

    BaK

    Code:
    /recyclebox converts the next opened box to a recycling box (must have price)
    So do you use "/recyclebox 50" for 50% return?
     
  10. No, the % is set in the config and applies to all recyclers on the server. The recycler can be used by players, so allowing them to set the % would not be a good idea :)
     
  11. BaK

    BaK

    ah ok, thanks :)
     
  12. Question, can I specify the number of an item needed for the box in order to trade. example

    Box 1 - 10 x Notes is required to get an AK
    Box 2 - 100 x Notes are required to get a Supply Signal?

    thanks
     
  13. I didn't test but in theory if the pricier items are first in the list it might work. The query on the list simply picks the first trade that has at least the amount provided.. If your 100 trade is first puting 50 notes would hand back 5 AK but puting 500 notes would return 5 supply signals. This is all theory though and assumes LINQ will always return the same result which I'm not 100% sure it always does.
    [DOUBLEPOST=1439479095][/DOUBLEPOST]Edit: you could in this case make the signal cost 10 AKs :)
     
  14. sorry you might have confused me more :)

    Can I setup a box to only give 1 item if you put in XX of another item? so this box needs 100 notes to get 1 supply signal and that is all that box does.
     
  15. Yes of course, sorry I thought you meant to make 1 box that would do 2 trades of the same input item but with different rewards based on the amount.

    So yes, you can setup a list that has only 1 trade and associate it with a box. You can do this with as many boxes as you want and set a different list for each of those boxes. You could put signs over them and use ZoneManager to prevent players from breaking the signs :)
     
  16. ok going to test this now.
     
  17. It is because of the static class MoegicExtensions on the top that it is throwing that warning. There should only be one class directly under the Oxide.Plugins namespace in a plugin.
    [DOUBLEPOST=1439492343][/DOUBLEPOST]
    Also i simplified it a little bit, changed some of the lengthy commands like /recyclebox is now /rb and /unlinkbox is now /unbox
    [DOUBLEPOST=1439492389][/DOUBLEPOST]
    You know i've just realised amidst all my comments i've fail to say good job :p good job m8 works well
     
  18. Wulf

    Wulf Community Admin

    @Deicide666ra, I would recommend storing the plugin's config under oxide/config, not oxide/data. You can fix the namespace warning by not defining your own namespace, which you can see how I fixed it in your Salvager plugin.
     
  19. I am all for the config being in the right folder :) also SHORTER names :)
     
  20. I'm saving under data because I haven't found a way to easily save a whole class structure in a standard config.. I asked about it several times and bumped it and nobody ever even replied. It's a nightmare to parse that stuff manually!

    As for the namespace I know how to fix it but it implies not using extensions. I also asked about why we cannot use extensions without raising this warning and nobody bothered to reply. I just see that warning as just that, a warning, and unless someone tells me its bad and going to crash the server I just consider the warning to be negligible. Extensions need to be defined in a static global namespace class.. Wish I could #pragma that warning out but it's probably and Oxide warning, not a compiler warning. I'm just being stubborn here I know... Lol.. Just sucks to have such a beautiful language feature blocked.
    [DOUBLEPOST=1439493793][/DOUBLEPOST]
    Shorter names you mean commands or using short item names in config?