View Single Post
05-25-09, 08:36 PM   #6
Yhor
A Pyroguard Emberseer
 
Yhor's Avatar
Join Date: May 2007
Posts: 1,077
I don't play WoW anymore, but looking at the .lua, it shouldn't be terribly hard. I have a couple questions, though.

1) With a database the size of 2500, I think there could be some nice potential for a "calendar base", plus optional 'random facts'. Meaning, the first 365 or 730 (if you want to do even/odd years) would be the actual "fact of the day" and the remainder would be the random facts. Just by looking at the .lua
Code:
 if cmd == "next" then 
            FactDB.Count = FactDB.Count + 1
            Facts_ShowFact()
        end
... it appears the database is numbered, or it could be, or it may not make a difference if it is or not.. point being, facts in the base facts can be assigned. The random facts could then be used for whispers. It could possibly hook into the calendar for this, which would keep 'everyone's' fact of the day "synced". This would be out of my scope of reality, though, considering I don't play anymore (and I'm also a newb at coding ).

2) Could it be as simple as adding a -sendchatMessage "/fact next"- after each whisper you respond to? You would lose the current fact of the day for those who missed it, and if you wanted to fetch it, it may prove to be a pain, if database facts are unassigned. It would only advance after the first person who whispers you, though. It also may be as simple as "/fact next -1", assuming that is a valid command (I can't test, if I could, a lot of this tl;DR would be shorter).

If number 2) is fine, try editing the .lua in the last few lines to this..(remember to backup your working version, if you are forgetful.
Code:
end

function Facts_OnEvent(msg, sender)  -- has someone whispered me the key command?
    if msg == key  then
        Facts_ShowFact(sender)
        sendchatMessage "/fact next"
    end
end
I'll keep an eye on the thread to see how it comes along, just in case I can help (it looks like a really fun addon, I wish addons were possible in LOTRO ).


Well, Akryn beat me up, err, beat me to it.... and I'd trust them more than me, anyway.

Last edited by Yhor : 05-25-09 at 08:38 PM. Reason: Akryn beat me up
  Reply With Quote