VipLib + VipAdmin
(Developed by Rafael Perrella)
Description
This system allows administrators to manage some new groups of players (usually known as donaters, special players or VIPs). It allows you to move players to these groups for a limited period of time (maybe some hours, days or months). When the time is over, they are moved back to the players' default group, 0, automatically. The system accepts more than one group (up to 126). With a precision of seconds, in the exact second a player's VIP time ends he'll be moved back to the default group. There's no need to logout to activate or deactivate the new group.
Download
It requires two files to work: VipLib v1.4b and VipAdmin v1.3a. [uPDATE: now, VipAdmin asks for username, not account id]
If you are using eAthena, use VipLib v1.4b.eA instead of VipLib v1.4b: http://rafaworks.zzl.org/root/scripts/accountmanager/viplib/v1.4b.eA.txt (still not tested, I'll try it soon)
Configurations
Just download the 2 files above, put them in NPCs folder and activate them. The NPC is at prontera 147 174, but you can also access it sending a message to npc:#vipadmin.
The script uses the group ids 1, 5, 6, 7, 8 as special groups. If you want other groups, open VipLib's file and search for "setarray $@AM_Vip_Groups", then edit the numbers (or remove, or add more numbers). Put the ids sorted from the worse to the best.
Special thanks to...
- frozenfox, for reporting a bug (of compatibility) in VipLib v1.0.x.
- Hybrid, for translating the old changelog file.
- DarkWhoteva, for testing and translating VipLib v1.2b.
How does it work? (for scripters)
We have two scripts here. Let's call these special groups "VIP groups".
The VipLib is a library of functions to manage these groups. The script considers that for every pair of groups, one is better than the other; so, if a player is in two (or more) groups at the same time, it'll first spend the best group's time and, when it's over, move them to the next group (worse than the last, better than all the rest he's in). Below, all the functions it has (time is always given in seconds):
About VipAdmin, it's a script that uses the list of functions available in VipLib to let administrators add, remove, set, read or clear the player's vip. The script could be much better, but I have no time left to do it. So, if you can do a better script using VipLib, I would appreciate your contribution =D