Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 12/20/22 em todas áreas

  1. (Resolvido)Item vendedor

    floW reagiu a Anderson Sacani por uma resposta no tópico

    1 ponto
    local item, count, storage = {}, 0, 0 function onUse(cid, item, frompos, itemEx, topos) item = { [1] = { id = 2537, price = 4800 }, [2] = { id = 2377, price = 480 }, [3] = { id = 2663, price = 600 }, [4] = { id = 2472, price = 90000 }, } storage = 556655123 if getPlayerStorageValue(cid, storage) <= 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You want to sell multiple items. Be careful, because the equipment you are using can be sold too, keep them.") addEvent(function() if isPlayer(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Use this item again to sell the items. REMEMBER TO STORE THE EQUIPMENT YOU ARE USING!") end end, 1500) setPlayerStorageValue(cid, storage, 1) else for i = 1, #item, 1 do count = getPlayerItemCount(cid, item[i].id) if count > 0 then doPlayerRemoveItem(cid, item[i].id, count) doPlayerAddMoney(cid, item[i].price * count) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sold " .. count .. "x " .. getItemNameById(item[i].id) .. " for " .. item[i].price .. " gold.") end end setPlayerStorageValue(cid, storage, 0) end return true end
Líderes está configurado para São Paulo/GMT-03:00

Informação Importante

Confirmação de Termo