------------------------------------------------------------------------------------
--Name：  210623[简体征服][活动脚本]荒野乱斗配套活动[7.8-7.21]
--Creator:      黄啸
--Created:     2021-06-23
------------------------------------------------------------------------------------
--/chgmap 11277 248 241
--/callluafunc </F>User_PlayPlot</N>202

CppScriptMgr:SetViewPosByCell(244, 238)


local player = CppScriptMgr:AddSimplePlayer(3320,239,235, "Dead Body")
local player1  = CppScriptMgr:AddSimplePlayer(3320,241,242, "Dead Body")
local player2  = CppScriptMgr:AddSimplePlayer(3320,246,243, "Dead Body")
local player3  = CppScriptMgr:AddSimplePlayer(3320,250,240, "Dead Body")
local player4  = CppScriptMgr:AddSimplePlayer(3320,248,234, "Dead Body")
local player5  = CppScriptMgr:AddSimplePlayer(3320,242,229, "Dead Body")
local player6  = CppScriptMgr:AddSimplePlayer(3320,249,251, "Dead Body")
local player7 = CppScriptMgr:AddSimplePlayer(1053746,240,239, "Blackbeard")
local player8 = CppScriptMgr:AddSimplePlayer(1053766,244,242, "Golden Lion")
local player9 = CppScriptMgr:AddSimplePlayer(1053756,249,235, "Officer Hannibal")


player7:SetDir(6);
player8:SetDir(6);
player9:SetDir(0);

local player10 = CppScriptMgr:AddSimplePlayer(1053730,260,253, "Adventurer Rocky")
local player11 = CppScriptMgr:AddSimplePlayer(3320,241,242, "Dead Body")
local player12 = CppScriptMgr:AddSimplePlayer(3320,237,228, "Dead Body")
local player13 = CppScriptMgr:AddSimplePlayer(3320,257,241, "Dead Body")
local player14 = CppScriptMgr:AddSimplePlayer(3320,236,243, "Dead Body")
local player15 = CppScriptMgr:AddSimplePlayer(3320,243,245, "Dead Body")
local player16 = CppScriptMgr:AddSimplePlayer(3320,256,236, "Dead Body")


CppScriptMgr:AddEffect("Blood_999",251,248)
CppScriptMgr:AddEffect("Blood_999",243,244)
CppScriptMgr:AddEffect("Blood_999",241,238)
CppScriptMgr:AddEffect("Blood_999",251,232)
CppScriptMgr:AddEffect("Blood_999",257,244)

--半身
CppScriptMgr:NpcCallOut("Hey! Welcome to the paradise for treasure hunters, the ancient battlefield! It`s full of Divine Diamonds and danger! Let`s join in the thrilling contest to grab treasures!", 1000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc184", 150, 430, "[Divine Contest] Lee", 250, 655)

CppScriptMgr:WaitMilSec(1200)

local nPosx = 244
local nPosy = 238
for i=1,13,1 do
	
	nPosx = nPosx + 1
	nPosy = nPosy + 1
	CppScriptMgr:SetViewPosByCell(nPosx, nPosy)
	CppScriptMgr:WaitMilSec(50)

	
end

player10:SetAction(290)
player10:SetAction(290)
player10:SetAction(290)
CppScriptMgr:WaitMilSec(3150)
CppScriptMgr:AddEffect("LuckDiffuse",260,253)
CppScriptMgr:AddEffect("DragonSoul_gold3",260,254)
CppScriptMgr:WaitMilSec(1000)

-- player10:SetLWeapon(562001,0,1);
player10:SetAction(150)
player10:Say("This is the precious Divine Diamond! I`m rich now!", 5000)

CppScriptMgr:NpcCallOut("This guy is in danger now.", 1000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc184", 150, 430, "[Divine Contest] Lee", 250, 655)

CppScriptMgr:WaitMilSec(2000)

local nPosx = 257
local nPosy = 251
for i=1,17,1 do
	
	nPosx = nPosx - 1
	nPosy = nPosy - 1
	CppScriptMgr:SetViewPosByCell(nPosx, nPosy)
	CppScriptMgr:WaitMilSec(50)

	
end


player7:SetAction(160)
player7:Say("Grabbing is the best way to get Divine Diamonds!", 5000)




CppScriptMgr:WaitMilSec(3000)
player9:SetAction(151)
player9:Say("Hahaha! These Divine Diamonds are mine!", 5000)

CppScriptMgr:WaitMilSec(1000)


local nPosx = 240
local nPosy = 239


player7:Say("This is my diamond! Stop it!", 5000)
player8:Say("Hand it over, and I`ll show you some mercy!", 5000)
player9:Say("Go grab them!", 5000)

player7:RunTo(261,255);
player8:RunTo(258,252);
player9:RunTo(261,253);


CppScriptMgr:WaitMilSec(700)

for i=1,18,1 do
	
	nPosx = nPosx + 1
	nPosy = nPosy + 1
	CppScriptMgr:SetViewPosByCell(nPosx, nPosy)
	CppScriptMgr:WaitMilSec(50)

	
end


CppScriptMgr:WaitMilSec(2300)
player7:SetAction(401)
player8:SetAction(401)
player9:SetAction(401)
player10:SetAction(401)
player7:SetAction(401)
player8:SetAction(401)
player9:SetAction(401)
player10:SetAction(401)
player7:SetAction(401)
player8:SetAction(401)
player9:SetAction(401)
player10:SetAction(401)


CppScriptMgr:NpcCallOut("Look! This is human nature! You gotta be strong enough to stand here!", 3000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc184", 150, 430, "[Divine Contest] Lee", 250, 655)

CppScriptMgr:WaitMilSec(3000)