• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction Check ZnoteAAC Points [0.4]

Amiroslo

Excellent OT User
Joined
Jul 28, 2009
Messages
6,768
Solutions
5
Reaction score
769
Hello,
I made this script for my OT and I am releasing it for the public.
When you say !points , it checks your premium points in-game, instead of going to the website and logging in.
Simple but useful :)
Tested on TFS 0.4
I don't believe its hard to change it to any other TFS, but I never took a look on TFS 1.x.

New file in talkactions:

znotepoints.lua
Code:
function onSay(cid, words, param, channel)


local Info = db.getResult("SELECT `points` FROM `znote_accounts` WHERE `account_id` = " .. getPlayerAccountId(cid) .. " LIMIT 1")
local points = Info:getDataInt("points")

    if isPlayer(cid) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your Account has " .. points .. " premium points.")
    end
return TRUE
end
in talkactions.xml
Code:
    <talkaction words="!points" event="script" value="znotepoints.lua" />
 
Last edited:
Gesior version:
Code:
function onSay(cid, words, param, channel)
   local info = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. " LIMIT 1")
   local points = info:getDataInt("premium_points")
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have " .. points .. " premium points in your account.")
   return TRUE
end
 
Thank you for sharing your script :)
No problem

Gesior version:
Code:
function onSay(cid, words, param, channel)
   local info = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. " LIMIT 1")
   local points = info:getDataInt("premium_points")
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have " .. points .. " premium points in your account.")
   return TRUE
end
Yep (Y)
 
Back
Top