赞 | 7 |
VIP | 0 |
好人卡 | 0 |
积分 | 23 |
经验 | 0 |
最后登录 | 2023-10-7 |
在线时间 | 168 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 2346
- 在线时间
- 168 小时
- 注册时间
- 2017-4-25
- 帖子
- 219
|
9楼
楼主 |
发表于 2019-2-22 17:58:29
|
只看该作者
本帖最后由 rexuegg123 于 2019-2-22 18:14 编辑
Game_Party.prototype.Collection_Action = function (wy_PictureID) {
var x1 = WY_Collection_getCar[0]; //采集类型
var x2 = WY_Collection_getCar[1]; //随机数上限
var x3 = WY_Collection_getCar[2]; //采集失败
var x4 = WY_Collection_getCar[3]; //1
var x5 = WY_Collection_getCar[4];
var x6 = WY_Collection_getCar[5];
var x7 = WY_Collection_getCar[6];
var x8 = WY_Collection_getCar[7]; //7
var x9 = WY_Collection_getCar[8]; //6
var x10 = WY_Collection_getCar[9]; //获得装备
var x11 = WY_Collection_getCar[10]; //获得潜能属性
var x12 = WY_Collection_getCar[11]; //属性类型
switch (x1) {
case "lingxiu": var wy_name = ['红色碎片','蓝色碎片','绿色碎片','紫色碎片','白色碎片','未知','智慧'];break;
case "famu":var wy_name = ['桃树原木','枫香树干','柳树干','桂树原木','花梨原木','未知','体质'];break;
case "wakuang":break;
case "nonggeng":break;
case "xumu":break;
case "diaoyu":break;
};
WY_got_0 = 0;
WY_got_1 = [0,0,0],WY_got_2 = [0,0,0],WY_got_3 = [0,0,0],WY_got_4 = [0,0,0];
WY_got_5 = [0,0,0],WY_got_6 = [0,0,0],WY_got_7 = [0,0,0],WY_got_8 = [0,0,0];
for (var i = 1; i <= 5;i++ ) {
$gameScreen.showPicture(wy_PictureID+1 ,'caiji/采集中',1,640,360,100,100,255,0);
$gameScreen.showPicture(wy_PictureID+2 ,'caiji/jindu_dt',0,580,378,100,100,255,0);
$gameScreen.showPicture(wy_PictureID+3 ,'caiji/jindu_mt',0,581,380,1,100,255,0);
$gameScreen.movePicture(wy_PictureID+3,0,581,380,100,100,255,0,360);
var a = Math.ceil(Math.random()*100);
var b = Math.ceil(Math.random()*x2-100);
var c = a + b;
if (c>x10 && c<=x11) {WY_got_8[0] = wy_name[7], WY_got_8[2] +=1;}; //115-120
if (c>x9 && c<=x10) {WY_got_7[0] = wy_name[6], WY_got_7[2] +=1;}; //110-115
if (c>x8 && c<=x9) {WY_got_6[0] = wy_name[5], WY_got_6[2] +=1; WY_get_url = 'caiji/' + x1 + '/' + wy_name[5];};
if (c>x7 && c<=x8) {WY_got_5[0] = wy_name[4], WY_got_5[2] +=1; WY_get_url = 'caiji/' + x1 + '/' + wy_name[4];};
if (c>x6 && c<=x7) {WY_got_4[0] = wy_name[3], WY_got_4[2] +=1; WY_get_url = 'caiji/' + x1 + '/' + wy_name[3];};
if (c>x5 && c<=x6) {WY_got_3[0] = wy_name[2], WY_got_3[2] +=1; WY_get_url = 'caiji/' + x1 + '/' + wy_name[2];};
if (c>x4 && c<=x5) {WY_got_2[0] = wy_name[1], WY_got_2[2] +=1; WY_get_url = 'caiji/' + x1 + '/' + wy_name[1];};
if (c>x3 && c<=x4) {WY_got_1[0] = wy_name[0], WY_got_1[2] +=1; WY_get_url = 'caiji/' + x1 + '/' + wy_name[0];}; //10-60
if (c<=x3) {WY_got_0 = 1;WY_get_url = 'caiji/' + x1 + '/' + wy_name[5];}; //0-10
setTimeout(function() {
$gameScreen.erasePicture(wy_PictureID+2);
$gameScreen.erasePicture(wy_PictureID+3);
$gameScreen.showPicture(wy_PictureID+4 ,WY_get_url,1,670,360,100,100,255,0);
$gameScreen.movePicture(wy_PictureID+4,1,670,240,100,100,255,0,60);
},7000);
setTimeout(function() {for (var i=401;i<=404;i++){$gameScreen.erasePicture(i);};},8000);
};
};
去掉for循环,可以正常运行。 |
|