cure_test.lua 904 B

123456789101112131415161718192021
  1. --[[
  2. Script Name : ItemScripts/cure_test.lua
  3. Script Purpose :
  4. Script Author : Emagi/Image
  5. Script Date : 7.1.2022
  6. Script Notes : This is to test having a used item CureByType and pass a target via ItemScripts
  7. --]]
  8. function used(Item, Player, Target)
  9. local effect_type = GetItemEffectType(Item)
  10. if effect_type < 7 then -- 7 is cure all
  11. CureByType(1, effect_type, "", (GetLevel(Player) * 1.08) + 1, Target, Player)
  12. elseif effect_type == 7 then
  13. CureByType(1, 1, "", (GetLevel(Player) * 1.08) + 1, Target, Player)
  14. CureByType(1, 2, "", (GetLevel(Player) * 1.08) + 1, Target, Player)
  15. CureByType(1, 3, "", (GetLevel(Player) * 1.08) + 1, Target, Player)
  16. CureByType(1, 4, "", (GetLevel(Player) * 1.08) + 1, Target, Player)
  17. CureByType(1, 5, "", (GetLevel(Player) * 1.08) + 1, Target, Player)
  18. CureByType(1, 6, "", (GetLevel(Player) * 1.08) + 1, Target, Player)
  19. end
  20. end