public void executeMsg(final Environmental myHost, final CMMsg msg) { super.executeMsg(myHost, msg); if ((affected != null) && (affected instanceof Room) && (invoker() != null) && (invoker().location() != null) && (sourceRoom != null) && (!invoker().isInCombat()) && (invoker().location() == sourceRoom)) { if (invoker().location() == room) { if ((msg.sourceMinor() == CMMsg.TYP_SPEAK) && (msg.othersCode() == CMMsg.NO_EFFECT) && (msg.othersMessage() == null) && (msg.sourceMessage() != null) && (!msg.amISource(invoker())) && (!msg.amITarget(invoker())) && (!lastSaid.equals(msg.sourceMessage()))) { lastSaid = msg.sourceMessage(); if ((invoker().phyStats().level() + (getXLEVELLevel(invoker()) * 10)) > msg.source().phyStats().level()) invoker().tell(msg.source(), msg.target(), msg.tool(), msg.sourceMessage()); else invoker() .tell( msg.source(), null, null, "<S-NAME> said something, but you couldn't quite make it out."); } } else if ((msg.sourceMinor() == CMMsg.TYP_SPEAK) && (msg.othersMinor() == CMMsg.TYP_SPEAK) && (msg.othersMessage() != null) && (msg.sourceMessage() != null) && (!lastSaid.equals(msg.sourceMessage()))) { lastSaid = msg.sourceMessage(); if ((invoker().phyStats().level() + (getXLEVELLevel(invoker()) * 10)) > msg.source().phyStats().level()) invoker().tell(msg.source(), msg.target(), msg.tool(), msg.sourceMessage()); else invoker() .tell( msg.source(), null, null, "<S-NAME> said something, but you couldn't quite make it out."); } } else unInvoke(); }
public void executeMsg(Environmental host, CMMsg msg) { if (affected instanceof MOB) { MOB mob = (MOB) affected; if ((msg.source() == mob) && (msg.target() == mob.location()) && (msg.targetMinor() == CMMsg.TYP_LEAVE)) { failed = true; unInvoke(); } else if ((CMLib.flags().isStanding(mob)) || (mob.location() != room)) { failed = true; unInvoke(); } } super.executeMsg(host, msg); }
public void executeMsg(Environmental host, CMMsg msg) { super.executeMsg(host, msg); if ((canBeUninvoked()) && (invoker() != null) && (invoker().location() != affected)) unInvoke(); }