DirkVagrin.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/DirkVagrin.lua
  3. Script Purpose : Dirk Vagrin
  4. Script Author : Scatman
  5. Script Date : 2009.08.12
  6. Script Notes :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function InRange(NPC, Spawn)
  15. local chance = math.random(0, 100)
  16. if chance <= 25 then
  17. FaceTarget(NPC, Spawn)
  18. PlayFlavor(NPC, "voiceover/english/dirk_vagrin/qey_village01/qey_village01_dirk_vagrin_callout_ab43615b.mp3", "Ehh? Who goes there? You looking for adventure? I bet my shinys will tempt you!", "boggle", 2386377043, 3237731304, Spawn)
  19. end
  20. end
  21. function LeaveRange(NPC, Spawn)
  22. end
  23. function hailed(NPC, Spawn)
  24. FaceTarget(NPC, Spawn)
  25. local choice = math.random(1, 2)
  26. if choice == 1 then
  27. PlayFlavor(NPC, "voiceover/english/dirk_vagrin/qey_village01/qey_village01_dirk_vagrin_multhail2_be08c03e.mp3", "Bah! Off with ye! These barrels are mine! Mine!", "", 4248926679, 4124146023, Spawn)
  28. elseif choice == 2 then
  29. PlayFlavor(NPC, "voiceover/english/dirk_vagrin/qey_village01/qey_village01_dirk_vagrin_multhail1_e70947c7.mp3", "Bah! Go away or I'll ... I'll ... I don't know. Just go away!", "", 3343827845, 2701332902, Spawn)
  30. end
  31. end