ibrahimsbaI Posted November 24, 2022 Posted November 24, 2022 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
Platonic Posted November 24, 2022 Posted November 24, 2022 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: X = 1147030094 Y = 1104814040 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)
Platonic Posted November 24, 2022 Posted November 24, 2022 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)
ibrahimsbaI Posted November 24, 2022 Author Posted November 24, 2022 I put it in the script but the value didn't change
HorridModz Posted November 25, 2022 Posted November 25, 2022 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.
Platonic Posted November 25, 2022 Posted November 25, 2022 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.png You forgot to add "gg.setValues(xyz)" function itlboss1() -- your current code(no need for xyz = gg.getResults(3) gg.setValues(xyz) end
Question
ibrahimsbaI
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
5 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.