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

[LUA] Convert Small Script

DiegoRulez

Member
Joined
Apr 16, 2012
Messages
93
Reaction score
11
Location
Feira de Santana - Brasil
I would like this script to be converted so I can use it in my TFS 1.3 with Znote AAC.

Table: znote_accounts
Column: points
Code:
local function doPlayerAddPremiumPoints(cid, count)
        db.query('UPDATE accounts SET znote_accounts = znote_accounts+'.. count ..' WHERE id = ' .. getAccountNumberByPlayerName(getCreatureName(cid)))
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
    doPlayerAddPremiumPoints(cid, 1)
    doSendMagicEffect(getCreaturePosition(cid), 2)
    doRemoveItem(item.uid,1)
    return true
end

Thanks to whom to help
 
Code:
db.query("UPDATE `znote_accounts` SET `points` = `points` + " .. count .. " WHERE `id` = " .. player:getAccountId())

Im not shure but it might work
 
What are "premium points"?
That's a custom function that has no translation/conversion to 1.3 unless you show us its implementation.
 
Back
Top