Advertisement
Guest User

questport.lua

a guest
Feb 2nd, 2017
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. local qmap=dfhack.gui.getCurViewscreen()
  2. local qx=qmap.cursor_x*48
  3. local qy=qmap.cursor_y*48
  4. local rx=qmap.player_region_x*48
  5. local ry=qmap.player_region_y*48
  6. local qarm=df.global.world.armies.all
  7. for k,v in ipairs(qarm) do
  8. if v.flags[0] then
  9. local my_arm=df.global.world.armies.all[k].pos
  10. if rx~=qx then do
  11. my_arm.x=qx
  12. my_arm.y=qy
  13. qmap.player_region_x=qmap.cursor_x
  14. qmap.player_region_y=qmap.cursor_y
  15. end
  16. end
  17. end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement