s96412044 發表於 2013-11-2 15:36:18

卡片掉落系統問題

請問一下我是在網上抓到的卡片掉落系統腳本

但我在使用10%卡片掉落的時候卻不會掉卡 角色介面會顯示

[卡片掉落]恭喜你獲得卡片 null

我想請問一下這裡面腳本哪裡出問題嗎?可有遇到此問題的大大幫我解決一下



-        script        卡片掉落        -1,{

OnNPCKillEvent:

        if(dropagree)
        {
                if (getmobdrops(killedrid)) {

                        set .@count, $@MobDrop_count;
                        copyarray .@item,$@MobDrop_item,.@count;
                        copyarray .@rate,$@MobDrop_rate,.@count;

                        for( set .@i,0; .@i < .@count; set .@i,.@i +1 )
                        {
                                if(.@rate[.@i]==1)
                                {
                                        set .@IDD,.@item[.@i];
                                }
                        }
                }
                set .@DropRate,10/DropRate;
                set .@rand,rand(1,.@DropRate);
                if(.@rand == 1)
                {
                        getitem .@iDD,1;
                        set .@ok,1;
                        announce "[卡片掉落]   恭喜你獲得卡片   "+getitemname(.@iDD)+"   。",bc_self,0xff0000;
                }
                if(.@ok==0)        announce "[卡片掉落]   再接再厲喔   !!!",bc_self,0x00ff00;
                set dropagree,0;
        }

end;

}

function        script        DropSystem        {

        announce "[卡片掉落]   下一次攻擊的怪物卡片掉落倍率為   "+DropRate+"   % 。",bc_self,0x00ffff;
        end;

}



頁: [1]
查看完整版本: 卡片掉落系統問題