--[Convert gems to BGL]
--[3 block far from telephone]
totalConvert = 0
delayConvert = 150
NewVersionGL = false
--[Main Script]
Var0 = "OnDialogRequest"
Var1 = [[set_default_color|`w
add_label_with_icon|small|`8BooLua Community|left|2918|
add_spacer|small|
add_label_with_icon|small|`5VIP `b- `5Free Scripts CPS|left|1368|
add_label_with_icon|small|`eGL `b- `2BotHax `b- `8GPai|left|1368|
add_label_with_icon|small|`6Report Bug Script|left|1368|
add_label_with_icon|small|`3Request Script|left|1368|
add_label_with_icon|small|`8Learn Script|left|1368|
add_spacer|small|
add_url_button||`qDiscord``|NOFLAGS|https://discord.gg/Any9dcWNwE|`$BooLua
Community.|0|0|
add_smalltext|`9Need more scripts?!Join now!|
add_quick_exit|]]
if NewVersionGL then
SendVariant({v1 = Var0, v2 = Var1})
else
SendVariant({v0 = Var0, v1 = Var1})
end
posX = math.floor(GetLocal().posX / 32)
posY = math.floor(GetLocal().posY / 32)
tiles = {}
for tileX = 0, 199 do
for tileY = 0, 199 do
if GetTile(tileX, tileY).fg == 3898 then
table.insert(tiles, {tileX, tileY})
end
end
end
minDist = math.huge
for _, xy in ipairs(tiles) do
dist = math.sqrt((posX - xy[1])^2 + (posY - xy[2])^2)
if dist < minDist then
minDist = dist
coor = xy
end
end
telX, telY = coor[1], coor[2]
for i = 1, 2 do
SendPacket(2, "action|dialog_return\ndialog_name|telephone\nnum|53785|\nx|" ..
telX .. "|\ny|" .. telY .. "|\nbuttonClicked|bglconvert2")
Sleep(delayConvert)
end
LogToConsole("DONE")