diff --git a/scripts/commands/inspire.py b/scripts/commands/inspire.py index 4a2aa2c8..0206cb2a 100644 --- a/scripts/commands/inspire.py +++ b/scripts/commands/inspire.py @@ -28,7 +28,11 @@ def run(core, actor, target, commandString): else: actor.sendSystemMessage('@performance:insp_buff_must_listen', 2) return - + + if target.getPosition().getDistance2D(actor.getWorldPosition()) > float(20): + actor.sendSystemMessage(target.getCustomName() + ' is too far away to inspire.') + return + builderWindow = BuffBuilderStartMessage(actor.getObjectId(), actor.getObjectId(), target.getObjectId()) objController = ObjControllerMessage(11, builderWindow) actor.getClient().getSession().write(objController.serialize()) diff --git a/scripts/commands/watch.py b/scripts/commands/watch.py index 6e55feef..071319c1 100644 --- a/scripts/commands/watch.py +++ b/scripts/commands/watch.py @@ -11,7 +11,12 @@ def run(core, actor, target, commandString): if target is None: return - + + + if target.getPosition().getDistance2D(actor.getWorldPosition()) > float(20): + actor.sendSystemMessage(target.getCustomName() + ' is too far away to watch.', 0) + return + if not target.isPlayer(): actor.sendSystemMessage('@performance:dance_watch_npc', 0) return