Creating a Listen trigger

  • punkmasterm
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 1 month ago #6137 by punkmasterm
Creating a Listen trigger was created by punkmasterm
Hello there!
Long time mudder, brand new builder. Hopefully this is even the right section to post this in, if not please forgive me.

I'm looking to create just a basic trigger where a player would command 'listen mob' and the mob will 'say x'

I appreciate the help, in advance!

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

More
5 years 1 month ago #6138 by thomas
Replied by thomas on topic Creating a Listen trigger
Log on to tbamud, and run tstat 25. That should help you out :)

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

  • punkmasterm
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 1 month ago #6139 by punkmasterm
Replied by punkmasterm on topic Creating a Listen trigger
You're the best, thanks so much!

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

  • punkmasterm
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 1 month ago #6141 by punkmasterm
Replied by punkmasterm on topic Creating a Listen trigger
It didnt.. cant really grasp this. Ive had 0 problems with all the other stuff but triggers seems impossible to me.



1) Name : Groundskeeper listen
2) Intended for : Mobiles
3) Trigger types: Command
4) Numeric Arg : 100
5) Arguments : l
6) Commands:
if %cmd.mudcommand% == listen && groundskeeper /= %arg%
%send% %actor% The groundskeeper beckons you closer to tell his story.....
%echoround% %actor% %actor.name% starts talking to the groundskeeper.
else
* If it doesn't match let the command continue.
return 0
end


what is wrong?

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

More
5 years 1 month ago #6142 by thomas
Replied by thomas on topic Creating a Listen trigger
My bad - %cmd.mudcommand% will only return something interesting (anything, really) if the command actually exists in the command list. And, unless you've added listen as a command, this won't work.

An alternative could be to set the argument to "liste" (ie. one letter more than "list", which is already a command) and then dispense with the "%cmd.mudcommand% == listen &&" part.

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

  • punkmasterm
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 1 month ago #6146 by punkmasterm
Replied by punkmasterm on topic Creating a Listen trigger
Thanks so much Thomas i will look into that!!!

Here's something else you may be able to help me with :)

Im trying to hide containers in a room, that either load weapons/treasure/etc. But i want the player to get the clue from the room description itself - not see the container laying on the floor.

Is there a way to make the container invisible to players? not the spell invis, like, actually invis!

thanks! heh

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

More
5 years 1 month ago #6147 by thomas
Replied by thomas on topic Creating a Listen trigger
This exact question popped up some years ago. A solution was implemented, because it wasn't possible at the time.
If the description for an object starts with a . it will not be listed in the room except for those with holylight on.

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

  • punkmasterm
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 1 month ago #6149 by punkmasterm
Replied by punkmasterm on topic Creating a Listen trigger
so all of the stuff you have given me so far has been gold, THANK YOU!

heres my trigger so far

if %arg% == keeper man
%send% %actor% The groundskeeper sighs and says 'I'm sorry my friend, today is not the day to mourn the ones we've lost. You've probably noticed the caved in graves about the cemetery... I'm not quite sure how these came about, but it has caused great trauma among the people of Tarsis. They demand answers and I've been tirelessly trying to find them.
%wait 2 s
%send% %actor% The groundskeeper lets out another deep sigh.
%wait 1 sec
%send% %actor% 'And to think... just a few days ago my biggest problem was getting the stench of goblin out of here.'
%echoaround% %actor% The groundskeeper begins to converse with %actor.name%.
else
%send% %actor% Who you tryin' to listen to stupid? The air???
end



two things, those %waits dont work which im sure you know, could you help me out with that? also - is it possible for me to format the text that the groundkeepr says? so that its the same as a a room formatted text?

Thanks
I work at a venue/concert hall on long island in NY, if you're out here and want to get wasted and see a show, look me up!

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

More
5 years 1 month ago #6150 by thomas
Replied by thomas on topic Creating a Listen trigger
I suggest you use [ code] tags around formatted text.

Will this work for you?
Trigger Type: Command, Numeric Arg: 7, Arg list: lis
Commands:
set command 'listen
set target 'keeper'man'groundskeeper
if  %command.contains('%cmd%)% && %target.contains('%arg%)%
  %send% %actor% The groundskeeper sighs and says 'I'm sorry my friend, today is not the day to mourn the ones we've lost. You've probably noticed the caved in graves about the cemetery... I'm not quite sure how these came about, but it has caused great trauma among the people of Tarsis. They demand answers and I've been tirelessly trying to find them.
  wait 2 s
  %send% %actor% The groundskeeper lets out another deep sigh.
  wait 1 s
  %send% %actor% 'And to think... just a few days ago my biggest problem was getting the stench of goblin out of here.'
  %echoaround% %actor% The groundskeeper begins to converse with %actor.name%.
else
  %send% %actor% Who you tryin' to listen to stupid? The air???
end
As you see, the wait command needs no "variable context" signs (the reason 'send' needs %'s is that there's actually 3 different commands in the background, depending on the current context. The %send% command is then translated internally to either wsend, msend or osend).

The magic in the beginning tries to look up the argument in the potential allowed strings by first appending them with a single quote.

You might want to avoid calling your player stupid, btw. If there's something they are doing wrong, it's typically because you havent been specific enough in your descriptions.

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

  • punkmasterm
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 1 month ago #6151 by punkmasterm
Replied by punkmasterm on topic Creating a Listen trigger
haha that stupid comment is stock!! it does it for everything :P ill have to tell a higher up about it heh.

thanks for all the info! will try it now

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

  • punkmasterm
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 1 month ago #6152 by punkmasterm
Replied by punkmasterm on topic Creating a Listen trigger
More questions :)

1) how would i go about making containers that open/close? Like, a chest, or a desk drawer.

2) Im interested in making a secret door that i saw in this section
www.tbamud.com/forum/3-building/3789-tri...y-secret-hidden-door

my question is, what does '%door% 14521 up flags ab' mean?

thanks!

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

More
5 years 1 month ago #6153 by Rumble
Replied by Rumble on topic Creating a Listen trigger
help %door
or if you don't have the stock help files I can cut and paste it.

Rumble
The Builder Academy
tbamud.com 9091
This email address is being protected from spambots. You need JavaScript enabled to view it.

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

Time to create page: 0.137 seconds