9
3

adervishnegotiator.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/adervishnegotiator.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2024.01.04 07:01:45
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/NPCModule"
  9. function spawn(NPC, Spawn)
  10. NPCModule(NPC, Spawn)
  11. setclass(NPC)
  12. setrace(NPC)
  13. RandomWeapons(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function setclass(NPC, Spawn)
  22. class = MakeRandomInt(1,4)
  23. if class == 1 then
  24. SpawnSet(NPC, "class", 2) -- Warrior
  25. elseif class == 2 then
  26. SpawnSet(NPC, "class", 38) -- Predator
  27. elseif class == 3 then
  28. SpawnSet(NPC, "class", 22) -- Sorcerer
  29. elseif class == 4 then
  30. SpawnSet(NPC, "class", 5) -- Brawler
  31. end
  32. end
  33. function setrace(NPC, Spawn)
  34. race = MakeRandomInt(1,3)
  35. if race == 1 then
  36. human(NPC)
  37. elseif race == 2 then
  38. halfelf(NPC)
  39. elseif race == 3 then
  40. darkelf(NPC)
  41. end
  42. end