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

烈焰服务端在烈焰城添加烈焰神兵合成NPC[yeyo6原创]

发表时间:2015-10-14 10:15点击人气:责任编辑:admin
今天给大家发布一个烈焰私服神兵合成的脚本.所需材料玫瑰系列.
脚本特意写的比较简单.好让学习烈焰私服的新手容易看懂.

神兵脚本代码如下

function ontalk2045(npc,event,player)
player:echo(0,npc:GetLowGUID(),[[

           烈焰私服神剑x2+烈焰私服石x1+玫瑰·金色诱惑x1
#&item20913#&                     <u><a href='event:M2402,1'>锻造</a></u>
           轩辕剑x2+烈焰私服石*2+玫瑰·金色诱惑*1
#&item20910#&                     <u><a href='event:M2402,2'>锻造</a></u>
           诛仙剑x2+烈焰私服石*2+玫瑰·金色诱惑*2
#&item20911#&                     <u><a href='event:M2402,3'>锻造</a></u>
           死方悯生剑x2+烈焰私服石x2+玫瑰·金色诱惑x3
#&item20912#&                     <u><a href='event:M2402,4'>锻造</a></u>
]]);
end

function ontalk2045_1(npc,event,player)
 if player:num_item_level(20900,1) >= 2 and player:num_item(18100) >= 1 and player:num_item(10196) >= 1 then
      player:remove_item(20900,2);
   player:remove_item(18100,1);
   player:remove_item(10196,1);
   player:add_item(20913,1,0);
   player:alert(110,0,0,"锻造成功");
  else
   player:alert(10,0,0,"材料不足,请确认后再来找我");
  end
 ontalk2045(npc,0,player,0);
end

function ontalk2045_2(npc,event,player)
 if player:num_item_level(20913,1) >= 2 and player:num_item(18100) >= 2 and player:num_item(10196) >= 1 then
      player:remove_item(20913,2);
   player:remove_item(18100,2);
   player:remove_item(10196,1);
   player:add_item(20910,1,0);
  player:alert(110,0,0,"锻造成功");
  else
   player:alert(10,0,0,"材料不足,请确认后再来找我");
  end
 ontalk2045(npc,0,player,0);
end

function ontalk2045_3(npc,event,player)
 if player:num_item_level(20910,1) >= 2 and player:num_item(18100) >= 2 and player:num_item(10196) >= 2 then
      player:remove_item(20910,2);
   player:remove_item(18100,2);
   player:remove_item(10196,2);
   player:add_item(20911,1,0);
  player:alert(110,0,0,"锻造成功");
  else
   player:alert(10,0,0,"材料不足,请确认后再来找我");
  end
 ontalk2045(npc,0,player,0);
end

function ontalk2045_4(npc,event,player)
 if player:num_item_level(20911,1) >= 2 and player:num_item(18100) >= 2 and player:num_item(10196) >= 3 then
      player:remove_item(20911,2);
   player:remove_item(18100,2);
   player:remove_item(10196,3);
   player:add_item(20912,1,0);
  player:alert(110,0,0,"锻造成功");
  else
   player:alert(10,0,0,"材料不足,请确认后再来找我");
  end
 ontalk2045(npc,0,player,0);
end


Npc2045Funid =
{
[0] = ontalk2045;
[3] = ontalk2045_3;
[4] = ontalk2045_4;
[1] = ontalk2045_1;
[2] = ontalk2045_2;
}

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

RegisterUnitEvent(2045,20,"ontalk2045")
RegisterUnitEvent(2045,29,"CreatureNpcFun")

以上代码请自行保存为编码UTF8编码的lua文件.
添加合成烈焰私服神兵的NPC,本站其他文章已经有介绍,
在这里就不重复介绍了.
烈 焰开服表表,烈焰私服最新开服信息尽在页游咯发布站http://www.yeyo6.com
页游发布论坛 http://bbs.yeyo6.com 新开欢迎大家注册踊跃参与