Disabling 'Ask/Tell' Temporarily

Shadecerule

Is 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

Best 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

Thank you! I'll give this a try.


Log in to post a reply.

Support

Forums