• My Pages
  • Comments
  • Add Link
  • Subscribe
  • Subscribe User
  • Edit (GUI)
  • Edit (Text)
  • Rename Page
  • Copy Page
  • Load Page
  • Save Page
  • Delete Page
  • Attachments
  • Check Spelling
  • Diffs
  • Info
  • Revert to this revision
  • XML
  • Render as Docbook
  • Print View
  • Raw Text
  • Delete Cache
  • Like Pages
  • Local Site Map
  • Remove Spam
  • Package Pages
  • Sync Pages
    • Diff for "MapFunctions"
    Differences between revisions 1 and 2
    Revision 1 as of 2014-12-26 20:02:18
    Size: 1076
    Editor: Inanna
    Comment:
    Revision 2 as of 2014-12-26 20:12:07
    Size: 2532
    Editor: Inanna
    Comment:
    Deletions are marked like this. Additions are marked like this.
    Line 6: Line 6:
    == GetFieldId ==
    ||<tablebgcolor="#F9F9F9" tablestyle="margin:1em 1em 1em 0px;border-style:solid;border-color:rgb(170, 170, 170);color:rgb(0, 0, 0);font-family:sans-serif;font-size:13px;line-height:19.5px;text-align:start; " tableclass="wikitable"#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Usage: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">!GetFieldId(coords) ||
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">coords = "460,355"<<BR>>echo !GetFieldId(coords) ||

    This function converts coordinates into a field id.

    The field id is a number between 0-63999. Each number directly corresponds to a square on the 800x800 grid map. The game server uses field ids to reference all the squares on the map... 0,0 has field id of 0.... 1,0 has field id of 1... 799,0 has field id of 799... 1,1 is field id 800... and so on. Many of the advanced scripting functions require you to convert your coordinates into fieldIds to use them.

     . {{{
    coords = "460,355"
    echo GetFieldId(coords)

    Result:
    15:07:40 Starting script
    15:07:40 Running line 1
    15:07:40 coords = 460,355
    15:07:42 Running line 2
    15:07:42 284460
    15:07:43 Script stopped
    }}}
    Line 10: Line 31:

    This example finds the coordinates of a field id:
    This function converts a field id into coordinates. This example finds the coordinates of a field id:

    See also: ...
    See also: ...

    GetFieldId

    Usage:

    GetFieldId(coords)

    Example:

    coords = "460,355"
    echo GetFieldId(coords)

    This function converts coordinates into a field id.

    The field id is a number between 0-63999. Each number directly corresponds to a square on the 800x800 grid map. The game server uses field ids to reference all the squares on the map... 0,0 has field id of 0.... 1,0 has field id of 1... 799,0 has field id of 799... 1,1 is field id 800... and so on. Many of the advanced scripting functions require you to convert your coordinates into fieldIds to use them.

    • coords = "460,355"
      echo GetFieldId(coords)
      
      Result:
      15:07:40 Starting script
      15:07:40 Running line 1
      15:07:40 coords = 460,355
      15:07:42 Running line 2
      15:07:42 284460
      15:07:43 Script stopped

    FieldIdToCoords

    Usage:

    FieldIdToCoords(fieldId)

    Example:

    fid = 284460
    echo FieldIdToCoords(fid)

    This function converts a field id into coordinates. This example finds the coordinates of a field id:

    • fid = 284460
      echo FieldIdToCoords(fid)
      
      Result:
      14:58:01 Starting script
      14:58:01 Running line 1
      14:58:01 fid = 284460
      14:58:02 Running line 2
      14:58:02 460,355
      14:58:03 Script stopped


    CategoryFunctions

    MapFunctions (last edited 2016-05-16 18:23:10 by Inanna)