<?xml version="1.0" encoding="UTF-8"?>
<mod name="Premium Points Item" version="20200402" author="Xaekai" contact="[email protected]" enabled="yes" >
<action itemid="8675309" allowfaruse="1" blockwalls="0" event="script" ><![CDATA[
function onUse(cid, item, fromPosition, itemEx, toPosition)
local playerID = getPlayerAccountId(cid)
local infinite = false
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. 10 .. " WHERE `id` = " .. playerID .. ";")
if infinite == false then
if item.type > 1 then
doChangeTypeItem(item.uid, ( item.type - 1 ))
else
doRemoveItem(item.uid, 1)
end
end
return true
end
]]></action>
</mod>