9
3

VictorPedestal.lua 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. --[[
  2. Script Name : SpawnScripts/MakeshiftArena/VictorPedestal.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.12.19 03:12:10
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. zone = GetZone(NPC)
  10. StartPodium = GetSpawnByLocationID(zone,133781327)
  11. if StartPodium ~=nil then
  12. Despawn(StartPodium)
  13. end
  14. end
  15. function casted_on(NPC, Spawn, SpellName)
  16. if SpellName == 'Address the Audience' and not IsInCombat(Spawn)then
  17. local con = CreateConversation()
  18. AddConversationOption(con, "[Bow in victory]","Bow")
  19. AddConversationOption(con, "[Show off to the crowd]","Flex")
  20. AddConversationOption(con, "[Threaten all that challenge you]","Taunt")
  21. AddConversationOption(con, "[Blow your admirers a kiss]","Kiss")
  22. AddConversationOption(con, "[Jump for joy]","Goof")
  23. StartDialogConversation(con, 1, NPC, Spawn, "You were victorious! Proclaim yourself a true warrior.")
  24. MoveToLocation(Spawn,7.23, 0.14, 5.61)
  25. SetHeading(Spawn,230)
  26. end
  27. end
  28. function Taunt(NPC,Spawn)
  29. PlayFlavor(Spawn,"","","feint",0,0)
  30. AddTimer(NPC,2000,"Cheer",1,Spawn)
  31. SetAccessToEntityCommand(Spawn,NPC,"Address the Audience", 0)
  32. SpawnSet(NPC, "show_command_icon", 0)
  33. SpawnSet(NPC, "display_hand_icon", 0)
  34. CloseConversation(NPC,Spawn)
  35. PlaySound(Spawn,"sounds/e3_scripted/mage_ohh01.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  36. end
  37. function Bow(NPC,Spawn)
  38. PlayFlavor(Spawn,"","","bow",0,0)
  39. AddTimer(NPC,2000,"Cheer",1,Spawn)
  40. SetAccessToEntityCommand(Spawn,NPC,"Address the Audience", 0)
  41. SpawnSet(NPC, "show_command_icon", 0)
  42. SpawnSet(NPC, "display_hand_icon", 0)
  43. CloseConversation(NPC,Spawn)
  44. PlaySound(Spawn,"sounds/e3_scripted/mage_ohh01.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  45. end
  46. function Flex(NPC,Spawn)
  47. PlayFlavor(Spawn,"","","flex",0,0)
  48. AddTimer(NPC,2000,"Cheer",1,Spawn)
  49. SetAccessToEntityCommand(Spawn,NPC,"Address the Audience", 0)
  50. SpawnSet(NPC, "show_command_icon", 0)
  51. SpawnSet(NPC, "display_hand_icon", 0)
  52. CloseConversation(NPC,Spawn)
  53. PlaySound(Spawn,"sounds/e3_scripted/mage_ohh01.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  54. end
  55. function Kiss(NPC,Spawn)
  56. PlayFlavor(Spawn,"","","kiss",0,0)
  57. AddTimer(NPC,2000,"Cheer",1,Spawn)
  58. SetAccessToEntityCommand(Spawn,NPC,"Address the Audience", 0)
  59. SpawnSet(NPC, "show_command_icon", 0)
  60. SpawnSet(NPC, "display_hand_icon", 0)
  61. CloseConversation(NPC,Spawn)
  62. PlaySound(Spawn,"sounds/e3_scripted/mage_ohh01.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  63. end
  64. function Goof(NPC,Spawn)
  65. PlayFlavor(Spawn,"","","heelclick",0,0)
  66. AddTimer(NPC,2000,"Cheer",1,Spawn)
  67. SetAccessToEntityCommand(Spawn,NPC,"Address the Audience", 0)
  68. SpawnSet(NPC, "show_command_icon", 0)
  69. SpawnSet(NPC, "display_hand_icon", 0)
  70. CloseConversation(NPC,Spawn)
  71. PlaySound(Spawn,"sounds/e3_scripted/mage_ohh01.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  72. end
  73. function respawn(NPC)
  74. spawn(NPC)
  75. end
  76. function Cheer(NPC,Spawn)
  77. PlaySound(NPC,"sounds/widgets/ecology_city_sounds/ecology_crowd_cheer001.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  78. zone = GetZone(NPC)
  79. StartPodium = GetSpawnByLocationID(zone,133781404)
  80. if StartPodium ~=nil then
  81. Despawn(StartPodium)
  82. end
  83. if HasQuest(Spawn,5791) then
  84. SetStepComplete(Spawn,5791,3)
  85. end
  86. end