avagrantsquatter_Squatting.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : SpawnScripts/TheRuins_Classic/avagrantsquatter_Squatting.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.07.06 04:07:38
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/NPCModule"
  9. function spawn(NPC, Spawn)
  10. NPCModule(NPC, Spawn)
  11. SetInfoStructString(NPC, "action_state", "sit_idle")
  12. human(NPC)
  13. end
  14. function hailed(NPC, Spawn)
  15. if not IsInCombat(NPC)then
  16. choice = MakeRandomInt(1,5)
  17. if choice ==1 then
  18. SendMessage(Spawn,"The vagrant squatter pays no attention to you.","white")
  19. elseif choice ==2 then
  20. SendMessage(Spawn,"The vagrant squatter listlessly stares in your direction.","white")
  21. elseif choice ==3 then
  22. SendMessage(Spawn,"The vagrant squatter's sun-scorched face cares little for your hail.","white")
  23. elseif choice ==4 then
  24. SendMessage(Spawn,"The vagrant squatter flails in your direction!","white")
  25. Attack(NPC,Spawn)
  26. elseif choice ==5 then
  27. FaceTarget(NPC,Spawn)
  28. SendMessage(Spawn,"The vagrant squatter eyes you and holds out its hands for an offering.","white")
  29. PlayFlavor(NPC,"","","beg",0,0)
  30. end
  31. end
  32. end
  33. function respawn(NPC)
  34. spawn(NPC)
  35. end
  36. function aggro(NPC,Spawn)
  37. PlayFlavor(NPC,"","","sit_exit",0,0)
  38. end