烈焰私服合成装备带几率成功失败的脚本
function ontalk2034(npc,event,player)
player:echo(0,npc:GetLowGUID(),[[
#&talk_line#&
<a href='event:M2402,11'>无情冰霜套合成</a>
#&talk_line#&
<a href='event:M2402,12'>无敌英雄套合成</a>
#&talk_line#&
<a href='event:M2402,13'>特殊道具类合成</a>
#&talk_line#&
<a href='event:M2402,14'>四格内饰类合成</a>
#&talk_line#&
]]);
end
function ontalk2034_11(npc,event,player)
player:echo(0,npc:GetLowGUID(),[[
【无情】冰霜套合成
#&talk_line#&
<a href='event:M2402,1101'>【无情】冰霜·神剑</a> <a href='event:M2402,1102'>【无情】冰霜·神甲(男)</a> <a href='event:M2402,1103'>【无情】冰霜·神甲(女)</a>
#&talk_line#&
]]);
end
function ontalk2034_12(npc,event,player)
player:echo(0,npc:GetLowGUID(),[[
【无敌】英雄套合成
#&talk_line#&
<a href='event:M2402,1201'>【无敌】英雄·神剑</a> <a href='event:M2402,1202'>【无敌】英雄·神甲(男)</a> <a href='event:M2402,1203'>【无敌】英雄·神甲(女)</a>
#&talk_line#&
]]);
end
function ontalk2034_1101(npc,event,player)
if player:num_item_level(20902,1) >= 3 then
if player:num_item_level(19105,1) >= 5 then
if player:num_item_level(18100,1) >= 10 then
if player:get_vcoin() >= 5000000 then
player:remove_item_level(18100,10,1);
player:remove_item_level(19105,5,1);
player:remove_item_level(20902,3,1);
player:sub_vcoin(5000000);
if player:num_item_level(19107,1) >= 1 then
player:remove_item_level(19107,1,1);
local i = math.random(1,1);
elseif player:num_item_level(19106,1) >= 1 then
player:remove_item_level(19107,1,1);
local i = math.random(1,70);
end
if i <= 30 then
player:add_item(20903,1,0);
player:alert(110,0,0,"合成【无情】冰霜·神剑】");
else
player:alert(110,0,0,"您的运气不佳,合成失败,材料及道具消失!");
end
else
player:alert(110,0,0,"您的元宝不足500万,无法合成");
end
else
player:alert(10,0,0,"您没有10个锻造石,无法合成");
end
else
player:alert(10,0,0,"您没有3个补天石,无法合成");
end
else
player:alert(10,0,0,"您没有3个【主宰】烈焰·神剑,或已强化、注灵");
end
ontalk2034_101(npc,0,player);
end
Npc2034Funid =
{
[11] = ontalk2034_11;
[1101] = ontalk2034_1101;
[1102] = ontalk2034_1102;
[1103] = ontalk2034_1103;
[1104] = ontalk2034_1104;
[1105] = ontalk2034_1105;
[1106] = ontalk2034_1106;
[1107] = ontalk2034_1107;
[1108] = ontalk2034_1108;
[1109] = ontalk2034_1109;
[1110] = ontalk2034_1110;
[1111] = ontalk2034_1111;
[1112] = ontalk2034_1112;
[1113] = ontalk2034_1113;
[1114] = ontalk2034_1114;
[1115] = ontalk2034_1115;
[1116] = ontalk2034_1116;
[1117] = ontalk2034_1117;
[1118] = ontalk2034_1118;
[1119] = ontalk2034_1119;
[12] = ontalk2034_12;
[1201] = ontalk2034_1201;
[1202] = ontalk2034_1202;
[1203] = ontalk2034_1203;
[1204] = ontalk2034_1204;
[1205] = ontalk2034_1205;
[1206] = ontalk2034_1206;
[1207] = ontalk2034_1207;
[1208] = ontalk2034_1208;
[1209] = ontalk2034_1209;
[1210] = ontalk2034_1210;
[1211] = ontalk2034_1211;
[1212] = ontalk2034_1212;
[1213] = ontalk2034_1213;
[1214] = ontalk2034_1214;
[1215] = ontalk2034_1215;
[1216] = ontalk2034_1216;
[1217] = ontalk2034_1217;
[1218] = ontalk2034_1218;
[1219] = ontalk2034_1219;
}
function CreatureNpcFun(npc,event,player,funid)
if Npc2034Funid[funid] ~= nil then
Npc2034Funid[funid](npc,event,player);
end
end
RegisterUnitEvent(2034,20,"ontalk2034")
RegisterUnitEvent(2034,29,"CreatureNpcFun")