Difference between revisions of "User:BrianFreud"
BrianFreud (talk | contribs) m |
BrianFreud (talk | contribs) |
||
Line 1: | Line 1: | ||
− | {{ | + | {{#if: true| <!-- This does the work to convert sextant coordinates to tile coordinates. |
− | {{#var: | + | Maps: |
+ | 1 = Britannia (Tram or Fel) | ||
+ | 2 = Lost Lands | ||
+ | 3 = Ilshenar | ||
+ | |||
+ | START COORDINATE CONVERSION CODE --> | ||
+ | {{#vardefine: x1|122}} | ||
+ | {{#vardefine: x2|0}} | ||
+ | {{#vardefine: x3|W}} | ||
+ | {{#vardefine: y1|44}} | ||
+ | {{#vardefine: y2|38}} | ||
+ | {{#vardefine: y3|N}} | ||
+ | {{#vardefine:map|1}} | ||
+ | {{#vardefine: height|{{#switch: {{#var:map}} | ||
+ | | 1 = 4096 | ||
+ | | 2 = 4096 | ||
+ | | 3 = 1600 | ||
+ | }} }} | ||
+ | {{#vardefine: centerY|{{#switch: {{#var:map}} | ||
+ | | 1 = 1624 | ||
+ | | 2 = 3112 | ||
+ | | 3 = | ||
+ | }} }} | ||
+ | {{#vardefine: width|{{#switch: {{#var:map}} | ||
+ | | 1 = 5120 | ||
+ | | 2 = 5120 | ||
+ | | 3 = 2304 | ||
+ | }} }} | ||
+ | {{#vardefine: centerX|{{#switch: {{#var:map}} | ||
+ | | 1 = 1323 | ||
+ | | 2 = 5936 | ||
+ | | 3 = | ||
+ | }} }} | ||
+ | {{#vardefine: y|{{#expr:{{#expr:{{#var:y1}}*100}}+{{#expr:{{#expr:{{#var:y2}}*10}}/6}}}}}} | ||
+ | {{#vardefine: y|{{#ifeq: {{#var:y3}}|N|{{#expr:36000-{{#var:y}}|{{#var:y}} }} }} }} | ||
+ | {{#vardefine: y|{{#expr:{{#var:y}}*{{#var:height}}}}}} | ||
+ | {{#vardefine: y|{{#expr:{{#var:y}}/36000}}}} | ||
+ | {{#vardefine: y|{{#expr:{{#var:centerY}}+{{#var:y}}}}}} | ||
+ | {{#vardefine: y|{{#expr:{{#var:y}} mod {{#var:height}}}}}} | ||
+ | {{#vardefine: x|{{#expr:{{#expr:{{#var:x1}}*100}}+{{#expr:{{#expr:{{#var:x2}}*10}}/6}}}}}} | ||
+ | {{#vardefine: x|{{#ifeq: {{#var:x3}}|W|{{#expr:36000-{{#var:x}}|{{#var:x}} }} }} }} | ||
+ | {{#vardefine: x|{{#expr:{{#var:x}}*{{#var:width}}}}}} | ||
+ | {{#vardefine: x|{{#expr:{{#var:x}}/36000}}}} | ||
+ | {{#vardefine: x|{{#expr:{{#var:centerX}}+{{#var:x}}}}}} | ||
+ | {{#vardefine: x|{{#expr:{{#var:x}} mod {{#var:width}}}}}} | ||
+ | |||
+ | <!-- END COORDINATE CONVERSION CODE --> | ||
+ | }} | ||
+ | |||
+ | {{#var:x}} x {{#var:y}} |
Revision as of 14:57, 4 September 2016
4707 x 1116