Compare commits
1 Commits
7a3bbc10c8
...
chinese_up
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac428166b0 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
panorama/scripts/custom_game/overhead.vjs_c
Normal file
BIN
panorama/scripts/custom_game/overhead.vjs_c
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
panorama/videos/promo/outlanders_bg.webm
Normal file
BIN
panorama/videos/promo/outlanders_bg.webm
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -138,7 +138,7 @@ function PutTowerToPoint(keys)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if SpawnSystem.IsUnLimited == false and IsBonusTower(itemName) and GetBonusTowerCount(caster) >= THTD_MAX_BONUS_TOWER then
|
if SpawnSystem.IsUnLimited == false and IsBonusTower(itemName) and GetBonusTowerCount(caster) >= THTD_MAX_BONUS_TOWER then
|
||||||
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner() , "show_message", {msg="bonus_tower_limit", duration=5, params={count=1}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner() , "show_message", {msg="#bonus_tower_limit", duration=5, params={count=1}, color="#0ff"} )
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -539,7 +539,7 @@ function OnTouhoutdExUp(keys)
|
|||||||
local unitName = target:GetUnitName()
|
local unitName = target:GetUnitName()
|
||||||
if unitName ~= "minoriko" and unitName ~= "sizuha" and unitName ~= "lily" and unitName ~= "nazrin" then
|
if unitName ~= "minoriko" and unitName ~= "sizuha" and unitName ~= "lily" and unitName ~= "nazrin" then
|
||||||
caster.is_team_mode = true
|
caster.is_team_mode = true
|
||||||
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_chat_msg", {msg="team_rank_tip", params={player_name=PlayerResource:GetPlayerName(caster:GetPlayerOwnerID()),reason="潜能已激活"}})
|
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_chat_msg", {msg="#team_rank_tip", params={player_name=PlayerResource:GetPlayerName(caster:GetPlayerOwnerID()),reason="潜能已激活"}})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
target.thtd_power_level = 10
|
target.thtd_power_level = 10
|
||||||
@@ -578,7 +578,7 @@ function OnTouhoutdExUp(keys)
|
|||||||
local unitName = target:GetUnitName()
|
local unitName = target:GetUnitName()
|
||||||
if unitName ~= "minoriko" and unitName ~= "sizuha" and unitName ~= "lily" and unitName ~= "nazrin" then
|
if unitName ~= "minoriko" and unitName ~= "sizuha" and unitName ~= "lily" and unitName ~= "nazrin" then
|
||||||
caster.is_team_mode = true
|
caster.is_team_mode = true
|
||||||
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_chat_msg", {msg="team_rank_tip", params={player_name=PlayerResource:GetPlayerName(caster:GetPlayerOwnerID()),reason="潜能已激活"}})
|
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_chat_msg", {msg="#team_rank_tip", params={player_name=PlayerResource:GetPlayerName(caster:GetPlayerOwnerID()),reason="潜能已激活"}})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
target.thtd_power_level = target:FindModifierByName("modifier_fairy_count"):GetStackCount()
|
target.thtd_power_level = target:FindModifierByName("modifier_fairy_count"):GetStackCount()
|
||||||
@@ -1211,7 +1211,7 @@ function SkipWave(keys)
|
|||||||
SpawnSystem:RemoveBoss()
|
SpawnSystem:RemoveBoss()
|
||||||
end
|
end
|
||||||
|
|
||||||
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_chat_msg", {msg="skip_wave_tip", params={player_name=PlayerResource:GetPlayerName(caster:GetPlayerOwnerID()),item_name=keys.ItemName,wave=SpawnSystem.ReachToWave}})
|
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_chat_msg", {msg="#skip_wave_tip", params={player_name=PlayerResource:GetPlayerName(caster:GetPlayerOwnerID()),item_name=keys.ItemName,wave=SpawnSystem.ReachToWave}})
|
||||||
EmitAnnouncerSound("Quest.Completed")
|
EmitAnnouncerSound("Quest.Completed")
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1311,10 +1311,10 @@ function OnCloseAI(keys)
|
|||||||
|
|
||||||
if caster.thtd_close_ai ~= true then
|
if caster.thtd_close_ai ~= true then
|
||||||
caster.thtd_close_ai = true
|
caster.thtd_close_ai = true
|
||||||
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_close_ai", duration=5, params={}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_close_ai", duration=5, params={}, color="#0ff"} )
|
||||||
else
|
else
|
||||||
caster.thtd_close_ai = false
|
caster.thtd_close_ai = false
|
||||||
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_open_ai", duration=5, params={}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_open_ai", duration=5, params={}, color="#0ff"} )
|
||||||
-- 神子和幽幽子,是否开启大招
|
-- 神子和幽幽子,是否开启大招
|
||||||
local unitName = caster:GetUnitName()
|
local unitName = caster:GetUnitName()
|
||||||
if unitName=="miko" then
|
if unitName=="miko" then
|
||||||
@@ -1340,12 +1340,12 @@ function OnCastPointAI(keys)
|
|||||||
local range = GetDistanceBetweenTwoVec2D(caster:GetOrigin(), targetPoint)
|
local range = GetDistanceBetweenTwoVec2D(caster:GetOrigin(), targetPoint)
|
||||||
if range <= 100 then
|
if range <= 100 then
|
||||||
caster.thtd_last_cast_point = nil
|
caster.thtd_last_cast_point = nil
|
||||||
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_close_cast_on_fixed_point", duration=5, params={}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_close_cast_on_fixed_point", duration=5, params={}, color="#0ff"} )
|
||||||
elseif range > keys.ability:GetCastRange() then
|
elseif range > keys.ability:GetCastRange() then
|
||||||
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_custom_error", {msg="cast_range_out"})
|
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_custom_error", {msg="cast_range_out"})
|
||||||
else
|
else
|
||||||
caster.thtd_last_cast_point = targetPoint
|
caster.thtd_last_cast_point = targetPoint
|
||||||
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_open_cast_on_fixed_point", duration=5, params={}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_open_cast_on_fixed_point", duration=5, params={}, color="#0ff"} )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -79,14 +79,14 @@ function OnKeine02SpellStart(keys)
|
|||||||
caster:SetModel("models/thd_hero/keine/keine2/keine2.vmdl")
|
caster:SetModel("models/thd_hero/keine/keine2/keine2.vmdl")
|
||||||
caster:SetOriginalModel("models/thd_hero/keine/keine2/keine2.vmdl")
|
caster:SetOriginalModel("models/thd_hero/keine/keine2/keine2.vmdl")
|
||||||
if caster.thtd_close_ai == true then
|
if caster.thtd_close_ai == true then
|
||||||
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_keine_shirasawa", duration=5, params={}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_keine_shirasawa", duration=5, params={}, color="#0ff"} )
|
||||||
end
|
end
|
||||||
elseif caster.thtd_keine_change == THTD_KEINE_02_SHIRASAWA then
|
elseif caster.thtd_keine_change == THTD_KEINE_02_SHIRASAWA then
|
||||||
caster.thtd_keine_change = THTD_KEINE_02_HUMEN
|
caster.thtd_keine_change = THTD_KEINE_02_HUMEN
|
||||||
caster:SetModel("models/thd_hero/keine/keine.vmdl")
|
caster:SetModel("models/thd_hero/keine/keine.vmdl")
|
||||||
caster:SetOriginalModel("models/thd_hero/keine/keine.vmdl")
|
caster:SetOriginalModel("models/thd_hero/keine/keine.vmdl")
|
||||||
if caster.thtd_close_ai == true then
|
if caster.thtd_close_ai == true then
|
||||||
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_keine_humen", duration=5, params={}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_keine_humen", duration=5, params={}, color="#0ff"} )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -274,13 +274,13 @@ function OnKeine04SpellStart(keys)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if caster.thtd_keine_04_change == THTD_KEINE_04_SWORD then
|
if caster.thtd_keine_04_change == THTD_KEINE_04_SWORD then
|
||||||
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_keine_04_jade", duration=5, params={count=1}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_keine_04_jade", duration=5, params={count=1}, color="#0ff"} )
|
||||||
caster.thtd_keine_04_change = THTD_KEINE_04_JADE
|
caster.thtd_keine_04_change = THTD_KEINE_04_JADE
|
||||||
elseif caster.thtd_keine_04_change == THTD_KEINE_04_JADE then
|
elseif caster.thtd_keine_04_change == THTD_KEINE_04_JADE then
|
||||||
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_keine_04_mirror", duration=5, params={count=1}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_keine_04_mirror", duration=5, params={count=1}, color="#0ff"} )
|
||||||
caster.thtd_keine_04_change = THTD_KEINE_04_MIRROR
|
caster.thtd_keine_04_change = THTD_KEINE_04_MIRROR
|
||||||
elseif caster.thtd_keine_04_change == THTD_KEINE_04_MIRROR then
|
elseif caster.thtd_keine_04_change == THTD_KEINE_04_MIRROR then
|
||||||
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_keine_04_sword", duration=5, params={count=1}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_keine_04_sword", duration=5, params={count=1}, color="#0ff"} )
|
||||||
caster.thtd_keine_04_change = THTD_KEINE_04_SWORD
|
caster.thtd_keine_04_change = THTD_KEINE_04_SWORD
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -24,7 +24,7 @@ function OnMinoriko02StarChange(keys)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if hero.thtd_minoriko_02_change >= keys.max_count then
|
if hero.thtd_minoriko_02_change >= keys.max_count then
|
||||||
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="minoriko_max_change", duration=5, params={count=1}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#minoriko_max_change", duration=5, params={count=1}, color="#0ff"} )
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
hero.thtd_minoriko_02_change = hero.thtd_minoriko_02_change + 1
|
hero.thtd_minoriko_02_change = hero.thtd_minoriko_02_change + 1
|
||||||
|
|||||||
@@ -254,13 +254,13 @@ function OnPatchouli02SpellStart(keys)
|
|||||||
|
|
||||||
if caster.thtd_patchouli_02_type == PATCHOULI_01_AGNI_SHINE then
|
if caster.thtd_patchouli_02_type == PATCHOULI_01_AGNI_SHINE then
|
||||||
caster.thtd_patchouli_02_type = PATCHOULI_01_BURY_IN_LAKE
|
caster.thtd_patchouli_02_type = PATCHOULI_01_BURY_IN_LAKE
|
||||||
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_patchouli_bury_in_lake", duration=1, params={count=1}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_patchouli_bury_in_lake", duration=1, params={count=1}, color="#0ff"} )
|
||||||
elseif caster.thtd_patchouli_02_type == PATCHOULI_01_BURY_IN_LAKE then
|
elseif caster.thtd_patchouli_02_type == PATCHOULI_01_BURY_IN_LAKE then
|
||||||
caster.thtd_patchouli_02_type = PATCHOULI_01_MERCURY_POISON
|
caster.thtd_patchouli_02_type = PATCHOULI_01_MERCURY_POISON
|
||||||
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_patchouli_mercury_poison", duration=1, params={count=1}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_patchouli_mercury_poison", duration=1, params={count=1}, color="#0ff"} )
|
||||||
elseif caster.thtd_patchouli_02_type == PATCHOULI_01_MERCURY_POISON then
|
elseif caster.thtd_patchouli_02_type == PATCHOULI_01_MERCURY_POISON then
|
||||||
caster.thtd_patchouli_02_type = PATCHOULI_01_AGNI_SHINE
|
caster.thtd_patchouli_02_type = PATCHOULI_01_AGNI_SHINE
|
||||||
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_patchouli_agni_shine", duration=1, params={count=1}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="#change_to_patchouli_agni_shine", duration=1, params={count=1}, color="#0ff"} )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -704,7 +704,7 @@ function OnSpellStartReimuPet01(keys)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if tostring(PlayerResource:GetSteamID(caster:GetPlayerOwnerID())) == GameRules.GameData.admin then
|
if tostring(PlayerResource:GetSteamID(caster:GetPlayerOwnerID())) == GameRules.GameData.admin then
|
||||||
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner() , "show_message", {msg="change_to_pet_model", duration=5, params={key = caster.pet_model}, color="#ff0"} )
|
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner() , "show_message", {msg="#change_to_pet_model", duration=5, params={key = caster.pet_model}, color="#ff0"} )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -746,7 +746,7 @@ function OnSpellStartReimuPet02(keys)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if tostring(PlayerResource:GetSteamID(caster:GetPlayerOwnerID())) == GameRules.GameData.admin then
|
if tostring(PlayerResource:GetSteamID(caster:GetPlayerOwnerID())) == GameRules.GameData.admin then
|
||||||
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner() , "show_message", {msg="change_to_pet_effect", duration=5, params={key = caster.effect_name}, color="#ff0"} )
|
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner() , "show_message", {msg="#change_to_pet_effect", duration=5, params={key = caster.effect_name}, color="#ff0"} )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -824,7 +824,7 @@ function OnSpellStartReimuPet04(keys)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
caster:EmitSound(reimu_pet_sound[RandomInt(1, #reimu_pet_sound)])
|
caster:EmitSound(reimu_pet_sound[RandomInt(1, #reimu_pet_sound)])
|
||||||
CustomGameEventManager:Send_ServerToPlayer(hero:GetPlayerOwner(), "show_message", {msg="key_made_tip", duration=3, params={}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToPlayer(hero:GetPlayerOwner(), "show_message", {msg="#key_made_tip", duration=3, params={}, color="#ff0"})
|
||||||
|
|
||||||
ParticleManager:DestroyParticleSystem(hero.thtd_emoji_effect,true)
|
ParticleManager:DestroyParticleSystem(hero.thtd_emoji_effect,true)
|
||||||
hero.thtd_emoji_effect = ParticleManager:CreateParticle("particles/thtd/emoji/thtd_msg_hongliange.vpcf", PATTACH_OVERHEAD_FOLLOW, hero)
|
hero.thtd_emoji_effect = ParticleManager:CreateParticle("particles/thtd/emoji/thtd_msg_hongliange.vpcf", PATTACH_OVERHEAD_FOLLOW, hero)
|
||||||
|
|||||||
@@ -950,7 +950,7 @@ function CTHTDGameMode:OnGameRulesStateChange(keys)
|
|||||||
for i=0, PlayerResource:GetPlayerCount()-1 do
|
for i=0, PlayerResource:GetPlayerCount()-1 do
|
||||||
if PlayerResource:GetTeam(i) == DOTA_TEAM_GOODGUYS then
|
if PlayerResource:GetTeam(i) == DOTA_TEAM_GOODGUYS then
|
||||||
if GameRules.PlayerData[i].ban == 1 then
|
if GameRules.PlayerData[i].ban == 1 then
|
||||||
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(i), "display_chat_msg", {msg="game_ban_tip", params={player_name=PlayerResource:GetPlayerName(i),reason=GameRules.PlayerData[i].reason}})
|
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(i), "display_chat_msg", {msg="#game_ban_tip", params={player_name=PlayerResource:GetPlayerName(i),reason=GameRules.PlayerData[i].reason}})
|
||||||
for _,hero in pairs(GameRules.HeroList) do
|
for _,hero in pairs(GameRules.HeroList) do
|
||||||
if hero.thtd_player_id == i then
|
if hero.thtd_player_id == i then
|
||||||
SpawnSystem:GameOver(hero)
|
SpawnSystem:GameOver(hero)
|
||||||
@@ -958,7 +958,7 @@ function CTHTDGameMode:OnGameRulesStateChange(keys)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif GameRules.PlayerData[i].vip == 1 then
|
elseif GameRules.PlayerData[i].vip == 1 then
|
||||||
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(i), "show_message", {msg="game_start_vip_tip", duration=60, params={name=PlayerResource:GetPlayerName(i),endtime=GameRules.PlayerData[i].end_time}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(i), "show_message", {msg="#game_start_vip_tip", duration=60, params={name=PlayerResource:GetPlayerName(i),endtime=GameRules.PlayerData[i].end_time}, color="#ff0"})
|
||||||
end
|
end
|
||||||
GameRules.HeroList[i]:RemoveModifierByName("modifier_rainbow_tail")
|
GameRules.HeroList[i]:RemoveModifierByName("modifier_rainbow_tail")
|
||||||
end
|
end
|
||||||
@@ -985,7 +985,6 @@ function CTHTDGameMode:GameStateCustomGameSetup()
|
|||||||
CreateHeroForPlayer(heroNames[RandomInt(1, #heroNames)], player):RemoveSelf()
|
CreateHeroForPlayer(heroNames[RandomInt(1, #heroNames)], player):RemoveSelf()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
print("Heros setup")
|
|
||||||
|
|
||||||
-- 玩家信息定义,按playerid的steamid、dota2帐户、玩家名称、英雄index信息、黑白名单及宠物信息
|
-- 玩家信息定义,按playerid的steamid、dota2帐户、玩家名称、英雄index信息、黑白名单及宠物信息
|
||||||
GameRules.PlayerData = { }
|
GameRules.PlayerData = { }
|
||||||
@@ -1418,7 +1417,7 @@ function CTHTDGameMode:OnPlayerSay(keys)
|
|||||||
|
|
||||||
if string.sub(text,1,6) == "-color" then
|
if string.sub(text,1,6) == "-color" then
|
||||||
local colorValue = string.sub(text, 8, 11)
|
local colorValue = string.sub(text, 8, 11)
|
||||||
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="item_locked_tip", duration=10, params={}, color=colorValue})
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#item_locked_tip", duration=10, params={}, color=colorValue})
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1428,7 +1427,7 @@ function CTHTDGameMode:OnPlayerSay(keys)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if string.sub(text,1,5) == "-date" then
|
if string.sub(text,1,5) == "-date" then
|
||||||
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(keys.playerid), "display_chat_msg", {msg="open_day_tip", params={server_time=GetRealDateTime(),start_time=GameRules.GameData.server_time,open_day_list=GameRules.GameData.open_day_list}})
|
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(keys.playerid), "display_chat_msg", {msg="#open_day_tip", params={server_time=GetRealDateTime(),start_time=GameRules.GameData.server_time,open_day_list=GameRules.GameData.open_day_list}})
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1779,7 +1778,7 @@ function CTHTDGameMode:ItemAddedToInventory( keys )
|
|||||||
if itemName == "item_3150" or itemName == "item_3151" or itemName == "item_3152" then
|
if itemName == "item_3150" or itemName == "item_3151" or itemName == "item_3152" then
|
||||||
if hero.is_team_mode ~= true then
|
if hero.is_team_mode ~= true then
|
||||||
hero.is_team_mode = true
|
hero.is_team_mode = true
|
||||||
CustomGameEventManager:Send_ServerToPlayer(hero:GetPlayerOwner(), "display_chat_msg", {msg="team_rank_tip", params={player_name=PlayerResource:GetPlayerName(hero:GetPlayerOwnerID()),reason="使用了传说武器"}})
|
CustomGameEventManager:Send_ServerToPlayer(hero:GetPlayerOwner(), "display_chat_msg", {msg="#team_rank_tip", params={player_name=PlayerResource:GetPlayerName(hero:GetPlayerOwnerID()),reason="使用了传说武器"}})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ CustomEvent.on('custom_game_kick_vote', function(data)
|
|||||||
if hero.is_game_over == true then return end
|
if hero.is_game_over == true then return end
|
||||||
|
|
||||||
if playerVote.kicked_player ~= - 1 and (math.floor(GameRules:GetGameTime()) - playerVote.vote_time) < 60 then
|
if playerVote.kicked_player ~= - 1 and (math.floor(GameRules:GetGameTime()) - playerVote.vote_time) < 60 then
|
||||||
CustomGameEventManager:Send_ServerToPlayer(player, "show_message", {msg="player_in_vote", duration=10, params={count=playerVote.kicked_player+1}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToPlayer(player, "show_message", {msg="#player_in_vote", duration=10, params={count=playerVote.kicked_player+1}, color="#ff0"})
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ CustomEvent.on('custom_game_kick_accept', function(data)
|
|||||||
playerVote.kicked_player = -1
|
playerVote.kicked_player = -1
|
||||||
playerVote.kicked_line = - 1
|
playerVote.kicked_line = - 1
|
||||||
playerVote.agree_players = {}
|
playerVote.agree_players = {}
|
||||||
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="player_vote_no_pass", duration=10, params={count=data.PlayerID+1}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#player_vote_no_pass", duration=10, params={count=data.PlayerID+1}, color="#ff0"})
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ function KickPlayer()
|
|||||||
for index,hero in pairs(GameRules.HeroList) do
|
for index,hero in pairs(GameRules.HeroList) do
|
||||||
if hero ~= nil and hero.is_game_over ~= true and hero.thtd_player_id == playerVote.kicked_player then
|
if hero ~= nil and hero.is_game_over ~= true and hero.thtd_player_id == playerVote.kicked_player then
|
||||||
SpawnSystem:GameOver(hero)
|
SpawnSystem:GameOver(hero)
|
||||||
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="player_vote_pass", duration=10, params={count=playerVote.kicked_player+1}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#player_vote_pass", duration=10, params={count=playerVote.kicked_player+1}, color="#ff0"})
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -384,7 +384,7 @@ end)
|
|||||||
CustomEvent.on('custom_game_command', function(data)
|
CustomEvent.on('custom_game_command', function(data)
|
||||||
if data["cmd"] == "wave" then
|
if data["cmd"] == "wave" then
|
||||||
SpawnSystem.ReachToWave = data["param"]
|
SpawnSystem.ReachToWave = data["param"]
|
||||||
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="reach_to_wave", duration=20, params={count=data["param"]}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#reach_to_wave", duration=20, params={count=data["param"]}, color="#ff0"})
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ end
|
|||||||
SERVER_KEY = GetDedicatedServerKeyV2("mydota")
|
SERVER_KEY = GetDedicatedServerKeyV2("mydota")
|
||||||
|
|
||||||
|
|
||||||
REQUEST_TIME_OUT = 30
|
REQUEST_TIME_OUT = 20
|
||||||
|
|
||||||
Service.Config = table.loadkv("scripts/npc/config.txt")
|
Service.Config = table.loadkv("scripts/npc/Config.txt")
|
||||||
|
|
||||||
-- 游戏配置项
|
-- 游戏配置项
|
||||||
GameRules.GameData = {
|
GameRules.GameData = {
|
||||||
@@ -712,7 +712,7 @@ end
|
|||||||
local data = json.decode(sBody)
|
local data = json.decode(sBody)
|
||||||
if data then
|
if data then
|
||||||
if data.code == "0000" then
|
if data.code == "0000" then
|
||||||
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(playerId), "show_message", {msg="pet_cumstom_saved", duration=15, params={}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(playerId), "show_message", {msg="#pet_cumstom_saved", duration=15, params={}, color="#ff0"})
|
||||||
else
|
else
|
||||||
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(playerId), "thtd_server_msg", {code = data.code, msg = data.msg})
|
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(playerId), "thtd_server_msg", {code = data.code, msg = data.msg})
|
||||||
end
|
end
|
||||||
@@ -762,7 +762,7 @@ end
|
|||||||
hero:AddItem(item)
|
hero:AddItem(item)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(playerId), "show_message", {msg="key_made_tip", duration=3, params={}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToPlayer(PlayerResource:GetPlayer(playerId), "show_message", {msg="#key_made_tip", duration=3, params={}, color="#ff0"})
|
||||||
ParticleManager:DestroyParticleSystem(hero.thtd_emoji_effect,true)
|
ParticleManager:DestroyParticleSystem(hero.thtd_emoji_effect,true)
|
||||||
hero.thtd_emoji_effect = ParticleManager:CreateParticle("particles/thtd/emoji/thtd_msg_hongliange.vpcf", PATTACH_OVERHEAD_FOLLOW, hero)
|
hero.thtd_emoji_effect = ParticleManager:CreateParticle("particles/thtd/emoji/thtd_msg_hongliange.vpcf", PATTACH_OVERHEAD_FOLLOW, hero)
|
||||||
ParticleManager:SetParticleControlEnt(hero.thtd_emoji_effect , 0, hero, PATTACH_OVERHEAD_FOLLOW, "attach_hitloc", Vector(0,0,0), true) --灵梦用 attach_emoji
|
ParticleManager:SetParticleControlEnt(hero.thtd_emoji_effect , 0, hero, PATTACH_OVERHEAD_FOLLOW, "attach_hitloc", Vector(0,0,0), true) --灵梦用 attach_emoji
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ function SpawnSystem:PreSpawn()
|
|||||||
if GameRules:IsGamePaused() then return 0.1 end
|
if GameRules:IsGamePaused() then return 0.1 end
|
||||||
if GameRules:State_Get() == DOTA_GAMERULES_STATE_GAME_IN_PROGRESS then return nil end
|
if GameRules:State_Get() == DOTA_GAMERULES_STATE_GAME_IN_PROGRESS then return nil end
|
||||||
if uiWaveInfo["RemainingTime"] == 0 then
|
if uiWaveInfo["RemainingTime"] == 0 then
|
||||||
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="item_locked_tip", duration=60, params={}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#item_locked_tip", duration=60, params={}, color="#ff0"})
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
uiWaveInfo["RemainingTime"] = math.max(math.floor(maxTime - GameRules:GetGameTime()),0)
|
uiWaveInfo["RemainingTime"] = math.max(math.floor(maxTime - GameRules:GetGameTime()),0)
|
||||||
@@ -284,9 +284,9 @@ function SpawnSystem:PreSpawn()
|
|||||||
-- 通知提示
|
-- 通知提示
|
||||||
local difficulty = GameRules:GetCustomGameDifficulty()
|
local difficulty = GameRules:GetCustomGameDifficulty()
|
||||||
if difficulty == CHALLENGE_MODE then
|
if difficulty == CHALLENGE_MODE then
|
||||||
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="challenge_game_on", duration=25, params={}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#challenge_game_on", duration=25, params={}, color="#ff0"})
|
||||||
elseif difficulty >= FUNNY_MODE then
|
elseif difficulty >= FUNNY_MODE then
|
||||||
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="funny_game_on", duration=25, params={}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#funny_game_on", duration=25, params={}, color="#ff0"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -407,7 +407,7 @@ function SpawnSystem:InitSpawn()
|
|||||||
|
|
||||||
-- 无尽前提示
|
-- 无尽前提示
|
||||||
if wave == 50 then
|
if wave == 50 then
|
||||||
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="spawn_unlimited", duration=133, params={count=50}, color="#0ff"})
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#spawn_unlimited", duration=133, params={count=50}, color="#0ff"})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 进入无尽
|
-- 进入无尽
|
||||||
@@ -443,11 +443,11 @@ function SpawnSystem:InitSpawn()
|
|||||||
SpawnSystem:StartUnlimited()
|
SpawnSystem:StartUnlimited()
|
||||||
max_time = 180.5
|
max_time = 180.5
|
||||||
left_time = max_time
|
left_time = max_time
|
||||||
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="start_unlimited", duration=180, params={}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#start_unlimited", duration=180, params={}, color="#ff0"})
|
||||||
if difficulty == CHALLENGE_MODE then
|
if difficulty == CHALLENGE_MODE then
|
||||||
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="challenge_game_on", duration=180, params={}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#challenge_game_on", duration=180, params={}, color="#ff0"})
|
||||||
elseif difficulty >= FUNNY_MODE then
|
elseif difficulty >= FUNNY_MODE then
|
||||||
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="funny_game_on", duration=180, params={}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#funny_game_on", duration=180, params={}, color="#ff0"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -690,10 +690,10 @@ function SpawnSystem:GameOver(hero)
|
|||||||
-- 过挑战第一波BOSS算上榜
|
-- 过挑战第一波BOSS算上榜
|
||||||
if wave > 100 then
|
if wave > 100 then
|
||||||
CheckRank(hero)
|
CheckRank(hero)
|
||||||
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="power_game_end_info", duration=60, params={wave=hero.thtd_game_info["max_wave"],name=PlayerResource:GetPlayerName(hero:GetPlayerID())}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#power_game_end_info", duration=60, params={wave=hero.thtd_game_info["max_wave"],name=PlayerResource:GetPlayerName(hero:GetPlayerID())}, color="#ff0"})
|
||||||
ShowDetail(hero)
|
ShowDetail(hero)
|
||||||
elseif wave > 50 then
|
elseif wave > 50 then
|
||||||
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="normal_game_end_info", duration=30, params={wave=wave-51,name=PlayerResource:GetPlayerName(hero:GetPlayerID())}, color="#f00"})
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#normal_game_end_info", duration=30, params={wave=wave-51,name=PlayerResource:GetPlayerName(hero:GetPlayerID())}, color="#f00"})
|
||||||
end
|
end
|
||||||
SpawnSystem:RefreshCreepMaxCount()
|
SpawnSystem:RefreshCreepMaxCount()
|
||||||
end
|
end
|
||||||
@@ -719,7 +719,7 @@ function SpawnSystem:GameEnd()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if wave > 100 then
|
if wave > 100 then
|
||||||
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="game_will_end", duration=60, params={}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#game_will_end", duration=60, params={}, color="#ff0"})
|
||||||
GameRules:GetGameModeEntity():SetContextThink(DoUniqueString("thtd_end_game"),
|
GameRules:GetGameModeEntity():SetContextThink(DoUniqueString("thtd_end_game"),
|
||||||
function()
|
function()
|
||||||
GameRules:SetGameWinner(DOTA_TEAM_GOODGUYS)
|
GameRules:SetGameWinner(DOTA_TEAM_GOODGUYS)
|
||||||
@@ -900,9 +900,9 @@ function CheckPlayerConnect()
|
|||||||
if (hero:GetPlayerOwner() == nil or hero:GetPlayerOwner():IsNull()) then
|
if (hero:GetPlayerOwner() == nil or hero:GetPlayerOwner():IsNull()) then
|
||||||
if hero.thtd_game_info["is_player_connected"] then
|
if hero.thtd_game_info["is_player_connected"] then
|
||||||
hero.thtd_game_info["is_player_connected"] = false
|
hero.thtd_game_info["is_player_connected"] = false
|
||||||
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="player_disconnect", duration=15, params={count=1}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#player_disconnect", duration=15, params={count=1}, color="#0ff"} )
|
||||||
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="{d:count}", duration=15, params={count=hero.thtd_player_id+1}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="{d:count}", duration=15, params={count=hero.thtd_player_id+1}, color="#ff0"})
|
||||||
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="pause_game", duration=15, params={}, color="#ff0"})
|
CustomGameEventManager:Send_ServerToAllClients("show_message", {msg="#pause_game", duration=15, params={}, color="#ff0"})
|
||||||
if GameRules:IsGamePaused() then PauseGame(false) end
|
if GameRules:IsGamePaused() then PauseGame(false) end
|
||||||
PauseGame(true)
|
PauseGame(true)
|
||||||
end
|
end
|
||||||
@@ -930,7 +930,7 @@ function SpawnSystem:WaveEndForEach()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if totalDamage < hero.thtd_wave_total_health * 0.9 then
|
if totalDamage < hero.thtd_wave_total_health * 0.9 then
|
||||||
CustomGameEventManager:Send_ServerToPlayer(hero:GetPlayerOwner(), "display_chat_msg", {msg="damage_less_rank_tip", params={player_name=PlayerResource:GetPlayerName(hero:GetPlayerOwnerID())}})
|
CustomGameEventManager:Send_ServerToPlayer(hero:GetPlayerOwner(), "display_chat_msg", {msg="#damage_less_rank_tip", params={player_name=PlayerResource:GetPlayerName(hero:GetPlayerOwnerID())}})
|
||||||
else
|
else
|
||||||
isMaxWave = true
|
isMaxWave = true
|
||||||
end
|
end
|
||||||
@@ -1384,10 +1384,10 @@ function SpawnSystem:StartSpawn()
|
|||||||
spawnerLine.nextBossName = thtd_bosses_list[RandomInt(1, #thtd_bosses_list)]
|
spawnerLine.nextBossName = thtd_bosses_list[RandomInt(1, #thtd_bosses_list)]
|
||||||
hero.next_boss_name = spawnerLine.nextBossName
|
hero.next_boss_name = spawnerLine.nextBossName
|
||||||
if player ~= nil then
|
if player ~= nil then
|
||||||
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="extra_bonus_nazrin", duration=60, params={count=1}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#extra_bonus_nazrin", duration=60, params={count=1}, color="#0ff"} )
|
||||||
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="extra_bonus_minoriko_limit", duration=60, params={count=1}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#extra_bonus_minoriko_limit", duration=60, params={count=1}, color="#0ff"} )
|
||||||
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="extra_bonus_lily", duration=60, params={count=1}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#extra_bonus_lily", duration=60, params={count=1}, color="#0ff"} )
|
||||||
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="extra_bosses_"..spawnerLine.nextBossName, duration=60, params={count=1}, color="#0ff"} )
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#extra_bosses_"..spawnerLine.nextBossName, duration=60, params={count=1}, color="#0ff"} )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1451,8 +1451,8 @@ function SpawnSystem:StartSpawn()
|
|||||||
local modifierName = RandomBossBuff[RandomInt(1, #RandomBossBuff)]
|
local modifierName = RandomBossBuff[RandomInt(1, #RandomBossBuff)]
|
||||||
unit:AddNewModifier(unit, nil, modifierName, {})
|
unit:AddNewModifier(unit, nil, modifierName, {})
|
||||||
if player ~= nil then
|
if player ~= nil then
|
||||||
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="random_boss_has_buff", duration=20, params={}, color="#0ff"})
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#random_boss_has_buff", duration=20, params={}, color="#0ff"})
|
||||||
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="DOTA_Tooltip_"..modifierName.."_Description", duration=20, params={}, color="#0ff"})
|
CustomGameEventManager:Send_ServerToPlayer(player,"show_message", {msg="#DOTA_Tooltip_"..modifierName.."_Description", duration=20, params={}, color="#0ff"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ function CDOTA_BaseNPC:THTD_InitExp()
|
|||||||
time_count = 0
|
time_count = 0
|
||||||
if self.thtd_star == 5 then
|
if self.thtd_star == 5 then
|
||||||
EmitSoundOn(THTD_GetVoiceEvent(self:GetUnitName(),"spawn"),self)
|
EmitSoundOn(THTD_GetVoiceEvent(self:GetUnitName(),"spawn"),self)
|
||||||
CustomGameEventManager:Send_ServerToPlayer(self:GetPlayerOwner() , "show_message", {msg=self:GetUnitName().."_up_to_5_star", duration=30, params={}, color="#ff0"} )
|
CustomGameEventManager:Send_ServerToPlayer(self:GetPlayerOwner() , "show_message", {msg= "#"..self:GetUnitName().."_up_to_5_star", duration=30, params={}, color="#ff0"} )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -350,9 +350,8 @@ end
|
|||||||
if str == nil or type(str) ~= "string" then
|
if str == nil or type(str) ~= "string" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
print(str)
|
|
||||||
-- loadstring在lua5.2中已经被弃用了
|
-- loadstring在lua5.2中已经被弃用了
|
||||||
--return loadstring("return " .. str)()
|
-- return loadstring("return " .. str)()
|
||||||
return load("return " .. str)()
|
return load("return " .. str)()
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -418,7 +417,7 @@ end
|
|||||||
|
|
||||||
-- 从文件中载入数据,来源对应加密数据
|
-- 从文件中载入数据,来源对应加密数据
|
||||||
function table.loadkv(path)
|
function table.loadkv(path)
|
||||||
--return table.fromstring(string.decode(string.loadkvfile(path), ""))
|
-- return table.fromstring(string.decode(string.loadkvfile(path), ""))
|
||||||
return table.fromstring(string.decode(string.loadkvfile(path), SERVER_KEY))
|
return table.fromstring(string.decode(string.loadkvfile(path), SERVER_KEY))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user