All pastes #25053 Raw Edit

Mine

public text v1 · immutable
#25053 ·published 2005-10-09 20:45 UTC
rendered paste body
		L2PcInstance activeChar = getClient().getActiveChar();
        L2FolkInstance folk = null;
        if (activeChar.getTarget() instanceof L2FolkInstance)
            folk = (L2FolkInstance)activeChar.getTarget();

        if (!activeChar.isGM()									// Not GM
		        && (folk == null								// No target (ie GM Shop)
			        || !(folk instanceof L2MerchantInstance)))	// Target not a merchant
			        return;
		else if (folk != null									// Not null
		        && (folk instanceof L2MerchantInstance)			// Target is a merchant
		        && activeChar.getDistance(folk.getX(), folk.getY()) > L2NpcInstance.INTERACTION_DISTANCE) // Distance is too far
		    return;