Jump to content
  • 0

Create a teleportation script


ibrahimsbaI

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

 

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

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

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.

Link to comment
Share on other sites

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.