KumbufuAri.lua 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/KumbufuAri.lua
  3. Script Purpose : Kumbufu Ari <Weaponsmith>
  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 choice = math.random(0, 100)
  16. if choice <= 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, 6)
  28. if choice == 1 then
  29. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/service/weaponsmith/kerran_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", 3547253110, 2896491555, Spawn)
  30. elseif choice == 2 then
  31. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/service/weaponsmith/kerran_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!", "ponder", 4263084610, 4279030372, Spawn)
  32. elseif choice == 3 then
  33. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/service/weaponsmith/kerran_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", 2923552658, 290527830, Spawn)
  34. elseif choice == 4 then
  35. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/service/weaponsmith/kerran_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.", "scold", 1978098526, 3344178102, Spawn)
  36. elseif choice == 5 then
  37. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/service/weaponsmith/kerran_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", 3072112550, 2391899341, Spawn)
  38. elseif choice == 6 then
  39. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/service/weaponsmith/kerran_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.", "scold", 1978098526, 3344178102, Spawn)
  40. end
  41. end