Untitled

 avatar
unknown
lua
2 years ago
681 B
5
Indexable
local t = {	
	[2021] = {item = 2160, count = 50, points = 10},
	[2022] = {item = 2152, count = 50, points = 10},
}

function onUse(cid, item, fromPosition, itemEx, toPosition)

	local offer = t[item.aid]
	if offer then
		-- # aqui deberias meterle un chequeo para saber si el player tiene los puntos necesarios
		--if not points then
		--	return doPlayerSendCancel(cid,"No tienes suficientes puntos visita Olympa-online.com para adquirirlos.")
		--end

		doRemovePremiumPoints(cid, offer.points)
        doPlayerAddItem(cid, offer.item, offer.count)
    end
    return doTransformItem(item.uid, item.itemid == 9825 and (item.itemid + 1) or (item.itemid - 1))	
end
Editor is loading...