9
3

GetheHuggs.lua 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. --[[
  2. Script Name: GetheHuggs.lua
  3. Script Purpose: Collections for evil island
  4. Script Author: John Adams
  5. Script Date: 2008.09.02
  6. Script Notes: Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local GetheHuggs = 2780039
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 25, "InRange")
  11. MovementLoopAddLocation(NPC, 5.65, -6.50, 208.26, 2, 10, "Gather")
  12. MovementLoopAddLocation(NPC, 0.71, -5.83, 198.18, 2, 10, "Gather")
  13. MovementLoopAddLocation(NPC, 10.66, -6.90, 200.55, 2, 10, "Gather")
  14. MovementLoopAddLocation(NPC, 18.65, -6.87, 194.36, 2, 10, "Gather")
  15. MovementLoopAddLocation(NPC, 26.80, -6.86, 187.05, 2, 10, "Gather")
  16. MovementLoopAddLocation(NPC, 31.08, -6.24, 197.45, 2, 10, "Gather")
  17. MovementLoopAddLocation(NPC, 9.11, -6.80, 206.29, 2, 10, "Gather")
  18. -- return to spawn point and hang out.
  19. MovementLoopAddLocation(NPC, -6.18, -4.96, 218.46, 2, 0)
  20. MovementLoopAddLocation(NPC, -5.91, -4.96, 218.24, 2, 30)
  21. end
  22. function InRange(NPC, Spawn)
  23. end
  24. function hailed(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. conversation = CreateConversation()
  27. local choice = MakeRandomInt(1, 3)
  28. if choice == 1 then
  29. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1003.mp3", "", "", 0, 0, Spawn)
  30. AddConversationOption(conversation, "What Collections?","WhatCollections")
  31. elseif choice == 2 then
  32. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1003.mp3", "", "", 0, 0, Spawn)
  33. AddConversationOption(conversation, "What Collections?","WhatCollections")
  34. elseif choice == 3 then
  35. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1003.mp3", "", "", 0, 0, Spawn)
  36. AddConversationOption(conversation, "What Collections?","WhatCollections")
  37. end
  38. if HasCollectionsToHandIn(Spawn) then
  39. AddConversationOption(conversation, "I have a collection for you.", "dlg_8_1")
  40. end
  41. AddConversationOption(conversation, "I don't have any at the moment.")
  42. StartConversation(conversation, NPC, Spawn, "Hello there! If you have any collections that you've completed, I can take them off your hands and reward you for your time. I'm just crazy for collections!")
  43. end
  44. function dlg_8_1(NPC, Spawn)
  45. FaceTarget(NPC, Spawn)
  46. HandInCollections(Spawn)
  47. SpawnSet(NPC, "visual_state", 0)
  48. conversation = CreateConversation()
  49. AddConversationOption(conversation, "Okay, bye!")
  50. StartConversation(conversation, NPC, Spawn, "This is a magnificent find! Here, take this for all your hard work.")
  51. end
  52. function WhatCollections(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. conversation = CreateConversation()
  55. AddConversationOption(conversation, "I'll keep that in mind.")
  56. StartConversation(conversation, NPC, Spawn, "Why, any sort of collection. There's so much out there to find! Just open your eyes and peek under the rocks. If you find anything interesting, let me have a look. Collecting is the only way I seem to relive my youth!")
  57. end
  58. function Gather(NPC)
  59. GatherSpawn = GetSpawn(NPC, GetheHuggs ) -- Get Gethe Huggs
  60. SpawnSet(GatherSpawn, "visual_state", "2809") -- Start gathering
  61. AddTimer(NPC, 5000, "stop_gathering") -- for 5 seconds, then stop
  62. end
  63. function stop_gathering(NPC)
  64. GatherSpawn = GetSpawn(NPC, GetheHuggs ) -- get Gethe Huggs
  65. SpawnSet(GatherSpawn, "visual_state", "0") -- Stop her from gathering
  66. end
  67. function respawn(NPC)
  68. spawn(NPC)
  69. end