Go to Page... |
Thread Tools | Display Modes |
11-20-10, 02:32 PM | #1 |
Some of my scripts
Since Sigg now put these back into the game with Text Info!
Here are some of the scripts at I came up with...... This is the script i use for the clock: Code:
local time24 = false --True if you want military time local hour = date("%H") local minute = date("%M") minute = floor(minute / 10) == 0 and "0" .. minute or minute local time = "" if time24 == true then time = hour .. ":" .. minute else local ampm = (floor(hour / 12) == 1) and "pm" or "am" hour = mod(hour, 12) if hour == 0 then hour = 12 end if ampm == "pm" then ampm = VFL.strtcolor(_bluesky) .. ampm else ampm = VFL.strcolor(1,1,.5) .. ampm end time = hour .. ":" .. minute .. " " .. ampm end text = time Code:
local text = "" local zone = GetMinimapZoneText(); local pvpType = GetZonePVPInfo(); if (pvpType == "sanctuary") then color = VFL.strcolor(.408,.8,.937) .. zone; elseif (pvpType == "arena") then color = VFL.strcolor(1,.098,.098) .. zone; elseif (pvpType == "friendly") then color = VFL.strcolor(.098,1,.098) .. zone; elseif (pvpType == "hostile" or pvpType == "combat") then color = VFL.strcolor(1,.098,.098) .. zone; elseif (pvpType == "contested") then color = VFL.strcolor(1,.635,0) .. zone; elseif (pvpType == nil) then color = VFL.strcolor(1,.98,.98) .. zone; end; text = color Code:
local text = ""; local f = 0; local bnf = 0; for n=1, GetNumFriends() do _,_,_,_, conn = GetFriendInfo(n); if conn then f = f +1; end end for bn=1, BNGetNumFriends() do _,_,_,_, conn = BNGetFriendInfo(bn); if conn then bnf = bnf +1; end end text = VFL.strtcolor(_white) .. "F: " .. VFL.strcolor(1,1,.50) .. f .. VFL.strtcolor(_white) .. "/" .. VFL.strcolor(1,1,.5) .. GetNumFriends() .. VFL.strtcolor(_white) .. " BN: " .. VFL.strtcolor(_bluesky) .. bnf .. VFL.strtcolor(_white) .. "/" .. VFL.strtcolor(_bluesky) .. BNGetNumFriends(); Code:
local text = ""; local fpstext = ""; local fps = floor(GetFramerate() or "" ); if fps >= 50 then fpstext = VFL.strtcolor(_green) ..fps ..VFL.strtcolor(_white) .."fps "; elseif fps <= 49 and fps >= 35 then fpstext = VFL.strtcolor(_yellow) ..fps ..VFL.strtcolor(_white) .."fps "; elseif fps <= 34 and fps >= 21 then fpstext = VFL.strtcolor(_orange) ..fps ..VFL.strtcolor(_white) .."fps "; elseif fps <= 20 then fpstext = VFL.strtcolor(_red) .. fps .. VFL.strtcolor(_white) .."fps "; end; local _,_,lag = GetNetStats(); if lag <= 125 then lag = VFL.strtcolor(_green) ..lag.. VFL.strtcolor(_white) .. "ms"; elseif lag >= 126 and lag <= 250 then lag = VFL.strtcolor(_yellow) ..lag.. VFL.strtcolor(_white) .. "ms"; elseif lag >= 251 and lag <= 375 then lag = VFL.strtcolor(_orange) ..lag.. VFL.strtcolor(_white) .. "ms"; elseif lag >= 376 then lag = VFL.strtcolor(_red) ..lag.. VFL.strtcolor(_white) .. "ms"; end; text = fpstext .. lag; Code:
local total = GetNumGuildMembers(true) local onlineTotal = 0 local offlineTotal = 0 for i = 1, total do local name, rank, rankIndex, level, class, zone, note, officernote, online, status, classFileName = GetGuildRosterInfo(i) if online then onlineTotal = onlineTotal + 1 else offlineTotal = offlineTotal + 1 end end text = "Guild: " .. VFL.strtcolor(_green) .. onlineTotal; Last edited by Kcori : 11-20-10 at 04:40 PM. Reason: Added Guild Script |
|
12-03-10, 08:39 AM | #2 |
Here are a couple more scripts I use:
Durability: Code:
local currdur, maxdur = Logistics.GetDurability(); local dura = floor((currdur/maxdur) *100); text =""; if dura >=75 then text = VFL.strtcolor(_white) .. "Durability: " .. VFL.strtcolor(_green) .. dura .. VFL.strtcolor(_white) .. "%"; elseif dura <=74 and dura >=50 then text = VFL.strtcolor(_white) .. "Durability: " .. VFL.strtcolor(_yellow) .. dura .. VFL.strtcolor(_white) .. "%"; elseif dura <=49 and dura >=25 then text = VFL.strtcolor(_white) .. "Durability: " .. VFL.strtcolor(_orange) .. dura .. VFL.strtcolor(_white) .. "%"; elseif dura <= 24 then text = VFL.strtcolor(_white) .. "Durability: " .. VFL.strtcolor(_red).. dura .. VFL.strtcolor(_white) .. "%"; end; Code:
local money = GetMoney(); local text = ""; if money <= 99 then text = VFL.strcolor(1,.450,.300) .. money .. "c"; elseif money >= 100 and money <= 9999 then text = VFL.strcolor(.750,.900,1) .. strsub(money, -4, -3) .. "s " .. VFL.strcolor(1,.450,.300) .. strsub(money, -2) .. "c"; elseif money >= 10000 then text = VFL.strtcolor(_yellow) .. strsub(money, 0, -5) .. "g " .. VFL.strcolor(.750,.900,1) .. strsub(money, -4, -3) .. "s " .. VFL.strcolor(1,.450,.300) .. strsub(money, -2) .. "c"; end |
|
WoWInterface » Featured Projects » OpenRDX » OpenRDX Community » OpenRDX: Community Chat » Some of my scripts |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|