GarionDunam.lua 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/GarionDunam.lua
  3. Script Purpose : Garion Dunam <Alchemist>
  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. Talk(NPC, Spawn)
  18. end
  19. end
  20. function LeaveRange(NPC, Spawn)
  21. end
  22. function hailed(NPC, Spawn)
  23. Talk(NPC, Spawn)
  24. end
  25. function Talk(NPC, Spawn)
  26. FaceTarget(NPC, Spawn)
  27. local choice = math.random(1, 5)
  28. if choice == 1 then
  29. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/alchemist/human_alchemist_service_good_1_hail_gm_a8ed74c7.mp3", "There are no refunds for caster error at this shop! Oh ... hello you're not here about a refund.", "no", 383508519, 1836231230, Spawn)
  30. elseif choice == 2 then
  31. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/alchemist/human_alchemist_service_good_1_hail_gm_59de96bd.mp3", "What happened to the highly explosive bottle that was on my desk? Have you seen it?", "peer", 1482977865, 753937939, Spawn)
  32. elseif choice == 3 then
  33. PlayFlavor(NPC, "", "Garion is my name, potions my game. What can I get for you?", "", 1689589577, 4560189, Spawn)
  34. elseif choice == 4 then
  35. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/alchemist/human_alchemist_service_good_1_hail_gm_ec533e4c.mp3", "Are you wounded? I just made up a fresh batch of healing potions an hour ago.", "hello", 3929603973, 2846331407, Spawn)
  36. elseif choice == 5 then
  37. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/alchemist/human_alchemist_service_good_1_hail_gm_efd903ba.mp3", "Hello, adventurer! Are you looking for a specific potion or ingredient?", "agree", 3478121196, 1626504328, Spawn)
  38. end
  39. end