ArenaPedestal.lua 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. --[[
  2. Script Name : SpawnScripts/MakeshiftArena/ArenaPedestal.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.12.19 01:12:49
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SetTempVariable(NPC,"Starting","false")
  10. end
  11. function casted_on(NPC, Spawn, SpellName)
  12. if SpellName == 'Address the Audience' and not IsInCombat(Spawn)then
  13. local con = CreateConversation()
  14. AddConversationOption(con, "[Taunt the crowd]","Taunt")
  15. AddConversationOption(con, "[Show off your weapon]","Flex")
  16. AddConversationOption(con, "[Howl in anger]","Yell")
  17. AddConversationOption(con, "[Goof around]","Goof")
  18. StartDialogConversation(con, 1, NPC, Spawn, "You stand before a crowd of onlookers hoping to enjoy the sight of combat. How will you address them?")
  19. MoveToLocation(Spawn,7.23, 0.14, 5.61)
  20. SetHeading(Spawn,230)
  21. end
  22. end
  23. function Taunt(NPC,Spawn)
  24. PlayFlavor(Spawn,"","","taunt",0,0)
  25. AddTimer(NPC,2000,"Cheer",1,Spawn)
  26. AddTimer(NPC,5000,"Doors",1,Spawn)
  27. AddTimer(NPC,7000,"Bears",1,Spawn)
  28. SetAccessToEntityCommand(Spawn,NPC,"Address the Audience", 0)
  29. SpawnSet(NPC, "show_command_icon", 0)
  30. SpawnSet(NPC, "display_hand_icon", 0)
  31. CloseConversation(NPC,Spawn)
  32. PlaySound(Spawn,"sounds/e3_scripted/mage_ohh01.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  33. end
  34. function Flex(NPC,Spawn)
  35. PlayFlavor(Spawn,"","","brandish",0,0)
  36. AddTimer(NPC,2000,"Cheer",1,Spawn)
  37. AddTimer(NPC,5000,"Doors",1,Spawn)
  38. AddTimer(NPC,7000,"Bears",1,Spawn)
  39. SetAccessToEntityCommand(Spawn,NPC,"Address the Audience", 0)
  40. SpawnSet(NPC, "show_command_icon", 0)
  41. SpawnSet(NPC, "display_hand_icon", 0)
  42. CloseConversation(NPC,Spawn)
  43. PlaySound(Spawn,"sounds/e3_scripted/mage_ohh01.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  44. end
  45. function Yell(NPC,Spawn)
  46. PlayFlavor(Spawn,"","","howl",0,0)
  47. AddTimer(NPC,2000,"Cheer",1,Spawn)
  48. AddTimer(NPC,5000,"Doors",1,Spawn)
  49. AddTimer(NPC,7000,"Bears",1,Spawn)
  50. SetAccessToEntityCommand(Spawn,NPC,"Address the Audience", 0)
  51. SpawnSet(NPC, "show_command_icon", 0)
  52. SpawnSet(NPC, "display_hand_icon", 0)
  53. CloseConversation(NPC,Spawn)
  54. PlaySound(Spawn,"sounds/e3_scripted/mage_ohh01.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  55. end
  56. function Goof(NPC,Spawn)
  57. PlayFlavor(Spawn,"","","neener",0,0)
  58. AddTimer(NPC,2000,"Cheer",1,Spawn)
  59. AddTimer(NPC,5000,"Doors",1,Spawn)
  60. AddTimer(NPC,7000,"Bears",1,Spawn)
  61. SetAccessToEntityCommand(Spawn,NPC,"Address the Audience", 0)
  62. SpawnSet(NPC, "show_command_icon", 0)
  63. SpawnSet(NPC, "display_hand_icon", 0)
  64. CloseConversation(NPC,Spawn)
  65. PlaySound(Spawn,"sounds/e3_scripted/mage_ohh01.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  66. end
  67. function Cheer(NPC,Spawn)
  68. PlaySound(NPC,"sounds/widgets/ecology_city_sounds/ecology_crowd_clap001.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  69. end
  70. function Doors(NPC,Spawn)
  71. PlaySound(NPC,"sounds/widgets/doors/door_mech_close001.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  72. SendPopUpMessage(Spawn,"Doors to north open revealing your first opponents",250,250,250)
  73. end
  74. function Bears(NPC,Spawn)
  75. zone = GetZone(NPC)
  76. Bear1 = GetSpawnByLocationID(zone,133781388)
  77. Bear2 = GetSpawnByLocationID(zone,133781389)
  78. if GetSpawnByGroupID(zone, 1053519) ==nil then
  79. SpawnGroupByID(zone,1053519)
  80. end
  81. end
  82. function respawn(NPC)
  83. spawn(NPC)
  84. end