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

[Request] Edited Premium System.

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Solutions
2
Reaction score
115
I would like to make premium time only expire while online.
If you are banned or have been banned three or more times, it will continue to expire.

Example:
John has a perfect record, and John buys premium.
John becomes an angry bad boy, so he random pks a lot of people. He becomes banned.
Now every second he is online or offline, the time will continue to expire. Too bad for John.

Thanks.

I can pay $$ for it, but I won't pay a lot because I know it is not extremely hard...I just don't know how to code C++.

Contact: Private message me to discuss further! :w00t:
 
Last edited:
what if u make a storage value that holds offline time. every time you log in it checks the time of your last log out and records the difference. then when that time is greater then 1day you add 1day of premium time to the players account. of course youll need to use a storage vaule to check if the last time they logout was because of a banishment
 
Last edited:
what if u make a storage value that holds offline time. every time you log in it checks the time of your last log out and records the difference. then when that time is greater then 1day you add 1day of premium time to the players account.
Ex.
of course youll need to use a storage vaule to check if the last time they logout was because of a banishment

Even if I managed to do this through LUA, it would create a lot of lag and have memory leaks.

I don't mind paying for a complete source change of the premium system. It isn't as hard as it sounds with C++.
I'm sure Stian, Elf, or anyone who knows c++ could do it within 15-20 minutes.
 
No, just use storages and getPlayerLastLoginSaved(cid) in onLogout?

Hm, I don't know. It can be done, but I prefer it to be through source. I want some other stuff done with it as well.
Waiting for someone to contact me via PM. :w00t:

@Cyko,
Make it if you want, I am requesting it. :p rep+!
 
i already explained how to do it without creating lag. and it seems that Cykotitan even agrees with me. what other stuff do you want done with it?
 
premium time = 1, and remove premium time loose entierly

ALTER TABLE players ADD premsec INT(11);

iologindata.cpp

loadPlayer
player->premSec = result->resultDataInt('premsec')
player->lastPremCheck = OTSYS_TIME();

savePlayer
set premsec = premsec - (OTSYS_TIME() - player->lastPremCheck)
if premsec < 0
set premium time && premsec = 0 (and tho, remove premium)


in ban script
if banned more then 3 time
get premsec, calcNewPremTime = premsec - length of ban in sec
if calcNewPremTime < 0
removePremium()
calcNewPremTime = 0

UPDATE players SET premsec = calcNewPremTime;
 
Back
Top