我想請問怎麼讓初學者簡單使用腳本的迴圈
因為我只會暴力解法
但是很花時間 錯一個就要回頭去更改
我也有研究過別人的迴圈腳本...
但是看下去頭沒花眼睛都花了...
我想先問基本的迴圈 再來了解多重回圈
-
mes "請選擇一個數字!";
for(set .@i,1;.@i<11;set .@i,.@i+1)
set .@select$,.@select$+.@i+":";//"選項1:選項2:選項3:..."
set .@select,prompt(.@select$);//此時.@select$為字串1:2:3:4:5:6:7:8:9:10:
mes "你選擇了 "+.@select;
close;
}
-
這是別人腳本的迴圈
-
set @gi,rand(2);
if (@gi ==0)goto c1;
if (@gi ==1)goto c2;
c1:
mes "";
mes "";
mes "";
next;
set @g1,rand(2);
if (@gi ==0)getitem xxxx,1;
if (@gi ==1)getitem xxxx,1;
-
我想要把迴圈應用在上面那個語法中
也就是到了c1的next;
有可能再跳回最上面的set取樣
聽說很基本但是我好廢 :"(
因為我只會暴力解法
但是很花時間 錯一個就要回頭去更改
我也有研究過別人的迴圈腳本...
但是看下去頭沒花眼睛都花了...
我想先問基本的迴圈 再來了解多重回圈
-
mes "請選擇一個數字!";
for(set .@i,1;.@i<11;set .@i,.@i+1)
set .@select$,.@select$+.@i+":";//"選項1:選項2:選項3:..."
set .@select,prompt(.@select$);//此時.@select$為字串1:2:3:4:5:6:7:8:9:10:
mes "你選擇了 "+.@select;
close;
}
-
這是別人腳本的迴圈
-
set @gi,rand(2);
if (@gi ==0)goto c1;
if (@gi ==1)goto c2;
c1:
mes "";
mes "";
mes "";
next;
set @g1,rand(2);
if (@gi ==0)getitem xxxx,1;
if (@gi ==1)getitem xxxx,1;
-
我想要把迴圈應用在上面那個語法中
也就是到了c1的next;
有可能再跳回最上面的set取樣
聽說很基本但是我好廢 :"(