9
3

OsharGrahl.lua 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/OsharGrahl.lua
  3. Script Author : Rylec
  4. Script Date : 2020.10.16 11:10:34
  5. Script Purpose : Add visual states and say
  6. :
  7. --]]
  8. function spawn(NPC)
  9. AddTimer(NPC, 3000, "Animations")
  10. AddTimer(NPC, 3000, "Text")
  11. end
  12. function hailed(NPC, Spawn)
  13. FaceTarget(NPC, Spawn)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function Animations(NPC)
  19. math.randomseed(os.time())
  20. local choice = math.random (1,2)
  21. if choice == 1 then
  22. PlayAnimation(NPC, 891)
  23. else
  24. PlayAnimation(NPC, 13008)
  25. end
  26. local time = math.random (30000,40000)
  27. AddTimer(NPC, time, "Animations")
  28. end
  29. function Text(NPC)
  30. math.randomseed(os.time())
  31. local choice = math.random (1,3)
  32. if choice == 1 then
  33. Say(NPC, "Night or day, I'll prrrotect you friend.")
  34. Emote(NPC, "flexes.")
  35. elseif choice == 2 then
  36. Say(NPC, "All this sand in my fur, bah!")
  37. Emote(NPC, "shakes.")
  38. else
  39. Say(NPC, "Our poor home... lost.")
  40. end
  41. local time2 = math.random (60000,240000)
  42. AddTimer(NPC, time2, "Text")
  43. end