迷你世界物品查询代码lua

迷你世界物品查询迷你世界物品查询代码lua_第1张图片

 


 

local A={}
local B={}
local n=0
local s=0
local function add2()  
for j=1,500 do
--等待1秒
 --threadpool:wait(2)
   i=(n-1)*500+j
local result,name=Item:getItemName(i)
--local result,name1=Creature:getActorName(i) 
--local result,name1=Player:getNickname(i)

if name=="" or name==" " or name==nil or name=="游戏版本过低" or name=="版本过低" or (name=="土块" and i>90000)  then
else 
A[#A+1]="#B代码:#n"..i.."#B名称:#n"..name
local title="#B代码:#n"..i.."\n#B名称:#n"..name
--print(title)
local x,y,z,x2,y2=(#A%83)*2-42,8,(math. floor(#A/83))*2-42,0,0
local graphicInfo = Graphics:makeGraphicsText(title, 13, 0, 1)
local result = Graphics:createGraphicsTxtByPos(x, y, z, graphicInfo, x2, y2)
Block:setBlockAll(x, y-2, z, 734,4)
local result,relNum=WorldContainer:addStorageItem(x,y-2,z,i,30)

end
local result,objids=World:spawnCreature(-50, 7, 0,i,1)
if result == 0 then
local result,name1=Creature:getActorName(objids[1]) 
Actor:killSelf(objids[1])
if name1=="" or name1==" " or name1==" 备用ID" or name1==nil  then
else 
B[#B+1]="#B代码:#n"..i.."#B名称:#n"..name1
local title="#B代码:#n"..i.."\n#B名称:#n"..name1
--print(title)
local x,y,z,x2,y2=(#B%30)*6-42,8,-(math. floor(#B/30))*6-55,0,0
local graphicInfo = Graphics:makeGraphicsText(title, 20, 0, 1)
local result = Graphics:createGraphicsTxtByPos(x+2, y+1, z, graphicInfo, x2, y2)

local result,objids=World:spawnCreature(x, y, z,i,1)
end
end
end
if n==1001 then print(#A) print(#B) print(B)   
end
end

local function add1()
  if s==0 and n<=1000  then 
  s=1
n=n+1 
add2()
s=0
 end   
end
ScriptSupportEvent:registerEvent([=[Game.Run]=],add1)
--ScriptSupportEvent:registerEvent([=[Game.Run]=],add1)

你可能感兴趣的:(笔记,lua,开发语言,网络协议)