User Tools

Site Tools


misc_func

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
misc_func [2022/07/15 15:08] – [Pets] adminmisc_func [2022/09/03 23:25] (current) – external edit 127.0.0.1
Line 843: Line 843:
 ===== Maps ===== ===== Maps =====
 {|style="font-size:85%; border:solid 2px; width: 50%;" {|style="font-size:85%; border:solid 2px; width: 50%;"
-|style="font-size:150%;  padding: 2px" colspan="2" | **Distance between 2 places using UO algorithm**+|style="font-size:150%;  padding: 2px" colspan="2" | **Co-Ordinates of a Decoded Map**
 |- style="background-color:#f0f0f0;" |- style="background-color:#f0f0f0;"
 |**Syntax** |**Syntax**
-|style="width: 90%" | Misc.Distance(X1, Y1, X2, Y2)+|style="width: 90%" | Misc.GetMapInfo(serial)
 |- |-
 |colspan="2" |**Description:** |colspan="2" |**Description:**
 |- |-
-|colspan="2"Compute the distance between 2 places using UO algorithm for distance +|colspan="2"Retrieve the co-ordinates of a decoded t-map. Your code would look like:
-use in your code like:+
 <code> <code>
 # #
-= Misc.Distance(10102020)+mapInfo = Misc.GetMapInfo(0x400BFD6C) 
 +print("Treasure at ({}{})Origin ({}{}), pin at ({}, {})" 
 +    .format(mapInfo.MapOrigin.X+mapInfo.PinPosition.X, mapInfo.MapOrigin.Y+mapInfo.PinPosition.Y, 
 +            mapInfo.MapOrigin.X, mapInfo.MapOrigin.Y, mapInfo.PinPosition.X, mapInfo.PinPosition.Y))
 # #
 </code> </code>
 +
 +|- style="background-color:#f0f0f0;"
 +|**Note:**
 +|The pin position is an offset from the origin, so you have to add them to get absolute location
 +
 |- style="background-color:#f0f0f0;" |- style="background-color:#f0f0f0;"
 |**Returns** |**Returns**
-|int+|MapInfo{ PinPosition, MapOrigin, MapEnd }
 |- |-
 |**In Object:** |**In Object:**
Line 865: Line 872:
 |- style="background-color:#f0f0f0;" |- style="background-color:#f0f0f0;"
 |**Parameters:** |**Parameters:**
-|X1 x origin +|serial Serial of the t-map
-|Y1 y origin +
-|X2 - x dest +
-|Y2 - y dest+
  
 |} |}
misc_func.1657897729.txt.gz · Last modified: 2022/09/03 22:41 (external edit)