Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local itemm = { [2644] = {point = 10}, [2126] = {point = 20},[8293] = {point = 25},[8879] = {point = 33},[2427] = {point = 15},[2504] = {point = 15},[7958] = {point = 15},[2128] = {point = 5},[2472] = {point = 4},[8888] = {point = 19},[7435] = {point = 10},[5907] = {point = 15},[7735] = {point = 25},[2474] = {point = 15},[2493] = {point = 5} }
local iteeeemm = getThingFromPos({x = 1076, y = 746, z = 7, stackpos = 1})
for k, v in pairs(itemm) do
if (iteeeemm.uid ~= 0 and iteeeemm.itemid == k) then
doRemoveItem(iteeeemm.uid, 1)
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. v.point .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
doCreatureSay(cid, "You have got rid of "..getItemNameById(k).." and you have recievd again the "..v.point.." points.", TALKTYPE_ORANGE_1)
else
doPlayerSendCancel(cid,"not worth it,try something else.!")
end
end
end
Player loss Item But don't get any POINTS!!!
Last edited: