I got it to work, Made my own script now. And it works like a dream, If anyone of you might want this script. Give me a message![]()
I got it to work, Made my own script now. And it works like a dream, If anyone of you might want this script. Give me a message![]()
Last edited by Stridharn; 07-06-2010 at 10:57 AM.
here:
Code:local timebetweenannounce = 3500 --Time between messeges the NPC sends local restarttime = 12000 --How long you want until it restarts all over again. local npcid = 998802 --The NPC's ID --Change the folowing text to whatever you want local message1 = "MESSSAGE1" local message2 = "MESSSAGE2" local message3 = "MESSSAGE3" local message4 = "MESSSAGE4" local message5 = "MESSSAGE5" function Announcer_Yell(pUnit, Event) pUnit:SendChatMessage(12, 0, message1) pUnit:RemoveEvents(); pUnit:RegisterEvent("Announcer2_Yell", timebetweenannounce, 0) end function Announcer2_Yell(pUnit, Event) pUnit:SendChatMessage(12 ,0, message2) pUnit:RemoveEvents(); pUnit:RegisterEvent("Announcer3_Yell", timebetweenannounce, 0) end function Announcer3_Yell(pUnit, Event) pUnit:SendChatMessage(12, 0, message3) pUnit:RemoveEvents(); pUnit:RegisterEvent("Announcer4_Yell", timebetweenannounce, 0) end function Announcer4_Yell(pUnit, Event) pUnit:SendChatMessage(12, 0, message4) pUnit:RemoveEvents(); pUnit:RegisterEvent("Announcer5_Yell", timebetweenannounce, 0) end function Announcer5_Yell(pUnit, Event) pUnit:SendChatMessage(12, 0, message5) pUnit:RemoveEvents(); pUnit:RegisterEvent("Announcer2_Yell", restarttime, 0) end function Announcer_Start(pUnit, Event) pUnit:RegisterEvent("Announcer_Yell", 1000, 0) end RegisterUnitEvent(npcid, 6, "Announcer_Start")
I love you!
+Rep Added to you good sir!![]()
@onlykl
thats one way
@stridharn
i'll see what i can do :P
Thanks Stridharn...
@NerieX well there is other way with mathematic selection between 1,2,3,4,5 message ... But i dont remeber how it should be because i didnt made anything with lua long time :P
Ah crap, I feel like a total idiot for this. I can't get it to work for some reason.
Here's what i've been changing;
Thanks for helping me out, Once again.Code:local timebetweenannounce = 3500 --Time between messeges the NPC sends local restarttime = 12000 --How long you want until it restarts all over again. local npcid = 295 --The NPC's ID --Change the folowing text to whatever you want local message1 = "Welcome to the Goldshire Inn, Take your time to look around!" local message2 = "We have one of the best collections of ale in all of Azeroth!" local message3 = "It costs 2 gold coins to stay the night!" local message4 = "Feel free to tell your friends about the inn, I'm sure they'll enjoy it just as much as you do!" local message5 = "Go say hello to the chef, He's in the kitchen making your meal as we speak!" function Announcer_Yell(pUnit, Event) pUnit:SendChatMessage(12, 0, message1) pUnit:RemoveEvents(); pUnit:RegisterEvent("Announcer2_Yell", timebetweenannounce, 0) end function Announcer2_Yell(pUnit, Event) pUnit:SendChatMessage(12 ,0, message2) pUnit:RemoveEvents(); pUnit:RegisterEvent("Announcer3_Yell", timebetweenannounce, 0) end function Announcer3_Yell(pUnit, Event) pUnit:SendChatMessage(12, 0, message3) pUnit:RemoveEvents(); pUnit:RegisterEvent("Announcer4_Yell", timebetweenannounce, 0) end function Announcer4_Yell(pUnit, Event) pUnit:SendChatMessage(12, 0, message4) pUnit:RemoveEvents(); pUnit:RegisterEvent("Announcer5_Yell", timebetweenannounce, 0) end function Announcer5_Yell(pUnit, Event) pUnit:SendChatMessage(12, 0, message5) pUnit:RemoveEvents(); pUnit:RegisterEvent("Announcer2_Yell", restarttime, 0) end function Announcer_Start(pUnit, Event) pUnit:RegisterEvent("Announcer_Yell", 1000, 0) end RegisterUnitEvent(npcid, 6, "Announcer_Start")
Last edited by Stridharn; 07-05-2010 at 11:59 AM.
What it say?? when you start arcemu-world.exe?
It doesn't tell me that there is any error etc. It all starts and loads successfully.
It just doesn't work In-game.
Thanks!
hmm idk whats wrong
Alright, Thanks anyways![]()
if there is no Lua error in the console then the script wasn't scripted correctly to do what you want it to, sorry but i have no idea what's wrong with the script
Alright Elidan0, Thanks for atleast taking a look at it
I'll try to script something myself, I'll reply to this thread when I'm done!
---------- Post added at 01:08 PM ---------- Previous post was at 12:54 PM ----------
Alright, Finished my script off, This is what it looks like:
Tried it at my server, It doesn't work.Code:function InnkeeperStart(Unit, Event) Unit:SendChatMessage(12, 0, "Welcome to the Lion's Pride Inn!") Unit:RemoveEvents(); Unit:RegisterEvent("InnkeeperFirst", 16000, 0) end function InnkeeperFirst(Unit, Event) Unit:SendChatMessage(12, 0, "Is this your first stay at the Lion's Pride Inn?") Unit:RemoveEvents(); Unit:RegisterEvent("InnkeeperSecond", 16000, 0) end function InnkeeperSecond(Unit, Event) Unit:SendChatMessage(12, 0, "We have the finest collection of ale, In all of Azeroth!") Unit:RemoveEvents(); Unit:RegisterEvent("InnkeeperThird", 16000, 0) end function InnkeeperThird(Unit, Event) Unit:SendChatMessage(12, 0, "Take some time and have a look around, You never know what you might find!") Unit:RemoveEvents() Unit:RegisterEvent("InnkeeperEnd", 10000, 0) end function InnkeeperEnd(Unit, Event) Unit:RegisterEvent("InnkeperStart", 3000, 0) end RegisterUnitEvent(295, 6, "InnkeeperStart")
I can't understand why though.
Last edited by Stridharn; 07-05-2010 at 01:10 PM.
shouldn't it be like this?
im not a Lua expert but i think thats how its supposed to be :PCode:local timebetweenannounce = 3500; --Time between messeges the NPC sends local restarttime = 12000; --How long you want until it restarts all over again. local npcid = 295; --The NPC's ID --Change the folowing text to whatever you want local message1 = "Welcome to the Goldshire Inn, Take your time to look around!"; local message2 = "We have one of the best collections of ale in all of Azeroth!"; local message3 = "It costs 2 gold coins to stay the night!"; local message4 = "Feel free to tell your friends about the inn, I'm sure they'll enjoy it just as much as you do!"; local message5 = "Go say hello to the chef, He's in the kitchen making your meal as we speak!"; function Announcer_Yell(pUnit, Event) pUnit:SendChatMessage(12, 0, message1); pUnit:RemoveEvents(); pUnit:RegisterEvent("Announcer2_Yell", timebetweenannounce, 0); end function Announcer2_Yell(pUnit, Event) pUnit:SendChatMessage(12 ,0, message2); pUnit:RemoveEvents(); pUnit:RegisterEvent("Announcer3_Yell", timebetweenannounce, 0); end function Announcer3_Yell(pUnit, Event) pUnit:SendChatMessage(12, 0, message3); pUnit:RemoveEvents(); pUnit:RegisterEvent("Announcer4_Yell", timebetweenannounce, 0); end function Announcer4_Yell(pUnit, Event) pUnit:SendChatMessage(12, 0, message4); pUnit:RemoveEvents(); pUnit:RegisterEvent("Announcer5_Yell", timebetweenannounce, 0); end function Announcer5_Yell(pUnit, Event) pUnit:SendChatMessage(12, 0, message5); pUnit:RemoveEvents(); pUnit:RegisterEvent("Announcer2_Yell", restarttime, 0); end function Announcer_Start(pUnit, Event) pUnit:RegisterEvent("Announcer_Yell", 1000, 0); end RegisterUnitEvent(npcid, 6, "Announcer_Start");
I'll try that out right now NerieX, Thanks for the helping hand
---------- Post added at 01:21 PM ---------- Previous post was at 01:18 PM ----------
Didn't make a difference, Sadly. But thanks for trying to help, NerieX![]()
Here is something maded by Alvanaar
AnnouncerNPC_Config.lua: Lua | --[[ * Alvanaar's Announcer - Alvanaar - f58604fd8 - Pastebin.com
AnnouncerNPC_Main.lua: Lua | --[[ * Alvanaar's Announcer - Alvanaar - f6822f6ae - Pastebin.com