Bogchild's_Iced_Trap.lua 689 B

12345678910111213141516171819
  1. --[[
  2. Script Name : ItemScripts/Bogchild's_Iced_Trap.lua
  3. Script Purpose : Handles the item "Bogchild's Iced Trap"
  4. Script Author : theFoof
  5. Script Date : 2013.5.20
  6. Script Notes :
  7. --]]
  8. function used(Item, Player)
  9. target = GetTarget(Player)
  10. if GetName(target) == 'a snowpack' or GetName(target) == 'an iceflow' then
  11. if IsInCombat(target) then
  12. SendMessage(Player, "You can only use this on an iceflow or snowpack that is not currently engaged in combat.", "yellow")
  13. else
  14. CastEntityCommand(Player, target, 1274, "Bogchild's Iced Trap")
  15. end
  16. else
  17. SendMessage(Player, "You can only use this on an iceflow or a snowpack.", "yellow")
  18. end
  19. end