--È«¾Ö±í Shadui_set = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51} xinxingshadiao = 1 curMSIns = 0 --Qingrenjie_canRef = 1 --×ø±ê local shadui_normal = {} --[[ shadui_normal[1] = {x = 395,y = 2818,z = 951} shadui_normal[2] = {x = 422,y = 2832,z = 925} shadui_normal[3] = {x = 375,y = 2849,z = 907} shadui_normal[4] = {x = 419,y = 2846,z = 883} shadui_normal[5] = {x = 467,y = 2752,z = 873} shadui_normal[6] = {x = 504,y = 2702,z = 873} shadui_normal[7] = {x = 383,y = 2855,z = 857} shadui_normal[8] = {x = 342,y = 2850,z = 885} shadui_normal[9] = {x = 343,y = 2850,z = 846} shadui_normal[10] = {x = 382,y = 2850,z = 806} shadui_normal[11] = {x = 405,y = 2850,z = 762} shadui_normal[12] = {x = 466,y = 2741,z = 743} shadui_normal[13] = {x = 512,y = 2700,z = 751} shadui_normal[14] = {x = 546,y = 2698,z = 733} shadui_normal[15] = {x = 423,y = 2850,z = 725} shadui_normal[16] = {x = 330,y = 2844,z = 795} shadui_normal[17] = {x = 288,y = 2822,z = 811} shadui_normal[18] = {x = 262,y = 2799,z = 785} shadui_normal[19] = {x = 255,y = 2782,z = 749} shadui_normal[20] = {x = 291,y = 2812,z = 738} shadui_normal[21] = {x = 343,y = 2850,z = 755} shadui_normal[22] = {x = 377,y = 2850,z = 708} shadui_normal[23] = {x = 332,y = 2850,z = 689} shadui_normal[24] = {x = 365,y = 2850,z = 670} shadui_normal[25] = {x = 407,y = 2850,z = 656} shadui_normal[26] = {x = 446,y = 2830,z = 681} shadui_normal[27] = {x = 296,y = 2804,z = 688} shadui_normal[28] = {x = 254,y = 2754,z = 704} shadui_normal[29] = {x = 256,y = 2750,z = 649} shadui_normal[30] = {x = 233,y = 2765,z = 596} shadui_normal[31] = {x = 296,y = 2787,z = 646} shadui_normal[32] = {x = 310,y = 2819,z = 597} shadui_normal[33] = {x = 368,y = 2850,z = 622} shadui_normal[34] = {x = 439,y = 2765,z = 607} shadui_normal[35] = {x = 556,y = 2583,z = 564} shadui_normal[36] = {x = 516,y = 2676,z = 550} shadui_normal[37] = {x = 470,y = 2714,z = 560} shadui_normal[38] = {x = 419,y = 2804,z = 550} shadui_normal[39] = {x = 398,y = 2850,z = 585} shadui_normal[40] = {x = 375,y = 2848,z = 493} shadui_normal[41] = {x = 359,y = 2850,z = 557} --]] shadui_normal[1] = {x = 460,y = 2728,z = 987} shadui_normal[2] = {x = 413,y = 2815,z = 947} shadui_normal[3] = {x = 382,y = 2852,z = 842} shadui_normal[4] = {x = 329,y = 2847,z = 818} shadui_normal[5] = {x = 287,y = 2814,z = 771} shadui_normal[6] = {x = 250,y = 2775,z = 740} shadui_normal[7] = {x = 245,y = 2713,z = 699} shadui_normal[8] = {x = 261,y = 2769,z = 678} shadui_normal[9] = {x = 306,y = 2825,z = 674} shadui_normal[10] = {x = 276,y = 2755,z = 647} shadui_normal[11] = {x = 300,y = 2812,z = 608} shadui_normal[12] = {x = 332,y = 2844,z = 606} shadui_normal[13] = {x = 345,y = 2850,z = 575} shadui_normal[14] = {x = 354,y = 2850,z = 545} shadui_normal[15] = {x = 378,y = 2848,z = 490} shadui_normal[16] = {x = 354,y = 2848,z = 435} shadui_normal[17] = {x = 338,y = 2850,z = 380} shadui_normal[18] = {x = 328,y = 2850,z = 346} shadui_normal[19] = {x = 361,y = 2851,z = 332} shadui_normal[20] = {x = 409,y = 2799,z = 311} shadui_normal[21] = {x = 453,y = 2730,z = 299} shadui_normal[22] = {x = 503,y = 2569,z = 307} shadui_normal[23] = {x = 521,y = 2567,z = 358} shadui_normal[24] = {x = 545,y = 2551,z = 412} shadui_normal[25] = {x = 541,y = 2556,z = 465} shadui_normal[26] = {x = 532,y = 2572,z = 496} shadui_normal[27] = {x = 499,y = 2712,z = 551} shadui_normal[28] = {x = 540,y = 2599,z = 569} shadui_normal[29] = {x = 421,y = 2803,z = 544} shadui_normal[30] = {x = 379,y = 2850,z = 575} shadui_normal[31] = {x = 419,y = 2849,z = 645} shadui_normal[32] = {x = 395,y = 2850,z = 717} shadui_normal[33] = {x = 445,y = 2833,z = 741} shadui_normal[34] = {x = 567,y = 2676,z = 706} shadui_normal[35] = {x = 568,y = 2646,z = 746} shadui_normal[36] = {x = 539,y = 2698,z = 808} shadui_normal[37] = {x = 489,y = 2723,z = 870} shadui_normal[38] = {x = 431,y = 2819,z = 879} shadui_normal[39] = {x = 335,y = 2850,z = 763} shadui_normal[40] = {x = 359,y = 2850,z = 703} shadui_normal[41] = {x = 348,y = 2850,z = 862} shadui_normal[42] = {x = 501,y = 2722,z = 956} shadui_normal[43] = {x = 544,y = 2700,z = 839} shadui_normal[44] = {x = 497,y = 2700,z = 738} shadui_normal[45] = {x = 577,y = 2623,z = 666} shadui_normal[46] = {x = 574,y = 2577,z = 600} shadui_normal[47] = {x = 465,y = 2720,z = 567} shadui_normal[48] = {x = 394,y = 2843,z = 416} shadui_normal[49] = {x = 400,y = 2827,z = 379} shadui_normal[50] = {x = 553,y = 2553,z = 315} shadui_normal[51] = {x = 357,y = 2850,z = 641} --»î¶¯Ã¿·ÖÖÓµ÷Óà function act53_OnTimerMin(ActID) local curhour = tonumber(os.date("%H"))--Сʱ local curmin = tonumber(os.date("%M"))--·ÖÖÓ --ˢƯÁ÷Æ¿ if curmin == 0 or curmin == 30 then piaoliuping_appear() local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 102, 300093)--²©²©ÂÞÂüµºµÄº£Ì²³öÏÖÁËÐí¶àƯÁ÷Æ¿¡­¡­ msg.DispatchBroadcast(MsgID,-1,-1,-1) end if curhour == 19 or curhour == 20 then --[[´Ë´¦ÖØÐ´ if Qingrenjie_canRef == 1 then for k in pairs(shadui_normal) do local cid = map.MapCreateColCreature(3390518312, 1, 6011039+math.random(3), shadui_normal[k].x, shadui_normal[k].y, shadui_normal[k].z, 1) cre.SetCreatureScriptData(3390518312, 1, cid, 1, 0, k) table.remove(Shadui_set, k) end --¸ù¾Ý³¡¾°Íæ¼ÒÊýÁ¿Ë¢Ð¼ÆÊ±Æ÷ --ɾ³ý¼ÆÊ±Æ÷Ë¢¹Ö local temptable = {} local total = 0 temptable = map.GetMapAllRoleID(3390518312, 1) if temptable ~= nil then total = table.maxn(temptable) end if total >= 200 then map.MapCreateCreature(3390518312, 1, 6011049, 1, 1 , 1) elseif total >= 100 then map.MapCreateCreature(3390518312, 1, 6011050, 1, 1 , 1) else map.MapCreateCreature(3390518312, 1, 6011051, 1, 1 , 1) end local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 102, 300094)--²©²©ÂÞÂüµºµÄɳµñ»î¶¯ÏÖÔÚ¿ªÊ¼£¬Èô«ËÍʹÕß[x,z]´øÄúÌåÑéÈÈ´øÉ³Ì²Ö®È¤¡£ msg.DispatchBroadcast(MsgID,-1,-1,-1) Qingrenjie_canRef = 0 end --]] --ÿ·ÖÖÓˢРif Shadui_set ~= nil then for k in pairs(Shadui_set) do local cid = map.MapCreateColCreature(3390518312, 1, 6011039+math.random(3), shadui_normal[Shadui_set[k]].x, shadui_normal[Shadui_set[k]].y, shadui_normal[Shadui_set[k]].z, 1) cre.SetCreatureScriptData(3390518312, 1, cid, 1, 0, Shadui_set[k]) table.remove(Shadui_set, k) end end if curmin == 0 or curmin == 30 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 102, 300094)--²©²©ÂÞÂüµºµÄɳµñ»î¶¯ÏÖÔÚ¿ªÊ¼£¬Èô«ËÍʹÕß[x,z]´øÄúÌåÑéÈÈ´øÉ³Ì²Ö®È¤¡£ msg.DispatchBroadcast(MsgID,-1,-1,-1) end if curmin%10 == 0 then local shabao_Pos = {} shabao_Pos[1] = {x = 404,y = 2794,z = 976} shabao_Pos[2] = {x = 381,y = 2849,z = 887} shabao_Pos[3] = {x = 530,y = 2700,z = 872} shabao_Pos[4] = {x = 266,y = 2819,z = 807} shabao_Pos[5] = {x = 376,y = 2850,z = 788} shabao_Pos[6] = {x = 530,y = 2700,z = 761} shabao_Pos[7] = {x = 282,y = 2791,z = 703} shabao_Pos[8] = {x = 431,y = 2850,z = 691} shabao_Pos[9] = {x = 348,y = 2850,z = 637} shabao_Pos[10] = {x = 261,y = 2761,z = 595} shabao_Pos[11] = {x = 427,y = 2814,z = 590} shabao_Pos[12] = {x = 376,y = 2849,z = 516} shabao_Pos[13] = {x = 542,y = 2566,z = 537} local rNum = math.random(13) local cid = map.MapCreateColCreature(3390518312, 1, 6011035, shabao_Pos[rNum].x, shabao_Pos[rNum].y, shabao_Pos[rNum].z, 1) local cid2 = map.MapCreateColCreature(3390518312, 1, 6011053, 1, 1, 1, 1)--10·ÖÖÓ¼ÆÊý cre.SetCreatureScriptData(3390518312, 1, cid2, 1, 0, cid) --´´½¨boss³¡¾° --boss_pos 120,500,120 map.CreateInstance(3390517544, cid) curMSIns = cid map.MapCreateColCreature(3390517544, cid, 1095130, 120, 500, 120, 1) local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 101, 210023) --ɳÇðħ±¤µÄÈë¿ÚͻȻ³öÏÖÔÚ[,]¡­¡­ msg.AddMsgEvent(MsgID, 9, shabao_Pos[rNum].x) msg.AddMsgEvent(MsgID, 9, shabao_Pos[rNum].z) msg.DispatchMapMsgEvent(MsgID, 3390518312, 1) elseif curmin%5 == 0 then local shabao_Pos = {} shabao_Pos[1] = {x = 404,y = 2794,z = 976} shabao_Pos[2] = {x = 381,y = 2849,z = 887} shabao_Pos[3] = {x = 530,y = 2700,z = 872} shabao_Pos[4] = {x = 266,y = 2819,z = 807} shabao_Pos[5] = {x = 376,y = 2850,z = 788} shabao_Pos[6] = {x = 530,y = 2700,z = 761} shabao_Pos[7] = {x = 282,y = 2791,z = 703} shabao_Pos[8] = {x = 431,y = 2850,z = 691} shabao_Pos[9] = {x = 348,y = 2850,z = 637} shabao_Pos[10] = {x = 261,y = 2761,z = 595} shabao_Pos[11] = {x = 427,y = 2814,z = 590} shabao_Pos[12] = {x = 376,y = 2849,z = 516} shabao_Pos[13] = {x = 542,y = 2566,z = 537} local rNum = math.random(13) local cid = map.MapCreateColCreature(3390518312, 1, 6011035, shabao_Pos[rNum].x, shabao_Pos[rNum].y, shabao_Pos[rNum].z, 1) local cid2 = map.MapCreateColCreature(3390518312, 1, 6011053, 1, 1, 1, 1)--10·ÖÖÓ¼ÆÊý cre.SetCreatureScriptData(3390518312, 1, cid2, 1, 0, cid) local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 101, 210023) --ɳÇðħ±¤µÄÈë¿ÚͻȻ³öÏÖÔÚ[,]¡­¡­ msg.AddMsgEvent(MsgID, 9, shabao_Pos[rNum].x) msg.AddMsgEvent(MsgID, 9, shabao_Pos[rNum].z) msg.DispatchMapMsgEvent(MsgID, 3390518312, 1) --´´½¨±¦Ï䳡¾° map.CreateInstance(3390517544, cid) curMSIns = cid local baoxiang_Pos = {} baoxiang_Pos[1] ={cre = 6011045,x = 6000,y = 500,z = 6000} baoxiang_Pos[2] ={cre = 6011046,x = 6845,y = 500,z = 5345} baoxiang_Pos[3] ={cre = 6011046,x = 6840,y = 500,z = 6579} baoxiang_Pos[4] ={cre = 6011046,x = 5650,y = 500,z = 6949} baoxiang_Pos[5] ={cre = 6011046,x = 4936,y = 500,z = 5938} baoxiang_Pos[6] ={cre = 6011046,x = 5703,y = 500,z = 4969} baoxiang_Pos[7] ={cre = 6011047,x = 4130,y = 500,z = 8411} baoxiang_Pos[8] ={cre = 6011047,x = 3109,y = 500,z = 7026} baoxiang_Pos[9] ={cre = 6011047,x = 3137,y = 500,z = 4961} baoxiang_Pos[10] ={cre = 6011047,x = 4134,y = 500,z = 3632} baoxiang_Pos[11] ={cre = 6011047,x = 5952,y = 500,z = 3008} baoxiang_Pos[12] ={cre = 6011047,x = 7803,y = 500,z = 3626} baoxiang_Pos[13] ={cre = 6011047,x = 8819,y = 500,z = 4977} baoxiang_Pos[14] ={cre = 6011047,x = 8824,y = 500,z = 7038} baoxiang_Pos[15] ={cre = 6011047,x = 7804,y = 500,z = 8421} baoxiang_Pos[16] ={cre = 6011047,x = 5976,y = 500,z = 9017} for k in pairs(baoxiang_Pos) do map.MapCreateColCreature(3390517544, cid, baoxiang_Pos[k].cre, baoxiang_Pos[k].x/50, baoxiang_Pos[k].y, baoxiang_Pos[k].z/50, 1) end end end end aux.RegisterActEvent(53, 4, "act53_OnTimerMin") --10·ÖÖÓ¼ÆÊ±Æ÷ function c6011053_On_Disappear(MapID, InstanceID, TargetID, TargetTypeID) map.DeleteInstance(3390517544, cre.GetCreatureScriptData(MapID, InstanceID, TargetID, 1, 0)) end aux.RegisterCreatureEvent(6011053, 13, "c6011053_On_Disappear") --ɳ¶Ñµ÷²éË¢ÐÂ4ÖÖɳµñ function c6011040_On_Die(MapID, InstanceID, CreatureID, CreatureTypeID, KillerID) local x,y,z = unit.GetPosition(MapID, InstanceID, CreatureID) local randomNum = math.random(100) if randomNum > 90 then--ÌÒÐÄ if xinxingshadiao == 1 then local cid = map.MapCreateColCreature(MapID, InstanceID, 6011044, x, y, z, 1) cre.SetCreatureScriptData(MapID, InstanceID, cid, 1, 0, cre.GetCreatureScriptData(MapID, InstanceID, CreatureID, 1, 0)) map.MapCreateColCreature(MapID, InstanceID, 6011048, x, y+1000, z, 1) xinxingshadiao = 0 local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 101, 210032) --ÐÄÐÎ msg.AddMsgEvent(MsgID, 9, x) msg.AddMsgEvent(MsgID, 9, z) msg.DispatchMapMsgEvent(MsgID, 3390518312, 1) else local cid = map.MapCreateColCreature(MapID, InstanceID, 6011037, x, y, z, 1) cre.SetCreatureScriptData(MapID, InstanceID, cid, 1, 0, cre.GetCreatureScriptData(MapID, InstanceID, CreatureID, 1, 0)) end elseif randomNum > 80 then--º£¹ê local cid = map.MapCreateColCreature(MapID, InstanceID, 6011037, x, y, z, 1) cre.SetCreatureScriptData(MapID, InstanceID, cid, 1, 0, cre.GetCreatureScriptData(MapID, InstanceID, CreatureID, 1, 0)) elseif randomNum > 30 then--º£ÐÇ local cid = map.MapCreateColCreature(MapID, InstanceID, 6011038, x, y, z, 1) cre.SetCreatureScriptData(MapID, InstanceID, cid, 1, 0, cre.GetCreatureScriptData(MapID, InstanceID, CreatureID, 1, 0)) else--º£ëà local cid = map.MapCreateColCreature(MapID, InstanceID, 6011039, x, y, z, 1) cre.SetCreatureScriptData(MapID, InstanceID, cid, 1, 0, cre.GetCreatureScriptData(MapID, InstanceID, CreatureID, 1, 0)) end end aux.RegisterCreatureEvent(6011040, 4, "c6011040_On_Die") aux.RegisterCreatureEvent(6011041, 4, "c6011040_On_Die") aux.RegisterCreatureEvent(6011042, 4, "c6011040_On_Die") --º£ëà function c6011039_On_Die(MapID, InstanceID, CreatureID, CreatureTypeID, KillerID) local x,y,z = unit.GetPosition(MapID, InstanceID, CreatureID) local randomNum = math.random(100) local theInd = cre.GetCreatureScriptData(MapID, InstanceID, CreatureID, 1, 0) table.insert(Shadui_set, theInd) local fuhao = {-1,1} if randomNum <= 90 then local level = role.GetRoleLevel(MapID, InstanceID, KillerID) if level > 85 then for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095128, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end elseif level > 75 then for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095126, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end elseif level > 65 then for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095124, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end elseif level > 55 then for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095122, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end else for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095120, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end end else for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 6011052, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end end end aux.RegisterCreatureEvent(6011039, 4, "c6011039_On_Die") --º£ÐÇ function c6011038_On_Die(MapID, InstanceID, CreatureID, CreatureTypeID, KillerID) local x,y,z = unit.GetPosition(MapID, InstanceID, CreatureID) local randomNum = math.random(100) local theInd = cre.GetCreatureScriptData(MapID, InstanceID, CreatureID, 1, 0) table.insert(Shadui_set, theInd) local fuhao = {-1,1} if randomNum <= 80 then local level = role.GetRoleLevel(MapID, InstanceID, KillerID) if level > 85 then for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095129, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end elseif level > 75 then for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095127, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end elseif level > 65 then for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095125, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end elseif level > 55 then for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095123, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end else for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095121, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end end else for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 6011052, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end end end aux.RegisterCreatureEvent(6011038, 4, "c6011038_On_Die") --º£¹ê function c6011037_On_Die(MapID, InstanceID, CreatureID, CreatureTypeID, KillerID) local x,y,z = unit.GetPosition(MapID, InstanceID, CreatureID) local randomNum = math.random(100) local theInd = cre.GetCreatureScriptData(MapID, InstanceID, CreatureID, 1, 0) table.insert(Shadui_set, theInd) local fuhao = {-1,1} if randomNum <= 70 then local level = role.GetRoleLevel(MapID, InstanceID, KillerID) if level > 85 then for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095129, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095128, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end elseif level > 75 then for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095127, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095126, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end elseif level > 65 then for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095125, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095124, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end elseif level > 55 then for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095123, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095122, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end else for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095121, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 1095120, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end end else for i=1,5 do map.MapCreateColCreature(MapID, InstanceID, 6011052, x+math.random(20)*fuhao[math.random(2)], y, z+math.random(20)*fuhao[math.random(2)], 1) end end end aux.RegisterCreatureEvent(6011037, 4, "c6011037_On_Die") --ÐÄÐÎNPC --ɳ±¤NPC --ÐÄÐÎÏûʧ function c6011044_On_Disappear(MapID, InstanceID, TargetID, TargetTypeID) local theInd = cre.GetCreatureScriptData(MapID, InstanceID, TargetID, 1, 0) table.insert(Shadui_set, theInd) xinxingshadiao = 1 end aux.RegisterCreatureEvent(6011044, 13, "c6011044_On_Disappear") --µ÷²é function c6011040_On_Invest(MapID, InstanceID, CreatureID, CreatureTypeID, RoleID) if role.GetBagFreeSize(RoleID) < 1 then --±³°ü¿Õ¼ä²»×ã local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 26, 210019) msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif role.GetRoleItemNum(RoleID, 4800280) < 1 then --ȱÉÙħ·¨Ë®µÎ local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 26, 210029) msg.DispatchRoleMsgEvent(RoleID, MsgID) unit.ChangeHP(MapID, InstanceID, CreatureID, 1) else local curNum = math.random(100) if curNum > 95 then local temp = {3070009,3070040,3070034,3070028} local suiji = math.random(1,#temp) role.AddRoleItem(MapID, InstanceID, RoleID, temp[suiji], 1, -1, 8, 420) else local level = role.GetRoleLevel(MapID, InstanceID, RoleID) if level > 90 then role.AddRoleExp(MapID, InstanceID, RoleID, 200000) elseif level > 85 then role.AddRoleExp(MapID, InstanceID, RoleID, 160000) elseif level > 80 then role.AddRoleExp(MapID, InstanceID, RoleID, 100000) elseif level > 75 then role.AddRoleExp(MapID, InstanceID, RoleID, 85000) elseif level > 70 then role.AddRoleExp(MapID, InstanceID, RoleID, 60000) elseif level > 65 then role.AddRoleExp(MapID, InstanceID, RoleID, 54000) elseif level > 60 then role.AddRoleExp(MapID, InstanceID, RoleID, 43000) elseif level > 55 then role.AddRoleExp(MapID, InstanceID, RoleID, 32000) elseif level > 50 then role.AddRoleExp(MapID, InstanceID, RoleID, 17000) elseif level > 45 then role.AddRoleExp(MapID, InstanceID, RoleID, 8000) elseif level >= 40 then role.AddRoleExp(MapID, InstanceID, RoleID, 4000) end end role.AddRoleItem(MapID, InstanceID, RoleID, 4800266, 1, -1, 8, 420) role.RemoveFromRole(MapID, InstanceID, RoleID, 4800280, 1, 102) end end aux.RegisterCreatureEvent(6011040, 6, "c6011040_On_Invest")--ɳ¶Ñ aux.RegisterCreatureEvent(6011041, 6, "c6011040_On_Invest")--ɳ¶Ñ aux.RegisterCreatureEvent(6011042, 6, "c6011040_On_Invest")--ɳ¶Ñ --º£ëà function c6011039_On_Invest(MapID, InstanceID, CreatureID, CreatureTypeID, RoleID)--6 local maxhp = unit.GetUnitAttValue(MapID, InstanceID, CreatureID, 9) if maxhp == 4 then unit.AddBuff(MapID, InstanceID, CreatureID, 6940301, CreatureID) elseif maxhp == 2 then unit.AddBuff(MapID, InstanceID, CreatureID, 6940302, CreatureID) end if role.GetBagFreeSize(RoleID) < 1 then --±³°ü¿Õ¼ä²»×ã local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 26, 210019) msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif role.GetRoleItemNum(RoleID, 4800280) < 1 then --ȱÉÙħ·¨Ë®µÎ local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 26, 210029) msg.DispatchRoleMsgEvent(RoleID, MsgID) unit.ChangeHP(MapID, InstanceID, CreatureID, 1) else local curNum = math.random(100) if curNum > 95 then local temp = {3070009,3070040,3070034,3070028} local suiji = math.random(1,#temp) role.AddRoleItem(MapID, InstanceID, RoleID, temp[suiji], 1, -1, 8, 420) else local level = role.GetRoleLevel(MapID, InstanceID, RoleID) if level > 90 then role.AddRoleExp(MapID, InstanceID, RoleID, 200000) elseif level > 85 then role.AddRoleExp(MapID, InstanceID, RoleID, 160000) elseif level > 80 then role.AddRoleExp(MapID, InstanceID, RoleID, 100000) elseif level > 75 then role.AddRoleExp(MapID, InstanceID, RoleID, 85000) elseif level > 70 then role.AddRoleExp(MapID, InstanceID, RoleID, 60000) elseif level > 65 then role.AddRoleExp(MapID, InstanceID, RoleID, 54000) elseif level > 60 then role.AddRoleExp(MapID, InstanceID, RoleID, 43000) elseif level > 55 then role.AddRoleExp(MapID, InstanceID, RoleID, 32000) elseif level > 50 then role.AddRoleExp(MapID, InstanceID, RoleID, 17000) elseif level > 45 then role.AddRoleExp(MapID, InstanceID, RoleID, 8000) elseif level >= 40 then role.AddRoleExp(MapID, InstanceID, RoleID, 4000) end end role.AddRoleItem(MapID, InstanceID, RoleID, 4800266, 1, -1, 8, 420) role.RemoveFromRole(MapID, InstanceID, RoleID, 4800280, 1, 102) end end aux.RegisterCreatureEvent(6011039, 6, "c6011039_On_Invest") --º£ÐÇ function c6011038_On_Invest(MapID, InstanceID, CreatureID, CreatureTypeID, RoleID)--54 local maxhp = unit.GetUnitAttValue(MapID, InstanceID, CreatureID, 9) if maxhp == 6 then unit.AddBuff(MapID, InstanceID, CreatureID, 6940301, CreatureID) elseif maxhp == 3 then unit.AddBuff(MapID, InstanceID, CreatureID, 6940302, CreatureID) end if role.GetBagFreeSize(RoleID) < 1 then --±³°ü¿Õ¼ä²»×ã local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 26, 210019) msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif role.GetRoleItemNum(RoleID, 4800280) < 1 then --ȱÉÙħ·¨Ë®µÎ local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 26, 210029) msg.DispatchRoleMsgEvent(RoleID, MsgID) unit.ChangeHP(MapID, InstanceID, CreatureID, 1) else local curNum = math.random(100) if curNum > 95 then local temp = {3070009,3070040,3070034,3070028} local suiji = math.random(1,#temp) role.AddRoleItem(MapID, InstanceID, RoleID, temp[suiji], 1, -1, 8, 420) else local level = role.GetRoleLevel(MapID, InstanceID, RoleID) if level > 90 then role.AddRoleExp(MapID, InstanceID, RoleID, 200000) elseif level > 85 then role.AddRoleExp(MapID, InstanceID, RoleID, 160000) elseif level > 80 then role.AddRoleExp(MapID, InstanceID, RoleID, 100000) elseif level > 75 then role.AddRoleExp(MapID, InstanceID, RoleID, 85000) elseif level > 70 then role.AddRoleExp(MapID, InstanceID, RoleID, 60000) elseif level > 65 then role.AddRoleExp(MapID, InstanceID, RoleID, 54000) elseif level > 60 then role.AddRoleExp(MapID, InstanceID, RoleID, 43000) elseif level > 55 then role.AddRoleExp(MapID, InstanceID, RoleID, 32000) elseif level > 50 then role.AddRoleExp(MapID, InstanceID, RoleID, 17000) elseif level > 45 then role.AddRoleExp(MapID, InstanceID, RoleID, 8000) elseif level >= 40 then role.AddRoleExp(MapID, InstanceID, RoleID, 4000) end end role.AddRoleItem(MapID, InstanceID, RoleID, 4800266, 1, -1, 8, 420) role.RemoveFromRole(MapID, InstanceID, RoleID, 4800280, 1, 102) end end aux.RegisterCreatureEvent(6011038, 6, "c6011038_On_Invest") --º£¹ê function c6011037_On_Invest(MapID, InstanceID, CreatureID, CreatureTypeID, RoleID)--72 local maxhp = unit.GetUnitAttValue(MapID, InstanceID, CreatureID, 9) if maxhp == 8 then unit.AddBuff(MapID, InstanceID, CreatureID, 6940301, CreatureID) elseif maxhp == 4 then unit.AddBuff(MapID, InstanceID, CreatureID, 6940302, CreatureID) end if role.GetBagFreeSize(RoleID) < 1 then --±³°ü¿Õ¼ä²»×ã local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 26, 210019) msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif role.GetRoleItemNum(RoleID, 4800280) < 1 then --ȱÉÙħ·¨Ë®µÎ local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 26, 210029) msg.DispatchRoleMsgEvent(RoleID, MsgID) unit.ChangeHP(MapID, InstanceID, CreatureID, 1) else local curNum = math.random(100) if curNum > 95 then local temp = {3070009,3070040,3070034,3070028} local suiji = math.random(1,#temp) role.AddRoleItem(MapID, InstanceID, RoleID, temp[suiji], 1, -1, 8, 420) else local level = role.GetRoleLevel(MapID, InstanceID, RoleID) if level > 90 then role.AddRoleExp(MapID, InstanceID, RoleID, 200000) elseif level > 85 then role.AddRoleExp(MapID, InstanceID, RoleID, 160000) elseif level > 80 then role.AddRoleExp(MapID, InstanceID, RoleID, 100000) elseif level > 75 then role.AddRoleExp(MapID, InstanceID, RoleID, 85000) elseif level > 70 then role.AddRoleExp(MapID, InstanceID, RoleID, 60000) elseif level > 65 then role.AddRoleExp(MapID, InstanceID, RoleID, 54000) elseif level > 60 then role.AddRoleExp(MapID, InstanceID, RoleID, 43000) elseif level > 55 then role.AddRoleExp(MapID, InstanceID, RoleID, 32000) elseif level > 50 then role.AddRoleExp(MapID, InstanceID, RoleID, 17000) elseif level > 45 then role.AddRoleExp(MapID, InstanceID, RoleID, 8000) elseif level >= 40 then role.AddRoleExp(MapID, InstanceID, RoleID, 4000) end end role.AddRoleItem(MapID, InstanceID, RoleID, 4800266, 1, -1, 8, 420) role.RemoveFromRole(MapID, InstanceID, RoleID, 4800280, 1, 102) end end aux.RegisterCreatureEvent(6011037, 6, "c6011037_On_Invest") --ÍõÕß±¦Ïä function c6011045_On_Invest(MapID, InstanceID, CreatureID, CreatureTypeID, RoleID) if role.GetRoleItemNum(RoleID, 4800267) > 0 then if role.GetBagFreeSize(RoleID) < 1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 26, 210019) msg.DispatchRoleMsgEvent(RoleID, MsgID) else unit.ChangeHP(MapID, InstanceID, CreatureID, -50) role.RemoveFromRole(MapID, InstanceID, RoleID, 4800267, 1, 102) role.AddRoleItem(MapID, InstanceID, RoleID, 4800279, 1, -1, 8, 420) unit.AddBuff(MapID, InstanceID, RoleID, 6940401, RoleID) end else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 26, 210022) --ȱÉÙ°®ÉñÖ®Óð msg.DispatchRoleMsgEvent(RoleID, MsgID) unit.ChangeHP(MapID, InstanceID, CreatureID, 1) end end aux.RegisterCreatureEvent(6011045, 6, "c6011045_On_Invest") function c6011046_On_Invest(MapID, InstanceID, CreatureID, CreatureTypeID, RoleID) unit.AddBuff(MapID, InstanceID, RoleID, 6940401, RoleID) end aux.RegisterCreatureEvent(6011046, 6, "c6011046_On_Invest") function c6011047_On_Invest(MapID, InstanceID, CreatureID, CreatureTypeID, RoleID) unit.AddBuff(MapID, InstanceID, RoleID, 6940401, RoleID) end aux.RegisterCreatureEvent(6011047, 6, "c6011047_On_Invest") --s64´«³ö¶Ô»° function c6011054_On_Talk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20,210033) --ÊÇ·ñÒª´«Ë͵½²©²©ÂÞÂüµº msg.AddMsgEvent(MsgID, 24, TargetID) msg.AddMsgEvent(MsgID, 21,4) -- msg.AddMsgEvent(MsgID, 1, 100001) --¡°È·¶¨¡± msg.AddMsgEvent(MsgID, 21,5) -- msg.AddMsgEvent(MsgID, 1, 100002) --¡°È¡Ïû¡± msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif TalkIndex == 4 then role.RoleGotoNewMap(MapID, InstanceID, RoleID, 3390518312,213,2543/50,726) end end aux.RegisterCreatureEvent(6011054, 7, "c6011054_On_Talk")