Jump to content
  • 0

Create a teleportation script


ibrahimsbaI
 Share

Question

How can I create a script for teleportation 

Where in the beginning you record three values and then change each value alone

Note that the value must be stored from the beginning once, because once you change your location, it is difficult to find the values

Exampl:

gg.searchNumber("1065353216;1147030094;1104814040;1145908920;1077039526", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0)

    gg.refineNumber("1147030094;1104814040;1145908920", gg.TYPE_DWORD)

After I found the values, how do I store them and call them to change them 

1147030094 to 1138487986

1104814040 to 1114810441

1145908920 To 1143816785

Thx

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

 

25 minutes ago, ibrahimsbaI said:

How can I create a script for teleportation 

Where in the beginning you record three values and then change each value alone

Note that the value must be stored from the beginning once, because once you change your location, it is difficult to find the values

Exampl:

gg.searchNumber("1065353216;1147030094;1104814040;1145908920;1077039526", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0)

    gg.refineNumber("1147030094;1104814040;1145908920", gg.TYPE_DWORD)

After I found the values, how do I store them and call them to change them 

1147030094 to 1138487986

1104814040 to 1114810441

1145908920 To 1143816785

Thx

Only based on your script. If your results are in the subsequent order:

  1. X = 1147030094
  2. Y = 1104814040
  3. Z = 1145908920

 

gg.searchNumber("1065353216;1147030094;1104814040;1145908920;1077039526", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0)

    gg.refineNumber("1147030094;1104814040;1145908920", gg.TYPE_DWORD)
xyz = gg.getResults(3) -- if you only get 3 results

gg.editAll("1138487986;1114810441;1143816785", gg.TYPE_DWORD)

 

Link to comment
Share on other sites

  • 0
29 minutes ago, ibrahimsbaI said:

How can I create a script for teleportation 

Where in the beginning you record three values and then change each value alone

This works to:

gg.searchNumber("1065353216;1147030094;1104814040;1145908920;1077039526", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0)

gg.refineNumber("1147030094;1104814040;1145908920", gg.TYPE_DWORD)
xyz = gg.getResults(3) -- if you only get 3 results

xyz[1].value = "1138487986"
xyz[2].value = "1114810441"
xyz[3].value = "1143816785"

gg.setValues(xyz)

 

Link to comment
Share on other sites

  • 0
20 hours ago, ibrahimsbaI said:

How can I create a script for teleportation 

Where in the beginning you record three values and then change each value alone

Note that the value must be stored from the beginning once, because once you change your location, it is difficult to find the values

Exampl:

gg.searchNumber("1065353216;1147030094;1104814040;1145908920;1077039526", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0)

    gg.refineNumber("1147030094;1104814040;1145908920", gg.TYPE_DWORD)

After I found the values, how do I store them and call them to change them 

1147030094 to 1138487986

1104814040 to 1114810441

1145908920 To 1143816785

Thx

Try using the saved list, which saves values that can be accessed globally - even by the user or by another script.

savedlist = gg.getListItems()
found = False
for i = 1, #savedlist do
  if savedlist[i].name == "xpos" then
    found = True
    break
    end
end
if not found then
  	--[[ Search code copied from @Platonic ]]
	gg.searchNumber("1065353216;1147030094;1104814040;1145908920;1077039526", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0)
	gg.refineNumber("1147030094;1104814040;1145908920", gg.TYPE_DWORD)
	xyz = gg.getResults(3) -- if you only get 3 results
	xyz[1].name = "xpos"
	xyz[2].name = "ypos"
	xyz[3].name = "zpos"
	gg.addListItems(xyz)
end

function enable()
    savedlist = gg.getListItems()
    for i = 1, #savedlist do
  		if savedlist[i].name == "xpos" then
    		savedlist[i].value = "1138487986"
        end
      	if savedlist[i].name == "ypos" then
    		savedlist[i].value = "1114810441"
        end
		if savedlist[i].name == "zpos" then
    		savedlist[i].value = "1143816785"
        end
    end
	gg.setValues(savedlist)
  	gg.clearResults()
  	gg.clearList()
    gg.addListItems(savedlist)
end
  
function disable()
    savedlist = gg.getListItems()
    for i = 1, #savedlist do
  		if savedlist[i].name == "xpos" then
    		savedlist[i].value = "1147030094"
        end
      	if savedlist[i].name == "ypos" then
    		savedlist[i].value = "1104814040"
        end
		if savedlist[i].name == "zpos" then
    		savedlist[i].value = "1145908920"
        end
    end
	gg.setValues(savedlist)
  	gg.clearResults()
  	gg.clearList()
    gg.addListItems(savedlist)
end
  
function toggle()
    savedlist = gg.getListItems()
    for i = 1, #savedlist do
  		if savedlist[i].name == "xpos" then
    		if savedlist[i].value == "1138487986" then
          		savedlist[i].value = "1147030094"
    		else
          		savedlist[i].value = "1138487986"
          	end
        end
      	if savedlist[i].name == "ypos" then
        	if savedlist[i].value == "1114810441" then
          		savedlist[i].value = "1104814040"
    		else
          		savedlist[i].value = "1114810441"
          	end
        end
		if savedlist[i].name == "zpos" then
        	if savedlist[i].value == "1143816785" then
          		savedlist[i].value = "1145908920"
    		else
          		savedlist[i].value = "1143816785"
          	end
        end
    end
	gg.setValues(savedlist)
  	gg.clearResults()
  	gg.clearList()
    gg.addListItems(savedlist)
end

 

When run, this code searches for and adds the values to the saved list if they do not already exist. I also created functions to enable, disable, and toggle the teleportation hack.

Edited by HorridModz
Link to comment
Share on other sites

  • 0
8 hours ago, ibrahimsbaI said:

 

 

5 hours ago, ibrahimsbaI said:

I put it in the script but the value didn't change

Screenshot_20221125-001313.pngScreenshot_20221125-001313.png

You forgot to add "gg.setValues(xyz)"

function itlboss1()
  -- your current code(no need for xyz = gg.getResults(3)
  gg.setValues(xyz)
  end

 

Edited by Platonic
Did not check the group search properly
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.