JoseluisGGR

Untitled

Apr 12th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. local p = {
  2. from = {x=31994, y=32446, z=7},
  3. to = {x=31989, y=32444, z=7}
  4. }
  5.  
  6. function isCleanAbleArea(pos)
  7. pos.stackpos = 0
  8. local tile = getThingfromPos(pos, false)
  9. if tile ~= 0 and not hasProperty(tile.uid, CONST_PROP_BLOCKSOLID) and not isCreature(getTopCreature(pos).uid) then
  10. return true
  11. end
  12. end
  13.  
  14. function onSay(cid, words, param)
  15. if words == "!cleanxx" then
  16. for x = p.from.x, p.topos.x do
  17. for y = p.from.y, p.to.y do
  18. for z = p.from.z, p.to.z do
  19. local c = {x = x, y = y, z = z}
  20. if isCleanAbleArea(c) then
  21. doCleanTile(c, false)
  22. end
  23. end
  24. end
  25. end
  26. return true
  27. end
Add Comment
Please, Sign In to add comment