What's the problem:
I have the coordinates of a character and I want to teleport it to the coordinates x = 1575, y = 1356, z = 13.44929885.
When I teleport a character through the Game Guardian interface, everything works and the character teleports.
BUT when I do the same with a script, the game crashes and Game Guardian throws a ptrace error: Game is protected.
How is it possible to fix the crash of the game?
Code in function:
gg.clearResults()
gg.setRanges(gg.REGION_C_ALLOC)
gg.sleep(300)
gg.getResults(6666)
gg.searchNumber('1 688;1 374;11.99852752686', gg.TYPE_FLOAT)
gg.refineNumber('1 688', gg.TYPE_FLOAT)
local x = gg.getResults(9999)
gg.clearResults()
gg.searchNumber('1 688;1 374;11.99852752686', gg.TYPE_FLOAT)
gg.refineNumber('1 374', gg.TYPE_FLOAT)
local y = gg.getResults(9999)
gg.clearResults()
gg.searchNumber('1 688;1 374;11.99852752686', gg.TYPE_FLOAT)
gg.refineNumber('11.99852752686', gg.TYPE_FLOAT)
local z = gg.getResults(9999)
gg.clearResults()
for repeatC = 1, 99 do
gg.sleep(2000)
for i, v in ipairs(x) do
if v.flags == gg.TYPE_FLOAT then
v.value = '1575'
v.freeze = true
end
end
gg.addListItems(x)
gg.clearResults()
for i, v in ipairs(y) do
if v.flags == gg.TYPE_FLOAT then
v.value = '1356'
v.freeze = true
end
end
gg.addListItems(y)
gg.clearResults()
for i, v in ipairs(z) do
if v.flags == gg.TYPE_FLOAT then
v.value = '13.44929885'
v.freeze = true
end
end
gg.addListItems(z)
gg.clearResults()