Why / command not doing anything? - WoWInterface
Thread Tools Display Modes
08-08-21, 10:06 AM   #1
A Warpwood Thunder Caller
hasnogaems's Avatar
Join Date: Apr 2016
Posts: 93
Why / command not doing anything?

Not even any error.
It like it not registered at all.
TheEarthFather = { }

function TheEarthFather:Greet(channel)
    local allgreetings = {
        "Peace, friend.",
        "You wish to speak?",
        "How may I aid you?",
        "What brings you here?",
        "Ah, I've been expecting you.",
        "Well met.",
        "Greetings, traveler.",
        "The winds guide you.",
        "I've been expecting you."
        "Speak friend.",
        "For the Horde!",
        "Blood and thunder!",
        "Strength and honor!",
        "Thrall hall!",
        "What do you need?",
        "What can I help you with?",
        "What do you need?",
        "Anaria shola.",
        "Bal'a dash, malanore.",
        "We will persevere!",
        "Our enemies will fall!",
        "Victory lies ahead!",
        "Anu belore dela'na.",
        "What business have you?",
        "Glory to the sin'dorei.",
        "State your business.",
        "The eternal sun guides us.",
        "The dark times will pass."
        "What do you require?",
        "This had better be good.",
        "What is it?",
        "Speak quickly.",
        "I'm listening.",
        "What do you ask of death?",
        "We are Forsaken.",
        "I am Forsaken.",
        "What now?!",
        "And you are...?"
        "Talk to me.",
        "Eh there.",
        "Who you be?",
        "Hello mon.",
        "Greetings mon.",
        "What be on ya mind?",
        "How ya doing mon?",
        "Lo' mon.",
        "Don't be shy.",
        "What'chu want?",
        "You come get da Voodoo."
        "Hello there.",
        "Light be with you.",
        "What can I do for you?",
        "Well met.",
        "Need help?",
        "King's honor, friend.",
        "You need somethin'?",
        "Can I help you?",
        "How are you?",
        "Hey there.",
        "Good day to you."
        "Hey there!",
        "Ya got my attention.",
        "How are ya?",
        "Talk to me.",
        "Well met.",
        "What's on your mind?",
        "Great tae meet ya.",
        "What can I do fer ya?",
        "Interest ya'n a pint?",
        "Honored, I'm sure.",
        "Good day to you.",
        "My, you're a tall one!",
        "Hmmm, interesting.",
        "Pleased to meet you!",
        "Can I help you?",
        "Very good.",
        "Need assistance?"
        "Blessings upon you.",
        "Archenon poros.",
        "Krona ki cristorr!",
        "May the light embrace you.",
        "The Naaru have not forgotten us.",
        "Each day is a blessing.",
        "Good fortune!",
        "Open your heart to the light.",
        "The Legion will fall.",
        "The Legion's end draws near.",
        "Warm wishes to you."
        "Elune be with you.",
        "Elune light your path.",
        "I am listening.",
        "I am honored.",
        "What brings you here?",
        "I am listening.",
        "Peace be with you."
if channel == 'say' then     
     SendChatMessage(allgreetings[math.random(100)], "SAY")
        elseif channel == 'party' then
            SendChatMessage(allgreetings[math.random(100)], "PARTY")

function TheEarthFather:Dismiss(channel)
    local alldismiss = {
        "Walk with the Earth Father.",
        "Winds be at your back.",
        "Go in peace.",
        "May the eternal sun shine upon thee.",
        "Be careful.",
        "We shall meet again.",
        "Ancestors watch over you.",
        "For the Horde!",
        "Go forth to victory.",
        "Go with honor.",
        "Be safe.",
        "May your blades never dull."
        "We will have justice!",
        "Death to all who oppose us!",
        "The reckoning is at hand!",
        "Selama ashal'anore!",
        "Remember the Sunwell.",
        "Stay the course.",
        "Time is of the essence.",
        "Keep your wits about you.",
        "Hold your head high."
        "Dark Lady watch over you.",
        "Victory for Sylvanas.",
        "Watch your back.",
        "Trust no one.",
        "Do not seek death.",
        "Our time will come.",
        "Beware, our enemies abound.",
        "Beware the living.",
        "Remember, patience... discipline.",
        "Embrace the shadow."
        "Ookie Dookie.",
        "See ya layta.",
        "Stay away from the Voodoo.",
        "You be careful mon.",
        "Be seeing ya.",
        "Spirits be with ya mon."
        "Be careful.",
        "Go with honor, friend.",
        "Safe travels!",
        "For the Alliance.",
        "See you around.",
        "Light bless you.",
        "Have a good one."
        "Off with ye.",
        "Safe travels.",
        "Keep your feet on the ground.",
        "See ya soon.",
        "Watch yer back!",
        "Be good!"
        "You have a great day now.",
        "Very good.",
        "Very well then.",
        "Off and away.",
        "Be seeing you.",
        "Daylight's burning.",
        "Alrighty, then!"
        "May your days be long and your hardships few.",
        "Be well.",
        "Remember the lessons of the past.",
        "Do not lose faith.",
        "Dioniss aca.",
        "Be kind to those less fortunate.",
        "Favor the road traveled by few.",
        "Remain vigilant.",
        "Safe journey.",
        "Blessings upon your family.",
        "Good health, long life."
        "Be careful.",
        "Elune guide your path.",
        "Goddess watch over you.",
        "Till the next we meet.",
        "May the stars guide you.",
        "Go in peace.",
        "Good luck, friend.",

        if channel == 'say' then
            SendChatMessage(alldismiss[math.random(90)], "SAY")
        elseif channel == 'party' then
            SendChatMessage(alldismiss[math.random(90)], "PARTY")

SLASH_THEEARTHFATHER2 = "/theearthfather"

SlashCmdList.THEEARTHFATHER = function(msg, editbox)
    local arg1 = strsplit(" ", msg)
    local race = UnitRace("player")
    if msg == 'h' then
    elseif msg == 'b' then
    elseif msg == 'hp' then
    elseif msg == 'bp' then
        print(format("Syntax\n /tem h\n /tem hp\n /tem b\n /tem bp\n"))
  Reply With Quote
08-08-21, 11:57 AM   #2
Fishing Trainer
Seerah's Avatar
WoWInterface Super Mod
Join Date: Oct 2006
Posts: 10,853
Copied from one of the discord channels where you posted this same question.
Originally Posted by Seerah
Firstly, get your greeting/dismiss tables out of those function. With them there, you are recreating new instances of all of those tables every time you call each function.
Second, are you geting any errors? (Make sure Lua errors are enabled and you're not hiding them.)
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
08-08-21, 12:10 PM   #3
I did that?
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,450
You have several lines in your table(s) that aren't terminated with commas
"I've been expecting you."
being the first.

If you're not getting errors then there's something wrong with whatever debugger you are using.
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
08-08-21, 02:02 PM   #4
A Warpwood Thunder Caller
hasnogaems's Avatar
Join Date: Apr 2016
Posts: 93
Originally Posted by Fizzlemizz View Post
something wrong with whatever debugger you are using.
Wdym by that? I run "/tef b" in game. Is there other environment you can recommend?

U was right my scripterror cvar was set to 0.
And yes, commas!
You guys are the best

Last edited by hasnogaems : 08-08-21 at 02:06 PM.
  Reply With Quote
08-08-21, 02:39 PM   #5
A Molten Giant
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 590
The "SAY" channel is protected when not in an instance. What you are trying to do here will not work. You can still send to "PARTY" though. You can also send to "EMOTE" if you want, like SendChatMessage("says: See ya soon!", "EMOTE")
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Why / command not doing anything?

Thread Tools
Display Modes

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