GetheHuggs.lua 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. if HasCollectionsToHandIn(Spawn) then
  24. SpawnSet(NPC, "visual_state", 6674 )
  25. end
  26. end
  27. function hailed(NPC, Spawn)
  28. FaceTarget(NPC, Spawn)
  29. conversation = CreateConversation()
  30. local choice = MakeRandomInt(1, 3)
  31. if choice == 1 then
  32. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1003.mp3", "", "", 0, 0, Spawn)
  33. AddConversationOption(conversation, "What Collections?","WhatCollections")
  34. elseif choice == 2 then
  35. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1003.mp3", "", "", 0, 0, Spawn)
  36. AddConversationOption(conversation, "What Collections?","WhatCollections")
  37. elseif choice == 3 then
  38. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1003.mp3", "", "", 0, 0, Spawn)
  39. AddConversationOption(conversation, "What Collections?","WhatCollections")
  40. end
  41. if HasCollectionsToHandIn(Spawn) then
  42. AddConversationOption(conversation, "I have a collection for you.", "dlg_8_1")
  43. end
  44. AddConversationOption(conversation, "I don't have any at the moment.")
  45. 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!")
  46. end
  47. function dlg_8_1(NPC, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. HandInCollections(Spawn)
  50. SpawnSet(NPC, "visual_state", 0)
  51. conversation = CreateConversation()
  52. AddConversationOption(conversation, "Okay, bye!")
  53. StartConversation(conversation, NPC, Spawn, "This is a magnificent find! Here, take this for all your hard work.")
  54. end
  55. function WhatCollections(NPC, Spawn)
  56. FaceTarget(NPC, Spawn)
  57. conversation = CreateConversation()
  58. AddConversationOption(conversation, "I'll keep that in mind.")
  59. 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!")
  60. end
  61. function Gather(NPC)
  62. GatherSpawn = GetSpawn(NPC, GetheHuggs ) -- Get Gethe Huggs
  63. SpawnSet(GatherSpawn, "visual_state", "2809") -- Start gathering
  64. AddTimer(NPC, 5000, "stop_gathering") -- for 5 seconds, then stop
  65. end
  66. function stop_gathering(NPC)
  67. GatherSpawn = GetSpawn(NPC, GetheHuggs ) -- get Gethe Huggs
  68. SpawnSet(GatherSpawn, "visual_state", "0") -- Stop her from gathering
  69. end
  70. function respawn(NPC)
  71. spawn(NPC)
  72. end