User Tools

Site Tools


lua:scripting:lua_queries

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
lua:scripting:lua_queries [2024/07/18 02:45] astarklua:scripting:lua_queries [2024/07/18 02:56] (current) astark
Line 42: Line 42:
 **List all weapons and their types, in the game, between level 1 and 90** \\ **List all weapons and their types, in the game, between level 1 and 90** \\
 ''luaq level,shortdescr,weapontype,area.name from op where ingame and level>1 and level<90 and otype=="weapon" order by level,weapontype'' ''luaq level,shortdescr,weapontype,area.name from op where ingame and level>1 and level<90 and otype=="weapon" order by level,weapontype''
 +
 +**List all areas and the number of weapons each of them has** \\
 +''luaq name,(function() local cnt=0 for k,v in pairs(x.objprotos) do if v.otype=="weapon" then cnt=cnt+1 end end return cnt end)() as # of weapons,minlevel as min level,maxlevel as max level from area where ingame order by min level''
  
  
lua/scripting/lua_queries.txt · Last modified: 2024/07/18 02:56 by astark