UID18145
阅读权限30
威望 点
积分242
注册时间2014-10-14
最后登录1970-1-1
听众
收听
升级
14%
|
不知道腳本哪裡寫錯導致運行錯誤
很久以前寫的 拿來用已經忘了
- brasilis,230,324,4 script 每日頭飾 857,{
- function turn;
- function showerror;
- function checkrand;
- function turn {
- if(getarg(0)==1||getarg(0)==3||getarg(0)==5||getarg(0)==7||getarg(0)==8||getarg(0)==10||getarg(0)==12) return 31;
- else if(getarg(0)==2) return 28;
- else return 30;
- }
- function showerror {
- dispbottom ""+getarg(0);
- close;
- }
- function checkrand {
- for(set .@i,1;.@i<getarg(2)+1;set .@i,.@i+1){
- if(getarg(0)==getd(getarg(1)+"["+.@i+"]")) return 1;
- }return 0;
- }
- for(set .@i,1;.@i<6;set .@i,.@i+1)
- mes "頭飾所需材料 : "+getitemname($td[.@i]) +" "+$tdneedn[.@i]+" 個";
- mes "Exchange?";
- set .@select,prompt("Exchange","cancel");
- if(.@select==255 || .@select==2) close;
- for(set .@i,1;.@i<6;set .@i,.@i+1){
- if(countitem($td[.@i])<$tdneedn[.@i]||zeny<$payzeny) {
- mes "材料或金額不足";close;
- }
- }
- for(set .@i,1;.@i<6;set .@i,.@i+1)
- delitem $td[.@i],$tdneedn[.@i];
- getitem $ar[$isrand?rand(1,getarraysize($ar)-1):((gettime(5)- (gettime(3)>=6?0:1) )<1? turn( gettime(6)==1?12:gettime(6)-1 ) : (gettime(5)-(gettime(3)>=6?0:1) ))],1;
- set Zeny,Zeny-$payzeny;
- mes "兌換成功";
- close;
- OnClock0600:
- deletearray $td[1],128;
- deletearray $tdneedn[1],128;
- for(set .@o,1;.@o<6;set .@o,.@o+1){
- for(;;){
- set .@ra,rand(1,getarraysize($exchange)-1);
- if(!checkrand($exchange[.@ra],"$td",5) && getitemname($exchange[.@ra])!="null")break;
- }
- setarray $td[.@o],$exchange[.@ra];
- setarray $tdneedn[.@o],rand(10,100);//隨機數量
- announce "每日頭飾所需材料 : "+getitemname($td[.@o]) +" "+$tdneedn[.@o]+" 個",0;
- }
- end;
- OnWhisperGlobal:
- if(getgmlevel() < 98) end;
- setarray .@word$[1],"欲修改頭飾編號","欲修改材料編號","欲修改頭飾","欲修改材料";
- for(set .@i,1;.@i<(set(.@a,getarraysize($ar))>set(.@b,getarraysize($exchange))?.@a:.@b);set .@i,.@i+1){
- mes .@i+" 日頭飾為 : "+getitemname($ar[.@i]);
- announce .@i+" 號材料為 : "+getitemname($exchange[.@i]),bc_self;
- }
- next;
- set .@select,prompt("更改頭飾","更改材料","刷新材料");
- if(.@select==255) end;
- if(.@select==3) { close2; callsub OnClock0700; }
- mes .@word$[.@select];
- input .@q;
- if(.@q>getarraysize(.@select==1?$ar:$exchange)-1||.@q<1) showerror("Wrong number!");
- mes .@word$[.@select+2];
- input .@qq;
- if(getitemname(.@qq)=="null") showerror("Not item variable!");
- setd "$"+(.@select==1?"ar":"exchange")+"["+.@q+"]",.@qq;
- mes "更改為 : "+getitemname(getd("$"+(.@select==1?"ar":"exchange")+"["+.@q+"]"));
- close;
- end;
- OnInit:
- set $isrand,0;//是否獲得隨機頭飾
- if($ar[1]) end;
- setarray $ar[1],2251,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281;//頭飾
- setarray $exchange[1],501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531;//材料
- set $payzeny,100000;//製作金額
- end;
- }
复制代码
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
温馨提示:
1. 本站模拟器源于网络,经 99Max.mE 二次开发,仅供个人学习娱乐使用,切勿用于商业用途,否则后果自负!
2. 如需更好体验游戏内容,请前往官方游戏!不具备合法的运营模式,都是强盗,请勿擅自搭建私服!
3. 如本站内容有侵犯您的权益,请发送信息至QQ:372607220 或 EMAIL:372607220@qq.com ,我们会及时删除。
|