CrustoseRepellentPrototype.lua 762 B

123456789101112131415161718
  1. --[[
  2. Script Name : ItemScripts/CrustoseRepellentPrototype.lua
  3. Script Purpose : Handles the item "crustose repellent prototype"
  4. Script Author : theFoof
  5. Script Date : 2013.5.12
  6. Script Notes :
  7. --]]
  8. function used(Item, Player)
  9. local target = GetTarget(Player)
  10. if GetName(target) == "a crustose sporetender" then
  11. CastEntityCommand(Player, target, 1269, "Spray")
  12. elseif IsInCombat(target) and GetName(target) == "a crustose sporetender" then
  13. SendMessage(Player, "This effect cannot be used on a crustose sporetender which is in combat.", "yellow")
  14. elseif GetName(target) ~= "a crustose sporetender" then
  15. SendMessage(Player, "You can only use the crustose repellent against crustose sporetenders.", "yellow")
  16. end
  17. end