Public Function 对话(对方 As npc) As Boolean
dm.GetClientSize mhwnd, w, h '获取游戏分辨率
ww = Fix(w / 2) '窗口中心像素X
'www = (ww / 20) - 1 '窗口中心坐标X
hh = Fix(h / 2) '窗口中心像素Y
'hhh = (hh / 20) - 1 '窗口中心坐标Y
获取坐标
dx = (map.x - 对方.x) * 20
dy = (map.y - 对方.y) * 20
Select Case map.dx
Case 0
sx = ww - dx
Case Is > 0
sx = ww + map.dx - dx
Case Is < 0
sx = map.mx - dx
End Select
Select Case map.dy
Case 0
sy = hh + dy
Case Is > 0
sy = hh + map.dy + dy
Case Is < 0
sy = hh + map.dy + dy
End Select
移动鼠标 sx, sy
End Function
05-11