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

The best VIP system ever! [Action/Movevent/Globalevent]

[programmertip]
An idea would be to change 'vipdays' in database to a time in the future when the VIP-days will be over (easiest would be unix timestamp), and then just check every server save or so if the current time is over the VIP endtime. That way, if the server would crash at 1:59 PM and miss the removal of a VIP-day (which is a possibility) it would still know exactly for how long the user has VIP-status after the next server start.
[/programmertip]
 
What do i have to change/fix to get just vip on the character that i use the vip medal on?
Now i get on the whole account but i just want on one of the character...

Like if i use a vip medal i get vip on that char that i use the medal on :p

Help me!:)
 
the days aren't removed when the char isn't online, im using rev2 0.3.7 by martyx

If days arent removed when char offline, then it should not remove it also when char is online because days removal doesnt have anything to be with character on or off.

- - - Updated - - -

What do i have to change/fix to get just vip on the character that i use the vip medal on?
Now i get on the whole account but i just want on one of the character...

Like if i use a vip medal i get vip on that char that i use the medal on :p

Help me!:)
I would have tochange the whole system since its based on all account.
 
If days arent removed when char offline, then it should not remove it also when char is online because days removal doesnt have anything to be with character on or off.

- - - Updated - - -



I would have tochange the whole system since its based on all account.

Ahh...
But can you make a script for just that?
and put it here?:)

Btw.. something is wrong...
when i used vip for 5 days ago i did get 30 days...
I still have 30days..:(
Help me!
 
Where do I put
Code:
ALTER TABLE `accounts` ADD
`vipdays` int(11) NOT NULL DEFAULT 0;
??

I dont have that "phpmyadmin"
I'm using Sqlitestudio
 
@up

function onTime()
db.executeQuery("UPDATE accounts SET vipdays = vipdays - 1 WHERE vipdays > 0;")
return true
end
 
[Warning - Event::loadScript] Event onTime not found (data/globalevents/scripts/daysremover.lua)

stay error :'(

function onTime()
db.executeQuery("UPDATE accounts SET vipdays = vipdays - 1 WHERE vipdays > 0;")
return true
end
<globalevent name="VipDaysRemover" time="00:01" event="script" value="daysremover.lua"/>

i use TFS 0.4. 3777
 
Last edited:
Guys You need to add
PHP:
ALTER TABLE `accounts` ADD
`vipdays` int(11) NOT NULL DEFAULT 0;


In your php my admins in your accounts and it wil be ok :)
 
so what is that
Go to your phpmyadmin and execute:
Code:

ALTER TABLE `accounts` ADD
`vipdays` int(11) NOT NULL DEFAULT 0;
 
Loool Open your localhost/phpmyadmin

then open your database ,and choose accounts then you will see up something Name sql open it and add the
PHP:
ALTER TABLE `accounts` ADD
`vipdays` int(11) NOT NULL DEFAULT 0;
and i will work :)
 
Info:getID()

what is 0.2 alternative of this "method"(as console called it)? Is there any way to get this result different way?
Tried adding 0.3.7 class and database libs to global.lua, but didn't worked
 
[Warning - Event::loadScript] Event onTime not found (data/globalevents/scripts/daysremover.lua)

stay error :'(




i use TFS 0.4. 3777
Try this

function onTimer()
db.executeQuery("UPDATE accounts SET vipdays = vipdays - 1 WHERE vipdays > 0;")
return true
end
 
Back
Top