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

how show Vip Time

beenii

Well-Known Member
Joined
Jul 26, 2010
Messages
586
Solutions
1
Reaction score
58
on modules/client_entergame/characterlist.lua

-- account
if account.premDays > 0 and account.premDays < 65535 then
accountStatusLabel:setText(tr("Premium Account (%s) days left", account.premDays))
elseif account.premDays >= 65535 then
accountStatusLabel:setText(tr("Lifetime Premium Account"))
else
accountStatusLabel:setText(tr('Free Account'))
end

if account.premDays > 0 and account.premDays <= 7 then
accountStatusLabel:setOn(true)
else
accountStatusLabel:setOn(false)
end
end




how change for get :

function vip.getVip(cid)
assert(tonumber(cid),'Parameter must be a number')
if isPlayer(cid) == FALSE then error('Player don\'t find') end;
ae = db.getResult("SELECT `vip_time` FROM `accounts` WHERE `name` = '"..getPlayerAccount(cid).."';")
if ae:getID() == -1 then
return 0
end
 
where is declarated : premDays ?? any??
 
In gamelib/protocollogin you have this:
Code:
local account = {}
 account.premDays = msg:getU16()
 signalcall(self.onCharacterList, self, characters, account)

I think, you will have to do SERVER source edit to have account.vipDays working.
 
on sources of otclient no is define premDays? xD!

dont need change definition premDays, only need read table vip_time >.<
 
Back
Top