Jump to content
  • 0

Return to original value


blackturbo
 Share

Question

Select Close. I want it to return to its original state.

My script.

                     if cstatus1 == on then

                      cstatus1 = off

                         else

                             cstatus1 = on 

                         end

    

                          if cstatus1 == on then

    gg.setRanges(32)

    gg.searchNumber("1401;19:5",4)

    gg.refineNumber("1401",4) 

local start = gg.getResults(1)

local target = start[1].address + 0x4

local target2 = start[1].address + -0x4C

local target3 = start[1].address + -0x9C

local target4 = start[1].address + -0xEC

  gg.setValues ({

   {address = target,flags=4,value=150000},

   {address = target2,flags=4,value=150000},

      {address = target3,flags=4,value=150000},

      {address = target4,flags=4,value=150000}})

gg.toast("✅[ON]✅")

                                   else

   Help me

    Return to original value   

    gg.clearResults() 

    gg.toast("❌[OFF]❌")

                                    end

Edited by blackturbo
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1
5 hours ago, blackturbo said:

Select Close. I want it to return to its original state.

My script.

                     if cstatus1 == on then

                      cstatus1 = off

                         else

                             cstatus1 = on 

                         end

    

                          if cstatus1 == on then

    gg.setRanges(32)

    gg.searchNumber("1401;19:5",4)

    gg.refineNumber("1401",4) 

local start = gg.getResults(1)

local target = start[1].address + 0x4

local target2 = start[1].address + -0x4C

local target3 = start[1].address + -0x9C

local target4 = start[1].address + -0xEC

  gg.setValues ({

   {address = target,flags=4,value=150000},

   {address = target2,flags=4,value=150000},

      {address = target3,flags=4,value=150000},

      {address = target4,flags=4,value=150000}})

gg.toast("✅[ON]✅")

                                   else

   Help me

    Return to original value   

    gg.clearResults() 

    gg.toast("❌[OFF]❌")

                                    end

U mean it?

if revert ~= nil then gg.setValues(revert) end

Link to comment
Share on other sites

  • 0
On 9/8/2567 at 21 นาฬิกา 29 นาที, BloodMoonScript said:

คุณหมายถึงแบบนั้นเหรอ?

ถ้า revert ~= nil จากนั้นgg .setValues(revert) end

It doesn't work.

does not return to its original value.

I want to revert to the original value from the change to 150,000.

How should I write?

Link to comment
Share on other sites

  • 0
On 8/10/2024 at 6:59 PM, blackturbo said:

It doesn't work.

does not return to its original value.

I want to revert to the original value from the change to 150,000.

How should I write?

It work. Then u just write code wrong

 

If u change 5 float to 15 float, and u want back this value to 5(from revert) then u need write search 15 Float, get results, and write this code

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • 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.