Advertisement
Guest User

Untitled

a guest
Nov 18th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. function GameMode:OnAbilityUsed(keys)
  2. print('[BAREBONES] AbilityUsed')
  3. DeepPrintTable(keys)
  4.  
  5. local player = EntIndexToHScript(keys.PlayerID)
  6. local abilityname = keys.abilityname
  7. local caster = EntIndexToHScript(keys.caster_entindex)
  8.  
  9.  
  10. if GetMapName() == "roshdef_turbo" then
  11. if abilityname == "item_ultra_boots" or abilityname == "item_travel_boots_2" or abilityname == "item_travel_boots" then
  12. for i=0,8 do
  13. local item = caster:GetItemInSlot( i )
  14. local item_name = ""
  15. if item then item_name = item:GetAbilityName() end
  16. -- print ("item = "..item_name)
  17.  
  18. if item and item_name == abilityname then
  19. Timers:CreateTimer(0.1,function()
  20. item:EndCooldown()
  21. item:StartCooldown(item:GetCooldown(0)/2)
  22. end)
  23. end
  24. end
  25. end
  26. end
  27.  
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement