Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*=======================================================================================================================
- - 腳本名稱: 仿手遊尋寶系統
- - 腳本作者: 皇
- - 測試環境: RACN 1.7.9
- - 更新內容: 2019/2/24 完成該腳本
- - 注意事項: 腳本僅供,程式語言研究,學術研究用途。
- =========================================================================================================================*/
- rangezek,188,198,5 script 尋寶專家 562,{
- if(Weight*100/MaxWeight > 80) {
- mes "【 尋寶專家 】";
- mes "超重囉!";
- mes "身上背著太多的重量 減輕了負重量後回來";
- mes "目前狀態: ^FF0000負重量大於80%^000000";
- close;
- }
- mes "【 尋寶專家 】";
- mes " 全伺服器最後 20 次 尋寶紀錄";
- for ( .@i = 1; .@i < getarraysize($itemname$); .@i++)
- mes " "+.@i+" :【 "+$itemplayer$[.@i]+" 】 獲得 <ITEM>"+getitemname($itemname$[.@i])+"<INFO>"+($itemname$[.@i])+"</INFO></ITEM> ";
- set .@name1$,strcharinfo(0);
- switch(select(
- "低階尋寶",
- "中階尋寶",
- "高階尋寶",
- "特殊尋寶",
- "離開"
- )){
- case 1:
- .@itema = 501; // 抽一次的消耗材料編號
- .@itemb = 1; // 抽一次消耗材料的數量
- setarray .@item[1],501,502,503,504; // 可抽取的獎品
- setarray .@num[1],1,1,1,1; // 獎品抽到時的數量
- setarray .@iteman[1],502; // 會上廣的獎品
- input .@SHJ;
- if ( .@SHJ < 1 ){ message strcharinfo(0),"輸入數量不正確"; end; }
- if (countitem(.@itema) < .@itemb*.@SHJ){ message strcharinfo(0),"材料不足"; end; }
- delitem .@itema,.@itemb*.@SHJ;
- break;
- case 2:
- .@itema = 501; // 抽一次的消耗材料編號
- .@itemb = 1; // 抽一次消耗材料的數量
- setarray .@item[1],501,502,503,504; // 可抽取的獎品
- setarray .@num[1],1,1,1,1; // 獎品抽到時的數量
- setarray .@iteman[1],502; // 會上廣的獎品
- input .@SHJ;
- if ( .@SHJ < 1 ){ message strcharinfo(0),"輸入數量不正確"; end; }
- if (countitem(.@itema) < .@itemb*.@SHJ){ message strcharinfo(0),"材料不足"; end; }
- delitem .@itema,.@itemb*.@SHJ;
- break;
- case 3:
- .@itema = 501; // 抽一次的消耗材料編號
- .@itemb = 1; // 抽一次消耗材料的數量
- setarray .@item[1],501,502,503,504; // 可抽取的獎品
- setarray .@num[1],1,1,1,1; // 獎品抽到時的數量
- setarray .@iteman[1],502; // 會上廣的獎品
- input .@SHJ;
- if ( .@SHJ < 1 ){ message strcharinfo(0),"輸入數量不正確"; end; }
- if (countitem(.@itema) < .@itemb*.@SHJ){ message strcharinfo(0),"材料不足"; end; }
- delitem .@itema,.@itemb*.@SHJ;
- break;
- case 4:
- .@itemb = 1; // 抽一次消耗變數的數量
- setarray .@item[1],501,502,503,504; // 可抽取的獎品
- setarray .@num[1],1,1,1,1; // 獎品抽到時的數量
- setarray .@iteman[1],502; // 會上廣的獎品
- input .@SHJ;
- if ( .@SHJ < 1 ){ message strcharinfo(0),"輸入數量不正確"; end; }
- if ( rune < .@itemb*.@SHJ){ message strcharinfo(0),"點數不足"; end; }
- set rune,rune-.@itemb*.@SHJ;
- break;
- case 5:
- end;
- }
- GO:
- for ( .@i = 0; .@i < getarraysize(.@iteman); .@i++){
- if( .@item[.@exc] == .@iteman[.@i])
- announce "【 好運降臨 】【 " + strcharinfo(0) + " 】 獲得了 "+getitemname(.@item[.@exc])+" ",bc_all,0xFFB7DD;
- }
- set .@exc,rand(1,(getarraysize(.@item)-1));
- getitem .@item[.@exc],.@num[.@exc];
- set $number,$number+1;
- if( $number == 21) set $number,1;
- setarray $itemplayer$[$number],.@name1$;
- setarray $itemname$[$number],getitemname(.@item[.@exc]);
- set .@numb,.@numb+1;
- if(.@numb < .@SHJ) goto GO;
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement