i use this script, unfortunatley i have commited a great sin and forgot who made it, i thimk mandoble.
; *****************************************************
; ** Operation Flashpoint Script File
; *****************************************************
;calculates the ingame grid coordinates (e.g. Be39) from a position array [x,y,z]
;[<positionarray>, <frontmatter>, <backmatter>, <comchannel>] exec "gridcoordinates.sqs"
;With comchannel you can choose the method of output:
;<comchannel> = ["Hint"] --> Hint
; ["SideChat", <unit>] --> Sidechat by <unit>
;Example:
;[GetPos player, "My position is grid ", ". Over.", ["SideChat", player]] exec "gridcoordinates.sqs"
_pos = _this select 0
_xpos = _pos select 0
_ypos = _pos select 1
_frontmatter = _this select 1
_backmatter = _this select 2
_comchannel = _this select 3
?((_xpos < 0) OR (_xpos >= 12800) OR (_ypos < 0) OR (_ypos >= 12800) ): _string = "XxXx"; Goto "SendMessage"
_xcoarserest = (_xpos Mod 1280)
_xslotcoarse = (_xpos - _xcoarserest)/1280
_xslotfine =(_xcoarserest - (_xcoarserest Mod 128))/128
_yslot = 99 - (_ypos - (_ypos Mod 128))/128
_ystring = Format["%1",_yslot]
?_yslot < 10: _ystring = "0" + _ystring
_upper = ["A","B","C","D","E","F","G","H","I","J"]
_lower = ["a","b","c","d","e","f","g","h","i","j"]
_xstring = (_upper select _xslotcoarse) + (_lower select _xslotfine)
_string = (_xstring + _ystring)
#SendMessage
_output = _frontmatter + _string + _backmatter
Goto (_comchannel select 0)
Goto "End"
#SideChat
(_comchannel select 1) SideChat _output
Goto "End"
#Hint
Hint _output
Goto "End"
#End
Exit