Welcome to the Builder Academy

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

More
31 Jul 2016 01:23 - 31 Jul 2016 15:18 #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: 31 Jul 2016 15:18 by Sascha.

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

More
31 Jul 2016 15:18 - 31 Jul 2016 15:29 #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: 31 Jul 2016 15:29 by Sascha.

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

More
01 Aug 2016 22:08 #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.

More
01 Aug 2016 23:08 #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
02 Aug 2016 19:38 #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.

More
03 Aug 2016 15:01 #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.192 seconds