How to tell if the player does not have an item?
if Not(player.HasInventory(iKey)){
DisplayAtY(TY, "There's a key in the drawer.");
}
By using "not" operator ('!'):
if (!player.HasInventory(iKey)){
DisplayAtY(TY, "There's a key in the drawer.");
}
More info: http://www.adventuregamestudio.co.uk/wiki/?title=Script_language_keywords#Operators
Thank you. It works.