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

烈焰服务端脚本之烈焰锻造石兑换烈焰VIP功能

发表时间:2015-12-25 13:39点击人气:责任编辑:admin

function ontalk1124(npc,event,player)
    player:echo(0,npc:GetLowGUID(),[[
<font color="#ADADAD">------------------------------------------------</font>
<font color="#ADADAD">------------------------------------------------</font>

        VIP5    锻造石x4    <u><a href='event:M2402,24'>兑换</a></u>
        
        VIP6    锻造石x5    <u><a href='event:M2402,25'>兑换</a></u>
        
        VIP7    锻造石x8    <u><a href='event:M2402,26'>兑换</a></u>
        
        VIP8    锻造石x10    <u><a href='event:M2402,27'>兑换</a></u>
        
        VIP9    锻造石x20    <u><a href='event:M2402,28'>兑换</a></u>
        
        VIP10    锻造石x40    <u><a href='event:M2402,29'>兑换</a></u>
        
    
]]);
end

function ontalk1124_21(npc,event,player)
    if player:get_player_type() <= 1 then
        if player:num_item(18100,1) >= 1 then
            player:remove_item(18100,1);
            player:set_vip_status(2,0,5);
            player:set_situ_revive_num(3);                    ------左下角VIP数字等级
            player:alert(10,0,0,"恭喜您,成为VIP2贵宾!");
            g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]使用[锻造石<font color='#FF0000'>x1</font>]在[福利官]兑换成为本服VIP2会员!",2,1000,0,1);
        else
            player:alert(10,0,0,"您没有锻造石<font color='#FF0000'>x1</font>,兑换失败!");
        end
    else
        player:alert(10,0,0,"您已经是的VIP2贵宾或超过VIP2,兑换失败!");
    end
    ontalk1124_20(npc,0,player,0);
end

function ontalk1124_22(npc,event,player)
    if player:get_player_type() == 1 then
        player:alert(10,0,0,"您不是VIP2贵宾,请先成为VIP贵宾2!");
    elseif player:get_player_type() == 2 then
        if player:num_item(18100,1) >= 2 then
            player:remove_item(18100,2);
            player:set_vip_status(3,0,5);
            player:set_situ_revive_num(4);                    ------左下角VIP数字等级
            player:alert(10,0,0,"恭喜您,成为VIP3贵宾!");
            g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]使用[锻造石<font color='#FF0000'>x2</font>]在[福利官]兑换成为本服VIP3会员!",2,1000,0,1);
        else
            player:alert(10,0,0,"您没有锻造石<font color='#FF0000'>x2</font>,兑换失败!");
        end
    else
        player:alert(10,0,0,"您已经是的VIP3贵宾或超过VIP3,兑换失败!");
    end
    ontalk1124_20(npc,0,player,0);
end

function ontalk1124_23(npc,event,player)
    if player:get_player_type() < 3 then
        player:alert(10,0,0,"您不是VIP3贵宾,请先成为VIP贵宾3!");
    elseif player:get_player_type() == 3 then
        if player:num_item(18100,1) >= 3 then
            player:remove_item(18100,3);
            player:set_vip_status(4,0,5);
            player:set_situ_revive_num(5);                    ------左下角VIP数字等级
            player:alert(10,0,0,"恭喜您,成为VIP4贵宾!");
            g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]使用[锻造石<font color='#FF0000'>x3</font>]在[福利官]兑换成为本服VIP4会员!",2,1000,0,1);
        else
            player:alert(10,0,0,"您没有锻造石<font color='#FF0000'>x3</font>,兑换失败!");
        end
    else
        player:alert(10,0,0,"您已经是的VIP4贵宾或超过VIP4,兑换失败!");
    end
    ontalk1124_20(npc,0,player,0);
end

function ontalk1124_24(npc,event,player)
    if player:get_player_type() < 4 then
        player:alert(10,0,0,"您不是VIP4贵宾,请先成为VIP贵宾4!");
    elseif player:get_player_type() == 4 then
        if player:num_item(18100,1) >= 4 then
            player:remove_item(18100,4);
            player:set_vip_status(5,0,5);
            player:set_situ_revive_num(6);                    ------左下角VIP数字等级
            player:alert(10,0,0,"恭喜您,成为VIP5贵宾!");
            g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]使用[锻造石<font color='#FF0000'>x4</font>]在[福利官]兑换成为本服VIP5会员!",2,1000,0,1);
        else
            player:alert(10,0,0,"您没有锻造石<font color='#FF0000'>x4</font>,兑换失败!");
        end
    else
        player:alert(10,0,0,"您已经是的VIP5贵宾或超过VIP5,兑换失败!");
    end
    ontalk1124_20(npc,0,player,0);
end

function ontalk1124_25(npc,event,player)
    if player:get_player_type() < 5 then
        player:alert(10,0,0,"您不是VIP5贵宾,请先成为VIP贵宾5!");
    elseif player:get_player_type() == 5 then
        if player:num_item(18100,1) >= 5 then
            player:remove_item(18100,5);
            player:set_vip_status(6,0,5);
            player:set_situ_revive_num(7);                    ------左下角VIP数字等级
            player:alert(10,0,0,"恭喜您,成为VIP6贵宾!");
            g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]使用[锻造石<font color='#FF0000'>x5</font>]在[福利官]兑换成为本服VIP6会员!",2,1000,0,1);
        else
            player:alert(10,0,0,"您没有锻造石<font color='#FF0000'>x5</font>,兑换失败!");
        end
    else
        player:alert(10,0,0,"您已经是的VIP6贵宾或超过VIP6,兑换失败!");
    end
    ontalk1124_20(npc,0,player,0);
end

function ontalk1124_26(npc,event,player)
    if player:get_player_type() < 6 then
        player:alert(10,0,0,"您不是VIP6贵宾,请先成为VIP贵宾6!");
    elseif player:get_player_type() == 6 then
        if player:num_item(18100,1) >= 8 then
            player:remove_item(18100,8);
            player:set_vip_status(7,0,5);
            player:set_situ_revive_num(8);                    ------左下角VIP数字等级
            player:alert(10,0,0,"恭喜您,成为VIP7贵宾!");
            g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]使用[锻造石<font color='#FF0000'>x8</font>]在[福利官]兑换成为本服VIP7会员!",2,1000,0,1);
        else
            player:alert(10,0,0,"您没有锻造石<font color='#FF0000'>x8</font>,兑换失败!");
        end
    else
        player:alert(10,0,0,"您已经是的VIP7贵宾或超过VIP7,兑换失败!");
    end
    ontalk1124_20(npc,0,player,0);
end

function ontalk1124_27(npc,event,player)
    if player:get_player_type() < 7 then
        player:alert(10,0,0,"您不是VIP7贵宾,请先成为VIP贵宾7!");
    elseif player:get_player_type() == 7 then
        if player:num_item(18100,1) >= 10 then
            player:remove_item(18100,10);
            player:set_vip_status(8,0,5);
            player:set_situ_revive_num(9);                    ------左下角VIP数字等级
            player:alert(10,0,0,"恭喜您,成为VIP8贵宾!");
            g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]使用[锻造石<font color='#FF0000'>x10</font>]在[福利官]兑换成为本服VIP8会员!",2,1000,0,1);
        else
            player:alert(10,0,0,"您没有锻造石<font color='#FF0000'>x10</font>,兑换失败!");
        end
    else
        player:alert(10,0,0,"您已经是的VIP8贵宾或超过VIP8,兑换失败!");
    end
    ontalk1124_20(npc,0,player,0);
end

function ontalk1124_28(npc,event,player)
    if player:get_player_type() < 8 then
        player:alert(10,0,0,"您不是VIP8贵宾,请先成为VIP贵宾8!");
    elseif player:get_player_type() == 8 then
        if player:num_item(18100,1) >= 20 then
            player:remove_item(18100,20);
            player:set_vip_status(9,0,5);
            player:set_situ_revive_num(10);                    ------左下角VIP数字等级
            player:alert(10,0,0,"恭喜您,成为VIP9贵宾!");
            g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]使用[锻造石<font color='#FF0000'>x20</font>]在[福利官]兑换成为本服VIP9会员!",2,1000,0,1);
        else
            player:alert(10,0,0,"您没有锻造石<font color='#FF0000'>x20</font>,兑换失败!");
        end
    else
        player:alert(10,0,0,"您已经是的VIP9贵宾或超过VIP9,兑换失败!");
    end
    ontalk1124_20(npc,0,player,0);
end

function ontalk1124_29(npc,event,player)
    if player:get_player_type() < 9 then
        player:alert(10,0,0,"您不是VIP9贵宾,请先成为VIP贵宾9!");
    elseif player:get_player_type() == 9 then
        if player:num_item(18100,1) >= 40 then
            player:remove_item(18100,40);
            player:set_vip_status(10,0,5);
            player:set_situ_revive_num(11);                    ------左下角VIP数字等级
            player:alert(10,0,0,"恭喜您,成为VIP10贵宾!");
            g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]使用[锻造石<font color='#FF0000'>x30</font>]在[福利官]兑换成为本服VIP10会员!",2,1000,0,1);
        else
            player:alert(10,0,0,"您没有锻造石<font color='#FF0000'>x30</font>,兑换失败!");
        end
    else
        player:alert(10,0,0,"您已经是的VIP10贵宾或超过VIP10,兑换失败!");
    end
    ontalk1124_20(npc,0,player,0);
end

function ontalk1124_30(npc,event,player)
    if player:get_player_type() < 10 then
        player:alert(10,0,0,"您不是VIP10贵宾,请先成为VIP贵宾10!");
    elseif player:get_player_type() == 10 then
        if player:num_item(18100,1) >= 10 then
            player:remove_item(18100,10);
            player:set_vip_status(11,0,5);
            player:set_situ_revive_num(12);                    ------左下角VIP数字等级
            player:alert(10,0,0,"恭喜您,成为VIP11贵宾!");
            g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]使用[锻造石<font color='#FF0000'>x10</font>]在[福利官]兑换成为本服VIP11会员!",2,1000,0,1);
        else
            player:alert(10,0,0,"您没有锻造石<font color='#FF0000'>x10</font>,兑换失败!");
        end
    else
        player:alert(10,0,0,"您已经是的VIP11贵宾或超过VIP11,兑换失败!");
    end
    ontalk1124_20(npc,0,player,0);
end

function ontalk1124_31(npc,event,player)
    if player:get_player_type() < 11 then
        player:alert(10,0,0,"您不是VIP11贵宾,请先成为VIP贵宾11!");
    elseif player:get_player_type() == 11 then
        if player:num_item(18100,1) >= 15 then
            player:remove_item(18100,15);
            player:set_vip_status(12,0,5);
            player:set_situ_revive_num(13);                    ------左下角VIP数字等级
            player:alert(10,0,0,"恭喜您,成为VIP12贵宾!");
            g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]使用[锻造石<font color='#FF0000'>x15</font>]在[福利官]兑换成为本服VIP12会员!",2,1000,0,1);
        else
            player:alert(10,0,0,"您没有锻造石<font color='#FF0000'>x15</font>,兑换失败!");
        end
    else
        player:alert(10,0,0,"您已经是的VIP12贵宾或超过VIP12,兑换失败!");
    end
    ontalk1124_20(npc,0,player,0);
end

function ontalk1124_32(npc,event,player)
    if player:get_player_type() < 12 then
        player:alert(10,0,0,"您不是VIP12贵宾,请先成为VIP贵宾12!");
    elseif player:get_player_type() == 12 then
        if player:num_item(18100,1) >= 20 then
            player:remove_item(18100,20);
            player:set_vip_status(13,0,5);
            player:set_situ_revive_num(14);                    ------左下角VIP数字等级
            player:alert(10,0,0,"恭喜您,成为VIP13贵宾!");
            g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]使用[锻造石<font color='#FF0000'>x20</font>]在[福利官]兑换成为本服VIP13会员!",2,1000,0,1);
        else
            player:alert(10,0,0,"您没有锻造石<font color='#FF0000'>x20</font>,兑换失败!");
        end
    else
        player:alert(10,0,0,"您已经是的VIP13贵宾或超过VIP13,兑换失败!");
    end
    ontalk1124_20(npc,0,player,0);
end

function ontalk1124_35(npc,event,player)
    if player:get_player_type() < 13 then
        player:alert(10,0,0,"您不是VIP13贵宾,请先成为VIP贵宾13!");
    elseif player:get_player_type() == 15 then
        if player:num_item(18100,1) >= 50 then
            player:remove_item(18100,50);
            player:set_vip_status(16,0,5);
            player:set_situ_revive_num(17);                    ------左下角VIP数字等级
            player:alert(10,0,0,"恭喜您,成为VIP16贵宾!");
            g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]使用[锻造石<font color='#FF0000'>x50</font>]在[福利官]兑换成为本服VIP16会员!",2,1000,0,1);
        else
            player:alert(10,0,0,"您没有锻造石<font color='#FF0000'>x50</font>,兑换失败!");
        end
    else
        player:alert(10,0,0,"您已经是的VIP16贵宾或超过VIP16,兑换失败!");
    end
    ontalk1124_20(npc,0,player,0);
end

function ontalk1124_36(npc,event,player)
    if player:get_player_type() < 16 then
        player:alert(10,0,0,"您不是VIP16贵宾,请先成为VIP贵宾16!");
    elseif player:get_player_type() == 16 then
        if player:num_item(18100,1) >= 100 then
            player:remove_item(18100,100);
            player:set_vip_status(17,0,5);
            player:set_situ_revive_num(18);                    ------左下角VIP数字等级
            player:alert(10,0,0,"恭喜您,成为VIP17贵宾!");
            g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]使用[锻造石<font color='#FF0000'>x100</font>]在[福利官]兑换成为本服VIP17会员!",2,1000,0,1);
        else
            player:alert(10,0,0,"您没有锻造石<font color='#FF0000'>x100</font>,兑换失败!");
        end
    else
        player:alert(10,0,0,"您已经是的VIP17贵宾或超过VIP17,兑换失败!");
    end
    ontalk1124_20(npc,0,player,0);
end

Npc1124Funid = 
{
[0] = ontalk1124;
[1] = ontalk1124_1;
[5] = ontalk1124_5;
[20] = ontalk1124_20;
[21] = ontalk1124_21;
[22] = ontalk1124_22;
[23] = ontalk1124_23;
[24] = ontalk1124_24;
[25] = ontalk1124_25;
[26] = ontalk1124_26;
[27] = ontalk1124_27;
[28] = ontalk1124_28;
[29] = ontalk1124_29;
[30] = ontalk1124_30;
[31] = ontalk1124_31;
[32] = ontalk1124_32;
[33] = ontalk1124_33;
[34] = ontalk1124_34;
[35] = ontalk1124_35;
[36] = ontalk1124_36;
}

function CreatureNpcFun(npc,event,player,funid)
    if Npc1124Funid[funid] ~= nil then
        Npc1124Funid[funid](npc,event,player);
    end
end

RegisterUnitEvent(1124,20,"ontalk1124")
RegisterUnitEvent(1124,29,"CreatureNpcFun")

 本烈焰脚本是针对使用烈焰锻造石来兑换游戏内的VIP等级,最高已写到16级,但其中兑换成功后,未给予VIPbuff 这个需要自行填写.
烈焰技术,烈焰脚本聚集地-yeyo6 页游SF发布站.