Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. function doUpdateCooldowns(cid)
  2. if not isCreature(cid) then return true end
  3. local a = getPlayerSlotItem(cid, 8)
  4. local ret = {}
  5. table.insert(ret, "12|,")
  6. if a.uid <= 0 or #getCreatureSummons(cid) <= 0 then
  7. for cds = 1, 12 do
  8. if useOTClient then table.insert(ret, "-1|0,") else table.insert(ret, "-1,") end
  9. end
  10. doPlayerSendCancel(cid, table.concat(ret))
  11. return true
  12. end
  13. for cds = 1, 12 do
  14. ----
  15. local summon = getCreatureSummons(cid)[1]
  16. if summon and getPlayerStorageValue(summon, 212123) >= 1 then
  17. cdzin = "cm_move"..cds
  18. else
  19. cdzin = "move"..cds
  20. end
  21. ----
  22. if isTransformed(summon) then --alterado v1.9
  23. moves = movestable[getPlayerStorageValue(summon, 1010)]
  24. else
  25. moves = movestable[getCreatureName(summon)]
  26. end
  27. local b = getNewMoveTable(moves, cds)
  28. if not b then
  29. for cds = 1, 12 do
  30. if useOTClient then table.insert(ret, "-1|0,") else table.insert(ret, "-1,") end --alterado v1.9
  31. end
  32. doPlayerSendCancel(cid, table.concat(ret))
  33. return true
  34. end
  35. ----
  36. if getCD(a.uid, cdzin) > 0 then
  37. if (useOTClient and b) then table.insert(ret, (getCD(a.uid, cdzin)).."|"..b.level..",") else table.insert(ret, (getCD(a.uid, cdzin))..",") end
  38. else
  39. if (useOTClient and b) then table.insert(ret, "0|"..b.level..",") else table.insert(ret, "0,") end
  40. end
  41. end
  42. doPlayerSendCancel(cid, table.concat(ret))
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement