Jump to content
  • 0

Using Mask And Offset in Script


XenClanad

Question

Posted

So im completely new to scripting with a little understanding on scripting. So recently i was trying to hacking and it work but everytime i leave the match i need to redo every search again because address that i search keep changing and it quite tiring so im planing to make script to make life easier but the problem is:

I dont know how to make a script that search for a value (Health) and then narrow it down to one by using mask address (EE0), and then use that one address with offset (-C) to hack and change value for (Cooldown) and freeze both value so i can get Godmode and No CD.

Im thinking of using search group value but i want the script to input health value manually by myself and then using that input to do the rest up above.

If there's any complete tutorial that could explain all about script and input code it would be awesome. Thank You

2 answers to this question

Recommended Posts

Posted
On 2/2/2023 at 10:37 AM, XenClanad said:

i want the script to input health value manually by myself and then using that input to do the rest up above.

Use prompt

 

On 2/2/2023 at 10:37 AM, XenClanad said:

I dont know how to make a script that search for a value (Health) and then narrow it down to one by using mask address (EE0)

Use searchNumberrefineAddress and getResults.

 

On 2/2/2023 at 10:37 AM, XenClanad said:

and then use that one address with offset (-C) to hack and change value for (Cooldown) and freeze both value so i can get Godmode and No CD.

Some example for offset and freeze after you got the results from the steps above: 

 

local t = gg.getResults(20)
local godMode = {}
local noCoolDown = {}
for i,v in pairs(t) do
  godMode[i] = {address = v.address, flags = gg.TYPE_FLOAT, value = "100", freeze = true}
  noCoolDown[i] = {address = v.address - 0xC, flags = gg.TYPE_FLOAT, value = "0", freeze = true}
end
gg.addListItems(godMode)
gg.addListItems(noCoolDown)

 

Posted
14 hours ago, Platonic said:

Use prompt

 

Use searchNumberrefineAddress and getResults.

 

Some example for offset and freeze after you got the results from the steps above: 

 

local t = gg.getResults(20)
local godMode = {}
local noCoolDown = {}
for i,v in pairs(t) do
  godMode[i] = {address = v.address, flags = gg.TYPE_FLOAT, value = "100", freeze = true}
  noCoolDown[i] = {address = v.address - 0xC, flags = gg.TYPE_FLOAT, value = "0", freeze = true}
end
gg.addListItems(godMode)
gg.addListItems(noCoolDown)

 

Thank You for your help yesterday i was tinkering with script menu sample and looking through tutorial from youtube and another forum and i finally did it. At least it work now but i don't know if it correct or not.

function hackgod()

  gg.alert(" \n⏸️ Please Pause ⏸️\n\nAnd Input Your Current Health Value ❤️\n")

  gg.sleep(1500)

  local p = gg.prompt({"❤️ Health Value ❤️"},nill,{"number"})

  if p == nil then gg.alert("Canceled") hack1() end

  gg.searchNumber(p[1], gg.TYPE_FLOAT)

  gg.getResults(10)

  gg.refineAddress("EE0", gg.TYPE_FLOAT)

  cnt = gg.getResultsCount(1)

  if cnt == 0 then gg.alert("\n❌ VALUE NOT FOUND ❌\n\n Please Try Again \n") hack1() end

  local t = gg.getResults(20)

  local godmode = t

local nocd = {}

for i,v in pairs(t) do

  godmode[i].freeze = true

  nocd[i] = {address = v.address - 0xC, flags = gg.TYPE_FLOAT, value = "200", freeze = true}

end

gg.addListItems(godmode)

gg.addListItems(nocd)

  gg.toast("✅ Active ✅")

  gg.clearResults()

end

 

  function reset()

gg.clearList("godmode", "nocd")

gg.toast("✅ CLEARED ✅")

  end

Im changing godmode from godmode = {} to godmode = t because i just want to freeze the value only not changing it (i don't know if that correct but it work) and i add a reset function because i want the value to get back to unfreeze every time i finish a stage because if not the game could crash after a few stage finish. But the problem is:

1. I don't know if: gg.clearList("godmode", "nocd")

is only clearing the list for godmode and nocd, I don't know if additemlist function like tag or something like that, because later i want to add a stat multiplier function and i want all the value under that function to keep have a freeze value until i exit the game so i worry that if clearlist function will delete that value later.

2. I don't know how to stop function because my script keep crashing for some reason and the reason is because i put an input like this:

if p == nil then gg.alert("Canceled") hack1() end

Basically i want the script to stop the function if i missclick or input a wrong number so it can get back to my menu. But for some reason my script keep running the whole function and because of that my script keep crashing, and i know this happen because even if the error message pop out i still get a message active from my function.

3. I want to make the gameguardian to pause before i input the health value in:

gg.alert(" \n⏸️ Please Pause ⏸️\n\nAnd Input Your Current Health Value ❤️\n")

  gg.sleep(1500)

  local p = gg.prompt({"❤️ Health Value ❤️"},nill,{"number"})

For now im using gg.sleep to pause script for a while before i input the value. But it would be so much better if after the message pop out rather than sleep game guardian would just pause so i can just click game guardian again to input the value. I already trying this:

while true do
  if gg.isVisible(true) then
    gg.setVisible(false)
  end

But it doesn't work and maybe this happen because my menu script was using it for main menu because there was this at the bottom:

while true do
  if gg.isVisible(true) then
    mainmenu = 1
    gg.setVisible(false)
  end

if mainmenu == 1 then START() end

I don't know things since this is completely my first time ever making a script but thank you for your help. so far i can use this script to play my game but i want to improve it to more stable and better script in the future.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.