Advertisement
Guest User

What I want for Winters Veil

a guest
Dec 19th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.62 KB | None | 0 0
  1. performLine={"s The trees are out.",3,"s All scattered about.",3,"s The snow falls silently,",2,"s wildly.",3,"s On this perfect winter's day.",3,"s So spread the cheer,",3,"s Winter Veil is here!",0,"d cheer",2,"e | The music starts to pick up pace, becoming more cheerful and upbeat. Yasmine lets loose and starts to jig her hips to the beat before returning to singing her song.",2,"s I can't wait, it's finally here.",3,"s And i can finally walk out and hear.",3,"s The bells for Winter veil are coming.",3,"s All the birds around are humming.",3,"s The children will not need to fear,",3,"s because Winter veil is here!",0,"d cheer",3,"s Before me i see, a great big feast,",3,"s that could only be eaten by a huge beast!",3,"s The cranberry sauce, the turkey, the stuffing galore!",3,"s My it is only what one could ask for.",3,"s The candles, the lights, they are all so bright.",3,"s To spread the happiness of all these upcoming nights!",3,"s So people shan't disappear,",3,"s because Winter veil is here!",0,"d cheer",3,"zw All come out onto stage and tilt towards facing Yasmine.",3,"s Sparkles, what do you want for Winter veil?",3,"q1s Erm, oh yes i want a male draenei!",3,"d facepalm",0,"q2d facepalm",2,"s Moving on!",3,"s Pan, what do you want for Winter veil?",3,"q2s I want a lovely dress,",3,"q2s one that stands out from the rest.",3,"q1s What do you want for Winter Veil Yasmine?",3,"s Me? I want a dazzling ring,",3,"s One that gives me a status of bling.",0,"zw All face foward.",3,"zs Getting presents isn't everything about Winter veil.",3,"s It is about showing love.",1,"q1s Kindness.",1,"q2s Respect.",3,"s So spread the cheer,",3,"zs Winter veil is here!",3,"zd bow"};
  2.  
  3. thisDancer={"yasmine","Daxina","Panmaelon",""};
  4. local lineTotal = 45;
  5. local lineCurrent = 1;
  6.  
  7. buzzchannel="Fableperform";
  8. local fablePerformCode = "!@#";
  9. local fableReadyRequestCode = "@&!";
  10. local fableReadyRespondCode = "*^!";
  11.  
  12. function ensureChannel()
  13. id, name = GetChannelName(buzzchannel);
  14. if (id == 0 and name == nil) then
  15. JoinChannelByName(buzzchannel);
  16. GHI_Message("Joined "..buzzchannel.." - ensure it's not visible.");
  17. end
  18. end
  19.  
  20. function stripRealm(player)
  21. local split = string.find(player,"-");
  22. return strsub(player,0,split-1);
  23. end
  24.  
  25. function sendPerformMessage(player, text)
  26. ensureChannel();
  27. id, name = GetChannelName(buzzchannel);
  28. if (id > 0 and name ~= nil) then
  29. SendChatMessage(fablePerformCode..player.."@"..text, "CHANNEL", nil, id);
  30. end
  31. end
  32.  
  33. function sendReadyCheckMessage(player)
  34. ensureChannel();
  35. id, name = GetChannelName(buzzchannel);
  36. if (id > 0 and name ~= nil) then
  37. SendChatMessage(fableReadyRequestCode..player, "CHANNEL", nil, id);
  38. end
  39. end
  40.  
  41. function AutoPlay()
  42. local info = ChatTypeInfo["YELL"];
  43. if GHI_CountBuffs("Performing") > 0 then
  44. if strsub(performLine[lineCurrent],0,1) == "z" then
  45. performLine[lineCurrent] = strsub(performLine[lineCurrent],2);
  46. for i=2,noDancers do
  47. sendPerformMessage(thisDancer[i], performLine[lineCurrent]);
  48. end
  49. end
  50. if strsub(performLine[lineCurrent],0,1) == "q" then
  51. local tempVal = (strsub(performLine[lineCurrent],2,2)-1)+2;
  52. sendPerformMessage(thisDancer[tempVal], strsub(performLine[lineCurrent],3));
  53. elseif strsub(performLine[lineCurrent],0,1) == "s" then
  54. SendChatMessage(strsub(performLine[lineCurrent],3),"SAY",nil,nil);
  55. elseif strsub(performLine[lineCurrent],0,1) == "e" then
  56. SendChatMessage(strsub(performLine[lineCurrent],3),"EMOTE",nil,nil);
  57. elseif strsub(performLine[lineCurrent],0,1) == "y" then
  58. SendChatMessage(strsub(performLine[lineCurrent],3),"YELL",nil,nil);
  59. elseif string.lower(strsub(performLine[lineCurrent],0,1)) == "d" then
  60. GHI_Emote(strsub(performLine[lineCurrent],3),0,"none");
  61. else
  62. NEW_DANCE_OOC(strsub(performLine[lineCurrent],3));
  63. end
  64.  
  65. if lineCurrent < ((lineTotal*2)-1) then
  66. local pauseTime=(performLine[lineCurrent+1]-1)+1;
  67. lineCurrent = lineCurrent+2;
  68. GHI_DoScript("AutoPlay()",pauseTime);
  69. else
  70. GHI_RemoveBuff("Performing", "Helpful");
  71. GHI_Message("Performance finished!");
  72. end
  73. else
  74. GHI_Message("Performance interrupted!");
  75. end
  76. end
  77.  
  78. function NEW_DANCE_OOC(message)
  79. local info = ChatTypeInfo["YELL"];
  80. GHI_Message(message);
  81. UIErrorsFrame:AddMessage(message, info.r, info.g, info.b, info.id);
  82. end
  83.  
  84. function SNGPLY_RESPOND(self, event, arg1, arg2, ...)
  85. if fableReadyRespondCode==strsub(arg1,1,3) then
  86. arg2 = stripRealm(arg2);
  87. local count = 0;
  88. for i=2,noDancers do
  89. if arg2==thisDancer[i] then
  90. dancerStatus[i] = 1;
  91. GHI_Message(arg2.." ready!");
  92. end
  93. count = count + dancerStatus[i];
  94. end
  95. if count == noDancers-1 then
  96. GHI_Message("Everyone's ready! Click to begin!");
  97. NEW_DANCE_GO = 1;
  98. end
  99. end
  100. end
  101.  
  102. if SNGPLY_ACTIVE==nil or SNGPLY_ACTIVE==0 then
  103. SNGPLY_ACTIVE=1;
  104. SNGPLY_LISTENER=CreateFrame("Frame",nil,UIParent);
  105. SNGPLY_LISTENER:SetScript("OnEvent",function(...) SNGPLY_RESPOND(...) end);
  106. SNGPLY_LISTENER:RegisterEvent("CHAT_MSG_CHANNEL");
  107. end
  108.  
  109. if NEW_DANCE_GO == nil then
  110. noDancers=3;
  111. dancerStatus={0,0,0,0};
  112. GHI_Message("Checking for performers...");
  113. for i=2,noDancers do
  114. dancerStatus[i] = 0;
  115. GHI_Message("sendReadyCheckMessage("..thisDancer[i]..")");
  116. GHI_DoScript("sendReadyCheckMessage(thisDancer["..i.."])",i-1);
  117. end
  118. else
  119. NEW_DANCE_GO = nil;
  120. GHI_ApplyBuff("Performing", "Performing with skill!", "Interface\\Icons\\ability_hunter_displacement", true, "Helpful", "Magic", 0, true, false, 1, 0, 0,1);
  121. GHI_DoScript("AutoPlay()", 2);
  122. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement