FRIEND LIST
This image is hosted on a possibly dangerous website (http://vpx.pl/i/2013/12/27/friendlist.png). Please consider reuploading it on Imgur.com.
About:
- Simple HUD with your friend vip list.
- You can move HUD with middle mouse button. Thanks to @sirmate.
Libraries:
- WindBot 1.1.2
- Raphael's Library 0.1.2
- Lucas Terra's Library 12.7
Version and Changelog:
- v1.0 - 27/12/2013 - stable version.
Code:
-- MADE by Turc @ --
init start
local space = 0
filterinput(false, true, false, false)
local Moving, Temp, Moved = false, {0, 0}, {0, 0}
function inputevents(e)
if (e.type == IEVENT_MMOUSEDOWN) then
Moving, Temp = true, {$cursor.x - Moved[1], $cursor.y - Moved[2]}
end
if (e.type == IEVENT_MMOUSEUP) then
Moving = false
end
end
init end
if (Moving) then
auto(10)
Moved = {$cursor.x - Temp[1], $cursor.y - Temp[2]}
end
setposition($clientwin.left + 2 + Moved[1], $worldwin.top - 28 + Moved[2])
local blueGradient = {0.0, color(78, 105, 112), 0.23, color(61, 87, 93), 0.76, color(44, 68, 74)}
local blackGradient = {0.0, color(75, 75, 75, 20), 0.23, color(45, 45, 45, 20), 0.76, color(19, 19, 19, 20)}
local redGradient = {0.0, color(136, 35, 12, 20), 0.23, color(139, 37, 13, 20), 0.76, color(92, 6, 6, 20)}
local greenGradient = {0.0, color(65, 96, 12, 0), 0.23, color(67, 99, 13, 0), 0.76, color(36, 52, 6, 0)}
local online, all, k = 0, 0, 1
setfillstyle('gradient', 'linear', 2, 0, 0, 0, 25 + space)
addgradcolors(table.unpack(blueGradient))
addshape('roundrect', $clientwin.left + 2, $worldwin.top, 150, 24 + space, 3,3)
space = 0
foreach vipentry v do
setfontstyle('Tahoma', 7, 75, 0xFFFFFF, 1, color(0, 0, 0, 20))
setfillstyle('gradient', 'linear', 2, 0, 0, 0, 17)
addgradcolors(table.unpack(blackGradient))
drawroundrect($clientwin.left + 6, $worldwin.top + 3 + (k*19), 120, 16)
drawtext(v.name, $clientwin.left + 8, $worldwin.top + 3 + (k*19) + 3)
if not v.isonline then
addgradcolors(table.unpack(redGradient))
else
addgradcolors(table.unpack(greenGradient))
online = online + 1
end
drawroundrect($clientwin.left + 110 + 8, $worldwin.top + 3 + (k*19), 30, 16, 2, 2)
k = k +1
all = all + 1
space = space + 19
end
setfontstyle('Tahoma', 10, 40, 0xFFBB55, 1, color(0, 0, 0, 20))
drawtext('FRIEND LIST (' ..online ..'/' ..all ..')', $clientwin.left + 10, $worldwin.top + 2)