;Blacksmith NPC

Letter = 65
DarkMetal = 63
Armor = 64


HasLetter = HasItem(#USERID, Letter)
HasMetal = HasItem(#USERID, DarkMetal)
UserSilver = GetUserSilver(#USERID)

If HasItem(#USERID, Armor) = 1
	SendMessageToUser(#USERID,"Blacksmith says, 'Excellant piece of armor that is, make good use of it.'",#MSG_SAY)
	GoTo END
EndIf

If HasLetter = 1
	If HasMetal = 0
		SendMessageToUser(#USERID,"Blacksmith says, 'What do you want? ...A letter from my sister? Hmm, alright I'll make you some armor. Go bring me the 'Dark Metal' I'll need to craft it.'",#MSG_SAY)
		GoTo END
	Else
		SendMessageToUser(#USERID,"Blacksmith says, 'Hmm, you brought the metal? Good. Now fork over my pay, and I'll get started.'",#MSG_SAY)
		If UserSilver >= 5000
			SetUserSilver(#USERID, UserSilver - 5000)
			SendMessageToUser(#USERID,"You hand the blacksmith 5000 silver coins, slowly counting them out like the miser you are.",#MSG_TELL)
			SendMessageToUser(#USERID,"Blacksmith says, 'Good, good. Now it normally takes me several days to make armor this good, but I happen to have a spare set laying around.'",#MSG_SAY)
			SendMessageToUser(#USERID,"You lost the Black Metal.",#MSG_TELL)
			SendMessageToUser(#USERID,"You lost the Letter to Blacksmith.",#MSG_TELL)
			SendMessageToUser(#USERID,"You got some Dark Armor.",#MSG_TELL)
			TakeItem(#USERID,Letter)
			TakeItem(#USERID,DarkMetal)
			GiveItem(#USERID,Armor)
		Else
			SendMessageToUser(#USERID,"You don't have the 5000 silver the smith is requesting.",#MSG_TELL)
		EndIf
	EndIf
Else
	SendMessageToUser(#USERID,"Blacksmith says, 'I SAID I'M BUSY! LET ME WORK!'",#MSG_SAY)
	SendMessageToUser(#USERID,"Apprentice says, 'Sir, please come back at a different time.'",#MSG_SAY)
EndIf

Label END

Continue = 1