• 0

    posted a message on CreateMacro() makes a "temporary macro"??
    NVM I fixed it myself. I actually had to update WoWWiki.

    New page: http://www.wowwiki.com/API_CreateMacro
    Posted in: Lua Code Discussion
  • 0

    posted a message on CreateMacro() makes a "temporary macro"??
    Code: http://ace.pastey.net/103990-3s2v.

    Problem:

    If you look at the code you can see that within the function it is recognizing the macro. However when I go into my blizzard macro UI, its not there. I know with 3.0 they changed macros to be saved serverside, which I could see messing it up. But its working for other addons. I checked Critters and Mounted to see how it made the macros, and I'm doing it the same way. And in a way, I'm doing it right because I can call it from the same function.

    However, I can find nothing on the official forums saying that any Macro API has changed. Any ideas of why it only exists in side that function? It's not there on reload either, or in my characters tab.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Doing something in intervals?
    How would I tell me addon to do something once per second? For every second while I'm doing something (in combat for example). So for every second I was in combat (on the interval) I want to take a snapshot of my hp, and store the value returned so I could call it later. i also want it to work the whole time im in combat.

    example because i dont think that was clear at all:

    0 second: enter combat:start recording
    1 second: record playerHP1
    2 second: record playerHP2
    3 second: leave combat:stop recording

    print: ("At 1 second your health was " .. playerHP1)
    print: ("At 2 second your health was " .. playerHP2)
    Posted in: Lua Code Discussion
  • 0

    posted a message on NPC Faction Standing - Help
    Thanks guy. UnitReaction was what I needed.

    Thanks to you guys: Saf_FixerUpper has been made!
    Posted in: Lua Code Discussion
  • 0

    posted a message on NPC Faction Standing - Help
    Does anyone know of a way to check the player faction standing (hated-exaulted) of the target, or npc your interacting with?

    I've only found one addon that can do this: ReagentRestocker.
    I looked at the code (indeed stared for about an hour or five >.>), but I don't understand it without understanding the entire addon (nearly all of it's functions, etc).

    I can't find anything on WoWWiki that would allow this. I just can't find a way to check if your neutral-exaulted with the NPC your with.

    P.S.
    For my auto repair addon.
    Posted in: Lua Code Discussion
  • 0

    posted a message on New GetCoinTextureString API Usage
    Well after an hour or so of guess-testing I figured it out.

    the new API is:

    GetCoinTextureString(amount,fontsize)
    Output: 1(G)2(S)3(C)
    (the parenthesis represent the ingame picture for gold, silver, and copper pieces)

    OR .

    GetCoinText(amount,fontsize)
    Output: 1 gold 2 silver 3 copper

    Uses:

    textcost = GetCoinTextureString( cost, default )

    textcost is my variable
    cost is also my variable
    default selects whatever the user has their textsize at (I guess, it doesnt give me an error but I've never changed my textsize)

    Out of lack of knowledge I just went with texturestring because I don't know how to separate the text string and then color it. If you could help with that please post :)
    Posted in: Lua Code Discussion
  • 0

    posted a message on New GetCoinTextureString API Usage
    Hello all,

    I'm working on my first addon, and as with most people that you lose patience with, very little knowledge of LUA. But alas, I'm trying.

    My question is how to use the new 3.0 API to get a currency output in gold,silver,copper.

    Basically I'm trying to convert the output of GetRepairAllCost into Gold/Silver/Copper. I've seen the old ways of dividing by 100 or 10000, but since this is a new addon I wanted to try and use the more current API.

    Thanks in advance for any help!
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.