Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function btnPack()
- if isPVw() then do return end end
- if not Global.getVar("oWisOn") or not aBase then do return end end
- if ss != "" or prs != "" then broadcastToAll("The Current Zone is Busy...", {0.943, 0.745, 0.14}) do return end end
- if not findBags() then do return end end if tBag then dumpSet() end local l = vBase.getLuaScript()
- n = 1 local p, f, u, r, m local s = "" aoj = getAllObjects() g = aoj[1] local a = string.char(10) local k = string.char(44)
- while g do
- p = g.getPosition() f = g.getGUID() u = 0 if g.getLock() then u = 1 end
- if math.abs(p[3]) < 26 and math.abs(p[1]) < 44 and math.abs(p[2]) < 26 then
- if string.find("059864@3761d8@ff9bc3@2deca3@649822", f) then m = 1 end
- if not string.find("FogOfWarTrigger@ScriptingTrigger@3DText", g.name) and not string.find(l, f) then
- ss = ss..g.guid r = g.getRotation() s = s.."--"..f..k..p[1]..k..p[2]..k..p[3]..k..r[1]..k..r[2]..k..r[3]..k..u..a
- end
- end n = n+1 g = aoj[n]
- end z2 = 1
- if ss != "" then
- if m then ss = "" broadcastToAll("Pack Canceled. Remove SkyBox Tool.", {0.943, 0.745, 0.14})
- else aBase.setLuaScript(s) broadcastToAll("Packing Zone...", {0.943, 0.745, 0.14})
- local t = {} t.type = "Bag" t.position = {0, 4, 0} t.callback = "doPack" t.callback_owner = self spawnObject(t)
- end
- else
- broadcastToAll("(to empty a zone, use Delete)", {0.7, 0.7, 0.7})
- broadcastToAll("No Objects Found in Zone.", {0.943, 0.745, 0.14})
- end
- end
- function doPack(a)
- local i for i = 0, string.len(ss)/6-1 do a.putObject(getObjectFromGUID(string.sub(ss, i*6+1, i*6+6))) end
- aBase.setDescription(a.guid) iBag = a cbOn({"cbPack"})
- end
- function cbPack() if cbc < 12 then do return end end
- if ss == "" then cbOff() cbOn({"endPack"}) end local i, g
- for i = 0, string.len(ss)/6-1 do g = string.sub(ss, i*6+1, i*6+6)
- if not getObjectFromGUID(g) then ss = string.sub(ss, 1, i*6)..string.sub(ss, i*6+7) end
- end if ss == "" then do return end end
- cbc = 0 z2 = z2 + 1 if z2/10 == math.modf(z2/10) then broadcastToAll("Pass"..(z2/10).."...", {0.943, 0.745, 0.14}) end
- if z2 > 68 then broadcastToAll("Manual Inspection Required.", {0.943, 0.745, 0.14})
- for i = 0, string.len(ss)/6-1 do g = string.sub(ss, i*6+1, i*6+6)
- getObjectFromGUID(g).resting = true getObjectFromGUID(g).setPosition({0, 3, 0})
- end ss = ""
- end
- end
- function endPack() if cbc < 45 then do return end end cbOff()
- if iBag then mBag.putObject(iBag) iBag = nil end
- jotBase() stowBase() noBase() setBtn() setTxt() broadcastToAll("Packing Complete.", {0.943, 0.745, 0.14})
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement