Go to Page... |
Thread Tools | Display Modes |
10-11-11, 07:19 PM | #1 | |||
I want to put Arenajunkies scripts into .lua form (need help)
Hi, i need help with some nice arenajunkies scripts that improve the default blizz ui.
arena123 casting bar colors/resizing/icon moving
arena123 pvp trinkets
|
||||
10-11-11, 08:21 PM | #2 |
Just remove all the /run's from every line - that's all already lua scripting.
Then make your folder in the Addons folder - for example, \ArenaJunkies\ Then make a file named exactly like your folder - case and spelling are important! - and put .toc on the end. In the above example, \ArenaJunkies\ArenaJunkies.toc Then, make your .lua file - \ArenaJunkies\ArenaJunkies.lua Copy/paste those scripts you have into your .lua file, and remove the /run's from the start of each line. Save the .lua file. Then, add a line to your .toc file that points to your .lua file - just the name is all you need, so "ArenaJunkies.lua" is fine. Save the .toc file. Start WoW. It SHOULD show up in your addons list as "ArenaJunkies". If not, then I've forgotten something simple and obvious in the .toc file, but my wingsauce-maddened brain cannot think of it at this time. :>
__________________
-- Taryble |
|
10-11-11, 08:41 PM | #3 |
The problem with that is the variable names...they may clobber one another since they're "f" and "j" and such.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes". Author of NPCScan and many other AddOns. |
|
10-12-11, 05:09 AM | #4 | |
but my lua coding knowledge isnt that good. i have atm. no time to learn it, because of school . |
||
10-12-11, 07:41 AM | #5 |
First you should try to make it readable. That helps to debug when you put them in an addon (dont put the three in the same addon as they share variablenames and functions)
And I guess you've pasted the third block twice lua Code:
lua Code:
lua Code:
__________________
The cataclysm broke the world ... and the pandas could not fix it! Last edited by Rilgamon : 10-12-11 at 07:44 AM. |
|
10-12-11, 06:07 PM | #6 |
Thank you very much bro, i know that it take time to write for me the code in .lua form.
the only script that work is the PVP Trinket script, the two others have errors. |
|
10-12-11, 09:17 PM | #7 |
What are the errors? Can you use Bugsack/Buggrabber to copy and paste the errors to this thread?
__________________
-- Taryble |
|
10-12-11, 10:12 PM | #8 | ||
From first script i get this error:
|
|||
10-12-11, 11:34 PM | #9 |
A simpler solution to variable collision issues would be to simply add a "do" before each block, and an "end" after each one, thus giving each section its own scope. You could also add some comments to remind you what each section does. With this method you could easily add more macros without needing other people to reformat the code for you.
lua Code:
|
|
10-13-11, 01:53 AM | #10 |
The "do" blocks won't matter since the variables aren't being prefixed with "local" - they're still being thrown into the global environment.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes". Author of NPCScan and many other AddOns. |
|
10-13-11, 05:00 AM | #11 |
Hmm, good point. I was just sitting down for breakfast when I made that last post.
|
|
10-13-11, 08:07 AM | #12 |
Hehe - I've been there before, as you know.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes". Author of NPCScan and many other AddOns. |
|
10-13-11, 08:42 AM | #13 |
Delete line 10 in the first and remove "local" from line 121 this should fix those errors.
__________________
The cataclysm broke the world ... and the pandas could not fix it! |
|
10-13-11, 11:11 AM | #14 | ||
Hi, thank you for the feedback.
i delete line 10. now i get this error:
|
|||
10-13-11, 05:35 PM | #15 |
Those errors are occurring because the arena frames are loaded on demand, and aren't loaded when your addon is loading. Either add this to your addon's TOC file:
Code:
## LoadsWith: Blizzard_ArenaUI Code:
LoadAddOn("Blizzard_ArenaUI") |
|
10-13-11, 11:12 PM | #16 | ||
Code:
## LoadOnDemand: 1
__________________
WoWInterface AddOns
|
|||
10-14-11, 06:57 PM | #17 |
Thank you bro, this worke fine.
only the arena debuff code is very buggy and lagy. it think its not effectiv written |
|
10-15-11, 02:27 PM | #18 |
Since you're not limited to using macros, why don't you just use one of the real addons written specifically for arenas? Your comment for the third macro names the addon LoseControl, which will cover the crowd control part, and there are plenty of arena debuff addons.
There are quite a few addons in the PvP, Arena, BattleGrounds category here on WoWInterface. You could also look through the Arena category over on Curse, though since they let authors list addons in multiple categories, there are a lot of addons listed there that are not arena-specific (eg. general unit frame addons that can show arena enemy frames), so that may be less useful. |
|
WoWInterface » Developer Discussions » Lua/XML Help » I want to put Arenajunkies scripts into .lua form (need help) |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|