Trigger help needed - firing only if the mob has item in inventory?

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 2 months ago - 5 years 2 months ago #6120 by Sascha
I've tried this sevem different ways but I can't seem to get total success.

I want the players to have to buy the storyteller a beer in exchange for a story. I'm trying to get the storyteller mob to check its inventory first to be sure there's a beer in there and if not, tell the player they need to buy him a beer before he'll tell his tale. I've tried:

if %heldobj.vnum% == 104
if %obj.vnum% == 104
if %self.vnum%104
if %actor.has_item(104)%
if %inventory.vnum(104)%
if %self.contents.vnum% = 104
if %has_item(104)%

Now I know some of these choices I tried are silly, but I started throwing everything I could at this. I feel like the obvious answer is staring me in the face and I could use a fresh set of eyes on this.

Thanks much!

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000
Last edit: 5 years 2 months ago by Sascha.

Please Log in or Create an account to join the conversation.

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 2 months ago - 5 years 2 months ago #6121 by Sascha
This morning I have tried, with no success:

if %self.obj% == 104
if %self.obj%(104)
if %self.object% == 104
if %self.object%(104)
if %self.object.id% == 104
if %self.object.id%(104)
if %self% %object% == 104
if %self% %object.id% == 104
if %self% %object.id%(104)

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000
Last edit: 5 years 2 months ago by Sascha.

Please Log in or Create an account to join the conversation.

More
5 years 2 months ago #6122 by thomas
Does this work?

%self.has_item(104)%
The following user(s) said Thank You: Sascha

Please Log in or Create an account to join the conversation.

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 2 months ago #6123 by Sascha
Why yes. Yes, it does.

THANK YOU!

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

Please Log in or Create an account to join the conversation.

More
5 years 2 months ago #6124 by thomas
I like that you wrote down all the things you'd tried. :)

Please Log in or Create an account to join the conversation.

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 2 months ago #6125 by Sascha
Well, I think that if I'm going to ask for help I should both demonstrate that I've been trying and not just asking for someone else to do something for me, and also show what I've tried so that the same ground isn't covered and someone's time isn't wasted. :)

I've been able to put together a lot of triggers overall, but this one had me stumped pretty hard!

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

Please Log in or Create an account to join the conversation.

Time to create page: 0.098 seconds