function onSay(player, words, param) if player:getGroup():getId() < 3 then return false end --[[ /i 1001, true, 1, 2, 3]]-- --[[ [01] = ItemID [02] = Definir status do item manualmente ou deixar zerado (false/true) [03] = Quantidade [04] = Se o [02] tiver true, aqui fica RARIDADE do item. Se [02] for falso, não precisa colocar nada aqui. [05] = Se o [02] tiver true, aqui fica STAR do item. Se [02] for falso, não precisa colocar nada aqui. ]]-- local split = param:splitTrimmed(" ") if _ITEMS[tonumber(split[01])] then local default = false if split[02] ~= nil then default = true end local iid = tonumber(split[01]) local slo = _ITEMS[iid].SLOT_EQUIP local rar = 00 local sta = 00 local qnt = 01 local ext = 00 if default then if split[03] ~= nil then if isNumber(split[03]) then qnt = tonumber(split[03]) else qnt = 01 end else qnt = 01 end if split[04] ~= nil then if isNumber(split[04]) then rar = tonumber(split[04]) end end if split[05] ~= nil then if isNumber(split[05]) then sta = tonumber(split[05]) end end end if slo > 9 or slo == 0 then slo = 3 end if iid == 3218 then PlayerVipCoins(player, 02, qnt) player:sendCancelMessage("@LootMSG 3218 3 0 " ..qnt) doBackpack(player, 11) return false end if doBackpack(player, 00, slo, ext, 01) then if slo == 3 then doBackpack(player, 03, slo, ext, 01, iid) -- Procurar if doBackpack(player, 01, slo, ext, 0, iid, rar, sta, qnt) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Você recebeu o item [ " .._ITEMS[iid].NAME.. ", x" ..qnt.." ].") player:getPosition():sendMagicEffect(14) end else if doBackpack(player, 01, slo, ext, 0, iid, rar, sta) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Você recebeu o item [ " .._ITEMS[iid].NAME.. " ].") player:getPosition():sendMagicEffect(14) end end else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Sua Backpack esta cheia.") player:getPosition():sendMagicEffect(03) return false end --else -- player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Parâmetro errado. Após o ID, é preciso definir [true ou false].") -- return false --end else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Item não encontrado.") return false end end