9
3

JarekOkelly.lua 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. --[[
  2. Script Name : SpawnScripts/QeynosHarbor/JarekOkelly.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.13 03:06:42
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  10. end
  11. function InRange(NPC, Spawn)
  12. if GetFactionAmount(Spawn,11) <0 then
  13. choice = math.random(1,2)
  14. FaceTarget(NPC, Spawn)
  15. if choice == 1 then
  16. PlayFlavor(NPC, "", "", "shakefist", 2088886924, 3736631596, Spawn)
  17. elseif choice == 2 then
  18. PlayFlavor(NPC, "", "", "heckno", 1584866727, 581589457, Spawn)
  19. end
  20. else
  21. if math.random(1,100)<60 then
  22. choice = math.random(1,2)
  23. FaceTarget(NPC, Spawn)
  24. if choice == 1 then
  25. PlayFlavor(NPC, "", "", "beckon", 2088886924, 3736631596, Spawn)
  26. elseif choice == 2 then
  27. PlayFlavor(NPC, "", "", "hello", 1584866727, 581589457, Spawn)
  28. end
  29. end
  30. end
  31. end
  32. function hailed(NPC, Spawn)
  33. FaceTarget(NPC, Spawn)
  34. local choice = MakeRandomInt(1,3)
  35. if choice == 1 then
  36. PlayFlavor(NPC, "voiceover/english/barbarian_eco_good_1/ft/service/weaponsmith/barbarian_weaponsmith_service_good_1_hail_gm_46ed66f6.mp3", "Never go into battle without a tried and trusted weapon. Take a look at what we have in stock.", "no", 2653334387, 1334351078, Spawn, 0)
  37. elseif choice == 2 then
  38. PlayFlavor(NPC, "voiceover/english/barbarian_eco_good_1/ft/service/weaponsmith/barbarian_weaponsmith_service_good_1_hail_gm_37dbcab8.mp3", "Welcome to my humble shop. We have quite a selection of weapons to choose from. See for yourself...", "salute", 581085624, 1350707041, Spawn, 0)
  39. elseif choice == 3 then
  40. PlayFlavor(NPC, "voiceover/english/barbarian_eco_good_1/ft/service/weaponsmith/barbarian_weaponsmith_service_good_1_hail_gm_1248b278.mp3", "I just got a shipment in from the Far Sea's Trading Company. I don't just show anybody this stuff so, shhhh! ", "wink", 4051219591, 539800994, Spawn, 0)
  41. end
  42. end
  43. function respawn(NPC)
  44. spawn(NPC)
  45. end