Thread Tools Display Modes
11-16-10, 08:07 AM   #1
Fhait
A Cliff Giant
Join Date: Dec 2006
Posts: 76
Question about Script variables and Time

I'm trying to create a Fractional Variable for use in a Status Bar.

spell, rank, displayName, icon, startTime, endTime, isTradeSkill, castID, interrupt = UnitCastingInfo("player")

I'd like the FracVar to consist of the remaining cast-time. (for a castbar mod)

I believe I'll need to work with the endTime and the current server time, GetTime()? but I can't seem to nail down the proper code.

Does anybody have any suggestions ?

= F
  Reply With Quote
11-16-10, 08:30 AM   #2
Cripsii
A Black Drake
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 82
Hi !

I do not understand too is that you request.
The bar and text timer shader provide this info for create a castbar..

however if you want ti get the timer remaining for a cast:

Code:
local spell, _, _, _, _, endTime = UnitCastingInfo("player")
if spell then 
 local tr = endTime/1000 - GetTime()
-- Start your timer here with tr in max time
end
If you want to explain your problem a little more..

++
  Reply With Quote
11-16-10, 12:37 PM   #3
Fhait
A Cliff Giant
Join Date: Dec 2006
Posts: 76
CastBar

Thank you, I played around a little bit more and noticed that if I dragged 'Var Spell Info' into my design, it added a new variable type called 'Var Spell Lag' which has given some usable variables to the Timer Shader.

However, the Bar and Text Timer shader has ALOT of variable options that are still unavailable.

Can somebody post a list of the pre-requisite variable types needed in the Design in order to use all these variable types in the shader ?

I was able to use a script variable to extract the Spell Name but how do I get the Spell Icons, Text Timers, etc into the Design ?

Thanks !

= F
  Reply With Quote
11-16-10, 01:11 PM   #4
Brainn
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 263
you dont have to use a script to get the spell-name, it should all be provided by the "Vars Spell Info" feature. to show the name/cast-time etc, just create a "Text Custom" feature and leave the script-object field empty. now go to the "Bar and Text Timer Shader" and select the text-feature you created as the "Text Timer" for casttime or "Text Info" for spellname. for casttime you can select the format of the display, and for textinfo you have to select spell_name_rank in the text info data field.

see my crazy paint-skills here:
  Reply With Quote
11-16-10, 02:04 PM   #5
sigg
Featured Artist
 
sigg's Avatar
Featured
Join Date: Aug 2008
Posts: 1,251
guide

http://www.wowinterface.com/forums/s...ad.php?t=21845

cheers
  Reply With Quote
11-18-10, 08:16 PM   #6
Fhait
A Cliff Giant
Join Date: Dec 2006
Posts: 76
Thanks

Thanks all.

I see now that the Timer Shader doesn't just reference variables, it also modifies others.

Great guide.

= F
  Reply With Quote

WoWInterface » Featured Projects » OpenRDX » OpenRDX Community » OpenRDX: Community Chat » Question about Script variables and Time


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off