• 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!

TFS 1.X+ Premium Scroll

victeron1993

New Member
Joined
Oct 29, 2017
Messages
9
Reaction score
0
Hey guys, I need a premium scroll tfs 1.2 tibia 10.00
Explain when I use item I get xx premium points.
Someone's can help me?
Sorry for my English ;)
 
Solution
I solve issue by myself change little bit a script, this script working for me

local addpoints = 20 -- amount of points to add
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if isPlayer(player) and item:remove() then
db.query("UPDATE `accounts` SET `premium_points` = `premium_points` + "..addpoints.." WHERE `id` = '" ..getAccountNumberByPlayerName(player:getName()).. "';")
doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_ORANGE, ""..addpoints.." premium points have been added to your account.")
player:say('20 Premium Points added to your account!', TALKTYPE_MONSTER_SAY)
return true
end
end
bump
i have that script"


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


and action.xml
<action itemid="16101" script="premiumscroll.lua"/>

but is not working :/
HELP please :D
 

Attachments

Last edited:
Rules for the Support board
8. Removing Solved Content:
- If you solved your problem, post the solution, do not remove the content in your posts. Instead write the solution you found. This can help other users with the same problem.
- Threads with removed content are useless and are seen as spam.
- If you were able to solve the issue yourself, post the solution and report your own post so a moderator can tag it as the "Best Answer".
 
I solve issue by myself change little bit a script, this script working for me

local addpoints = 20 -- amount of points to add
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if isPlayer(player) and item:remove() then
db.query("UPDATE `accounts` SET `premium_points` = `premium_points` + "..addpoints.." WHERE `id` = '" ..getAccountNumberByPlayerName(player:getName()).. "';")
doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_ORANGE, ""..addpoints.." premium points have been added to your account.")
player:say('20 Premium Points added to your account!', TALKTYPE_MONSTER_SAY)
return true
end
end
 
Solution
Back
Top