MarjaniKenan.lua 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/MarjaniKenan.lua
  3. Script Purpose : Marjani Kenan
  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/optional2/kerran_eco_good_2/ft/kerran/kerran_eco_good_2_hail_gf_63881722.mp3", "I'm trying to find a new seasoning for my dried fish.", "ponder", 3322224010, 1564701262, Spawn)
  30. elseif choice == 2 then
  31. PlayFlavor(NPC, "voiceover/english/optional2/kerran_eco_good_2/ft/kerran/kerran_eco_good_2_hail_gf_eabd8556.mp3", "I heard the Ratonga play it for fun.", "shrug", 1138200584, 1711242450, Spawn)
  32. elseif choice == 3 then
  33. PlayFlavor(NPC, "voiceover/english/optional2/kerran_eco_good_2/ft/kerran/kerran_eco_good_2_hail_gf_4424ae28.mp3", "How sweet my Tom is to leave such a gift at my door step. ", "thanks", 2235953436, 2446050201, Spawn)
  34. elseif choice == 4 then
  35. PlayFlavor(NPC, "voiceover/english/optional2/kerran_eco_good_2/ft/kerran/kerran_eco_good_2_hail_gf_b155e999.mp3", "You won't see me near any of those fountains.", "no", 1123179326, 271243686, Spawn)
  36. elseif choice == 5 then
  37. PlayFlavor(NPC, "voiceover/english/optional2/kerran_eco_good_2/ft/kerran/kerran_eco_good_2_hail_gf_28445ab7.mp3", "I don't spend as much time grooming as the others say I do.", "sulk", 1571714850, 824504933, Spawn)
  38. end
  39. end