最新最全最权威的各类手游,端游,页游游戏信息开服信息,尽在游民之家. 订阅微信

让页游烈焰的祝福油可使用到幸运+9

发表时间:2016-01-17 13:10点击人气:责任编辑:admin
function item_10071(item,event,player)
    if player:check_euqip(-4) == false then
        player:alert(10,0,0,"由于您没有佩带武器,无法使用");
        return 1;
    end
    local z = math.random(1,100);
    if player:get_weapon_luck() <= 0 then
        if z <= 100 then
        player:set_weapon_luck(player:get_weapon_luck()+1);
        player:alert(10,0,0,"武器幸运增加");
        return 0;
        end
    end
    if player:get_weapon_luck() == 1 then
        if z <= 80  then
        player:set_weapon_luck(2);
        player:alert(10,0,0,"武器幸运增加");
        return 0;
        end
        if z >= 81 and z <= 100  then
        player:alert(10,0,0,"祝福无效");
        return 0;
        end
    end
    if player:get_weapon_luck() == 2 then
        if z <= 60  then
        player:set_weapon_luck(3);
        player:alert(10,0,0,"武器幸运增加");
        return 0;
        end
        if z >= 61 and z <= 100  then
        player:alert(10,0,0,"祝福无效");
        return 0;
        end
    end
    if player:get_weapon_luck() == 3 then
        if z <= 40  then
        player:set_weapon_luck(4);
        player:alert(10,0,0,"武器幸运增加");
        return 0;
        end
        if z >= 41 and z <= 70  then
        player:alert(10,0,0,"祝福无效");
        return 0;
        end
        if z >= 71 and z <= 100  then
        player:set_weapon_luck(2);
        player:alert(10,0,0,"武器被诅咒了");
        return 0;
        end
    end
    if player:get_weapon_luck() == 4 then
        if z <= 20  then
        player:set_weapon_luck(5);
        player:alert(10,0,0,"武器幸运增加");
        return 0;
        end
        if z >= 21 and z <= 60  then
        player:alert(10,0,0,"祝福无效");
        return 0;
        end
        if z >= 61 and z <= 100  then
        player:set_weapon_luck(3);
        player:alert(10,0,0,"武器被诅咒了");
        return 0;
        end
    end
    if player:get_weapon_luck() == 5 then
        if z <= 1  then
        player:set_weapon_luck(6);
        player:alert(10,0,0,"武器幸运增加");
        return 0;
        end
        if z >= 2 and z <= 51  then
        player:alert(10,0,0,"祝福无效");
        return 0;
        end
        if z >= 52 and z <= 100  then
        player:set_weapon_luck(4);
        player:alert(10,0,0,"武器被诅咒了");
        return 0;
        end
    end
    if player:get_weapon_luck() == 6 then
        if z <= 1  then
        player:set_weapon_luck(7);
        player:alert(10,0,0,"武器幸运增加");
        return 0;
        end
        if z >= 2 and z <= 51  then
        player:alert(10,0,0,"祝福无效");
        return 0;
        end
        if z >= 52 and z <= 100  then
        player:set_weapon_luck(5);
        player:alert(10,0,0,"武器被诅咒了");
        return 0;
        end
    end
    if player:get_weapon_luck() == 7 then
        if z <= 1  then
        player:set_weapon_luck(8);
        player:alert(10,0,0,"武器幸运增加");
        return 0;
        end
        if z >= 2 and z <= 51  then
        player:alert(10,0,0,"祝福无效");
        return 0;
        end
        if z >= 52 and z <= 100  then
        player:set_weapon_luck(6);
        player:alert(10,0,0,"武器被诅咒了");
        return 0;
        end
    end
    if player:get_weapon_luck() == 8 then
        if z <= 1  then
        player:set_weapon_luck(9);
        player:alert(10,0,0,"武器幸运增加");
        return 0;
        end
        if z >= 2 and z <= 51  then
        player:alert(10,0,0,"祝福无效");
        return 0;
        end
        if z >= 52 and z <= 100  then
        player:set_weapon_luck(7);
        player:alert(10,0,0,"武器被诅咒了");
        return 0;
        end
    end
    if player:get_weapon_luck() >=9 then
        player:alert(10,0,0,"最高支持幸运+9,无法再祝福");
        --return 0;
        end
end

 本烈焰脚本代码从幸运6开始难度较大,可自行进行相应的调整.
本脚本代码所在路径GameServerscriptsItemdaoju.lua