local a=[[ local excludedItemIDs = {32, 18, 6336, 9640, 5706} bot = getBot() function findssp() for _, obj in pairs(bot:getWorld():getObjects()) do if obj.id == 5706 then local targetX, targetY = obj.x, obj.y bot:findPath(math.floor(targetX / 32), math.floor(targetY / 32)) sleep(500) bot:collectObject(obj.oid, 2) sleep(2000) openssp() end end end function cek() if not getBot():isInWorld(world) then sleep(3000) bot:warp(world,worldid) sleep(7000) openssp() else sleep(4000) openssp() end end function dc() if bot.status == 0 then sleep(8000) openssp() end end function openssp() sleep(3000) while getBot():isInWorld() do dc() local inventory = bot:getInventory() if inventory:getItemCount(5706) > 15 then sleep(110) getBot():use(5706) ssp() sleep(100) else sleep(1000) findssp() break end end end function ssp() local inventory = bot:getInventory() local itemCounts = {} for _, itemID in ipairs(getInventoryItemIDs()) do local itemCount = inventory:getItemCount(itemID) itemCounts[itemID] = itemCount local isExcluded = false for _, excludedID in ipairs(excludedItemIDs) do if itemID == excludedID then isExcluded = true break end end if not isExcluded and itemCount > 190 then ziz() end end for itemID, count in pairs(itemCounts) do end end function ziz() if not getBot():isInWorld(sspvend) then sleep(1000) bot:warp(sspvend,vendid) sleep(5000) bot:moveLeft() putinvend() else sleep(5000) bot:moveLeft() putinvend() end end function putinvend() local vendInfo = { posx = {}, posy = {}, price = {}, priceid = {}, } local numbers = 0 for _, tile in pairs(getBot():getWorld():getTiles()) do if tile.fg == 2978 or tile.fg == 9268 then local extra = getBot():getWorld():getTile(tile.x, tile.y):getExtra() if extra.id ~= 0 then table.insert(vendInfo.price, extra.item_price) table.insert(vendInfo.priceid, extra.id) table.insert(vendInfo.posx, tile.x) table.insert(vendInfo.posy, tile.y) numbers = numbers + 1 end end end local itemIDs = getInventoryItemIDs() for i = 1, numbers do local itemID = vendInfo.priceid[i] for _, id in ipairs(itemIDs) do if itemID == id then local tileX = vendInfo.posx[i] local tileY = vendInfo.posy[i] getBot():findPath(tileX, tileY) sleep(delay) getBot():wrench(tileX, tileY) sleep(delay) getBot():sendPacket(2, [[action|dialog_return dialog_name|vending tilex|]]..tileX..[[| tiley|]]..tileY..[[| buttonClicked|addstock]]) sleep(delay) break end end end bot:warp(world,worldid) end function getInventoryItemIDs() local itemIDs = {} local inventory = getInventory() if inventory then local items = inventory.items for _, item in pairs(items) do table.insert(itemIDs, item.id) end end return itemIDs end while true do cek() end ]] a="--// Decompiled Code. \n"..a;function Obfuscate(b)local c="function IllIlllIllIlllIlllIlllIll(IllIlllIllIllIll) if (IllIlllIllIllIll==(((((919 + 636)-636)*3147)/3147)+919)) then return not true end if (IllIlllIllIllIll==(((((968 + 670)-670)*3315)/3315)+968)) then return not false end end; "local d=c;local e=""local f={"IllIllIllIllI","IIlllIIlllIIlllIIlllII","IIllllIIllll"}local g=[[local IlIlIlIlIlIlIlIlII = {]]local h=[[local IllIIllIIllIII = loadstring]]local i=[[local IllIIIllIIIIllI = table.concat]]local j=[[local IIIIIIIIllllllllIIIIIIII = "''"]]local k="local "..f[math.random(1,#f)].." = (7*3-9/9+3*2/0+3*3);"local l="local "..f[math.random(1,#f)].." = (3*4-7/7+6*4/3+9*9);"local m="--// Obfuscated with LuaSeel 1.1 \n\n"for n=1,string.len(b)do e=e.."'\\"..string.byte(b,n).."',"end;local o="function IllIIIIllIIIIIl("..f[math.random(1,#f)]..")"local p="function "..f[math.random(1,#f)].."("..f[math.random(1,#f)]..")"local q="local "..f[math.random(1,#f)].." = (5*3-2/8+9*2/9+8*3)"local r="end"local s="IllIIIIllIIIIIl(900283)"local t="function IllIlllIllIlllIlllIlllIllIlllIIIlll("..f[math.random(1,#f)]..")"local q="function "..f[math.random(1,#f)].."("..f[math.random(1,#f)]..")"local u="local "..f[math.random(1,#f)].." = (9*0-7/5+3*1/3+8*2)"local v="end"local w="IllIlllIllIlllIlllIlllIllIlllIIIlll(9083)"local x=m..d..k..l..i..";"..o.." "..p.." "..q.." "..r.." "..r.." "..r..";"..s..";"..t.." "..q.." "..u.." "..v.." "..v..";"..w..";"..h..";"..g..e.."}".."IllIIllIIllIII(IllIIIllIIIIllI(IlIlIlIlIlIlIlIlII,IIIIIIIIllllllllIIIIIIII))()"print(x)end;do Obfuscate(a)end
Write, Run & Share Lua code online using OneCompiler's Lua online compiler for free. It's one of the robust, feature-rich online compilers for Lua language, running the latest Lua version 5.4. Getting started with the OneCompiler's Lua editor is easy and fast. The editor shows sample boilerplate code when you choose language as Lua and start coding.
OneCompiler's Lua online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample Lua program which takes name as input and prints hello message with your name.
name = io.read("*a")
print ("Hello ", name)
Lua is a light weight embeddable scripting language which is built on top of C. It is used in almost all kind of applications like games, web applications, mobile applications, image processing etc. It's a very powerful, fast, easy to learn, open-source scripting language.
-- global variables
a = 10
-- local variables
local x = 30
Value Type | Description |
---|---|
number | Represents numbers |
string | Represents text |
nil | Differentiates values whether it has data or not |
boolean | Value can be either true or false |
function | Represents a sub-routine |
userdata | Represents arbitary C data |
thread | Represents independent threads of execution. |
table | Can hold any value except nil |
While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.
while(condition)
do
--code
end
Repeat-Until is also used to iterate a set of statements based on a condition. It is very similar to Do-While, it is mostly used when you need to execute the statements atleast once.
repeat
--code
until( condition )
For loop is used to iterate a set of statements based on a condition.
for init,max/min value, increment
do
--code
end
Function is a sub-routine which contains set of statements. Usually functions are written when multiple calls are required to same set of statements which increase re-usuability and modularity.
optional_function_scope function function_name( argument1, argument2, argument3........, argumentn)
--code
return params with comma seperated
end