AGnollTent.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. --[[
  2. Script Name : SpawnScripts/thunderdome/AGnollTent.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.07.12 12:07:24
  5. Script Purpose :
  6. :
  7. --]]
  8. --133773735 fairy
  9. --133773731,133773732,133773733,133773734 golems
  10. function spawn(NPC)
  11. CampSpawn (NPC)
  12. end
  13. function CampSpawn(NPC)
  14. if GetSpawnLocationID(NPC)==133773730 then
  15. Camp1(NPC)
  16. end
  17. end
  18. function Camp1(NPC, Spawn)
  19. local zone = GetZone(NPC)
  20. local Object1 = SpawnByLocationID(zone, 133773736)
  21. local Object2 = SpawnByLocationID(zone, 133773737)
  22. local choice = math.random(0,2)
  23. if choice <= 1 then
  24. local Merchant = SpawnByLocationID(zone, 133773749)
  25. else
  26. end
  27. AddTimer(NPC,3500,"Camp1Pop")
  28. end
  29. function Camp1Pop(NPC, Spawn)
  30. local zone = GetZone(NPC)
  31. if GetSpawnByLocationID(zone, 133773738) ==nil then
  32. local Spawn1 = SpawnByLocationID(zone, 133773738)
  33. end
  34. if GetSpawnByLocationID(zone, 133773739) ==nil then
  35. local Spawn2 = SpawnByLocationID(zone, 133773739)
  36. end
  37. if GetSpawnByLocationID(zone, 133773740) ==nil then
  38. local Spawn3 = SpawnByLocationID(zone, 133773740)
  39. end
  40. if GetSpawnByLocationID(zone, 133773741) ==nil then
  41. local Spawn4 = SpawnByLocationID(zone, 133773741)
  42. end
  43. end
  44. function respawn(NPC)
  45. spawn(NPC)
  46. end