Fizban wrote: The scripts don't need to be combined, the if checks just need to be selective enough to only trigger for things meant to trigger their speech, and they need return 0 for everything else to allow other triggers in the room to interact with any command that doesn't trigger the first script, etc.
Man, why couldn't I have seen this hours ago?!? As it is, this is the script I managed to come up with for my previously mentioned test mobs that seems to work. You have no idea what complicated mess I was working on before I scrapped the whole thing, twice....
Code:
*
* Mulitple Mobs Ask Trigger
*
context %self.id%
mobile_1 edgar
mobile_2 jess
*
*
if %cmd.mudcommand% == ask && %arg%
if %self.name% /= %arg.car%
say %actor.name% is the greatest!
say My name is %self.name%!
elseif edgar /= %arg.car% && edgar != %self.name.car%
return 0
elseif jess /= %arg.car% && jess != %self.name.car%
return 0
elseif %arg.car% && %arg.car% != %self.name.car%
return 0
end
elseif %cmd.mudcommand% == ask && !%arg%
return 0
else
return 0
end
I was going to share earlier, but I didn't have a chance to test it until after work so I didn't know if it would work or not. Besides, I had some bugs I had to work out due to the odd misype. Also, I can't seem to get strings assigned to variables to work properly. Maybe someone can help with that?
Addendum:
I've already reduced it down to the following:
Code:
*
* Mulitple Mobs Ask Trigger
*
*
if %cmd.mudcommand% == ask && %arg%
if %self.name.car% /= %arg.car%
say %actor.name% is the greatest!
say My name is %self.name%!
elseif %self.name.car% != %arg.car%
return 0
end
else
return 0
end