If what you want is create a NPC that you can only interact with every 15 minutes you could do something similar to this:
// create a NPC template:
- script giver FAKE_NPC,{
// get the item name from the NPC name
.@item$ = strnpcinfo(NPC_NAME_HIDDEN);
// check when the player last obtained this item
.@last = .obtained[playerattached()];
if (.@last <= time_from_minutes(-15)) {
// give the item
getitem(.@item$, 1);
// update the last obtained date
.obtained[playerattached()] = now();
mes("Enjoy!");
} else {
// calculate the difference
.@seconds = .@last - time_from_minutes(-15);
// tell the player to wait
mesf("Don't be greedy! Try again %s.", FuzzyTime(time_from_seconds(.@seconds)));
// This would print, ie: "Don't be greedy! Try again in 5 minutes and 32 seconds."
}
close;
}
// now make duplicates:
einbech,172,113,4 duplicate(giver) new name#Jellopy 4_M_EINMAN
// ^ this would spawn a NPC named "new name" that gives a Jellopy every 15 minutes
This creates a template NPC that gets its parameters from the NPC name so you can create several duplicates that all give different items.
PS: to make it easier to read this script uses the
Date and Time functions file