Installation
Installation of Red Multichar AIO
Database setup
Basic Character Tables
The basic character tables are created automatically by VORP Core. However, you need to add additional columns for the playtime feature.
PlayTime Feature
The playtime feature tracks how long each character has been played and when they last logged in.
Step 1: Run SQL Commands
Open your database management tool (phpMyAdmin, HeidiSQL, etc.) and run the following SQL commands:
-- Add playtime column to characters table
ALTER TABLE `characters`
ADD COLUMN `playtime` INT(11) DEFAULT 0
COMMENT 'Total playtime in seconds';
-- Add last_login column to track when character was last played
ALTER TABLE `characters`
ADD COLUMN `last_login` TIMESTAMP NULL DEFAULT NULL
COMMENT 'Last time character was played';
-- Add index for better performance on playtime queries
CREATE INDEX `idx_characters_playtime` ON `characters` (`playtime`);
-- Add index for last_login queries
CREATE INDEX `idx_characters_last_login` ON `characters` (`last_login`);
-- Update existing characters to have 0 playtime if they don't have it set
UPDATE `characters` SET `playtime` = 0 WHERE `playtime` IS NULL;Verify Installation
After running the SQL commands, verify that the new columns exist:
DESCRIBE characters;You should see playtime and last_login columns in the result.
What Does PlayTime Track?
playtime: Total time the character has been played (in seconds)Updated every time the player disconnects
Can be used for statistics, leaderboards, or rewards
last_login: Timestamp of when the character was last playedUpdated when the player selects the character
Useful for inactive character cleanup or welcome messages
Example Usage
You can query playtime data like this:
-- Get top 10 characters by playtime
SELECT firstname, lastname, playtime/3600 as hours_played
FROM characters
ORDER BY playtime DESC
LIMIT 10;
-- Get characters that haven't logged in for 30 days
SELECT firstname, lastname, last_login
FROM characters
WHERE last_login < DATE_SUB(NOW(), INTERVAL 30 DAY);Last updated