local pointsAmount = 10
function onUse(player, item, fromPos, target, toPos, isHotkey)
if not player then
return true
end
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You received '..pointsAmount..' premium points')
db.query("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. pointsAmount .. " WHERE `id` = " .. player:getAccountId())
item:remove(1)
return true
end
Hi
Someone have script for "points scroll" adds points to sms shop after use and dissapear.
MyAAC 1.0 BETAWhat acc you use?
local pointsAmount = 10
function onUse(player, item, fromPos, target, toPos, isHotkey)
if not player then
return true
end
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You received '..pointsAmount..' premium points')
db.query("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. pointsAmount .. " WHERE `id` = " .. player:getAccountId())
item:remove(1)
return true
end
WORKS! Thank you a lot.LUA:local pointsAmount = 10 function onUse(player, item, fromPos, target, toPos, isHotkey) if not player then return true end player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You received '..pointsAmount..' premium points') db.query("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. pointsAmount .. " WHERE `id` = " .. player:getAccountId()) item:remove(1) return true end
Try this, not tested but should work ( I hope )![]()
WORKS! Thank you a lot.