Advertisement
Guest User

Untitled

a guest
Jul 20th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. function doMoveInAreaMulti(cid, effDis, effMagic, areaEff, areaDano, element, min, max, ret) --alterado v1.7
  2. if not isCreature(cid) then return true end
  3. local pos = getPosfromArea(cid, areaEff)
  4. local pos2 = getPosfromArea(cid, areaDano)
  5. local n = 0
  6.  
  7. while n < #pos2 do
  8. if not isCreature(cid) then return true end
  9. if isSleeping(cid) and getPlayerStorageValue(cid, 3644587) >= 1 then return true end
  10. if isWithFear(cid) and getPlayerStorageValue(cid, 3644587) >= 1 then return true end
  11.  
  12. n = n+1
  13. thing = {x=pos2[n].x,y=pos2[n].y,z=pos2[n].z,stackpos=253}
  14. if n < #pos then
  15. addEvent(sendDistanceShootWithProtect, 50, cid, getThingPos(cid), pos[n], effDis) --39
  16. addEvent(sendEffWithProtect, 100, cid, pos[n], effMagic) -- 112
  17. --- --alterado v1.6.1
  18. if math.random(1, 2) == 2 then
  19. addEvent(sendDistanceShootWithProtect, 450, cid, getThingPos(cid), pos[n], effDis) --550
  20. addEvent(sendEffWithProtect, 550, cid, pos[n], effMagic) -- 650
  21. end
  22. end
  23. local pid = getThingFromPosWithProtect(thing)
  24. if isCreature(pid) then
  25. if ret and ret.id == 0 then --alterado v1.8
  26. ret.id = pid
  27. ret.check = getPlayerStorageValue(pid, conds[ret.cond])
  28. end
  29. if not ret then ret = {} end --alterado v1.7
  30. doMoveDano2(cid, pid, element, min, max, ret, getPlayerStorageValue(cid, 21102))
  31. end
  32. end
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement