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
Next revision
Previous revision
lua:scripting:lua_queries [2024/07/04 13:17] astarklua:scripting:lua_queries [2024/07/18 02:56] (current) astark
Line 35: Line 35:
 \\ \\
 **List all weapons that are above level 90, with a damtype of either disease, poison, or energy.** \\ **List all weapons that are above level 90, with a damtype of either disease, poison, or energy.** \\
-'' luaq level,vnum,shortdescr,area.name,damtype,weapontype from op where otype=="weapon" and level>90 and ingame and (damtype=="disease" or damtype=="poison" or damtype=="energy") +''luaq level,vnum,shortdescr,area.name,damtype,weapontype from op where otype=="weapon" and level>90 and ingame and (damtype=="disease" or damtype=="poison" or damtype=="energy") ''
-''+
  
 **List all armor that is transparent, above level 99, with a rating above 1, that is in the game. Sort by armor slot.** \\ **List all armor that is transparent, above level 99, with a rating above 1, that is in the game. Sort by armor slot.** \\
 luaq level,vnum,shortdescr,rating,weartype,extra("trans") from op where otype=="armor" and level>99 and ingame and rating > 1 and extra("trans")==true order by weartype,extra("trans") luaq level,vnum,shortdescr,rating,weartype,extra("trans") from op where otype=="armor" and level>99 and ingame and rating > 1 and extra("trans")==true order by weartype,extra("trans")
 +
 +**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''
 +
 +**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.1720099075.txt.gz · Last modified: 2024/07/04 13:17 by astark