begin sltw_KA_npc_name_script

short doOnce
short mybelongings
short mybutton
short diseasemaker
short diseased

if ( MenuMode == 1 )
	return
endif

if ( doOnce == 0 )
	if ( OnDeath == 1 )
		set doOnce to 1
	endif
endif

if ( doOnce == 1 )
	if ( OnActivate == 1 )
		MessageBox, "Do you want to risk disease by touching the corpse?", "No", "Take All", "Dispose of Corpse"
		set doOnce to 2
	endif
endif

if ( doOnce == 2 )
	set mybutton to GetButtonPressed
	if ( mybutton == -1 )
		return
	endif
	set diseasemaker to Random, 100
	if ( diseased == 0 )
		if ( mybutton > 0 )
			if ( diseasemaker < 50 )				;this value determines the chance of catching the disease, 0 is 0% chance, 100 is 100% chance 
				Player -> AddSpell, wither			;can change to disease contracted here
				MessageBox "You have contracted Wither."	;tells the player what disease they got
				set diseased to 1
			endif
		endif
	endif
	if ( mybutton == 0 )
		set doOnce to 1
		return
	elseif ( mybutton == 1 )
		if ( mybelongings == 0 )
									;remove items from npc and give them to player
			Player -> AddItem, Gold_001, 100		;add more removeitem/additem as necessary
			RemoveItem, common_pants_04_b, 1		;be sure all removed items are in npc inventory
			Player -> AddItem, common_pants_04_b, 1		;Notice, only removeitem for clothing, armor, or weapons, not anything that can be pickpocketed
		
			MessageBox "You found 100 gold and a pair of common pants."	;Add a message telling the player what he/she found on the body
			set mybelongings to 1
			set doOnce to 1
		else
			MessageBox "You found no other items on this body."
			set doOnce to 1
		endif
	elseif ( mybutton == 2 )
		Disable
		set doOnce to 3
		return
	endif
endif

end