Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <CheatTable>
  3. <CheatEntries>
  4. <CheatEntry>
  5. <ID>103</ID>
  6. <Description>"Teleport Activation"</Description>
  7. <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
  8. <LastState Activated="1"/>
  9. <Color>800000</Color>
  10. <VariableType>Auto Assembler Script</VariableType>
  11. <AssemblerScript>define(address,"UnityPlayer.dll"+D08435)
  12. define(bytes,F2 41 0F 11 8E D8 01 00 00)
  13.  
  14. [ENABLE]
  15. assert(address,bytes)
  16. alloc(newmem,$1000,"UnityPlayer.dll"+D08435)
  17.  
  18. label(return)
  19. label(save)
  20. label(load)
  21. label(presetlocationload)
  22. label(telecall)
  23. label(teledata)
  24. label(telecoords)
  25. label(teleregioncoords)
  26. registersymbol(teleregioncoords)
  27. registersymbol(teledata)
  28.  
  29. newmem:
  30. // original code, z update
  31. movsd [r14+000001D8],xmm1
  32.  
  33. // Save Base Address
  34. mov [teleregioncoords],r14
  35.  
  36. // Determine if hotkey was pressed
  37. mov eax,[teledata]
  38. mov [teledata],0
  39. cmp eax,1
  40. je save
  41. cmp eax,2
  42. je load
  43. cmp eax,3
  44. je presetlocationload
  45. jmp return
  46.  
  47. save:
  48. movupd [telecoords],xmm0
  49. movsd [telecoords+10],xmm1
  50. jmp return
  51.  
  52. load:
  53. mov rax, telecoords
  54. call telecall
  55. jmp return
  56.  
  57. presetlocationload:
  58. // get and verify index
  59. mov eax, [teledata+4]
  60. cmp eax,0
  61. jle return
  62. {$lua}
  63. local count = AddressList.getMemoryRecordByID(397).DropDownList.Count
  64. return 'cmp eax,' .. count
  65. {$asm}
  66. jge return
  67.  
  68. // load coordinates using index
  69. // this would be easier with lea rax, [teledata+rax*18+8] but that won't assemble...
  70. push rdx
  71. mov rdx, 18
  72. mul rdx // multiply rax (index) by rdx aka 0x18 aka 24 aka the size of 3 doubles
  73. mov rdx, telecoords
  74. add rax, rdx // add base of coordinates array (-8 since telecall adds 8)
  75. pop rdx
  76.  
  77. call telecall
  78. jmp return
  79.  
  80. telecall:
  81. movsd xmm0,[rax]
  82. movsd [r14+1C8],xmm0
  83. movsd xmm0,[rax+8]
  84. movsd [r14+1D0],xmm0
  85. movsd xmm0,[rax+10]
  86. movsd [r14+1D8],xmm0
  87. ret
  88.  
  89.  
  90. teleregioncoords:
  91. dq 0 // Base Address
  92.  
  93. teledata:
  94. dd 1 // Flag // [teledata]
  95. dd 1 //Preset Locations for player to select // [teledata+4]
  96. telecoords:
  97. dq 0 //X-Pos // [teledata+8]
  98. dq 0 //Y-Pos // [teledata+10]
  99. dq 0 //Z-Pos // [teledata+18]
  100.  
  101. // Preset Location Coords // PL
  102.  
  103. // Ranch // PL = 1
  104. dq (double)89.3 // X-Pos +20
  105. dq (double)16.0 // Y-Pos +28
  106. dq (double)-144.46 // Z-Pos +30
  107.  
  108. // Ogden's Retreat // PL = 2
  109. dq (double)900 // + 68
  110. dq (double)3 // +70
  111. dq (double)485 // +78
  112.  
  113. // Vault 1 // PL = 3
  114. dq (double)871.15 // +38
  115. dq (double)6.0 // +40
  116. dq (double)-2.25 // +48
  117.  
  118. // Vault 2 // PL = 4
  119. dq (double)831.34 // +50
  120. dq (double)12.8 // +58
  121. dq (double)105.9 // + 60
  122.  
  123. // Vault 3 // PL = 5
  124. dq (double)810.43 // + 68
  125. dq (double)18.0 // +70
  126. dq (double)206.63 // +78
  127.  
  128. address:
  129. jmp newmem
  130. nop
  131. nop
  132. nop
  133. nop
  134. return:
  135.  
  136. [DISABLE]
  137.  
  138. address:
  139. db bytes
  140.  
  141. dealloc(newmem)
  142. unregistersymbol(teledata)
  143. unregistersymbol(teleregiondata)
  144. </AssemblerScript>
  145. <CheatEntries>
  146. <CheatEntry>
  147. <ID>396</ID>
  148. <Description>"Teleport Flag"</Description>
  149. <DropDownList ReadOnly="1" DescriptionOnly="1" DisplayValueAsItem="1">0:Do Nothing
  150. 1:Save Current Location
  151. 2:Teleport to Saved Location
  152. 3:Teleport to Selected Location
  153. </DropDownList>
  154. <LastState Value="0" RealAddress="7FF98A490119"/>
  155. <Color>008000</Color>
  156. <VariableType>4 Bytes</VariableType>
  157. <Address>teledata</Address>
  158. <Hotkeys>
  159. <Hotkey>
  160. <Action>Set Value</Action>
  161. <Keys>
  162. <Key>97</Key>
  163. </Keys>
  164. <Value>1</Value>
  165. <ID>0</ID>
  166. </Hotkey>
  167. <Hotkey>
  168. <Action>Set Value</Action>
  169. <Keys>
  170. <Key>98</Key>
  171. </Keys>
  172. <Value>2</Value>
  173. <ID>1</ID>
  174. </Hotkey>
  175. <Hotkey>
  176. <Action>Set Value</Action>
  177. <Keys>
  178. <Key>99</Key>
  179. </Keys>
  180. <Value>3</Value>
  181. <ID>2</ID>
  182. </Hotkey>
  183. </Hotkeys>
  184. </CheatEntry>
  185. <CheatEntry>
  186. <ID>397</ID>
  187. <Description>"Select Location"</Description>
  188. <DropDownList ReadOnly="1" DescriptionOnly="1" DisplayValueAsItem="1">0:Nowhere
  189. 1:Ranch
  190. 2:Ogden's Retreat
  191. 3:Vault 1
  192. 4:Vault 2
  193. 5:Vault 3
  194. </DropDownList>
  195. <LastState Value="2" RealAddress="7FF98A49011D"/>
  196. <Color>008000</Color>
  197. <VariableType>4 Bytes</VariableType>
  198. <Address>teledata+4</Address>
  199. <Hotkeys>
  200. <Hotkey>
  201. <Action>Increase Value</Action>
  202. <Keys>
  203. <Key>107</Key>
  204. </Keys>
  205. <Value>1</Value>
  206. <ID>0</ID>
  207. </Hotkey>
  208. <Hotkey>
  209. <Action>Decrease Value</Action>
  210. <Keys>
  211. <Key>109</Key>
  212. </Keys>
  213. <Value>1</Value>
  214. <ID>1</ID>
  215. </Hotkey>
  216. </Hotkeys>
  217. </CheatEntry>
  218. <CheatEntry>
  219. <ID>106</ID>
  220. <Description>"Saved Coords"</Description>
  221. <Options moHideChildren="1"/>
  222. <LastState Value="" RealAddress="00000000"/>
  223. <Color>008000</Color>
  224. <GroupHeader>1</GroupHeader>
  225. <CheatEntries>
  226. <CheatEntry>
  227. <ID>393</ID>
  228. <Description>"Saved X-Pos"</Description>
  229. <LastState Value="871.150024414063" RealAddress="7FF98A490121"/>
  230. <Color>808000</Color>
  231. <VariableType>Double</VariableType>
  232. <Address>teledata+8</Address>
  233. </CheatEntry>
  234. <CheatEntry>
  235. <ID>394</ID>
  236. <Description>"Saved Y-Pos"</Description>
  237. <LastState Value="2.89876809716225" RealAddress="7FF98A490129"/>
  238. <Color>808000</Color>
  239. <VariableType>Double</VariableType>
  240. <Address>teledata+10</Address>
  241. </CheatEntry>
  242. <CheatEntry>
  243. <ID>395</ID>
  244. <Description>"Saved Z-Pos"</Description>
  245. <LastState Value="-2.25000190734863" RealAddress="7FF98A490131"/>
  246. <Color>808000</Color>
  247. <VariableType>Double</VariableType>
  248. <Address>teledata+18</Address>
  249. </CheatEntry>
  250. </CheatEntries>
  251. </CheatEntry>
  252. <CheatEntry>
  253. <ID>462</ID>
  254. <Description>"Set Region for Position"</Description>
  255. <Options moHideChildren="1" moActivateChildrenAsWell="1" moDeactivateChildrenAsWell="1"/>
  256. <LastState/>
  257. <Color>008000</Color>
  258. <VariableType>Auto Assembler Script</VariableType>
  259. <AssemblerScript>define(address,PlayerState:Update+54)
  260. define(bytes,48 8B C8 48 83 EC 20)
  261.  
  262. [ENABLE]
  263. assert(address,bytes)
  264. alloc(newmem,$100,PlayerState:Update+54)
  265.  
  266. label(code)
  267. label(return)
  268. label(telechangeregiondata)
  269. registersymbol(telechangeregiondata)
  270.  
  271. newmem:
  272. cmp [telechangeregiondata],1
  273. jne code
  274. // Save Registers for original function
  275. push rdx
  276. push rcx
  277. // Setup Call Parameters
  278. mov rdx,[telechangeregiondata+4] // Region ID
  279. mov rcx,rax // This-Pointer to PlayerModel
  280. // Call
  281. sub rsp,20
  282. call "MonomiPark.SlimeRancher.DataModel:PlayerModel:SetCurrRegionSet"
  283. add rsp,20
  284. // Restore Registers
  285. pop rcx
  286. pop rdx
  287. // Reset Flag
  288. mov [telechangeregiondata],0
  289.  
  290. code:
  291. // Original Code
  292. mov rcx,rax
  293. sub rsp,20
  294. jmp return
  295.  
  296. telechangeregiondata:
  297. dd 0,0
  298.  
  299. address:
  300. jmp newmem
  301. nop
  302. nop
  303. return:
  304.  
  305. [DISABLE]
  306.  
  307. address:
  308. db bytes
  309.  
  310. dealloc(newmem)
  311. </AssemblerScript>
  312. <CheatEntries>
  313. <CheatEntry>
  314. <ID>482</ID>
  315. <Description>"This=Enabled for above to work"</Description>
  316. <LastState/>
  317. <Color>0000FF</Color>
  318. <VariableType>Auto Assembler Script</VariableType>
  319. <AssemblerScript>{$lua}
  320. [ENABLE]
  321. local function checkcoords(timer)
  322. local y = readDouble("[teleregioncoords]+1D0")
  323. local z = readDouble("[teleregioncoords]+1D8")
  324. if y &gt; 900 then
  325. writeInteger("telechangeregiondata+4",1) -- Desert
  326. writeInteger("telechangeregiondata",1) -- Flag
  327. elseif z &lt; -550 then
  328. writeInteger("telechangeregiondata+4",2) -- Valley
  329. writeInteger("telechangeregiondata",1) -- Flag
  330. else
  331. writeInteger("telechangeregiondata+4",0) -- Home
  332. writeInteger("telechangeregiondata",1) -- Flag
  333. end
  334. end
  335. ----------------------------------
  336. if syntaxcheck then return end
  337. teletimer = createTimer(MainForm)
  338. teletimer.Interval = 50
  339. teletimer.OnTimer = checkcoords
  340. [DISABLE]
  341. if syntaxcheck then return end
  342. teletimer.destroy()
  343. </AssemblerScript>
  344. </CheatEntry>
  345. </CheatEntries>
  346. </CheatEntry>
  347. </CheatEntries>
  348. </CheatEntry>
  349. </CheatEntries>
  350. </CheatTable>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement