CalltoHome.lua 660 B

1234567891011121314151617181920212223242526272829
  1. --[[
  2. Script Name : Spells/Commoner/CalltoHome.lua
  3. Script Author : neatz09
  4. Script Date : 2019.04.08 12:04:04
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Teleports you to your recall point.
  9. function precast(Caster, Target)
  10. if GetBoundZoneID(Caster) == 0 then
  11. SendMessage(Caster, "You are a failure", "red")
  12. return false
  13. end
  14. if(IsGateAllowed(Caster))
  15. then
  16. return true
  17. else
  18. SendMessage(Caster, "You cannot use Call to Home from this location.", "red")
  19. return false
  20. end
  21. return true
  22. end
  23. function cast(Caster, Target)
  24. Gate(Caster)
  25. end