Few other points, when posting code use [ code ] actual stuff [ / code] so it maintains some form of legibility.
You will wanna add a function to check for item (actually some have been posted, actually I have one in my siggy for my met bank lol) to check if they have 18 db. Then get item info from the equiped item slot that was selected, create a new item identical to it except with a new socket (255 was blank socket I believe) and then replace the old item with it and update database.
I don't really feel like going into any further steps seeing as #1 I haven't coded it and don't feel like coding it right now and #2 if you are going to try to add something of that complexity (lets face it, as far as npcs go, upgrades are one of the hardest things to do. Everything else is just simple character checks, add/remove item, spit out text etc)
Anyways, those are the basic steps you will wanna take. I'd try to learn to code basic npcs first though. Learn what you are capable of and slowly build up to more complex things. In the long run it will really help because you will know the basics and won't be struggling with if statements and such when trying to add somewhat complex systems (seriously... it's hard to debug something when 50+% of the code is wrong)
You will wanna add a function to check for item (actually some have been posted, actually I have one in my siggy for my met bank lol) to check if they have 18 db. Then get item info from the equiped item slot that was selected, create a new item identical to it except with a new socket (255 was blank socket I believe) and then replace the old item with it and update database.
I don't really feel like going into any further steps seeing as #1 I haven't coded it and don't feel like coding it right now and #2 if you are going to try to add something of that complexity (lets face it, as far as npcs go, upgrades are one of the hardest things to do. Everything else is just simple character checks, add/remove item, spit out text etc)
Anyways, those are the basic steps you will wanna take. I'd try to learn to code basic npcs first though. Learn what you are capable of and slowly build up to more complex things. In the long run it will really help because you will know the basics and won't be struggling with if statements and such when trying to add somewhat complex systems (seriously... it's hard to debug something when 50+% of the code is wrong)