A now (currently abandoned) project that i was working on that randomly generates a sword with a color, name, ID, and damage. the only problem with it is that it messes up if it generates a weapon with the same name.
It works.. Kind of..
http://puu.sh/gX3IU/8bca8d40cd.zip!!!FOR IT TO WORK, YOU NEED TO NOT HAVE IT IN A ZIP FILE. IT HAS TO BE IN A NORMAL FOLDER!!!it requires
Event_AddItem for it to automatically put it into your inventory when it generates. You could just spawn it using a normal brick too if you don't have it.
to use it, you'll have to use /generatesword [number] to generate a weapon. the number will be it's id.
you can inspect a weapon with /i [number]
and to actually put it into the world, you do /bindsword [number]. it should add it to your inventory if it's not full.
generated weapons will be in Server_PGW/Generated Weapons/[number].txt