invisiblecube1.lua 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --[[
  2. Script Name : SpawnScripts/Baubbleshire/invisiblecube1.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.03.16 06:03:00
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 12, "InRange", "LeaveRange")
  10. end
  11. function InRange(NPC, Spawn) --Quest Callout
  12. --QUEST CHECK, CHECKS EACH RACE SUBURB
  13. if GetFactionAmount(Spawn,11)>-1 then
  14. if not HasQuest(Spawn,5760) and not HasCompletedQuest(Spawn, 5760) and
  15. not HasQuest(Spawn,5761) and not HasCompletedQuest(Spawn, 5761) and
  16. not HasQuest(Spawn,5762) and not HasCompletedQuest(Spawn, 5762) and
  17. not HasQuest(Spawn,5763) and not HasCompletedQuest(Spawn, 5763) and
  18. not HasQuest(Spawn,5764) and not HasCompletedQuest(Spawn, 5764) and
  19. not HasQuest(Spawn,5765) and not HasCompletedQuest(Spawn, 5765) and
  20. --QUEST CHECK FOR ISLE OF REFUGE QUEST AND OFFERED QUEST
  21. not HasQuest(Spawn, 5717) and not HasQuest(Spawn, 5792) then
  22. OfferQuest(NPC,Spawn,5792)
  23. conversation = CreateConversation()
  24. PlayFlavor(Spawn, "voiceover/english/queen_antonia_bayle/qey_north/antonia_isle_speech_9.mp3", "", "", 2292019727, 2112049669, Spawn)
  25. AddConversationOption(conversation, " ")
  26. StartDialogConversation(conversation, 1, NPC, Spawn, "The voice of Queen Antonia Bayle enters your mind as you step forward... \n\n\"Prepare yourself. When you enter the city gates, you accept the challenge of citizenship.\"")
  27. end
  28. end
  29. end
  30. function respawn(NPC)
  31. spawn(NPC)
  32. end