[Outdated] Creativerse OSD of Coordinates

Post gaming related scripts
TygerByte
Posts: 96
Joined: 12 Aug 2016, 05:22

[Outdated] Creativerse OSD of Coordinates

09 Jun 2017, 02:59

Outdated and no longer functions. Since the change to 64bit on Creativerse and the my general loss in interest to the game I've decided to stop updating the script.I will leave the script here as a reference.

On Screen Display of your XYZ Coordinates in game at the top left corner with CTRL+F8 Hotkey.

CTRL+F5 Hotkey set for measuring distance
CTRL+F9 Reloads the script

I nabbed the pointers on a 64bit machine and I don't recall if it was with a 64bit version of the game so it may or may not work for everyone. Also it was done on Win8.1 so YMMV. This script is not the best of work and any improvements would be appreciated. In the event the game is updated the script will likely fail to work anymore and I may or may not have time to update it. Hopefully Playful will have a better solution than this script by then.

I'd also like to thank Kalamity, tic, cmann, and Frankie Bagnardi for the libraries used otherwise the script would be poop.

You'll need the following libraries
https://github.com/Kalamity/classMemory
https://autohotkey.com/boards/viewtopic.php?t=6517
https://autohotkey.com/boards/viewtopic.php?t=1879
https://gist.github.com/brigand/3941326

Small sample of the script in action
Image

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance Force
#Include classMemory.ahk
#Include Gdip_All.ahk
#Include Gdip_Ext.ahk
#Include GdipHelper.ahk
SetFormat, FloatFast, 0.1
Toggle := 0

; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

; You can use this code to check if you have installed the class correctly.
if (_ClassMemory.__Class != "_ClassMemory")
	msgbox class memory not correctly installed. Or the (global class) variable "_ClassMemory" has been overwritten

; Open a process with sufficient access to read and write memory addresses (this is required before you can use the other functions)
; You only need to do this once. But if the process closes/restarts, then you will need to perform this step again. Refer to the notes section below.
; Also, if the target process is running as admin, then the script will also require admin rights!
; Note: The program identifier can be any AHK windowTitle i.e.ahk_exe, ahk_class, ahk_pid, or simply the window title.
; hProcessCopy is an optional variable in which the opened handled is stored. 
 
CreativerseProcess := new _ClassMemory("ahk_exe creativerse.exe", "", hProcessCopy) 

; Check if the above method was successful.
	if !isObject(CreativerseProcess) 
	{
		msgbox failed to open a handle
		if (hProcessCopy = 0)
			msgbox The program isn't running (not found) or you passed an incorrect program identifier parameter. 
		else if (hProcessCopy = "")
			msgbox OpenProcess failed. If the target process has admin rights, then the script also needs to be ran as admin. Consult A_LastError for more information.
		ExitApp
	}

SetUpGDIP()

#MaxThreadsPerHotkey, 8
^F8::
Toggle := !Toggle
If WinActive("Creativerse ahk_exe creativerse.exe") && Toggle
{
	Gui, Hide
	Gui, 1: Show, NA
	Loop, 
	{
		If Toggle
		{
			XAxisCoord := CreativerseProcess.read(0x00FF5708 + CreativerseProcess.BaseAddress, "UFloat", 0x48, 0x1C, 0x1C, 0x4, 0x20, 0x50)
			YAxisCoord := CreativerseProcess.read(0x00FF5708 + CreativerseProcess.BaseAddress, "UFloat", 0x48, 0x1C, 0x1C, 0x4, 0x20, 0x58)
			ZAxisCoord := CreativerseProcess.read(0x00FF5708 + CreativerseProcess.BaseAddress, "UFloat", 0x48, 0x1C, 0x1C, 0x4, 0x20, 0x54)

			StartDrawGDIP()
			ClearDrawGDIP()
			Width := A_ScreenWidth
			Height := A_ScreenHeight
			Font = Arial
			Options = x10 y10 w80p cbbffdc73 ow4 ocFF000000 r4 s20
			Gdip_TextToGraphics2(G, "X: " . XAxisCoord . "`nY: " . YAxisCoord . "`nZ: " . ZAxisCoord, Options, Font, Width, Height)
			Sleep, 20

			EndDrawGDIP()
		
			If !WinActive("Creativerse ahk_exe creativerse.exe")
			{
				Gui, Hide
				AltTabbed := 1
			}
			If WinActive("Creativerse ahk_exe creativerse.exe") && AltTabbed
			{
				Gui, 1: Show, NA
				AltTabbed := 0
			}
		}
		Else
		{
			Gui, Hide
			Break			
		}
	}	
}
return

^F9::
Reload
Return

#MaxThreadsPerHotkey, 8
^F5::
Toggle := !Toggle

If WinActive("Creativerse ahk_exe creativerse.exe") && Toggle
{
	XAxisCoord := CreativerseProcess.read(0x00FF5708 + CreativerseProcess.BaseAddress, "UFloat", 0x48, 0x1C, 0x1C, 0x4, 0x20, 0x50)
	YAxisCoord := CreativerseProcess.read(0x00FF5708 + CreativerseProcess.BaseAddress, "UFloat", 0x48, 0x1C, 0x1C, 0x4, 0x20, 0x58)
	ZAxisCoord := CreativerseProcess.read(0x00FF5708 + CreativerseProcess.BaseAddress, "UFloat", 0x48, 0x1C, 0x1C, 0x4, 0x20, 0x54)
	
	CurrentX := XAxisCoord
	CurrentY := YAxisCoord
	CurrentZ := ZAxisCoord
	Gui, Hide
	Gui, 1: Show, NA
	Loop, 
	{
		If Toggle
		{
			XAxisCoord := CreativerseProcess.read(0x00FF5708 + CreativerseProcess.BaseAddress, "UFloat", 0x48, 0x1C, 0x1C, 0x4, 0x20, 0x50)
			YAxisCoord := CreativerseProcess.read(0x00FF5708 + CreativerseProcess.BaseAddress, "UFloat", 0x48, 0x1C, 0x1C, 0x4, 0x20, 0x58)
			ZAxisCoord := CreativerseProcess.read(0x00FF5708 + CreativerseProcess.BaseAddress, "UFloat", 0x48, 0x1C, 0x1C, 0x4, 0x20, 0x54)

			DistX := (XAxisCoord - CurrentX)
			DistY := (YAxisCoord - CurrentY)
			DistZ := (ZAxisCoord - CurrentZ)

			StartDrawGDIP()
			ClearDrawGDIP()
			Width := A_ScreenWidth
			Height := A_ScreenHeight
			Font = Arial
			Options = x10 y10 w80p cbbffdc73 ow4 ocFF000000 r4 s20
			Gdip_TextToGraphics2(G, "Distance X: " . DistX . "`nDistance Y: " . DistY . "`nDistance Z: " . DistZ, Options, Font, Width, Height)
			Sleep, 20

			EndDrawGDIP()
		
			If !WinActive("Creativerse ahk_exe creativerse.exe")
			{
				Gui, Hide
				AltTabbed := 1
			}
			If WinActive("Creativerse ahk_exe creativerse.exe") && AltTabbed
			{
				Gui, 1: Show, NA
				AltTabbed := 0
			}
		}
		Else
		{
			Gui, Hide
			Break			
		}
	}	
}
return
Edit: Some changes so Toggle works better and Offset change for shorter jumps. Hopefully more reliable for multiple world changes. Updated Offsets

Updated Offsets: Sept 27, 2017
Last edited by TygerByte on 18 Dec 2017, 16:09, edited 4 times in total.
User avatar
SnowFlake
Posts: 368
Joined: 28 Apr 2015, 05:41
Contact:

Re: Creativerse OSD of Coordinates

09 Jun 2017, 13:56

Added all the scripts in a zip file

Creativerse OSD of Coordinates + All extra ahk scripts
Attachments
Creativerse OSD of Coordinates + All extra ahk scripts.zip
Creativerse OSD of Coordinates + All extra ahk scripts
(43.99 KiB) Downloaded 164 times
:yawn:
TygerByte
Posts: 96
Joined: 12 Aug 2016, 05:22

Re: Creativerse OSD of Coordinates

27 Sep 2017, 17:17

Sorry about the lack of pointer update since I haven't played in a while. The first offset of 0x44 was to 0x48 and it now works again. Good luck.

Return to “Gaming Scripts (v1)”

Who is online

Users browsing this forum: No registered users and 27 guests