------------------------------------------------------------------------------------
--Name：  210914[简体征服][活动脚本]全球万圣节活动
--Creator:      黄啸
--Created:     2021-09-14
------------------------------------------------------------------------------------
--/callluafunc </F>User_PlayPlot</N>222
CppScriptMgr:ChangeScreenColor(100000, "0x36708090","0x36708090")
CppScriptMgr:SetViewPosByCell(367,446)
local hero = CppScriptMgr:QueryHero()
hero:SetPos(365,446)
local nNPcID = CppScriptMgr:AddSimplePlayer(1050150,372,446, "Craze Clown")
nNPcID:AddEffect("glebesword4-1")
-- nNPcID:DelEffect("glebesword4-1")
CppScriptMgr:NpcCallOut("Open! Terror Land! Unleash terror!", 2000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc184", 150, 430, "[Terror Land] Craze Clown", 250, 655)
CppScriptMgr:AddSimplePlayer(43507,367,441, "Jack O`Lantern")
CppScriptMgr:AddEffect("poisontime",371,445)
CppScriptMgr:AddSimplePlayer(43507,366,449, "Jack O`Lantern")
CppScriptMgr:AddEffect("poisontime",370,453)
CppScriptMgr:AddSimplePlayer(43507,373,452, "Jack O`Lantern")
CppScriptMgr:AddEffect("poisontime",377,456)
CppScriptMgr:AddSimplePlayer(43507,378,447, "Jack O`Lantern")
CppScriptMgr:AddEffect("poisontime",382,451)
CppScriptMgr:AddSimplePlayer(43507,375,441, "Jack O`Lantern")
CppScriptMgr:AddEffect("poisontime",379,445)

nNPcID:Say("Sink into darkness!",2500)
-- CppScriptMgr:WaitMilSec(2000)

CppScriptMgr:AddEffect("poisonblast",373,446)
CppScriptMgr:AddEffect("poisonblast",373,446)
CppScriptMgr:AddEffect("poisonblast",373,446)
CppScriptMgr:WaitMilSec(2000)
-- local effectObj = CppScriptMgr:AddEffect("glebesword4-1",373,446)
-- nNPcID:AddEffect("glebesword4-1")
-- effectObj:Scale(0.6,0.6,0.6)
-- nNPcID:Scale("glebesword4-1",373,446)
hero:AddEffect("curse-1")
CppScriptMgr:WaitMilSec(1800)
hero:Say("An irresistible force is dragging me towards the hole!",2500)
CppScriptMgr:WaitMilSec(1000)

for i=1,8 do
	hero:SetPos(365 + i,446)
	
	if i >= 2 then
		hero:SetZoomPercent(100 - ( (i-2) * 30 ) )
	end
	CppScriptMgr:WaitMilSec(95)
end
hero:SetHide(1)


CppScriptMgr:AddEffect("accession",367,441)
CppScriptMgr:AddEffect("accession",366,449)
CppScriptMgr:AddEffect("accession",373,452)
CppScriptMgr:AddEffect("accession",369,441)
CppScriptMgr:AddEffect("accession",378,447)
CppScriptMgr:AddEffect("fastflash",375,441)

CppScriptMgr:WaitMilSec(300)


-- local effectObj = CppScriptMgr:AddEffect("glebesword4-1",373,446)
-- effectObj:Scale(0.4,0.4,0.4)
-- CppScriptMgr:WaitMilSec(3000)
-- local effectObj = CppScriptMgr:AddEffect("glebesword4-1",373,446)
-- effectObj:Scale(0.4,0.4,0.4)
-- CppScriptMgr:WaitMilSec(1000)

CppScriptMgr:NpcCallOut("Welcome to Terror Land!", 5000, 1, "NPCBust_bg", "", 320, 570, 400, 580, "NPCBust_npc184", 150, 430, "[Terror Land] Craze Clown", 250, 655)
CppScriptMgr:WaitMilSec(2000)