[Tutorial] Single Draft Mode

Ngoc LeO

Mario & Luigi
Tham gia ngày
23/7/06
Bài viết
839
Reaction score
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ó.

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
[/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 \m/
 
Chỉnh sửa cuối:
^_^ đang cần cái này ^_^ tks, làm map divide nên cái giao diện cũng y chang =)) nếu dc cho xin thêm cái multiboard :D
 
sao ma lam xong roi nhung khi pick hero agi thi no cu nhay~ ra la random
 
Bạn thử post trigger của bạn lên mình xem thử
 
làm cách nào copy đoạn trigger vào trong đây nhỉ @@
 
Trong trigger,bạn click vào dòng tên trigger,nó nằm trên cùng trigger,trên dòng Event,click chuột phải,chọn Copy as text (Ctrl + Shift + C) rồi paste ra ngoài
 
Chỉnh sửa cuối:
Trong trigger,bạn click vào dòng tên map,nó nằm trên cùng trigger,trên dòng Event,click chuột phải,chọn Copy as text (Ctrl + Shift + C) rồi paste ra ngoài

Dòng tên map... Thôi, cho cậu vinh 2706 một bức ảnh cho dễ này :)).
[spoil]
copyastext.jpg
[/spoil]
 
Mã:
Single Draft Mode
    Events
        Player - Player 2 (Blue) types a chat message containing -sd as An exact match
    Conditions
    Actions
        Trigger - Turn off p10 <gen>
        Trigger - Turn off hien mode <gen>
        Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Region 106 <gen>) over 0.00 seconds
        Trigger - Turn off p11 <gen>
        Trigger - Turn off p12 <gen>
        Trigger - Turn off p2 <gen>
        Trigger - Turn off p3 <gen>
        Trigger - Turn off p4 <gen>
        Trigger - Turn off p5 <gen>
        Trigger - Turn off p6 <gen>
        Trigger - Turn off p8 <gen>
        Trigger - Turn off p9 <gen>
        Cinematic - Clear the screen of text messages for (All players)
        Game - Display to (All players) for 10.00 seconds the text: |cff6ab5ff-sd|r: Ch...
        Multiboard - Create a multiboard with 5 columns and 13 rows, titled |cffffff00Single Dr...
        Set Single_MultiBoard = (Last created multiboard)
        Multiboard - Maximize Single_MultiBoard
        For each (Integer A) from 1 to 12, 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 12, 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 1 to 12, 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 12, 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 12, do (Actions)
                            Loop - Actions
                                Multiboard - Set the icon for Single_MultiBoard item in column (Integer B), row ((Integer A) + 1) to String[1]

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] = ((Triggering player) start location)
        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 12, 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 team1 <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

Cái trigger đầu tiên đã sửa lại Region từ 1-10 rùi :D và player array cũng thế
 
Bạn vui lòng send cả cái trigger đầu nữa nhé,để xem bạn set biến đúng chưa
 
Mã:
Map initialization
    Events
        Map initialization
    Conditions
    Actions
        Set Region[2] = Region 095 <gen>
        Set Region[3] = Region 095 Copy <gen>
        Set Region[4] = Region 095 Copy 2 <gen>
        Set Region[5] = Region 095 Copy 3 <gen>
        Set Region[6] = Region 095 Copy 4 <gen>
        Set Region[8] = Region 095 Copy 5 <gen>
        Set Region[9] = Region 095 Copy 5 Copy <gen>
        Set Region[10] = Region 095 Copy 5 Copy 2 <gen>
        Set Region[11] = Region 095 Copy 5 Copy 3 <gen>
        Set Region[12] = Region 095 Copy 5 Copy 4 <gen>
        -------- ------------ --------
        Set String[1] = ReplaceableTextures\WorldEditUI\DoodadPlaceholder.blp
        -------- Effect --------
        Set String[2] = Abilities\Spells\Items\AIam\AIamTarget.mdl
        -------- ------------ --------
        Set Total_Heroes_STR = 12
        Set Random_Count_STR = 12
        Set Hero_ArraySTR[1] = |cff0080ff1|r
        Set Hero_ArraySTR[2] = |cffff00002|r
        Set Hero_ArraySTR[3] = |cff00ffff3|r
        Set Hero_ArraySTR[4] = |cff8000ff4|r
        Set Hero_ArraySTR[5] = |cffc0c0c05|r
        Set Hero_ArraySTR[6] = |cffff00006|r
        Set Hero_ArraySTR[7] = |cffff00007|r
        Set Hero_ArraySTR[8] = |cffff80408|r
        Set Hero_ArraySTR[9] = |cffff80409|r
        Set Hero_ArraySTR[10] = |cffff804010|r
        Set Hero_ArraySTR[11] = |cffffff0011|r
        Set Hero_ArraySTR[12] = |cffffff0012|r
        -------- ------------ --------
        Set Hero_ArraySTR_Data[1] = |cff0080ff1|r
        Set Hero_ArraySTR_Data[2] = |cffff00002|r
        Set Hero_ArraySTR_Data[3] = |cff00ffff3|r
        Set Hero_ArraySTR_Data[4] = |cff8000ff4|r
        Set Hero_ArraySTR_Data[5] = |cffc0c0c05|r
        Set Hero_ArraySTR_Data[6] = |cffff00006|r
        Set Hero_ArraySTR_Data[7] = |cffff00007|r
        Set Hero_ArraySTR_Data[8] = |cffff80408|r
        Set Hero_ArraySTR_Data[9] = |cffff80409|r
        Set Hero_ArraySTR_Data[10] = |cffff804010|r
        Set Hero_ArraySTR_Data[11] = |cffffff0011|r
        Set Hero_ArraySTR_Data[12] = |cffffff0012|r
        -------- ------------ --------
        Set Ability_HeroSTR[1] = Str|cff0080ff1|r 
        Set Ability_HeroSTR[2] = Str-|cffff00002|r 
        Set Ability_HeroSTR[3] = Str|cff00ffff3|r 
        Set Ability_HeroSTR[4] = Str-|cff8000ff4|r 
        Set Ability_HeroSTR[5] = Str-|cffc0c0c0K5|r 
        Set Ability_HeroSTR[6] = Str-|cffff00006|r 
        Set Ability_HeroSTR[7] = Str-|cffff00007|r 
        Set Ability_HeroSTR[8] = Str-|cffff80408|r 
        Set Ability_HeroSTR[9] = Str-|cffff80409|r 
        Set Ability_HeroSTR[10] = Str-|cffff804010|r 
        Set Ability_HeroSTR[11] = Str-|cffffff0011|r 
        Set Ability_HeroSTR[12] = Str-|cffffff0012|r 
        -------- ------------ --------
        Set Ability_HeroSTR_Data[1] = Str|cff0080ff1|r 
        Set Ability_HeroSTR_Data[2] = Str-|cffff00002|r 
        Set Ability_HeroSTR_Data[3] = Str|cff00ffff3|r 
        Set Ability_HeroSTR_Data[4] = Str-|cff8000ff4|r 
        Set Ability_HeroSTR_Data[5] = Str-|cffc0c0c05|r 
        Set Ability_HeroSTR_Data[6] = Str-|cffff00006|r 
        Set Ability_HeroSTR_Data[7] = Str-|cffff00007|r 
        Set Ability_HeroSTR_Data[8] = Str-|cffff80408|r 
        Set Ability_HeroSTR_Data[9] = Str-|cffff80409|r 
        Set Ability_HeroSTR_Data[10] = Str-|cffff804010|r 
        Set Ability_HeroSTR_Data[11] = Str-|cffffff0011|r 
        Set Ability_HeroSTR_Data[12] = Str-|cffffff0012|r 
        -------- ------------ --------
        Set Single_StringSTR[1] = ReplaceableTextures\CommandButtons\BTNProudmoore.blp
        Set Single_StringSTR[2] = ReplaceableTextures\CommandButtons\BTNAbomination.blp
        Set Single_StringSTR[3] = ReplaceableTextures\CommandButtons\BTNHeroPaladin.blp
        Set Single_StringSTR[4] = ReplaceableTextures\CommandButtons\BTNTichondrius.blp
        Set Single_StringSTR[5] = ReplaceableTextures\CommandButtons\BTNSkeletonArcher.blp
        Set Single_StringSTR[6] = ReplaceableTextures\CommandButtons\BTNChaosGrom.blp
        Set Single_StringSTR[7] = ReplaceableTextures\CommandButtons\BTNFelGuard.blp
        Set Single_StringSTR[8] = ReplaceableTextures\CommandButtons\BTNBeastMaster.blp
        Set Single_StringSTR[9] = ReplaceableTextures\CommandButtons\BTNMountainGiant.blp
        Set Single_StringSTR[10] = ReplaceableTextures\CommandButtons\BTNHeroTaurenChieftain.blp
        Set Single_StringSTR[11] = ReplaceableTextures\CommandButtons\BTNTheCaptain.blp
        Set Single_StringSTR[12] = ReplaceableTextures\CommandButtons\BTNArthas.blp
        -------- ------------ --------
        Set Single_StringSTR_Data[1] = ReplaceableTextures\CommandButtons\BTNProudmoore.blp
        Set Single_StringSTR_Data[2] = ReplaceableTextures\CommandButtons\BTNAbomination.blp
        Set Single_StringSTR_Data[3] = ReplaceableTextures\CommandButtons\BTNHeroPaladin.blp
        Set Single_StringSTR_Data[4] = ReplaceableTextures\CommandButtons\BTNTichondrius.blp
        Set Single_StringSTR_Data[5] = ReplaceableTextures\CommandButtons\BTNSkeletonArcher.blp
        Set Single_StringSTR_Data[6] = ReplaceableTextures\CommandButtons\BTNChaosGrom.blp
        Set Single_StringSTR_Data[7] = ReplaceableTextures\CommandButtons\BTNFelGuard.blp
        Set Single_StringSTR_Data[8] = ReplaceableTextures\CommandButtons\BTNBeastMaster.blp
        Set Single_StringSTR_Data[9] = ReplaceableTextures\CommandButtons\BTNMountainGiant.blp
        Set Single_StringSTR_Data[10] = ReplaceableTextures\CommandButtons\BTNHeroTaurenChieftain.blp
        Set Single_StringSTR_Data[11] = ReplaceableTextures\CommandButtons\BTNTheCaptain.blp
        Set Single_StringSTR_Data[12] = ReplaceableTextures\CommandButtons\BTNArthas.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 = 12
        Set Random_Count_AGI = 12
        Set Hero_ArrayAGI[1] = test13
        Set Hero_ArrayAGI[2] = test14
        Set Hero_ArrayAGI[3] = test15
        Set Hero_ArrayAGI[4] = test16 
        Set Hero_ArrayAGI[5] = test17
        Set Hero_ArrayAGI[6] = test18
        Set Hero_ArrayAGI[7] = test19
        Set Hero_ArrayAGI[8] = test20
        Set Hero_ArrayAGI[9] = test21
        Set Hero_ArrayAGI[10] = test22
        Set Hero_ArrayAGI[11] = test23
        Set Hero_ArrayAGI[12] = test24
        -------- ------------ --------
        Set Hero_ArrayAGI_Data[1] = |cff0080c0Sinh vËt l¹|r
        Set Hero_ArrayAGI_Data[2] = |cff0080ffMa n÷ v« t×nh|r
        Set Hero_ArrayAGI_Data[3] = |cff00ff00B¸n nguyÖt ®ao kh¸ch|r
        Set Hero_ArrayAGI_Data[4] = Warden
        Set Hero_ArrayAGI_Data[5] = |cff00ffffL«i ma|r
        Set Hero_ArrayAGI_Data[6] = |cff00ffffTia chíp|r
        Set Hero_ArrayAGI_Data[7] = |cff666666Hån ma cæ ®¹i|r
        Set Hero_ArrayAGI_Data[8] = |cff8000ffS¸t thñ|r
        Set Hero_ArrayAGI_Data[9] = |cff8080ffH»ng Nga|r
        Set Hero_ArrayAGI_Data[10] = |cffff0000Kho¸i lang|r
        Set Hero_ArrayAGI_Data[11] = |cffff0000Viªm háa thÇn ma|r
        Set Hero_ArrayAGI_Data[12] = |cffff0000§éc c« cÇu b¹i|r
        -------- ------------ --------
        Set Ability_HeroAGI[1] = Agi-test13
        Set Ability_HeroAGI[2] = Agi-test14
        Set Ability_HeroAGI[3] = Agi-test15
        Set Ability_HeroAGI[4] = Agi-test16
        Set Ability_HeroAGI[5] = Agi-test17
        Set Ability_HeroAGI[6] = Agi-test18
        Set Ability_HeroAGI[7] = Agi-test19
        Set Ability_HeroAGI[8] = Agi-test20
        Set Ability_HeroAGI[9] = Agi-test21
        Set Ability_HeroAGI[10] = Agi-test22
        Set Ability_HeroAGI[11] = Agi-test23
        Set Ability_HeroAGI[12] = Agi-test24
        -------- ------------ --------
        Set Ability_HeroAGI_Data[1] = Agi-test13
        Set Ability_HeroAGI_Data[2] = Agi-test14
        Set Ability_HeroAGI_Data[3] = Agi-test15 
        Set Ability_HeroAGI_Data[4] = Agi-test16
        Set Ability_HeroAGI_Data[5] = Agi-test17
        Set Ability_HeroAGI_Data[7] = Agi-test18
        Set Ability_HeroAGI_Data[8] = Agi-test19
        Set Ability_HeroAGI_Data[10] = Agi-test20
        Set Ability_HeroAGI_Data[9] = Agi-test21
        Set Ability_HeroAGI_Data[11] = Agi-test22
        Set Ability_HeroAGI_Data[12] = Agi-test23
        Set Ability_HeroAGI_Data[6] = Agi-test24
        -------- ------------ --------
        Set Single_StringAGI[1] = ReplaceableTextures\CommandButtons\BTNFacelessOne.blp
        Set Single_StringAGI[2] = ReplaceableTextures\CommandButtons\BTNNagaSeaWitch.blp
        Set Single_StringAGI[3] = ReplaceableTextures\CommandButtons\BTNHeroDemonHunter.blp
        Set Single_StringAGI[4] = ReplaceableTextures\CommandButtons\BTNHeroWarden.blp
        Set Single_StringAGI[5] = ReplaceableTextures\CommandButtons\BTNRevenant.blp
        Set Single_StringAGI[6] = ReplaceableTextures\CommandButtons\BTNStorm.blp
        Set Single_StringAGI[7] = ReplaceableTextures\CommandButtons\BTNVengeanceIncarnate.tga
        Set Single_StringAGI[8] = ReplaceableTextures\CommandButtons\BTNAvengingAssassin.tga
        Set Single_StringAGI[9] = ReplaceableTextures\CommandButtons\BTNPriestessOfTheMoon.blp
        Set Single_StringAGI[10] = ReplaceableTextures\CommandButtons\BTNShaman.blp
        Set Single_StringAGI[11] = ReplaceableTextures\CommandButtons\BTNShade.blp
        Set Single_StringAGI[12] = ReplaceableTextures\CommandButtons\BTNChaosBlademaster.blp
        -------- ------------ --------
        Set Single_StringAGI_Data[1] = ReplaceableTextures\CommandButtons\BTNFacelessOne.blp
        Set Single_StringAGI_Data[2] = ReplaceableTextures\CommandButtons\BTNNagaSeaWitch.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\BTNRevenant.blp
        Set Single_StringAGI_Data[6] = ReplaceableTextures\CommandButtons\BTNStorm.blp
        Set Single_StringAGI_Data[7] = ReplaceableTextures\CommandButtons\BTNVengeanceIncarnate.tga
        Set Single_StringAGI_Data[8] = ReplaceableTextures\CommandButtons\BTNAvengingAssassin.tga
        Set Single_StringAGI_Data[9] = ReplaceableTextures\CommandButtons\BTNPriestessOfTheMoon.blp
        Set Single_StringAGI_Data[10] = ReplaceableTextures\CommandButtons\BTNShaman.blp
        Set Single_StringAGI_Data[11] = ReplaceableTextures\CommandButtons\BTNShade.blp
        Set Single_StringAGI_Data[12] = ReplaceableTextures\CommandButtons\BTNChaosBlademaster.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 = 14
        Set Random_Count_INT = 14
        Set Hero_ArrayINT[1] = test24
        Set Hero_ArrayINT[2] = test25
        Set Hero_ArrayINT[3] = test26
        Set Hero_ArrayINT[4] = test27
        Set Hero_ArrayINT[5] = test28
        Set Hero_ArrayINT[6] = test29
        Set Hero_ArrayINT[7] = test30
        Set Hero_ArrayINT[8] = test31
        Set Hero_ArrayINT[9] = test32
        Set Hero_ArrayINT[10] = test33
        Set Hero_ArrayINT[11] = test34
        Set Hero_ArrayINT[12] = test35
        Set Hero_ArrayINT[13] = test36
        Set Hero_ArrayINT[14] = test37
        -------- ------------ --------
        Set Hero_ArrayINT_Data[1] = test24
        Set Hero_ArrayINT_Data[2] = test25
        Set Hero_ArrayINT_Data[3] = test26
        Set Hero_ArrayINT_Data[4] = test27        
        Set Hero_ArrayINT_Data[5] = test28
        Set Hero_ArrayINT_Data[6] = test29 
        Set Hero_ArrayINT_Data[7] = test30
        Set Hero_ArrayINT_Data[8] = test31 
        Set Hero_ArrayINT_Data[9] = test32
        Set Hero_ArrayINT_Data[10] = test33
        Set Hero_ArrayINT_Data[11] = test34 
        Set Hero_ArrayINT_Data[12] = test35 
        Set Hero_ArrayINT_Data[13] = test36 
        Set Hero_ArrayINT_Data[14] = test37 
        -------- ------------ --------
        Set Ability_HeroINT[1] = Int-test24
        Set Ability_HeroINT[2] = Int-test25
        Set Ability_HeroINT[3] = Int-test26 
        Set Ability_HeroINT[4] = Int-test27
        Set Ability_HeroINT[5] = Int-test28 
        Set Ability_HeroINT[6] = Int-test29
        Set Ability_HeroINT[7] = Int-test30
        Set Ability_HeroINT[8] = Int-test31 
        Set Ability_HeroINT[9] = Int-test32 
        Set Ability_HeroINT[10] = Int-test33 
        Set Ability_HeroINT[11] = Int-test34 
        Set Ability_HeroINT[12] = Int-test35 
        Set Ability_HeroINT[13] = Int-test36 
        Set Ability_HeroINT[14] = Int-test37 
        -------- ------------ --------
        Set Ability_HeroINT_Data[1] = Int-test24  
        Set Ability_HeroINT_Data[2] = Int-test25
        Set Ability_HeroINT_Data[3] = Int-test26 
        Set Ability_HeroINT_Data[4] = Int-test27
        Set Ability_HeroINT_Data[5] = Int-test28
        Set Ability_HeroINT_Data[6] = Int-test29 
        Set Ability_HeroINT_Data[7] = Int-test30 
        Set Ability_HeroINT_Data[8] = Int-test31 
        Set Ability_HeroINT_Data[9] = Int-test32
        Set Ability_HeroINT_Data[10] = Int-test33
        Set Ability_HeroINT_Data[11] = Int-test34 
        Set Ability_HeroINT_Data[12] = Int-test35 
        Set Ability_HeroINT_Data[13] = Int-test36 
        Set Ability_HeroINT_Data[14] = Int-test37 
        -------- ------------ -------
        Set Single_StringINT[1] = ReplaceableTextures\CommandButtons\BTNHeroArchMage.blp
        Set Single_StringINT[2] = ReplaceableTextures\CommandButtons\BTNEredarRed.blp
        Set Single_StringINT[3] = ReplaceableTextures\CommandButtons\BTNMedivh.blp
        Set Single_StringINT[4] = ReplaceableTextures\CommandButtons\BTNGhostOfKelThuzad.blp
        Set Single_StringINT[5] = ReplaceableTextures\CommandButtons\BTNDranaiMage.blp
        Set Single_StringINT[6] = ReplaceableTextures\CommandButtons\BTNLichVersion2.blp
        Set Single_StringINT[7] = ReplaceableTextures\CommandButtons\BTNJaina.blp
        Set Single_StringINT[8] = ReplaceableTextures\CommandButtons\BTNBlueDemoness.blp
        Set Single_StringINT[9] = ReplaceableTextures\CommandButtons\BTNFurion.blp
        Set Single_StringINT[10] = ReplaceableTextures\CommandButtons\BTNAvatarOn.blp
        Set Single_StringINT[11] = ReplaceableTextures\CommandButtons\BTNSylvanusWindrunner.blp
        Set Single_StringINT[12] = ReplaceableTextures\CommandButtons\BTNSorceress.blp
        Set Single_StringINT[13] = ReplaceableTextures\CommandButtons\BTNHeroBloodElfPrince.blp
        Set Single_StringINT[14] = ReplaceableTextures\CommandButtons\BTNSpellBreaker.blp
        -------- ------------ --------
        Set Single_StringINT_Data[1] = ReplaceableTextures\CommandButtons\BTNHeroArchMage.blp
        Set Single_StringINT_Data[2] = ReplaceableTextures\CommandButtons\BTNEredarRed.blp
        Set Single_StringINT_Data[3] = ReplaceableTextures\CommandButtons\BTNMedivh.blp
        Set Single_StringINT_Data[4] = ReplaceableTextures\CommandButtons\BTNGhostOfKelThuzad.blp
        Set Single_StringINT_Data[5] = ReplaceableTextures\CommandButtons\BTNDranaiMage.blp
        Set Single_StringINT_Data[6] = ReplaceableTextures\CommandButtons\BTNLichVersion2.blp
        Set Single_StringINT_Data[7] = ReplaceableTextures\CommandButtons\BTNJaina.blp
        Set Single_StringINT_Data[8] = ReplaceableTextures\CommandButtons\BTNBlueDemoness.blp
        Set Single_StringINT_Data[9] = ReplaceableTextures\CommandButtons\BTNFurion.blp
        Set Single_StringINT_Data[10] = ReplaceableTextures\CommandButtons\BTNAvatarOn.blp
        Set Single_StringINT_Data[11] = ReplaceableTextures\CommandButtons\BTNSylvanusWindrunner.blp
        Set Single_StringINT_Data[12] = ReplaceableTextures\CommandButtons\BTNSorceress.blp
        Set Single_StringINT_Data[13] = ReplaceableTextures\CommandButtons\BTNHeroBloodElfPrince.blp
        Set Single_StringINT_Data[14] = ReplaceableTextures\CommandButtons\BTNSpellBreaker.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[2] = Player 2 (Blue)
        Set PlayerArray[4] = Player 4 (Purple)
        Set PlayerArray[3] = Player 3 (Teal)
        Set PlayerArray[5] = Player 5 (Yellow)
        Set PlayerArray[6] = Player 6 (Orange)
        Set PlayerArray[8] = Player 8 (Pink)
        Set PlayerArray[9] = Player 9 (Gray)
        Set PlayerArray[10] = Player 10 (Light Blue)
        Set PlayerArray[11] = Player 11 (Dark Green)
        Set PlayerArray[12] = Player 12 (Brown)
 
Mình thấy bình thường mà nhỉ :-? 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 =-= ?
 
để mai nhé ^_^ h bận đi chơi rùi ^^
 
Back
Top