FluwkowirHaggleton.lua 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. --[[
  2. Script Name : SpawnScripts/Oakmyst/FluwkowirHaggleton.lua
  3. Script Purpose : Fluwkowir Haggleton
  4. Script Author : Scatman
  5. Script Date : 2009.05.03
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local QUEST_FROM_JORN = 5220
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange")
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function InRange(NPC, Spawn)
  16. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/fluwkowir_haggleton/qey_adv01_oakmyst_revamp/qst_fluwkowir_wrongway_52d5c902.mp3", "Ooops, I think I was going the other way.", "wince", 2064229810, 2868860860, Spawn)
  17. AddTimer(NPC,2500,"waypoints",1)
  18. end
  19. function waypoints(NPC)
  20. MovementLoopAddLocation(NPC, 1025.74, -0.17, -377.00, 5, 0)
  21. MovementLoopAddLocation(NPC, 1019.76, 1.17, -380.48, 5, 0)
  22. MovementLoopAddLocation(NPC, 1018.18, 2.25, -386.19, 6, 0)
  23. MovementLoopAddLocation(NPC, 1024.46, 4.02, -392.70, 6, 0)
  24. MovementLoopAddLocation(NPC, 1024.46, 4.02, -392.70, 5, 1,"DespawnHaggleton")
  25. end
  26. function DespawnHaggleton (NPC)
  27. Despawn(NPC)
  28. end
  29. function hailed(NPC, Spawn)
  30. FaceTarget(NPC, Spawn)
  31. conversation = CreateConversation()
  32. if HasQuest(Spawn, QUEST_FROM_JORN) and GetQuestStep(Spawn, QUEST_FROM_JORN) == 1 then
  33. JustLeaveMeAlone(NPC, Spawn, conversation)
  34. else
  35. end
  36. end
  37. function JustLeaveMeAlone(NPC, Spawn, conversation)
  38. AddConversationOption(conversation, "I need to talk to you.", "WhatAbout")
  39. StartConversation(conversation, NPC, Spawn, "Just leave me alone!")
  40. end
  41. function WhatAbout(NPC, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. conversation = CreateConversation()
  44. AddConversationOption(conversation, "It's about Jorn Sorefoot, the barbarian you were playing cards with.", "MakeAttackable")
  45. StartConversation(conversation, NPC, Spawn, "Bah! What about? I'm very busy, I don't need to waste my time talking to the likes of you.")
  46. end
  47. function MakeAttackable(NPC, Spawn)
  48. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/fluwkowir_haggleton/qey_adv01_oakmyst_revamp/qst_fluwkowir_attack_104162fd.mp3", "Oh no you don't! I won't go down!", "", 260519136, 2014641631, Spawn)
  49. SpawnSet(NPC, "attackable", 1)
  50. SpawnSet(NPC, "show_level", 1)
  51. AddHate(Spawn, NPC, 100)
  52. end
  53. function death(NPC, Spawn)
  54. if HasQuest(Spawn, QUEST_FROM_JORN) then
  55. -- Flukowir's Satchel
  56. SummonItem(Player, 6389)
  57. end
  58. end