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

烈焰私服服务端脚本代码之VIP专属领取NPC

发表时间:2016-01-11 14:33点击人气:责任编辑:admin

function ontalk2106(npc,event,player)
    player:echo(0,npc:GetLowGUID(),[[
<font color='#FF0080'>----------------------</font>
               <b><font color="#C2FF68">VIP奖励大使<font></b>
<font color='#FF0080'>----------------------</font>
            欢迎来到XX烈焰
              祝你游戏开心
             by:小月月
         联系QQ:894036605
<font color='#2828FF'>----------------------</font>
     <a href='event:M2402,1'>VIP1奖励领取</a></u>         <a href='event:M2402,6'>VIP6奖励领取</a></u>
<font color='#2828FF'>----------------------</font>
     <a href='event:M2402,2'>VIP2奖励领取</a></u>         <a href='event:M2402,7'>VIP7奖励领取</a></u>
<font color='#2828FF'>----------------------</font>
     <a href='event:M2402,3'>VIP3奖励领取</a></u>         <a href='event:M2402,8'>VIP8奖励领取</a></u>
<font color='#2828FF'>----------------------</font>
     <a href='event:M2402,4'>VIP4奖励领取</a></u>         <a href='event:M2402,9'>VIP9奖励领取</a></u>
<font color='#2828FF'>----------------------</font>
     <a href='event:M2402,5'>VIP5奖励领取</a></u>         <a href='event:M2402,10'>VIP10奖励领取</a></u>
<font color='#2828FF'>----------------------</font>
]]);
end

function ontalk2106_1(npc,event,player)
 if player:get_param(401) == 0 then
  if player:get_player_type() >= 1 then 
   if player:num_bag_black() >= 1 then
    player:add_item(10184,1,1);
    player:set_param(401,1)
    g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]童鞋领取了VIP1奖励,被疯狂的奖励击晕了,升级VIP2可也获得更高奖励哦",2,1000,0,1);
   else
    player:alert(10,0,0,"您的背包空间不足1格,无法领取");
   end    
  else
   player:alert(10,0,0,"您不是VIP,无法领取");
  end
 else
  player:alert(10,0,0,"领过了,还来干嘛!");
 end
 ontalk2106(npc,0,player,0);
end

function ontalk2106_2(npc,event,player)
 if player:get_param(410) == 0 then
  if player:get_player_type() >= 2 then 
   if player:num_bag_black() >= 1 then
    player:add_item(10185,1,1);
    player:set_param(410,1)
    g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]童鞋领取了VIP1奖励,被疯狂的奖励击晕了,升级VIP2可也获得更高奖励哦",2,1000,0,1);
   else
    player:alert(10,0,0,"您的背包空间不足1格,无法领取");
   end    
  else
   player:alert(10,0,0,"您的VIP等级不足,无法领取");
  end
 else
  player:alert(10,0,0,"领过了,还来干嘛!");
 end
 ontalk2106(npc,0,player,0);
end

function ontalk2106_3(npc,event,player)
 if player:get_param(403) == 0 then
  if player:get_player_type() >= 2 then 
   if player:num_bag_black() >= 1 then
    player:add_item(10185,1,1);
    player:set_param(403,1)
    g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]童鞋领取了VIP1奖励,被疯狂的奖励击晕了,升级VIP2可也获得更高奖励哦",2,1000,0,1);
   else
    player:alert(10,0,0,"您的背包空间不足1格,无法领取");
   end    
  else
   player:alert(10,0,0,"您的VIP等级不足,无法领取");
  end
 else
  player:alert(10,0,0,"领过了,还来干嘛!");
 end
 ontalk2106(npc,0,player,0);
end

function ontalk2106_4(npc,event,player)
 if player:get_param(404) == 0 then
  if player:get_player_type() >= 2 then 
   if player:num_bag_black() >= 1 then
    player:add_item(10185,1,1);
    player:set_param(404,1)
    g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]童鞋领取了VIP1奖励,被疯狂的奖励击晕了,升级VIP2可也获得更高奖励哦",2,1000,0,1);
   else
    player:alert(10,0,0,"您的背包空间不足1格,无法领取");
   end    
  else
   player:alert(10,0,0,"您的VIP等级不足,无法领取");
  end
 else
  player:alert(10,0,0,"领过了,还来干嘛!");
 end
 ontalk2106(npc,0,player,0);
end

function ontalk2106_5(npc,event,player)
 if player:get_param(405) == 0 then
  if player:get_player_type() >= 2 then 
   if player:num_bag_black() >= 1 then
    player:add_item(10185,1,1);
    player:set_param(405,1)
    g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]童鞋领取了VIP1奖励,被疯狂的奖励击晕了,升级VIP2可也获得更高奖励哦",2,1000,0,1);
   else
    player:alert(10,0,0,"您的背包空间不足1格,无法领取");
   end    
  else
   player:alert(10,0,0,"您的VIP等级不足,无法领取");
  end
 else
  player:alert(10,0,0,"领过了,还来干嘛!");
 end
 ontalk2106(npc,0,player,0);
end

function ontalk2106_6(npc,event,player)
 if player:get_param(406) == 0 then
  if player:get_player_type() >= 2 then 
   if player:num_bag_black() >= 1 then
    player:add_item(10185,1,1);
    player:set_param(406,1)
    g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]童鞋领取了VIP1奖励,被疯狂的奖励击晕了,升级VIP2可也获得更高奖励哦",2,1000,0,1);
   else
    player:alert(10,0,0,"您的背包空间不足1格,无法领取");
   end    
  else
   player:alert(10,0,0,"您的VIP等级不足,无法领取");
  end
 else
  player:alert(10,0,0,"领过了,还来干嘛!");
 end
 ontalk2106(npc,0,player,0);
end

function ontalk2106_7(npc,event,player)
 if player:get_param(407) == 0 then
  if player:get_player_type() >= 2 then 
   if player:num_bag_black() >= 1 then
    player:add_item(10185,1,1);
    player:set_param(407,1)
    g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]童鞋领取了VIP1奖励,被疯狂的奖励击晕了,升级VIP2可也获得更高奖励哦",2,1000,0,1);
   else
    player:alert(10,0,0,"您的背包空间不足1格,无法领取");
   end    
  else
   player:alert(10,0,0,"您的VIP等级不足,无法领取");
  end
 else
  player:alert(10,0,0,"领过了,还来干嘛!");
 end
 ontalk2106(npc,0,player,0);
end

function ontalk2106_8(npc,event,player)
 if player:get_param(408) == 0 then
  if player:get_player_type() >= 2 then 
   if player:num_bag_black() >= 1 then
    player:add_item(10185,1,1);
    player:set_param(408,1)
    g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]童鞋领取了VIP1奖励,被疯狂的奖励击晕了,升级VIP2可也获得更高奖励哦",2,1000,0,1);
   else
    player:alert(10,0,0,"您的背包空间不足1格,无法领取");
   end    
  else
   player:alert(10,0,0,"您的VIP等级不足,无法领取");
  end
 else
  player:alert(10,0,0,"领过了,还来干嘛!");
 end
 ontalk2106(npc,0,player,0);
end

function ontalk2106_9(npc,event,player)
 if player:get_param(409) == 0 then
  if player:get_player_type() >= 2 then 
   if player:num_bag_black() >= 1 then
    player:add_item(10185,1,1);
    player:set_param(409,1)
    g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]童鞋领取了VIP1奖励,被疯狂的奖励击晕了,升级VIP2可也获得更高奖励哦",2,1000,0,1);
   else
    player:alert(10,0,0,"您的背包空间不足1格,无法领取");
   end    
  else
   player:alert(10,0,0,"您的VIP等级不足,无法领取");
  end
 else
  player:alert(10,0,0,"领过了,还来干嘛!");
 end
 ontalk2106(npc,0,player,0);
end

function ontalk2106_10(npc,event,player)
 if player:get_param(410) == 0 then
  if player:get_player_type() >= 2 then 
   if player:num_bag_black() >= 1 then
    player:add_item(10185,1,1);
    player:set_param(410,1)
    g_alert("[<font color='#FF0000'>"..player:GetName().."</font>]童鞋领取了VIP1奖励,被疯狂的奖励击晕了,升级VIP2可也获得更高奖励哦",2,1000,0,1);
   else
    player:alert(10,0,0,"您的背包空间不足1格,无法领取");
   end    
  else
   player:alert(10,0,0,"您的VIP等级不足,无法领取");
  end
 else
  player:alert(10,0,0,"领过了,还来干嘛!");
 end
 ontalk2106(npc,0,player,0);
end


Npc2106Funid =
{
[0] = ontalk2106;
[1] = ontalk2106_1;
[2] = ontalk2106_2;
[3] = ontalk2106_3;
[4] = ontalk2106_4;
[5] = ontalk2106_5;
[6] = ontalk2106_6;
[7] = ontalk2106_7;
[8] = ontalk2106_8;
[9] = ontalk2106_9;
[10] = ontalk2106_10;

 

 


}

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

RegisterUnitEvent(2106,20,"ontalk2106")
RegisterUnitEvent(2106,29,"CreatureNpcFun")

只有VIP才可领取的功能NPC 代码.代码内具体的可领取道具等请自行修改.
本站仅提供代码框架,具体的加入请自行测试完善.