0% found this document useful (0 votes)
4 views3 pages

Growganofth Left Lua

The document is a Lua script for a game that automates player actions such as entering worlds, dropping items, and collecting tickets. It includes functions for logging events, checking item counts, and navigating the game environment. The main loop continuously checks the player's status and performs actions based on the presence of specific items in the inventory.

Uploaded by

ahmadsenju994
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

Growganofth Left Lua

The document is a Lua script for a game that automates player actions such as entering worlds, dropping items, and collecting tickets. It includes functions for logging events, checking item counts, and navigating the game environment. The main loop continuously checks the player's status and performs actions based on the presence of specific items in the inventory.

Uploaded by

ahmadsenju994
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

-- Variabel

local eventGame = "r"


local storageItem = "SATANCAR"
local doorItem = "TES"
local itemGanothL = {1936, 1880, 1884}
local itemGanothR = {1940, 1878, 1930}

-- Fungsi
function log(str)
local x = {}
x[0] = "OnTextOverlay"
x[1] = str
sendVariant(x)
end

function getItemCount(x)
for _, item in pairs(getInventory()) do
if (item.id) == x then
return item.amount
end
end
return 0
end

function enter_(int_x, int_y)


sendPacketRaw(false, {tilex = int_x, tiley = int_y, type = 7, value = 18})
end

function hit_(x, y)
sendPacketRaw(false, {x = getLocal().pos.x, y = getLocal().pos.y, tilex = x,
tiley = y, type = 3, value = 18})
end

function enterWorld(w, i)
sendPacket(3, "action|join_request\nname|" .. w .. "|" .. i)
end

function dropReward()
local inventory = getInventory()
if inventory ~= nil then
for _, p in pairs(inventory) do
if p ~= nil then
for _, item in pairs(itemGanothR) do
if (item.id) == item then
sendPacket(2, "action|drop\n|itemID|" .. item)
sendPacket(2, "action|dialog_return\ndialog_name|drop_item\
nitemID|" .. item .. "|\ncount|" .. p.amount)
sleep(200)
end
end
end
end
end
end

function getTicket()
local worldObjects = getWorldObject()
if worldObjects ~= nil then
for _, obj in pairs(worldObjects) do
if obj ~= nil and (obj.id) == 1898 then
local objX = obj.pos.x // 32
local objY = obj.pos.y // 32
findPath(objX, objY)
sleep(2500)
end
end
end
end

-- Loop utama
while true do
sleep(1000)
local localPlayer = getLocal()
if localPlayer ~= nil then
local x = math.floor(localPlayer.pos.x / 32)
local y = math.floor(localPlayer.pos.y / 32)

if getItemCount(1898) == 0 then
toggleCheat(26, false)
enterWorld(storageItem, doorItem)
log("Joined Storage World")
sleep(2000)
dropReward()
log("Dropped Reward Item")
sleep(200)
getTicket()
log("Take Ticket")
sleep(500)
enterWorld("CARNIVAL", "1")
log("Joined CARNIVAL")
sleep(2000)
else
toggleCheat(26, true)
if eventGame == "r" then
findPath(90, 39)
sleep(1000)
end

if x == 90 then
findPath(92, 37)
sleep(200)
enter_(92, 37)
sleep(200)
end

if x == 96 then
findPath(96, 23)
sleep(200)
hit_(96, 23)
sleep(200)
end
end
else
log("Menunggu karakter lokal dimuat...")
sleep(1000)
end
end

You might also like