Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <CheatTable>
- <CheatEntries>
- <CheatEntry>
- <ID>103</ID>
- <Description>"Teleport Activation"</Description>
- <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
- <LastState Activated="1"/>
- <Color>800000</Color>
- <VariableType>Auto Assembler Script</VariableType>
- <AssemblerScript>define(address,"UnityPlayer.dll"+D08435)
- define(bytes,F2 41 0F 11 8E D8 01 00 00)
- [ENABLE]
- assert(address,bytes)
- alloc(newmem,$1000,"UnityPlayer.dll"+D08435)
- label(return)
- label(save)
- label(load)
- label(presetlocationload)
- label(telecall)
- label(teledata)
- label(telecoords)
- label(teleregioncoords)
- registersymbol(teleregioncoords)
- registersymbol(teledata)
- newmem:
- // original code, z update
- movsd [r14+000001D8],xmm1
- // Save Base Address
- mov [teleregioncoords],r14
- // Determine if hotkey was pressed
- mov eax,[teledata]
- mov [teledata],0
- cmp eax,1
- je save
- cmp eax,2
- je load
- cmp eax,3
- je presetlocationload
- jmp return
- save:
- movupd [telecoords],xmm0
- movsd [telecoords+10],xmm1
- jmp return
- load:
- mov rax, telecoords
- call telecall
- jmp return
- presetlocationload:
- // get and verify index
- mov eax, [teledata+4]
- cmp eax,0
- jle return
- {$lua}
- local count = AddressList.getMemoryRecordByID(397).DropDownList.Count
- return 'cmp eax,' .. count
- {$asm}
- jge return
- // load coordinates using index
- // this would be easier with lea rax, [teledata+rax*18+8] but that won't assemble...
- push rdx
- mov rdx, 18
- mul rdx // multiply rax (index) by rdx aka 0x18 aka 24 aka the size of 3 doubles
- mov rdx, telecoords
- add rax, rdx // add base of coordinates array (-8 since telecall adds 8)
- pop rdx
- call telecall
- jmp return
- telecall:
- movsd xmm0,[rax]
- movsd [r14+1C8],xmm0
- movsd xmm0,[rax+8]
- movsd [r14+1D0],xmm0
- movsd xmm0,[rax+10]
- movsd [r14+1D8],xmm0
- ret
- teleregioncoords:
- dq 0 // Base Address
- teledata:
- dd 1 // Flag // [teledata]
- dd 1 //Preset Locations for player to select // [teledata+4]
- telecoords:
- dq 0 //X-Pos // [teledata+8]
- dq 0 //Y-Pos // [teledata+10]
- dq 0 //Z-Pos // [teledata+18]
- // Preset Location Coords // PL
- // Ranch // PL = 1
- dq (double)89.3 // X-Pos +20
- dq (double)16.0 // Y-Pos +28
- dq (double)-144.46 // Z-Pos +30
- // Ogden's Retreat // PL = 2
- dq (double)900 // + 68
- dq (double)3 // +70
- dq (double)485 // +78
- // Vault 1 // PL = 3
- dq (double)871.15 // +38
- dq (double)6.0 // +40
- dq (double)-2.25 // +48
- // Vault 2 // PL = 4
- dq (double)831.34 // +50
- dq (double)12.8 // +58
- dq (double)105.9 // + 60
- // Vault 3 // PL = 5
- dq (double)810.43 // + 68
- dq (double)18.0 // +70
- dq (double)206.63 // +78
- address:
- jmp newmem
- nop
- nop
- nop
- nop
- return:
- [DISABLE]
- address:
- db bytes
- dealloc(newmem)
- unregistersymbol(teledata)
- unregistersymbol(teleregiondata)
- </AssemblerScript>
- <CheatEntries>
- <CheatEntry>
- <ID>396</ID>
- <Description>"Teleport Flag"</Description>
- <DropDownList ReadOnly="1" DescriptionOnly="1" DisplayValueAsItem="1">0:Do Nothing
- 1:Save Current Location
- 2:Teleport to Saved Location
- 3:Teleport to Selected Location
- </DropDownList>
- <LastState Value="0" RealAddress="7FF98A490119"/>
- <Color>008000</Color>
- <VariableType>4 Bytes</VariableType>
- <Address>teledata</Address>
- <Hotkeys>
- <Hotkey>
- <Action>Set Value</Action>
- <Keys>
- <Key>97</Key>
- </Keys>
- <Value>1</Value>
- <ID>0</ID>
- </Hotkey>
- <Hotkey>
- <Action>Set Value</Action>
- <Keys>
- <Key>98</Key>
- </Keys>
- <Value>2</Value>
- <ID>1</ID>
- </Hotkey>
- <Hotkey>
- <Action>Set Value</Action>
- <Keys>
- <Key>99</Key>
- </Keys>
- <Value>3</Value>
- <ID>2</ID>
- </Hotkey>
- </Hotkeys>
- </CheatEntry>
- <CheatEntry>
- <ID>397</ID>
- <Description>"Select Location"</Description>
- <DropDownList ReadOnly="1" DescriptionOnly="1" DisplayValueAsItem="1">0:Nowhere
- 1:Ranch
- 2:Ogden's Retreat
- 3:Vault 1
- 4:Vault 2
- 5:Vault 3
- </DropDownList>
- <LastState Value="2" RealAddress="7FF98A49011D"/>
- <Color>008000</Color>
- <VariableType>4 Bytes</VariableType>
- <Address>teledata+4</Address>
- <Hotkeys>
- <Hotkey>
- <Action>Increase Value</Action>
- <Keys>
- <Key>107</Key>
- </Keys>
- <Value>1</Value>
- <ID>0</ID>
- </Hotkey>
- <Hotkey>
- <Action>Decrease Value</Action>
- <Keys>
- <Key>109</Key>
- </Keys>
- <Value>1</Value>
- <ID>1</ID>
- </Hotkey>
- </Hotkeys>
- </CheatEntry>
- <CheatEntry>
- <ID>106</ID>
- <Description>"Saved Coords"</Description>
- <Options moHideChildren="1"/>
- <LastState Value="" RealAddress="00000000"/>
- <Color>008000</Color>
- <GroupHeader>1</GroupHeader>
- <CheatEntries>
- <CheatEntry>
- <ID>393</ID>
- <Description>"Saved X-Pos"</Description>
- <LastState Value="871.150024414063" RealAddress="7FF98A490121"/>
- <Color>808000</Color>
- <VariableType>Double</VariableType>
- <Address>teledata+8</Address>
- </CheatEntry>
- <CheatEntry>
- <ID>394</ID>
- <Description>"Saved Y-Pos"</Description>
- <LastState Value="2.89876809716225" RealAddress="7FF98A490129"/>
- <Color>808000</Color>
- <VariableType>Double</VariableType>
- <Address>teledata+10</Address>
- </CheatEntry>
- <CheatEntry>
- <ID>395</ID>
- <Description>"Saved Z-Pos"</Description>
- <LastState Value="-2.25000190734863" RealAddress="7FF98A490131"/>
- <Color>808000</Color>
- <VariableType>Double</VariableType>
- <Address>teledata+18</Address>
- </CheatEntry>
- </CheatEntries>
- </CheatEntry>
- <CheatEntry>
- <ID>462</ID>
- <Description>"Set Region for Position"</Description>
- <Options moHideChildren="1" moActivateChildrenAsWell="1" moDeactivateChildrenAsWell="1"/>
- <LastState/>
- <Color>008000</Color>
- <VariableType>Auto Assembler Script</VariableType>
- <AssemblerScript>define(address,PlayerState:Update+54)
- define(bytes,48 8B C8 48 83 EC 20)
- [ENABLE]
- assert(address,bytes)
- alloc(newmem,$100,PlayerState:Update+54)
- label(code)
- label(return)
- label(telechangeregiondata)
- registersymbol(telechangeregiondata)
- newmem:
- cmp [telechangeregiondata],1
- jne code
- // Save Registers for original function
- push rdx
- push rcx
- // Setup Call Parameters
- mov rdx,[telechangeregiondata+4] // Region ID
- mov rcx,rax // This-Pointer to PlayerModel
- // Call
- sub rsp,20
- call "MonomiPark.SlimeRancher.DataModel:PlayerModel:SetCurrRegionSet"
- add rsp,20
- // Restore Registers
- pop rcx
- pop rdx
- // Reset Flag
- mov [telechangeregiondata],0
- code:
- // Original Code
- mov rcx,rax
- sub rsp,20
- jmp return
- telechangeregiondata:
- dd 0,0
- address:
- jmp newmem
- nop
- nop
- return:
- [DISABLE]
- address:
- db bytes
- dealloc(newmem)
- </AssemblerScript>
- <CheatEntries>
- <CheatEntry>
- <ID>482</ID>
- <Description>"This=Enabled for above to work"</Description>
- <LastState/>
- <Color>0000FF</Color>
- <VariableType>Auto Assembler Script</VariableType>
- <AssemblerScript>{$lua}
- [ENABLE]
- local function checkcoords(timer)
- local y = readDouble("[teleregioncoords]+1D0")
- local z = readDouble("[teleregioncoords]+1D8")
- if y > 900 then
- writeInteger("telechangeregiondata+4",1) -- Desert
- writeInteger("telechangeregiondata",1) -- Flag
- elseif z < -550 then
- writeInteger("telechangeregiondata+4",2) -- Valley
- writeInteger("telechangeregiondata",1) -- Flag
- else
- writeInteger("telechangeregiondata+4",0) -- Home
- writeInteger("telechangeregiondata",1) -- Flag
- end
- end
- ----------------------------------
- if syntaxcheck then return end
- teletimer = createTimer(MainForm)
- teletimer.Interval = 50
- teletimer.OnTimer = checkcoords
- [DISABLE]
- if syntaxcheck then return end
- teletimer.destroy()
- </AssemblerScript>
- </CheatEntry>
- </CheatEntries>
- </CheatEntry>
- </CheatEntries>
- </CheatEntry>
- </CheatEntries>
- </CheatTable>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement