How can I track the runes required for Death Prophesy?

Right.  What I want to do is be able to track the runes that come up for Death Prophesy (there will be five of them) and track them via an echo.  The goal is to, after the runes have hit, be able to call an alias which will echo what runes were chosen so I can adapt on the fly.


You sling a nyd rune at Johan, hitting him in the chest.
The ominous image of a rune appears briefly in the air before you.
The rune of ur:
     ______
    /           \
   |     | \     |
   |     | |     |
   |     |       |
    \______/


This is how DP shows the runes selected.  I want to track "The rune of (x):" so that I can watch what afflictions I'm needing to stick.  The problem is, it will by the exact same line, so I don't know how to create different variables for each one.  Basically, when all the runes have hit, I want to be able to show something like:

+----------------------------------------+
|      DEATH PROPHESY:     |
|   rune1         rune2              |
|   rune3         rune4              |
|   rune5                               |
+----------------------------------------+

Any ideas?  :/

Best Answers

Answers

  • I'll give this a go!  Thank you!

    I'll probably have more questions about this later, also.

    <3
  • edited April 2013
    You'll get errors using that exact code: you'll get "attempt to concatenate a nil value" errors when the table isn't fully populated (i.e. when you don't know all the runes). If you don't mind them being in one column, you can use 
    for _,r in pairs(runetable) do echo(r) end

    Alternatively, you could have, at the start, something like
    firstRune = runetable[1] or "unknown"
    secondRune = runetable[2] or "unknown"
    then just do
    echo("| "..firstRune.."   "..secondRune.. " |")
    (neaten it up first, of course).
  • KioKio
    edited April 2013
    Akyaevin said:
    You'll get errors using that exact code: you'll get "attempt to concatenate a nil value" errors when the table isn't fully populated (i.e. when you don't know all the runes). If you don't mind them being in one column, you can use 
    for _,r in pairs(runetable) do echo(r) end

    Alternatively, you could have, at the start, something like
    firstRune = runetable[1] or "unknown"
    secondRune = runetable[2] or "unknown"
    then just do
    echo("| "..firstRune.."   "..secondRune.. " |")
    (neaten it up first, of course).
    I'll try the second, as I have no idea how to make sense of the first.

    Also, I put this in the echo part, correct?  This is saying that if the variable has not been defined, it will show "unknown," but if it is defined in the table, it will show "firstrune," correct?
Sign In or Register to comment.