misc_func
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
misc_func [2022/07/05 15:02] – [File] admin | misc_func [2025/02/25 22:20] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 69: | Line 69: | ||
===== File ===== | ===== File ===== | ||
+ | |||
+ | The file operations are limited, because I am paranoid of bad actors. | ||
+ | The file to be written to MUST be in the RE directory tree, or if your running CUO it can be in the CUO directory tree. Further, the file suffix has to be one of {data, xml, map, csv}. The file suffixes list could be extended, but the main thing I didn't want someone to do damage to files needed for execution. | ||
+ | |||
{|style=" | {|style=" | ||
Line 114: | Line 118: | ||
|- style=" | |- style=" | ||
|**Parameters: | |**Parameters: | ||
- | |string FileName | + | |string FileName, string LineToInsert |
- | |string LineToInsert | + | |
|} | |} | ||
+ | |||
+ | {|style=" | ||
+ | |style=" | ||
+ | |- style=" | ||
+ | |**Syntax** | ||
+ | |style=" | ||
+ | |- | ||
+ | |colspan=" | ||
+ | |- | ||
+ | |colspan=" | ||
+ | |- style=" | ||
+ | |**Returns** | ||
+ | |bool True - success False - Fail | ||
+ | |- | ||
+ | |**In Object:** | ||
+ | |Misc | ||
+ | |- style=" | ||
+ | |**Parameters: | ||
+ | |string FileName | ||
+ | |||
+ | |} | ||
+ | |||
{|style=" | {|style=" | ||
Line 813: | Line 838: | ||
|**Parameters: | |**Parameters: | ||
|scriptfilename | |scriptfilename | ||
+ | |||
+ | |} | ||
+ | |||
+ | ===== Maps ===== | ||
+ | {|style=" | ||
+ | |style=" | ||
+ | |- style=" | ||
+ | |**Syntax** | ||
+ | |style=" | ||
+ | |- | ||
+ | |colspan=" | ||
+ | |- | ||
+ | |colspan=" | ||
+ | < | ||
+ | # | ||
+ | mapInfo = Misc.GetMapInfo(0x400BFD6C) | ||
+ | print(" | ||
+ | .format(mapInfo.MapOrigin.X+mapInfo.PinPosition.X, | ||
+ | mapInfo.MapOrigin.X, | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | |- style=" | ||
+ | |**Note:** | ||
+ | |The pin position is an offset from the origin, so you have to add them to get absolute location | ||
+ | |||
+ | |- style=" | ||
+ | |**Returns** | ||
+ | |MapInfo{ PinPosition, | ||
+ | |- | ||
+ | |**In Object:** | ||
+ | |Misc | ||
+ | |- style=" | ||
+ | |**Parameters: | ||
+ | |serial - Serial of the t-map | ||
|} | |} |
misc_func.1657033320.txt.gz · Last modified: 2022/09/03 22:41 (external edit)