#include "nw_i0_tool"
void main()
{
object oPC = GetLastUsedBy();
int alg = GetAlignmentGoodEvil(oPC);
 if ((alg == ALIGNMENT_EVIL) && (!HasItem(oPC, "ThievesKey"))){
 CreateItemOnObject("thieveskey", oPC, 1);
 }
}