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

HelperZyy Lua

Uploaded by

vrhrghrggvrv
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)
36 views3 pages

HelperZyy Lua

Uploaded by

vrhrghrggvrv
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

fdrop = false

ftrash = false
addvend = false
takevend = false

function inv(id)
for _, item in pairs(GetInventory()) do
if ([Link] == id) then
return [Link]
end
end
return 0
end

function hooq(ck)
systemlog = "`w[`$Zyy`w]"
varcontent = ck.v2
if ck.v1 == "OnConsoleMessage" then
LogToConsole(systemlog .. varcontent)
return true
end
if ftrash and ck.v2:find("destroy") then
count = ck.v2:match("you have (%d+)")
item = ck.v2:match("itemID|(%d+)")
SendPacket(2, "action|dialog_return\ndialog_name|trash_item\nitemID|"..item.."|\
ncount|"..count.."\n")
return true
end
if fdrop and ck.v2:find("Drop") then
count = ck.v2:match("count||(%d+)")
item = ck.v2:match("itemID|(%d+)")
SendPacket(2, "action|dialog_return\ndialog_name|drop_item\nitemID|"..item.."|\
ncount|"..count.."\n")
return true
end
if addvend and ck.v2:find("Machine") then
vatilex = ck.v2:match("tilex|(%d+)")
vatiley = ck.v2:match("tiley|(%d+)")
SendPacket(2, "action|dialog_return\ndialog_name|vending\ntilex|"..vatilex.."|\
ntiley|"..vatiley.."|\nbuttonClicked|addstock")
return true
end
if takevend and ck.v2:find("Machine") then
vttilex = ck.v2:match("tilex|(%d+)")
vttiley = ck.v2:match("tiley|(%d+)")
SendPacket(2, "action|dialog_return\ndialog_name|vending\ntilex|"..vttilex.."|\
ntiley|"..vttiley.."|\nbuttonClicked|pullstock")
return true
end
return false
end

function log(txt)
LogToConsole("`0[`$Zyy`w]" .. txt)
end
function ont(txt)
var = {}
var.v1 = "OnTextOverlay"
var.v2 = txt
SendVariant(var)
end
function custom_command(type, packet)
if packet:find("action|friends") or packet:find("buttonClicked|link") then
link = [[
add_label_with_icon|big|`2Helper Zyy |left|10110|
add_spacer|small|
add_label_with_icon|smal|`9Hello, `1]] .. GetLocal().name .. [[
|left|6272|
add_smalltext|`1Thanks For Using My Script|left|
add_spacer|medium|
text_scaling_string|imlookingcool|
add_button_with_icon|ftrash|`4Fast `wTrash |staticYellowFrame|448|
add_button_with_icon|fdrop|`3Fast `wDrop |staticYellowFrame|448|
add_spacer|small|
add_button_with_icon||END_LIST|noflags|0||
text_scaling_string|asdasdasdsaas|
add_button_with_icon|vndadd|`4Vend `wAdd |staticYellowFrame|9268|
add_button_with_icon|vndtake|`3Vend `wTake |staticYellowFrame|9268|
add_button_with_icon||END_LIST|noflags|0||
add_quick_exit|
end_dialog|link|Cancel|OK|
]]
var = {}
var.v1 = "OnDialogRequest"
var.v2 = link
SendVariant(var)
end
if packet:find("buttonClicked|ftrash") or packet:find("/ftrash") or
packet:find("/Ftrash") then
if false == ftrash then
ftrash = true
fdrop = false
ont("`9Fast Trash `2Enable")
log("`9Fast Trash `2Enable")
return true
else
ftrash = false
ont("`9Fast Trash `4Disable")
log("`9Fast Trash `4Disable")
return true
end
end
if packet:find("buttonClicked|fdrop") or packet:find("/fdrop") then
if false == fdrop then
fdrop = true
ftrash = false
ont("`wFast Drop `2Enable")
log("`wFast Drop `2Enable")
return true
else
fdrop = false
ont("`wFast Drop `4Disable")
log("`wFast Drop `4Disable")
return true
end
end
if packet:find("buttonClicked|vndadd") or packet:find("/vadd") or
packet:find("/Vadd") then
if false == addvend then
addvend = true
takevend = false
ont("`9Vend Add `2Enable")
log("`9Vend Add `2Enable")
return true
else
addvend = false
ont("`9Vend Add `4Disable")
log("`9Vend Add `4Disable")
return true
end
end
if packet:find("buttonClicked|vndtake") or packet:find("/vtake") or
packet:find("/Vtake") then
if false == takevend then
addvend = false
takevend = true
ont("`9Vend Take `2Enable")
log("`9Vend Take `2Enable")
return true
else
takevend = false
ont("`9Vend Take `4Disable")
log("`9Vend Take `4Disable")
return true
end
end
return false
end
AddHook(custom_command, "OnSendPacket")
AddHook(hooq, "OnVariant")

You might also like