原来的宏就变成了:

/script
bag=0 cw=1 sc=1 
for bag=0,3,1 do
for cw=1,16,1 do
if G(bag,cw)~=nil
  then
  if I(bag,cw)
  then
    while I(4,sc) do sc=sc+1 end
    P(bag,cw)
    P(4,sc)
    P(bag,cw) 
    sc=sc+1 
  end     
end
end
end

多余的变量定义和过长的变量都可以更改:


/script
s=1 
for g=0,3 do
for w=1,16 do
if G(g,w)
  then
  if I(g,w)
  then
    while I(4,s) do s=s+1 end
    P(g,w)
    P(4,s)
    P(g,w) 
    s=s+1 
  end     
end
end
end

现在写的下了吧。呵呵,至于使用物品的宏我虽然已经写好了,但没有测试过,等测试没问题后再放出来把。有兴趣的朋友也可以自己写写。

但要注意一点,使用物品的宏只要找到物品就可以马上跳出循环,所以用Repeat循环做比较合适

相关文章:

  • 2021-12-27
  • 2022-02-14
  • 2021-12-07
  • 2022-12-23
  • 2022-01-23
猜你喜欢
  • 2022-12-23
  • 2021-05-08
  • 2021-11-18
  • 2021-05-21
  • 2021-09-09
相关资源
相似解决方案