You are on page 1of 2

--Script by Limitz#4889

--allows to transfer from world to world or same world


--supports mag/vend/dropped to mag/vend/dropped

WORLD_FROM = "" --world where the player will take/retrieve


WORLD_TO = "" --world where the player will put/drop

ITEM_ID = 13593 --item that you want to transfer


DIALOG_ID = -274 --dialog id of item

--dont set two variables to true


FROM_VEND = true
FROM_MAG = false
FROM_DROP = false

FROM_X,FROM_Y =0,0 --coordinates where the player will take/retrieve

--dont set two variables to true


TO_VEND = false
TO_MAG = true
TO_DROP = false

TO_X,TO_Y = 0,0 --coordinates where the player will put/drop

DELAY = 7000 --Delay when you enter a world

function PathFind(x,y)
if CheckPath(x+1,y) then
FindPath(x+1,y)
elseif CheckPath(x-1,y) then
FindPath(x-1,y)
elseif CheckPath(x,y+1) then
FindPath(x,y+1)
elseif CheckPath(x,y-1) then
FindPath(x,y-1)
else
FindPath(x,y)
end
end

local function p(x, y, id)


local player = GetLocal()
local pkt_punch = {
type = 3,
int_data = id,
pos_x = player.pos_x,
pos_y = player.pos_y,
int_x = x,
int_y = y,
}
SendPacketRaw(pkt_punch)
end

while true do
if GetLocal().world ~= WORLD_FROM then
SendPacket(3, "action|join_request\nname|" .. WORLD_FROM .. "\ninvitedWorld|0")
Sleep(DELAY)
end

if FROM_VEND then
FindPath(FROM_X,FROM_Y)
Sleep(100)
p(FROM_X,FROM_Y,32)
Sleep(100)
SendPacket(2,"action|dialog_return\ndialog_name|vend_edit\nx|" .. FROM_X .. "|\ny|"
.. FROM_Y "|\nbuttonClicked|pullstock")
elseif FROM_MAG then
PathFind(FROM_X,FROM_Y)
Sleep(100)
p(FROM_X,FROM_Y,32)
Sleep(100)
SendPacket(2,"action|dialog_return\ndialog_name|magplant_edit\nx|".. FROM_X .."|\
ny|".. FROM_Y .."|\nbuttonClicked|withdraw")
else
FindPath(FROM_X,FROM_Y)
Sleep(1000)
end

if GetLocal().world ~= WORLD_TO then


SendPacket(3, "action|join_request\nname|" .. WORLD_TO .. "\ninvitedWorld|0")
Sleep(DELAY)
end

if TO_VEND then
FindPath(TO_X,TO_Y)
Sleep(100)
p(TO_X,TO_Y,32)
Sleep(100)
SendPacket(2,"action|dialog_return\ndialog_name|vend_edit\nx|" .. TO_X .. "|\
ny|" .. TO_Y .. "|\nbuttonClicked|addstock")
elseif TO_MAG then
PathFind(TO_X,TO_Y)
Sleep(100)
p(TO_X,TO_Y,32)
Sleep(100)
SendPacket(2,"action|dialog_return\ndialog_name|magplant_edit\nx|".. TO_X .."|\
ny|".. TO_Y .."|\nbuttonClicked|additems")
else
FindPath(TO_X - 1,TO_Y)
Sleep(1000)
SendPacket(2,"action|dialog_return\ndialog_name|drop\nitem_drop|" .. DIALOG_ID ..
"|\nitem_count|" .. GetItemCount(ITEM_ID) .. "")
end

end

You might also like