SetRecallPoint.lua 697 B

12345678910111213141516171819202122232425262728
  1. --[[
  2. Script Name : Spells/Commoner/SetRecallPoint.lua
  3. Script Author : neatz09
  4. Script Date : 2019.10.12 09:10:20
  5. Script Purpose :
  6. Edit By : Devn00b: Implemented Bind Location check, as well as in combat check. 6/15/2022
  7. --]]
  8. function cast(Caster, Target)
  9. canbind = GetCanBind(Caster)
  10. incombat = IsInCombat(Caster)
  11. if ( incombat == true)
  12. then
  13. SendMessage(Caster, "You cannot use Set Recall Point while in combat.", "red")
  14. goto exit;
  15. end
  16. if( canbind == 0 )
  17. then
  18. SendMessage(Caster, "You cannot use Set Recall Point at this location. Please try in a city or suburb.", "red")
  19. else
  20. Bind(Caster)
  21. end
  22. ::exit::
  23. end