9
3

IsleRefuge1.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. --[[
  2. Script Name : ZoneScripts/IsleRefuge1.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.09 06:09:11
  5. Script Purpose :
  6. :
  7. --]]
  8. function player_entry(Zone, Spawn)
  9. SendPopUpMessage(Spawn, "The Isle of Refuge", 230, 230, 230)
  10. end
  11. function init_zone_script(Zone)
  12. CreateWidgetRegion(Zone, 0, "TestRegion", "", 924281492, 4117633379, 2.0)
  13. end
  14. --[[Create new script, RegionScripts/tutorial_island02/TestRegion.lua with the following:
  15. function TakeFireDamage(Spawn)
  16. local invul = IsInvulnerable(Spawn)
  17. if invul == true then
  18. return 0
  19. end
  20. local hp = GetHP(Spawn)
  21. local level = GetLevel(Spawn)
  22. local damageToTake = level * 1
  23. -- if we don't have enough HP make them die to pain and suffering not self
  24. if hp <= damageToTake then
  25. KillSpawn(Spawn, null, 1)
  26. else
  27. DamageSpawn(Spawn, Spawn, 192, 3, damageToTake, damageToTake, "Fire!", 0, 0, 1, 1)
  28. end
  29. end
  30. function EnterRegion(Zone, Spawn, RegionType)
  31. -- initial tick for hitting the fire
  32. TakeFireDamage(Spawn)
  33. -- 5 second Tick
  34. return 5000
  35. end
  36. function Tick(Zone, Spawn, RegionType)
  37. TakeFireDamage(Spawn)
  38. -- returning 1 would stop the Tick process until Spawn leaves/re-enters region
  39. return 0
  40. end]]--