• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

[Request] Premium Scroll = Premium Points

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local addpoints = 10 -- amount of points to add
	db.executeQuery("UPDATE `accounts` SET `points` = `points` + "..addpoints.." WHERE `id` = '" ..getPlayerAccountId(cid).. "';")
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, ""..addpoints.." premium points have been added to your account.")
	doRemoveItem(item.uid, 1)
return true
end

Script is tested and working for 1.0/0.2, to get it working on 0.3 you need to change the points column to premium_points.

This is an extremely basic script. So in the future, maybe you shouldn't criticize other people's work until you can at least do your own (Thread starter should know what I'm talking about).
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local addpoints = 10 -- amount of points to add
	db.executeQuery("UPDATE `accounts` SET `points` = `points` + "..addpoints.." WHERE `id` = '" ..getPlayerAccountId(cid).. "';")
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, ""..addpoints.." premium points have been added to your account.")
	doRemoveItem(item.uid, 1)
return true
end

Script is tested and working for 1.0/0.2, to get it working on 0.3 you need to change the points column to premium_points.

This is an extremely basic script. So in the future, maybe you shouldn't criticize other people's work until you can at least do your own (Thread starter should know what I'm talking about).

This is for actions right?

Works fine thanks.
2447d0o.png



worked with
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local addpoints = 10 -- amount of points to add
	db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + "..addpoints.." WHERE `id` = '" ..getPlayerAccountId(cid).. "';")
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, ""..addpoints.." premium points have been added to your account.")
	doRemoveItem(item.uid, 1)
return true
end
 
Last edited:
Back
Top