MuginSplitshin.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --[[
  2. Script Name : SpawnScripts/Baubbleshire/MuginSplitshin.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.10.26 03:10:27
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  10. SetInfoStructString(NPC, "action_state", "tapfoot")
  11. end
  12. function InRange(NPC, Spawn)
  13. if math.random(1,100) <15 then
  14. if GetFactionAmount(Spawn,11) >0 then
  15. PlayFlavor(NPC, "voiceover/english/halfling_eco_good_1/ft/service/weaponsmith/halfling_weaponsmith_service_good_1_aoi_gm_cc3887ba.mp3", "It's the duty of all citizens to protect the innocent. Purchase your weapons here for the honor of Qeynos.", "brandish", 259815311, 2474436962, Spawn)
  16. end
  17. end
  18. end
  19. function hailed(NPC, Spawn)
  20. FaceTarget(NPC, Spawn)
  21. local choice = MakeRandomInt(1,4)
  22. if choice == 1 then
  23. PlayFlavor(NPC, "voiceover/english/gnome_eco_good_1/ft/service/weaponsmith/gnome_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", 1420367370, 281045768, Spawn, 0)
  24. elseif choice == 2 then
  25. PlayFlavor(NPC, "voiceover/english/gnome_eco_good_1/ft/service/weaponsmith/gnome_weaponsmith_service_good_1_hail_gm_48594671.mp3", "Is there something you need to have custom made? I can see if I can get one of my lads to look into it!", "smile", 990534064, 1871659860, Spawn)
  26. elseif choice == 3 then
  27. PlayFlavor(NPC, "voiceover/english/gnome_eco_good_1/ft/service/weaponsmith/gnome_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.", "brandish", 3060803810, 2289579153, Spawn)
  28. elseif choice == 4 then
  29. PlayFlavor(NPC, "voiceover/english/gnome_eco_good_1/ft/service/weaponsmith/gnome_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", 2730095756, 1896311415, Spawn, 0)
  30. else
  31. end
  32. end
  33. function respawn(NPC)
  34. spawn(NPC)
  35. end