0% found this document useful (0 votes)
13 views2 pages

Convert Tax

Uploaded by

starries.real
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)
13 views2 pages

Convert Tax

Uploaded by

starries.real
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/ 2

local TELEPHONE_X = 0 -- do not touch

local TELEPHONE_Y = 0 -- do not touch

local DONE = false -- do not touch

function Hook(varlist)
if varlist[0]:find("OnConsoleMessage") and varlist[1]:find("Tax Credit") then
return true
end

if varlist[0]:find("OnDialogRequest") and varlist[1]:find("Telephone") then


if TELEPHONE_X == 0 and TELEPHONE_Y == 0 then
TELEPHONE_X = varlist[1]:match('embed_data|x|(%d+)')
TELEPHONE_Y = varlist[1]:match('embed_data|y|(%d+)')
end

return true
end

if varlist[0]:find("OnTalkBubble") and varlist[2]:find("Not enough Tax Credit")


then
DONE = true
end
end

AddCallback("?", "OnVarlist", Hook)

local function Dialog()


local var = {}
var[0] = "OnDialogRequest"
var[1] = "set_default_color|`o\nadd_label_with_icon|big|`2asleepdream#8973's
Auto Convert Tax``|left|1796|\nadd_textbox|Wrench the telephone that you want to
use.|\nend_dialog|||Continue|"
var.netid = -1
SendVarlist(var)
end

Dialog()

while true do
if DONE then return end

if (TELEPHONE_X ~= 0 and TELEPHONE_Y ~= 0) then

while true do
if GetItemCount(1486) >= 200 then
local packet = {}
packet.type = 10
packet.int_data = 1486
SendPacketRaw(packet)
Sleep(50)
SendPacketRaw(packet)
Sleep(50)
elseif GetItemCount(1486) >= 100 and GetItemCount(1486) < 200 then
local packet = {}
packet.type = 10
packet.int_data = 1486
SendPacketRaw(packet)
Sleep(50)
end

SendPacket(2, "action|dialog_return\ndialog_name|telephone\nnum|12345|\
nx|"..TELEPHONE_X.."|\ny|"..TELEPHONE_Y.."|\nbuttonClicked|tax_to_gtoken\n")
Sleep(100)
end

RemoveCallback("?")
DONE = true
end
end

You might also like