Ngoc LeO
Mario & Luigi
- 23/7/06
- 839
- 7,506
Tham gia box được một năm rồi =-= không biết đóng góp gì nên mạnh dạn viết bài về cách làm mode Single Draft này,không biết có được gọi là [Tutorial] không nữa.
Lưu ý với các bạn rằng mình chưa chơi Dota nên không rõ mode này của Dota ra sao,mình chỉ làm theo hiểu biết của mình.
[spoil]
Đầu tiên ta cần tạo các biến để lưu các hero type,icon,cũng như một số thứ lặt vặt khác.
Các bạn sẽ thắc mắc vì sao mình lại lưu unit type,string,ability dummy hai lần vào hai biến riêng biệt. Cái này mình sẽ giải thích sau
Các Hero Str,Agi,Int sẽ được lưu vào các biến khác nhau để sao cho mỗi khi kích hoạt mode trong con Wisp của mỗi player sẽ có đủ 3 loại Hero đó.
Có nhiều cách để pick Hero trong con Wisp,ở đây mình dùng các tạo ability dummy rồi add vào nó.
Vì thời gian hạn hẹp và bận làm biếng nên mình chỉ làm mẫu tạm 3 player với 15 hero,các bạn chỉ cần chỉnh sửa chút là được. Khi kích hoạt mode,sẽ có bảng multiboard hiển thị Hero nhận được của mỗi player,tính thời gian,khi hết thời gian mà player nào chưa chọn thì hệ thống sẽ tự động chọn thay.
Ở đây các biến tương ứng khi ngẫu nhiên được chọn thì ta sẽ xóa các dữ liệu đó đi để tránh bị trùng lặp Hero. Các biến Single_RandomINT_Data,Single_RandomSTR_Data,Single_RandomAGI_Data để lưu các giá trị ngẫu nhiên lại,dùng khi player dùng tới lựa chọn Random thay vì pick một trong ba Hero được nhận.
Lý do mình tạo hai biến lưu dữ liệu của ability,hero type,string.v.v. là vì các dữ liệu đầu tiên đã bị đảo lộn. Vì thế khi pick unit ta cần một biến chính xác như ban đầu.
[/spoil]
Map demo: http://www.mediafire.com/?76hlwceukvfu37f
Có gì không đúng,mọi người góp ý để mình hoàn thiện hơn nhé,cám ơn
Lưu ý với các bạn rằng mình chưa chơi Dota nên không rõ mode này của Dota ra sao,mình chỉ làm theo hiểu biết của mình.
[spoil]
Đầu tiên ta cần tạo các biến để lưu các hero type,icon,cũng như một số thứ lặt vặt khác.
Các bạn sẽ thắc mắc vì sao mình lại lưu unit type,string,ability dummy hai lần vào hai biến riêng biệt. Cái này mình sẽ giải thích sau
Các Hero Str,Agi,Int sẽ được lưu vào các biến khác nhau để sao cho mỗi khi kích hoạt mode trong con Wisp của mỗi player sẽ có đủ 3 loại Hero đó.
Có nhiều cách để pick Hero trong con Wisp,ở đây mình dùng các tạo ability dummy rồi add vào nó.
Mã:
Map initialization
Events
Map initialization
Conditions
Actions
Set Region[1] = P1 <gen>
Set Region[2] = P2 <gen>
Set Region[3] = P3 <gen>
-------- ------------ --------
Set String[1] = ReplaceableTextures\WorldEditUI\DoodadPlaceholder.blp
-------- Effect --------
Set String[2] = Abilities\Spells\Items\AIam\AIamTarget.mdl
-------- ------------ --------
Set Total_Heroes_STR = 5
Set Random_Count_STR = 5
Set Hero_ArraySTR[1] = Paladin
Set Hero_ArraySTR[2] = Tauren Chieftain
Set Hero_ArraySTR[3] = Mountain King
Set Hero_ArraySTR[4] = Crypt Lord
Set Hero_ArraySTR[5] = Dreadlord
-------- ------------ --------
Set Hero_ArraySTR_Data[1] = Paladin
Set Hero_ArraySTR_Data[2] = Tauren Chieftain
Set Hero_ArraySTR_Data[3] = Mountain King
Set Hero_ArraySTR_Data[4] = Crypt Lord
Set Hero_ArraySTR_Data[5] = Dreadlord
-------- ------------ --------
Set Ability_HeroSTR[1] = Str-Paladin
Set Ability_HeroSTR[2] = Str-Tauren
Set Ability_HeroSTR[3] = Str-Mountain King
Set Ability_HeroSTR[4] = Str-Crypt Lord
Set Ability_HeroSTR[5] = Str-Dead Lord
-------- ------------ --------
Set Ability_HeroSTR_Data[1] = Str-Paladin
Set Ability_HeroSTR_Data[2] = Str-Tauren
Set Ability_HeroSTR_Data[3] = Str-Mountain King
Set Ability_HeroSTR_Data[4] = Str-Crypt Lord
Set Ability_HeroSTR_Data[5] = Str-Dead Lord
-------- ------------ --------
Set Single_StringSTR[1] = ReplaceableTextures\CommandButtons\BTNHeroPaladin.blp
Set Single_StringSTR[2] = ReplaceableTextures\CommandButtons\BTNHeroTaurenChieftain.blp
Set Single_StringSTR[3] = ReplaceableTextures\CommandButtons\BTNHeroMountainKing.blp
Set Single_StringSTR[4] = ReplaceableTextures\CommandButtons\BTNHeroCryptLord.blp
Set Single_StringSTR[5] = ReplaceableTextures\CommandButtons\BTNTichondrius.blp
-------- ------------ --------
Set Single_StringSTR_Data[1] = ReplaceableTextures\CommandButtons\BTNHeroPaladin.blp
Set Single_StringSTR_Data[2] = ReplaceableTextures\CommandButtons\BTNHeroTaurenChieftain.blp
Set Single_StringSTR_Data[3] = ReplaceableTextures\CommandButtons\BTNHeroMountainKing.blp
Set Single_StringSTR_Data[4] = ReplaceableTextures\CommandButtons\BTNHeroCryptLord.blp
Set Single_StringSTR_Data[5] = ReplaceableTextures\CommandButtons\BTNTichondrius.blp
-------- ------------ --------
For each (Integer A) from 1 to Total_Heroes_STR, do (Actions)
Loop - Actions
Set Random_Data_STR[(Integer A)] = (Integer A)
Set Single_RandomSTR_Data[(Integer A)] = (Integer A)
Set Total_Heroes_AGI = 5
Set Random_Count_AGI = 5
Set Hero_ArrayAGI[1] = Blademaster
Set Hero_ArrayAGI[2] = Priestess of the Moon
Set Hero_ArrayAGI[3] = Demon Hunter
Set Hero_ArrayAGI[4] = Warden
Set Hero_ArrayAGI[5] = Dark Ranger
-------- ------------ --------
Set Hero_ArrayAGI_Data[1] = Blademaster
Set Hero_ArrayAGI_Data[2] = Priestess of the Moon
Set Hero_ArrayAGI_Data[3] = Demon Hunter
Set Hero_ArrayAGI_Data[4] = Warden
Set Hero_ArrayAGI_Data[5] = Dark Ranger
-------- ------------ --------
Set Ability_HeroAGI[1] = Agi-Blade Master
Set Ability_HeroAGI[2] = Agi-Priestess of the Moon
Set Ability_HeroAGI[3] = Agi-Demon Hunter
Set Ability_HeroAGI[4] = Agi-Warden
Set Ability_HeroAGI[5] = Agi-Dark Ranger
-------- ------------ --------
Set Ability_HeroAGI_Data[1] = Agi-Blade Master
Set Ability_HeroAGI_Data[2] = Agi-Priestess of the Moon
Set Ability_HeroAGI_Data[3] = Agi-Demon Hunter
Set Ability_HeroAGI_Data[4] = Agi-Warden
Set Ability_HeroAGI_Data[5] = Agi-Dark Ranger
-------- ------------ --------
Set Single_StringAGI[1] = ReplaceableTextures\CommandButtons\BTNHeroBlademaster.blp
Set Single_StringAGI[2] = ReplaceableTextures\CommandButtons\BTNPriestessOfTheMoon.blp
Set Single_StringAGI[3] = ReplaceableTextures\CommandButtons\BTNHeroDemonHunter.blp
Set Single_StringAGI[4] = ReplaceableTextures\CommandButtons\BTNHeroWarden.blp
Set Single_StringAGI[5] = ReplaceableTextures\CommandButtons\BTNBansheeRanger.blp
-------- ------------ --------
Set Single_StringAGI_Data[1] = ReplaceableTextures\CommandButtons\BTNHeroBlademaster.blp
Set Single_StringAGI_Data[2] = ReplaceableTextures\CommandButtons\BTNPriestessOfTheMoon.blp
Set Single_StringAGI_Data[3] = ReplaceableTextures\CommandButtons\BTNHeroDemonHunter.blp
Set Single_StringAGI_Data[4] = ReplaceableTextures\CommandButtons\BTNHeroWarden.blp
Set Single_StringAGI_Data[5] = ReplaceableTextures\CommandButtons\BTNBansheeRanger.blp
-------- ------------ --------
For each (Integer A) from 1 to Total_Heroes_AGI, do (Actions)
Loop - Actions
Set Random_Data_AGI[(Integer A)] = (Integer A)
Set Single_RandomAGI_Data[(Integer A)] = (Integer A)
Set Total_Heroes_INT = 5
Set Random_Count_INT = 5
Set Hero_ArrayINT[1] = Archmage
Set Hero_ArrayINT[2] = Blood Mage
Set Hero_ArrayINT[3] = Far Seer
Set Hero_ArrayINT[4] = Shadow Hunter
Set Hero_ArrayINT[5] = Keeper of the Grove
-------- ------------ --------
Set Hero_ArrayINT_Data[1] = Archmage
Set Hero_ArrayINT_Data[2] = Blood Mage
Set Hero_ArrayINT_Data[3] = Far Seer
Set Hero_ArrayINT_Data[4] = Shadow Hunter
Set Hero_ArrayINT_Data[5] = Keeper of the Grove
-------- ------------ --------
Set Ability_HeroINT[1] = Int-Arch Mage
Set Ability_HeroINT[2] = Int-Blood Mage
Set Ability_HeroINT[3] = Int-Far Seer
Set Ability_HeroINT[4] = Int-Shadow Hunter
Set Ability_HeroINT[5] = Int-Keeper of the Grove
-------- ------------ --------
Set Ability_HeroINT_Data[1] = Int-Arch Mage
Set Ability_HeroINT_Data[2] = Int-Blood Mage
Set Ability_HeroINT_Data[3] = Int-Far Seer
Set Ability_HeroINT_Data[4] = Int-Shadow Hunter
Set Ability_HeroINT_Data[5] = Int-Keeper of the Grove
-------- ------------ --------
Set Single_StringINT[1] = ReplaceableTextures\CommandButtons\BTNHeroArchMage.blp
Set Single_StringINT[2] = ReplaceableTextures\CommandButtons\BTNHeroBloodElfPrince.blp
Set Single_StringINT[3] = ReplaceableTextures\CommandButtons\BTNHeroFarseer.blp
Set Single_StringINT[4] = ReplaceableTextures\CommandButtons\BTNShadowHunter.blp
Set Single_StringINT[5] = ReplaceableTextures\CommandButtons\BTNKeeperOfTheGrove.blp
-------- ------------ --------
Set Single_StringINT_Data[1] = ReplaceableTextures\CommandButtons\BTNHeroArchMage.blp
Set Single_StringINT_Data[2] = ReplaceableTextures\CommandButtons\BTNHeroBloodElfPrince.blp
Set Single_StringINT_Data[3] = ReplaceableTextures\CommandButtons\BTNHeroFarseer.blp
Set Single_StringINT_Data[4] = ReplaceableTextures\CommandButtons\BTNShadowHunter.blp
Set Single_StringINT_Data[5] = ReplaceableTextures\CommandButtons\BTNKeeperOfTheGrove.blp
For each (Integer A) from 1 to Total_Heroes_INT, do (Actions)
Loop - Actions
Set Random_Data_INT[(Integer A)] = (Integer A)
Set Single_RandomINT_Data[(Integer A)] = (Integer A)
-------- ========================================================================================================================================== --------
Set PlayerArray[1] = Player 1 (Red)
Set PlayerArray[2] = Player 2 (Blue)
Set PlayerArray[3] = Player 3 (Teal)
Vì thời gian hạn hẹp và bận làm biếng nên mình chỉ làm mẫu tạm 3 player với 15 hero,các bạn chỉ cần chỉnh sửa chút là được. Khi kích hoạt mode,sẽ có bảng multiboard hiển thị Hero nhận được của mỗi player,tính thời gian,khi hết thời gian mà player nào chưa chọn thì hệ thống sẽ tự động chọn thay.
Ở đây các biến tương ứng khi ngẫu nhiên được chọn thì ta sẽ xóa các dữ liệu đó đi để tránh bị trùng lặp Hero. Các biến Single_RandomINT_Data,Single_RandomSTR_Data,Single_RandomAGI_Data để lưu các giá trị ngẫu nhiên lại,dùng khi player dùng tới lựa chọn Random thay vì pick một trong ba Hero được nhận.
Mã:
Single Draft Mode
Events
Player - Player 1 (Red) types a chat message containing -sd as An exact match
Conditions
Actions
Trigger - Turn off (This trigger)
Cinematic - Clear the screen of text messages for (All players)
Game - Display to (All players) for 10.00 seconds the text: |cff6ab5ff-sd|r: Mo...
Multiboard - Create a multiboard with 5 columns and 4 rows, titled |cffffff00Single Dr...
Set Single_MultiBoard = (Last created multiboard)
Multiboard - Maximize Single_MultiBoard
For each (Integer A) from 1 to 4, do (Actions)
Loop - Actions
Multiboard - Set the display style for Single_MultiBoard item in column 1, row (Integer A) to Show text and Hide icons
For each (Integer B) from 2 to 5, do (Actions)
Loop - Actions
Multiboard - Set the display style for Single_MultiBoard item in column (Integer B), row (Integer A) to Hide text and Hide icons
Multiboard - Set the display style for Single_MultiBoard item in column (Integer B), row 1 to Hide text and Show icons
Multiboard - Set the width for Single_MultiBoard item in column 1, row (Integer A) to 7.25% of the total screen width
Multiboard - Set the icon for Single_MultiBoard item in column 2, row 1 to UI\Widgets\Console\Human\infocard-heroattributes-str.blp
Multiboard - Set the icon for Single_MultiBoard item in column 3, row 1 to UI\Widgets\Console\Human\infocard-heroattributes-agi.blp
Multiboard - Set the icon for Single_MultiBoard item in column 4, row 1 to UI\Widgets\Console\Human\infocard-heroattributes-int.blp
For each (Integer A) from 2 to 5, do (Actions)
Loop - Actions
For each (Integer B) from 1 to 4, do (Actions)
Loop - Actions
Multiboard - Set the display style for Single_MultiBoard item in column (Integer A), row (Integer B) to Hide text and Show icons
Multiboard - Set the width for Single_MultiBoard item in column (Integer A), row (Integer B) to 2.00% of the total screen width
Multiboard - Set the display style for Single_MultiBoard item in column 5, row (Integer B) to Show text and Hide icons
For each (Integer A) from 2 to 4, do (Actions)
Loop - Actions
Multiboard - Set the text for Single_MultiBoard item in column 1, row (Integer A) to (Name of PlayerArray[((Integer A) - 1)])
Trigger - Turn on Sigle Draft Time <gen>
For each (Integer A) from 1 to 3, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(PlayerArray[(Integer A)] slot status) Equal to Is playing
Then - Actions
Set TempInt = ((Integer A) + 1)
Set Single_Boolean[(Integer A)] = True
Set Single_Int[(Integer A)] = 65
Multiboard - Set the text for (Last created multiboard) item in column 5, row TempInt to (String(Single_Int[(Integer A)]))
Set Point_Array[(Integer A)] = (Center of Region[(Integer A)])
Unit - Create 1 Wisp for PlayerArray[(Integer A)] at Point_Array[(Integer A)] facing Default building facing degrees
Unit - Add Random to (Last created unit)
Selection - Select (Last created unit) for (Owner of (Last created unit))
Custom script: call RemoveLocation (udg_Point_Array[bj_forLoopAIndex])
Set Random = (Random integer number between 1 and Random_Count_STR)
Set Single_RandomSTR[(Integer A)] = Single_RandomSTR_Data[Random]
Multiboard - Set the icon for Single_MultiBoard item in column 2, row TempInt to Single_StringSTR[Random]
Unit - Add Ability_HeroSTR[Random] to (Last created unit)
Set Ability_HeroSTR[Random] = Ability_HeroSTR[Random_Count_STR]
Set Single_StringSTR[Random] = Single_StringSTR[Random_Count_STR]
Set Single_RandomSTR_Data[Random] = Single_RandomSTR_Data[Random_Count_STR]
Set Random_Data_STR[Random] = Random_Count_STR
Set Random_Count_STR = (Random_Count_STR - 1)
-------- ----------- --------
Set Random = (Random integer number between 1 and Random_Count_AGI)
Set Single_RandomAGI[(Integer A)] = Single_RandomAGI_Data[Random]
Multiboard - Set the icon for Single_MultiBoard item in column 3, row TempInt to Single_StringAGI[Random]
Unit - Add Ability_HeroAGI[Random] to (Last created unit)
Set Ability_HeroAGI[Random] = Ability_HeroAGI[Random_Count_AGI]
Set Single_StringAGI[Random] = Single_StringAGI[Random_Count_AGI]
Set Single_RandomAGI_Data[Random] = Single_RandomAGI_Data[Random_Count_AGI]
Set Random_Data_AGI[Random] = Random_Count_AGI
Set Random_Count_AGI = (Random_Count_AGI - 1)
-------- ----------- --------
Set Random = (Random integer number between 1 and Random_Count_INT)
Set Single_RandomINT[(Integer A)] = Single_RandomINT_Data[Random]
Multiboard - Set the icon for Single_MultiBoard item in column 4, row TempInt to Single_StringINT[Random]
Unit - Add Ability_HeroINT[Random] to (Last created unit)
Set Ability_HeroINT[Random] = Ability_HeroINT[Random_Count_INT]
Set Single_StringINT[Random] = Single_StringINT[Random_Count_INT]
Set Single_RandomINT_Data[Random] = Single_RandomINT_Data[Random_Count_INT]
Set Random_Data_INT[Random] = Random_Count_INT
Set Random_Count_INT = (Random_Count_INT - 1)
Else - Actions
For each (Integer B) from 1 to 4, do (Actions)
Loop - Actions
Multiboard - Set the icon for Single_MultiBoard item in column (Integer B), row ((Integer A) + 1) to String[1]
Lý do mình tạo hai biến lưu dữ liệu của ability,hero type,string.v.v. là vì các dữ liệu đầu tiên đã bị đảo lộn. Vì thế khi pick unit ta cần một biến chính xác như ban đầu.
Mã:
Chosen
Events
Unit - A unit Starts the effect of an ability
Conditions
(Unit-type of (Triggering unit)) Equal to Wisp
((Owner of (Triggering unit)) slot status) Equal to Is playing
Actions
Set Point_Array[1] = (Center of Create <gen>)
Set Point_Array[2] = (Position of (Triggering unit))
Special Effect - Create a special effect at Point_Array[2] using String[2]
Special Effect - Destroy (Last created special effect)
Set TempInt = ((Player number of (Owner of (Triggering unit))) + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Random
Then - Actions
Set Random = (Random integer number between 1 and 3)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Random Equal to 1
Then - Actions
Unit - Create 1 Hero_ArraySTR[Single_RandomSTR[(Player number of (Owner of (Triggering unit)))]] for (Owner of (Triggering unit)) at Point_Array[1] facing Default building facing degrees
Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of (Triggering unit))) + ( has randomed + (Name of (Last created unit))))
Selection - Select (Last created unit) for (Owner of (Triggering unit))
Multiboard - Set the icon for Single_MultiBoard item in column 3, row TempInt to String[1]
Multiboard - Set the icon for Single_MultiBoard item in column 4, row TempInt to String[1]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Random Equal to 2
Then - Actions
Unit - Create 1 Hero_ArrayAGI[Single_RandomAGI[(Player number of (Owner of (Triggering unit)))]] for (Owner of (Triggering unit)) at Point_Array[1] facing Default building facing degrees
Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of (Triggering unit))) + ( has randomed + (Name of (Last created unit))))
Selection - Select (Last created unit) for (Owner of (Triggering unit))
Multiboard - Set the icon for Single_MultiBoard item in column 2, row TempInt to String[1]
Multiboard - Set the icon for Single_MultiBoard item in column 4, row TempInt to String[1]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Random Equal to 3
Then - Actions
Unit - Create 1 Hero_ArrayINT[Single_RandomINT[(Player number of (Owner of (Triggering unit)))]] for (Owner of (Triggering unit)) at Point_Array[1] facing Default building facing degrees
Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of (Triggering unit))) + ( has randomed + (Name of (Last created unit))))
Selection - Select (Last created unit) for (Owner of (Triggering unit))
Multiboard - Set the icon for Single_MultiBoard item in column 2, row TempInt to String[1]
Multiboard - Set the icon for Single_MultiBoard item in column 3, row TempInt to String[1]
Else - Actions
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Not equal to Random
Then - Actions
For each (Integer A) from 1 to Total_Heroes_STR, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Ability_HeroSTR_Data[(Integer A)]
Then - Actions
Unit - Create 1 Hero_ArraySTR_Data[(Integer A)] for (Owner of (Triggering unit)) at Point_Array[1] facing Default building facing degrees
Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of (Triggering unit))) + ( has chosen + (Name of (Last created unit))))
Selection - Select (Last created unit) for (Owner of (Triggering unit))
Multiboard - Set the icon for Single_MultiBoard item in column 3, row TempInt to String[1]
Multiboard - Set the icon for Single_MultiBoard item in column 4, row TempInt to String[1]
Else - Actions
For each (Integer A) from 1 to Total_Heroes_AGI, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Ability_HeroAGI_Data[(Integer A)]
Then - Actions
Unit - Create 1 Hero_ArrayAGI_Data[(Integer A)] for (Owner of (Triggering unit)) at Point_Array[1] facing Default building facing degrees
Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of (Triggering unit))) + ( has chosen + (Name of (Last created unit))))
Selection - Select (Last created unit) for (Owner of (Triggering unit))
Multiboard - Set the icon for Single_MultiBoard item in column 2, row TempInt to String[1]
Multiboard - Set the icon for Single_MultiBoard item in column 4, row TempInt to String[1]
Else - Actions
For each (Integer A) from 1 to Total_Heroes_INT, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Ability_HeroINT_Data[(Integer A)]
Then - Actions
Unit - Create 1 Hero_ArrayINT_Data[(Integer A)] for (Owner of (Triggering unit)) at Point_Array[1] facing Default building facing degrees
Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of (Triggering unit))) + ( has chosen + (Name of (Last created unit))))
Selection - Select (Last created unit) for (Owner of (Triggering unit))
Multiboard - Set the icon for Single_MultiBoard item in column 2, row TempInt to String[1]
Multiboard - Set the icon for Single_MultiBoard item in column 3, row TempInt to String[1]
Else - Actions
Else - Actions
Set Single_Boolean[(Player number of (Owner of (Triggering unit)))] = False
Camera - Pan camera for (Owner of (Triggering unit)) to Point_Array[1] over 1.00 seconds
Custom script: call RemoveLocation (udg_Point_Array[1])
Custom script: call RemoveLocation (udg_Point_Array[2])
Unit - Kill (Triggering unit)
Mã:
Sigle Draft Time
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 3, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Single_Boolean[(Integer A)] Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Single_Int[(Integer A)] Greater than 0
Then - Actions
Set Single_Int[(Integer A)] = (Single_Int[(Integer A)] - 1)
Multiboard - Set the text for (Last created multiboard) item in column 5, row ((Integer A) + 1) to (String(Single_Int[(Integer A)]))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Single_Boolean[(Integer A)] Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Single_Int[(Integer A)] Equal to 1
Then - Actions
Set Group = (Units owned by PlayerArray[(Integer A)] of type Wisp)
Unit Group - Pick every unit in Group and do (Actions)
Loop - Actions
Set Point_Array[2] = (Position of (Picked unit))
Unit - Remove (Picked unit) from the game
Special Effect - Create a special effect at Point_Array[2] using Abilities\Spells\Items\AIam\AIamTarget.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation (udg_Point_Array[2])
Custom script: call DestroyGroup (udg_Group)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Single_Int[(Integer A)] Less than or equal to 0
Then - Actions
Set Single_Boolean[(Integer A)] = False
Set TempInt = ((Integer A) + 1)
Set Point_Array[1] = (Center of Create <gen>)
Set Random = (Random integer number between 1 and 3)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Random Equal to 1
Then - Actions
Unit - Create 1 Hero_ArraySTR[Single_RandomSTR[(Integer A)]] for PlayerArray[(Integer A)] at Point_Array[1] facing Default building facing degrees
Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of (Last created unit))) + ( ®· chän ngÉu nhiªn ®Âîc + (Name of (Last created unit))))
Selection - Select (Last created unit) for (Owner of (Last created unit))
Multiboard - Set the icon for Single_MultiBoard item in column 3, row TempInt to String[1]
Multiboard - Set the icon for Single_MultiBoard item in column 4, row TempInt to String[1]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Random Equal to 2
Then - Actions
Unit - Create 1 Hero_ArrayAGI[Single_RandomAGI[(Integer A)]] for PlayerArray[(Integer A)] at Point_Array[1] facing Default building facing degrees
Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of (Last created unit))) + ( ®· chän ngÉu nhiªn ®Âîc + (Name of (Last created unit))))
Selection - Select (Last created unit) for (Owner of (Last created unit))
Multiboard - Set the icon for Single_MultiBoard item in column 2, row TempInt to String[1]
Multiboard - Set the icon for Single_MultiBoard item in column 4, row TempInt to String[1]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Random Equal to 3
Then - Actions
Unit - Create 1 Hero_ArrayINT[Single_RandomINT[(Integer A)]] for PlayerArray[(Integer A)] at Point_Array[1] facing Default building facing degrees
Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of (Last created unit))) + ( ®· chän ngÉu nhiªn ®Âîc + (Name of (Last created unit))))
Selection - Select (Last created unit) for (Owner of (Last created unit))
Multiboard - Set the icon for Single_MultiBoard item in column 2, row TempInt to String[1]
Multiboard - Set the icon for Single_MultiBoard item in column 3, row TempInt to String[1]
Else - Actions
Camera - Pan camera for PlayerArray[(Integer A)] to Point_Array[1] over 1.00 seconds
Custom script: call RemoveLocation (udg_Point_Array[1])
Else - Actions
Else - Actions
Else - Actions
Map demo: http://www.mediafire.com/?76hlwceukvfu37f
Có gì không đúng,mọi người góp ý để mình hoàn thiện hơn nhé,cám ơn

Chỉnh sửa cuối:
nếu dc cho xin thêm cái multiboard 
.
bạn có thể nói rõ tình trạng lỗi bạn gặp và up map demo lên để mình kiểm tra đc không =-= ?