Trigger of the Day - Following Mob Assist

  • Rumble
  • Rumble's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
More
4 years 1 month ago - 4 years 1 month ago #3271 by Rumble
Rumble created the topic: Trigger of the Day - Following Mob Assist
Name: 'Mob Following Assist Master',  VNum: [   39], RNum: [   39]
Trigger Intended Assignment: Mobiles
Trigger Type: Random , Numeric Arg: 100, Arg list: None
Commands:
* By Rumble of The Builder Academy    tbamud.com 9091
* Make following mob assist.
if %self.master%
  set master %self.master%
  if %master.fighting%
    say I will save you Master %master.name%
    wait 1 sec
    assist %master.name%
  end
end
If this was helpful please vote or leave a review for TBA.

Rumble
The Builder Academy
tbamud.com 9091
Last Edit: 4 years 1 month ago by Rumble.

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

More
4 years 1 month ago #3292 by Sean Wilson
Sean Wilson replied the topic: Trigger of the Day - Following Mob Assist
Perfect timing on this. I was just looking for a way to make all pets auto assist by default.

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

More
4 years 1 month ago #3314 by Brandon Bridges
Brandon Bridges replied the topic: Trigger of the Day - Following Mob Assist
I'd recommend changing this line:

eval master %self.master%

to:

set master %self.master%

Especially if you plan to attach it to a ton of mobs.

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

More
4 months 17 hours ago - 4 months 17 hours ago #6628 by Theresa
Theresa replied the topic: Trigger of the Day - Following Mob Assist
I've been working with this and for some reason, this trigger won't execute for me. This is what I see when switched into the mob (who is following) when its master is under attack. It would like to assist but it can't identify the master, apparently:

Tester tickles an enormous bear as she pierces him.
An enormous bear mauls at Tester, missing wildly!
a bear cub>

No one by that name here.
Tester pierces an enormous bear.
An enormous bear mauls Tester.
a bear cub>

Tester barely pierces an enormous bear.
An enormous bear mauls Tester.
a bear cub>

Dovie'andi se tovya sagain. After the Breaking MUD, coming in June 2017.
Last Edit: 4 months 17 hours ago by Theresa.

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

  • Rumble
  • Rumble's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
More
4 months 16 hours ago #6629 by Rumble
Rumble replied the topic: Trigger of the Day - Following Mob Assist
Looks like it is working, you just can't find the target.
Are you in a dark room, is the mob blind, or is the wrong alias being used?

Rumble
The Builder Academy
tbamud.com 9091

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

More
3 months 4 weeks ago #6630 by Theresa
Theresa replied the topic: Trigger of the Day - Following Mob Assist
It's setting the variable(s). I was switched into the following mob (a bear cub) so I could see what it sees/does. The testing room is not dark, and no mobs are blinded.

This is usually the time when I start to reverse-engineer potential issues - that's the way my brain works. I tested quite a few things with no results, and then got to this: It wants the keyword(s) to be exactly the s-desc for this to work. In this case, the s-desc is 'an enormous bear' and the keywords were 'enormous bear mamabear'. As soon as I changed the keywords to 'an enormous bear mamabear' this trigger worked.

That's somewhat inelegant because now a player can type 'look an', and it sees the bear instead of 'look enormous', 'look bear', or 'look mamabear'.

So yes, the trigger works but is there a way to get around it wanting to match the entire s-desc to the keywords? Or am I only halfway there to figuring this out? :)

Thanks so much!

Dovie'andi se tovya sagain. After the Breaking MUD, coming in June 2017.

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

  • Rumble
  • Rumble's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
More
3 months 4 weeks ago #6635 by Rumble
Rumble replied the topic: Trigger of the Day - Following Mob Assist
yes, use %.alias% and not name. You can also use the first alias if it has multiple with
car - Returns the first word of the string. For %text%="this is the
string"; %text.car% will yield "this". TSTAT 53

HELP CHAR-VAR
HELP TEXT-VAR

Rumble
The Builder Academy
tbamud.com 9091
The following user(s) said Thank You: Theresa

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

More
3 months 4 weeks ago #6639 by Thomas
Thomas replied the topic: Trigger of the Day - Following Mob Assist
I think this is probably something we could improve upon.

The issue is that "assist %master.name%" is translated into "assist an enormous bear".
Instead, you could use "assist %master.alias%" which should return the alias, not the s-desc, and then expand to "assist enormous bear mamabear". Which would be parsed by the server as "assist enormous". Which may or may not work, depending on whether the bear is the lastly arrived "enormous" mob.

A general fix would be to allow lookups based on UID_CHAR+id in get_char_vis.
This again would require some moving of some of the internal plumbing.
The following user(s) said Thank You: Theresa

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

More
3 months 3 weeks ago #6644 by Theresa
Theresa replied the topic: Trigger of the Day - Following Mob Assist
The suggested modifications work, by the way. I've added a few other twists to bring it a little more to life. Thank you everyone for you help!

Dovie'andi se tovya sagain. After the Breaking MUD, coming in June 2017.

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

Time to create page: 1.817 seconds