All pastes #24991 Raw Edit

Unnamed

public text v1 · immutable
#24991 ·published 2005-10-09 00:27 UTC
rendered paste body
		L2PcInstance activeChar = getClient().getActiveChar();
		L2FolkInstance folk = activeChar.getLastFolkNPC();
		if ((folk instanceof L2MerchantInstance) && activeChar.getDistance(folk.getX(), folk.getY()) > L2NpcInstance.INTERACTION_DISTANCE)
		    return; // If talking to a merchant and too far
		else if (!(folk instanceof L2MerchantInstance) && !activeChar.isGM())
			return; // If not talking to a merchant and not a gm (gm shop)

		L2MerchantInstance merchant = null;
		// prevent cast exception and allow GMs use gmshop
		if (folk instanceof L2MerchantInstance)
		    merchant = (L2MerchantInstance)folk;

        if (_listId > 1000000) // lease