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

Othire 1.0 Premium days

Nostalgian

Member
Joined
Mar 17, 2018
Messages
66
Reaction score
15
I am using the current othire from github: TwistedScorpio/OTHire
In conjunction with Qwizer/rlmap740x
And also, otclient

Everything seems to be running fine(other than some database errors in the console), but im having trouble adding premium days. I have been messing around with it to no avail.

Basically, I manually went into the database and changed prem end to 100 (because that's the only thing related to premium that I see). When I login on the website, it shows premium account. When I login the client though, it still shows free account and I do not have access to premium features.

What am I missing?
 
Solution
Premium days in OTHire is based on timestamp. You can manipulate your AAC to add premium time upon creation of accounts, or you can add it using Lua scripts:
Lua:
doPlayerAddPremiumDays(cid, 10)
Above example will add 10 days of premium
Premium days in OTHire is based on timestamp. You can manipulate your AAC to add premium time upon creation of accounts, or you can add it using Lua scripts:
Lua:
doPlayerAddPremiumDays(cid, 10)
Above example will add 10 days of premium
 
Solution
I had some issues of this also, I solved with having to do this:

in creaturescripts.xml, I added:

Code:
<event name="addPremium" type="login" script="freepremium.lua" />

Then, in the creaturescripts/scripts folder, put a lua called freepremium:

Lua:
function onLogin(cid)
    if getPlayerPremiumDays(cid) <= 29 then
        doPlayerAddPremiumDays(cid, 30)
        -- doPlayerSendTextMessage(cid, 17, "You received 30 premium days for free.")
    end
    return true
end

So, in the very first time you log in your man, you must relog in, and then you get the premmy days. After that, when you log in, it does check and if you are low it brings you back up again.
I am sure there is a better way to do it so it is always on premium, and hopefully someone smart comes to say it, but this is only what I could get to work.

Good luck!
 
Ahhh thank you both. That's exactly what I was looking for. I just noticed that on the AAC it says my premium time expires January 1st, 1970...... so I ran out of premium time 40 years ago, hahah.
 
Back
Top