If not object question

I have a barrel that is used to burn things in. I have a local command to handle what can be dropped in. The objects that should be dropped in to start a fire are already accounted for and that is working fine (I think). Most objects I want to prevent from being dropped in the barrel. In the Else of this 'If' script I have given specific reasons for certain objects not to be dropped in the barrel. See below:

if (object = Man Card) {
  msg ("Why would you want to burn your Man Card.  You earned this bad boy in part one of your adventure and it is the only proof you have that you are manly.")
}
else if (object = anklet) {
  msg ("There is NO WAY you are throwing this precious item into that filthy burn barrel.  It belonged to that alluring woman in the compound... the real Dingo.  Now it is yours.  ALL yours.")
}

What can I add to the 'Else' of this 'If' script to account for all other objects with a generic default message (something like, you have no reason to burn that.)? I assume I have to use the 'not' here to separate it from the unique items.

If object1 = not(item1 or item2) then...
^just taking a stab at it =)

Thanks!


This:

if (not object1 = item1 and not object1 = item2) {

If it was me, I would have an attribute on the Man card and anklet, noburnmessage, and put the text in that.

if (HasString(object,  "noburnmessage")) {
  msg (object.noburnmessage)
}
else if (not object1 = item1 and not object1 = item2) {
  msg("You don't want to burn that.")
}
etc.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums