ZinunLoospakina.lua 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/ZinunLoospakina.lua
  3. Script Purpose : Zinun Loospakina <General Goods>
  4. Script Author : John Adams
  5. Script Date : 2008.09.23
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 11, "InRange", "LeaveRange")
  10. end
  11. function InRange(NPC, Spawn)
  12. if GetFactionAmount(Spawn,11)<0 then
  13. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  14. else
  15. chance = MakeRandomInt(0,100)
  16. if chance <= 30 then
  17. Talk(NPC, Spawn)
  18. end
  19. end
  20. end
  21. function hailed(NPC, Spawn)
  22. FaceTarget(NPC, Spawn)
  23. if GetFactionAmount(Spawn,11)<0 then
  24. PlayFlavor(NPC, "", "", "heckno", 0, 0, Spawn)
  25. else
  26. Talk(NPC, Spawn)
  27. end
  28. end
  29. function Talk(NPC, Spawn)
  30. FaceTarget(NPC, Spawn)
  31. choice = math.random(1,3)
  32. if choice == 1 then
  33. PlayFlavor(NPC, "voiceover/english/optional2/erudite_eco_good_2/ft/service/merchant/erudite_merchant_service_good_2_hail_gm_45d92a75.mp3", "Welcome! What can I help you with?", "bow", 4271285862, 1774320762, Spawn)
  34. elseif choice == 2 then
  35. PlayFlavor(NPC, "voiceover/english/optional2/erudite_eco_good_2/ft/service/merchant/erudite_merchant_service_good_2_hail_gm_24322c5d.mp3", "Greetings, friend traveler! We have the finest supplies to fill your adventuring needs.", "smile", 857840270, 941389485, Spawn)
  36. elseif choice == 3 then
  37. PlayFlavor(NPC, "voiceover/english/optional2/erudite_eco_good_2/ft/service/merchant/erudite_merchant_service_good_2_hail_gm_ae84abf9.mp3", "Go on, take a look at the stock. You'll never beat this price in the city. I guarantee it!", "wink", 2447200130, 2600666744, Spawn)
  38. end
  39. end