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

VIP Days Remover

kozmo

Member
Joined
Jan 30, 2009
Messages
444
Solutions
2
Reaction score
23
So i finally got VIP added into the server the only issue now is that the script i have seems to not work, It looks like this.

function onTime()
db.query("UPDATE accounts SET vipdays = vipdays - 1 WHERE vipdays > 0;")
return true
end

And for the XML Part looks like this.

<globalevent name="VipDaysRemover" interval="86395"" event="script" value="daysremover.lua"/>

If someone could help me solve this problem it would be much appreciated thanks.
 
Alright thanks for everyones help but the one thing no one has yet explained is acutally how to Execute Query
So whoever knows how please let me know.

You should already know how to do this, if you took time learning it. E.g. Google "How to execute queries with PhpMyAdmin".
 
As you can see i actually already had this in the hole time but is something wrong with it because its still not working, And i don't know if this helps but when it takes away a premium it takes away all 30 days of VIP!

EQuqPdW.bmp
 
Last edited:
Lua:
function onTime()
db.query("UPDATE accounts SET vipdays = 0 WHERE vipdays > 0;")
return true
end
try this

- - - Updated - - -

if dont work, try this:
Lua:
function onTime()
db.query("UPDATE `accounts` SET `vipdays` = '0' WHERE `vipdays` > 0;")
return true
end
 
Lua:
function onTime()
db.query("UPDATE accounts SET vipdays = 0 WHERE vipdays > 0;")
return true
end
try this

- - - Updated - - -

if dont work, try this:
Lua:
function onTime()
db.query("UPDATE `accounts` SET `vipdays` = '0' WHERE `vipdays` > 0;")
return true
end

Try reading it again.
It will set vipdays to 0.
 
Thanks to everyone that tried to help i was so close but there's always a problem for example when you create an account you start with 10 days of premium , iv been watching everyday it takes way 1 premium day it then takes all the VIP 30 days away from the account so i am done wasting time on this i will have to make it so once you buy VIP you never loose it..
 
Thanks to everyone that tried to help i was so close but there's always a problem for example when you create an account you start with 10 days of premium , iv been watching everyday it takes way 1 premium day it then takes all the VIP 30 days away from the account so i am done wasting time on this i will have to make it so once you buy VIP you never loose it..

Uh. Tell me what rev/TFS version you're using. I'll make one for you.
 
Back
Top