9
3

TGask.lua 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --[[
  2. Script Name : SpawnScripts/Longshadow/TGask.lua
  3. Script Purpose : T`Gask <Tailor>
  4. Script Author : John Adams
  5. Script Date : 2008.09.29
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  11. SetInfoStructString(NPC, "action_state", "tailoring_idle")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. if MakeRandomInt(1, 100) <= 18 and GetFactionAmount(Spawn,12) >0 then
  18. FaceTarget(NPC, Spawn)
  19. PlayFlavor(NPC, "voiceover/english/darkelf_eco_evil_1/ft/service/merchant/darkelf_merchant_service_evil_1_aoi_gf_53388b91.mp3", "Only traitors to the Overlord would pass up a bargain like this. You're not a traitor are you?", "scold", 2250198640, 1947969981, Spawn)
  20. elseif GetFactionAmount(Spawn,12) <=0 then
  21. PlayFlavor(NPC, "voiceover/english/highelf_eco_good_1/ft/highelf/highelf_eco_good_1_notcitizen_gf_6da83eeb.mp3", "I'll defend myself if it comes to that, savage.", "", 3357669916, 1930978996, Spawn)
  22. end
  23. end
  24. function respawn(NPC)
  25. spawn(NPC)
  26. end
  27. function hailed(NPC, Spawn)
  28. if GetFactionAmount(Spawn,12) >0 then
  29. Dialog1(NPC, Spawn)
  30. else
  31. PlayFlavor(NPC, "voiceover/english/highelf_eco_good_1/ft/highelf/highelf_eco_good_1_notcitizen_gf_6da83eeb.mp3", "I'll defend myself if it comes to that, savage.", "", 3357669916, 1930978996, Spawn)
  32. end
  33. end
  34. function Dialog1(NPC, Spawn)
  35. local choice = MakeRandomInt(1,3)
  36. if choice == 1 then
  37. PlayFlavor(NPC, "voiceover/english/darkelf_eco_evil_1/ft/service/merchant/darkelf_merchant_service_evil_1_hail_gf_d088c20d.mp3", "The stuff's over there. Just let me know if you find anything you like.", "ponder", 1457896156, 727813168, Spawn, 0)
  38. elseif choice == 2 then
  39. PlayFlavor(NPC, "voiceover/english/darkelf_eco_evil_1/ft/service/merchant/darkelf_merchant_service_evil_1_hail_gf_f715099e.mp3", "Hello there, kind adventurer. My merchandise carries the seal of the Overlord himself! Go ahead, take a look!", "salute_freeport", 3860282907, 2830883681, Spawn, 0)
  40. elseif choice == 3 then
  41. PlayFlavor(NPC, "voiceover/english/darkelf_eco_evil_1/ft/service/merchant/darkelf_merchant_service_evil_1_hail_gf_aff3fc07.mp3", "Are you going to buy anything today or am I just wasting my time? This isn't a museum display you know!", "glare", 1486780566, 1792397389, Spawn, 0)
  42. end
  43. end