SpareSupplies

Approved SpareSupplies 1.4

No permission to download

samvds

Member
Trusted Member
Member
Jan 10, 2018
61
40
18
20
The Netherlands
legacylives.nl
samvds submitted a new resource:

SpareSupplies - Recycle your spare building supplies.

This plugin provides players with the ability to convert any "glitch-proof" building supplies back into the resources required to build the supplies.

Ideal if you get another building crate from an airdrop, or when you've made too many furnaces.

/recycle will give instructions.
Read more about this resource...
 

Revezunds

Moderator
Moderator
Dec 1, 2017
144
52
28
Hello ,
The Plugin is awesome i am using it actively on my server found some bugs and complain from players recently players complained the recycler is bugged and they are losing armor if they recycle anything
the armor is also getting recycled and it is also kinda doing shady stuff like sometimes it gives more wood and fewer planks but also if there is low Qual in inventory it decreases or just take away some Low Qual. to recycle any other part.
Here is some logs :

Error:
[3/6/2018 3:58:24 AM] [Debug] [CHAT-CMD] "mynameajeff" executed "/recycle woodfoundation 1"
[3/6/2018 3:58:24 AM] [Error] [IronPython] Error in plugin SpareSupplies:
[3/6/2018 3:58:24 AM] [Error] Traceback (most recent call last):
File "<string>", line 421, in On_Command
NameError: global name 'amound' is not defined

[3/6/2018 3:58:34 AM] [Debug] [CHAT-CMD] "mynameajeff" executed "/recycle woodfoundation 1"


Maybe it is something to do with the way of writing or not using Quotes {""}
 
Last edited:
  • Like
Reactions: Spainrust

samvds

Member
Trusted Member
Member
Jan 10, 2018
61
40
18
20
The Netherlands
legacylives.nl
Hello ,
The Plugin is awesome i am using it actively on my server found some bugs and complain from players recently players complained the recycler is bugged and they are losing armor if they recycle anything
the armor is also getting recycled and it is also kinda doing shady stuff like sometimes it gives more wood and fewer planks but also if there is low Qual in inventory it decreases or just take away some Low Qual. to recycle any other part.
Here is some logs :

Error:
[3/6/2018 3:58:22 AM] [Debug] [CHAT-CMD] "(aCw*) Rev" executed "/doorcloser 3"
[3/6/2018 3:58:24 AM] [Debug] [CHAT-CMD] "mynameajeff" executed "/recycle woodfoundation 1"
[3/6/2018 3:58:24 AM] [Error] [IronPython] Error in plugin SpareSupplies:
[3/6/2018 3:58:24 AM] [Error] Traceback (most recent call last):
File "<string>", line 421, in On_Command
NameError: global name 'amound' is not defined

[3/6/2018 3:58:34 AM] [Debug] [CHAT-CMD] "mynameajeff" executed "/recycle woodfoundation 1"

Chat:

[3/6/2018 3:58:56 AM] [CHAT] "mynameajeff": "really.....i just tried to recycle a wood foundation and it took my armor too"
[3/6/2018 3:59:14 AM] [CHAT] "(aCw*) Rev": "what ?"
[3/6/2018 3:59:24 AM] [CHAT] "(aCw*) Rev": "your arm or two?"
[3/6/2018 3:59:38 AM] [CHAT] "mynameajeff": "i did /recycle woodfoundation 1 and it too away my leather set"
[3/6/2018 3:59:48 AM] [CHAT] "(aCw*) Rev": "what :D"
[3/6/2018 3:59:50 AM] [CHAT] "(aCw*) Rev": "no"
[3/6/2018 3:59:51 AM] [CHAT] "z_T_r MyM": "oO"
[3/6/2018 3:59:53 AM] [CHAT] "(aCw*) Rev": "lol"
[3/6/2018 3:59:55 AM] [CHAT] "mynameajeff": "i swear lol"
[3/6/2018 4:00:17 AM] [CHAT] "(aCw*) Rev": "wait"
[3/6/2018 4:01:05 AM] [CHAT] "mynameajeff": "i ll try it again"
[3/6/2018 4:01:33 AM] [CHAT] "mynameajeff": "yeah, just happened again with pillar this time lol"
[3/6/2018 4:01:50 AM] [CHAT] "mynameajeff": "my gear is gone. I get the leather back, but it recycles the gear too"
[3/6/2018 4:02:11 AM] [CHAT] "(aCw*) Rev": "okey that can be a bug"
[3/6/2018 4:02:20 AM] [CHAT] "(aCw*) Rev": "leme ch"
[3/6/2018 4:02:29 AM] [CHAT] "z_T_r MyM": "it takes away armor"
[3/6/2018 4:02:34 AM] [CHAT] "z_T_r MyM": "aaaaaaaa my kevlar!!!!"
[3/6/2018 4:02:38 AM] [CHAT] "mynameajeff": "xD"
[3/6/2018 4:02:42 AM] [CHAT] "z_T_r MyM": "omg"
[3/6/2018 4:02:50 AM] [CHAT] "z_T_r MyM": "i am but naked and there are girls arround"
[3/6/2018 4:02:53 AM] [CHAT] "z_T_r MyM": "aaaaaaaaaaaa"
[3/6/2018 4:02:55 AM] [CHAT] "(aCw\") Maggie": "lol"
[3/6/2018 4:04:22 AM] [CHAT] "z_T_r MyM": "reve, recycle is doing all kinds of shady stuff"
[3/6/2018 4:04:27 AM] [CHAT] "mynameajeff": "yea"
[3/6/2018 4:04:48 AM] [CHAT] "mynameajeff": "i just got an inventory full of planks and stacks of wood by recycling 200 pillars..."
[3/6/2018 4:04:50 AM] [CHAT] "z_T_r MyM": "i got low quality metal from kevlar, but when i recycle the foundation, the lqm count is going down"

Maybe it is something to do with the way of writing or not using Quotes {""}
I see what's wrong, will fix it today!
 
  • Winner
Reactions: Revezunds

Revezunds

Moderator
Moderator
Dec 1, 2017
144
52
28
Hmm. Doesn't do that on my server. You got discord?
Yes i have Discord. also, do you think it is some conflict with another plugin as for now I have removed the plugin.didnot received the error tough this time. just added plugin and tested and it was same i would give it another try.
 
  • Like
Reactions: Spainrust

samvds

Member
Trusted Member
Member
Jan 10, 2018
61
40
18
20
The Netherlands
legacylives.nl
  • Like
Reactions: Revezunds

Revezunds

Moderator
Moderator
Dec 1, 2017
144
52
28
The plugin has a huge bug or Duping Items, I tried to fix, but it is still like that, removed from the server for now. will not explain here how to use bug, but recycling Guns in a particular way can dupe huge number of LQM.
 
  • Like
Reactions: Spainrust

SPooCK

Plugin Developer
Plugin Developer
Jul 27, 2014
14
19
3
26
England / Bulgarian
@Revezunds Here is a quick example of the fix:

Python:
def Recycle(self, Player, Name):
    try:
        if Player.Inventory.HasItem(Name, 1):
            Item = Player.Inventory.InternalInventory.FindItem(Name)
            Player.Inventory.InternalInventory.RemoveItem(int(Item.slot))
            Player.Notice("Thank you for thinking of the environment. Go green!")
            return True
        else:
            Player.MessageFrom(sysname, yellow + "☢ " + red + "You don't have enough to recycle!")
            return False
    except:
        Player.MessageFrom(sysname, yellow + "☢ " + red + "We couldn't recycle that item!")
        return False
     
#### Example CMD - All needs to be changed like this or re-write the whole plugin, since its not well optimized xD
def On_Command(self, Player, cmd, args):
    amount = self.Amount
    if cmd == "recycle":
        if len(args) == 0:
            Player.MessageFrom(sysname, "Use " + cyan + "/recycle \"item\" \"amount\" " + white + "- to recycle a certain amount of a specific item.")
            Player.MessageFrom(sysname, "Example given: " + cyan + "/recycle woodbarricade 5" + white + " or " + cyan + "/recycle metaldoor 2")
        elif len(args) == 1:
            if "m4" in str(args[0]).lower():
                add = self.Recycle(Player, "M4")
                if add:
                    Player.Inventory.AddItem("Low Quality Metal", 30)
I'm busy to go around and fix each line of the code, is kind of not optimized very well. If someone is willing to do that, be my guest. :p