Disabling 'Ask/Tell' Temporarily
Shadecerule
02 Apr 2017, 23:31Is there a way to disable the 'Ask/Tell' function temporarily? For instance, if a player is a ghost and cannot interact with people? Disabling the function would be so much easier than adding "if player.ghost" before everything.
Similarly, is there a way to disable 'Ask/Tell' functionality for only a specific NPC?
The Pixie
03 Apr 2017, 07:25Best way would be to over-ride the ask command. Create a a new command, set the pattern in the dropdown to "regular expression". Put in this pattern:
^ask (?<object>.*) about (?<text>.*)$
Call it "ask2". For the script, paste this in:
if (player.isghost) {
msg("Cannot ask when ghost.")
}
else {
DoAskTell (object, text, "ask", "askdefault", "DefaultAsk")
}
Shadecerule
03 Apr 2017, 08:36Thank you! I'll give this a try.