Welcome to the Builder Academy

Question Mobs reacting to socials, %victim.name% not set in act triggers?

More
18 Jan 2020 05:25 #8477 by krell
So what was the solution? This sounds interesting.

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

More
18 Jan 2020 13:50 #8478 by Rumble
Not sure in this case, but the below example works fine.
Code:
Name: 'Mob Action Example', VNum: [ 64], RNum: [ 64] Trigger Intended Assignment: Mobiles Trigger Type: Act , Numeric Arg: 0, Arg list: kisses you. Commands: * By Rumble of The Builder Academy tbamud.com 9091 wait 1 sec slap %actor.name% wait 1 sec say I'm not that kind of girl. pout set inroom %self.room% %zoneecho% %inroom.vnum% %self.name% shouts, '%actor.name% kisses like a fish.'

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com

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

More
19 Jan 2020 14:34 #8486 by thomas
This very small change will fix this:
Code:
diff --git a/src/comm.c b/src/comm.c index 5ec5a3a..0c1ec9e 100644 --- a/src/comm.c +++ b/src/comm.c @@ -2495,7 +2495,7 @@ void perform_act(const char *orig, struct char_data *ch, struct obj_data *obj, const char *i = NULL; char lbuf[MAX_STRING_LENGTH], *buf, *j; bool uppercasenext = FALSE; - struct char_data *dg_victim = NULL; + struct char_data *dg_victim = (to == vict_obj) ? vict_obj : NULL; struct obj_data *dg_target = NULL; char *dg_arg = NULL;
The var dg_victim is usually only set if $N, $M or $S appears in the message. In this case, we send the specific text "you", so this won't trigger. However, when we know we're sending to the victim, we can set it right away.
The following user(s) said Thank You: Banlock

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

Time to create page: 0.198 seconds