Đăng NhậpĐăng ký
Log inLog in  
  • RegisterRegister  
  • FAQFAQ  
  • HomeHome  
  • CalendarCalendar  
  • GalleryGallery  
  • MemberlistMemberlist  
  • SearchSearch  

  • +126
    aokhung111
    khoawar123
    Cắn chim tự tử
    MamTom0192
    locasdfg
    garungdongnai
    supper.cop
    Nyuu
    Muzaka
    Thợ Săn Quỷ
    Raijer
    iTsMe.Liz
    VaL.inu589565
    hellobumbum
    danknessdragon
    oaivailo
    kaizoku98
    hieuk
    Bu.
    amgadt7
    vutaka
    cumidang
    sown1310
    lanprhandsome
    Kẻ Báo Lỗi DF
    wander113
    trungzibo102
    huy079sttt
    zxforeverlovexz
    DreamOfDoll
    ProSolo
    LEANHKHOA
    Tanker.NORAD
    a1s2d3456
    chu8
    14u|Ro
    DragonStar
    664607
    Delfire
    mr.equal
    Drakkar Knight
    Hiroshi.Kaze
    tungvnbk
    vubradbecks
    o0o0o1922
    talavodichhaha
    DragonWater
    Soul.Jiro
    huynhbu2
    NewbieWE
    GaKon
    Bố Già
    anhxayda11
    nanvaichuong
    xZzDarkLordzZx
    kietcuabe01
    Leo Oblivion
    thuan0147
    Ultimecia
    dackro123
    jackypham
    nchkg879177
    kunbuzz1990
    Ajen Kul
    zZzBEMzZz
    S2.Yuri.S2
    phuoc1931998
    Lầu Xanh
    Sheny
    hoangthach1402
    Xathucoi
    Pio
    vtcgames3
    nhathoang1130
    fantom2409
    Shank Tóc Đỏ
    Market_Tanker
    FlameDrake
    gavinroy1995
    dak_lak_city
    ICE...Damge
    Fire Wizard
    gameover55
    vjpkjssmjss
    Golden_Dragon1
    rebellion
    DT_ChanDoi2
    datrovip
    ♥-Win-♥
    love4everNHMH
    qwqwop
    Thánh Z3
    Soul.BabyGirl
    phucto1
    ♥ Vô Vọng ♥
    andy_bi
    bamay289
    daimagiao
    satthuvodanh293
    A.n.k.h
    Nụ Cười Buồn
    Geniuskwe
    window789456
    19101994
    blackwolf
    blackwolf196
    chapter20
    Heo Empire
    HuỳnhPhúcTrạng
    J3eJY
    thaiduong
    K3_Posh
    nppluong97
    kameliadiamond
    Red.Hunter
    justeever_tk
    Zupapa Idiler
    Zongshishun
    Thiên Mệnh
    graveyard
    sahojden2100
    kingpro1
    Kai....NCKT
    KiNiem123
    phutu
    ηЋǿċ_şǿċķ
    130 posters

    Go to page : Previous  1 ... 22 ... 40, 41, 42 ... 47 ... 54  Next

    Tham gia : 2012-05-03
    Bài gửi : 81
    Uy tín : 3
    Coins : 166
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    avatar

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    em sữa dc r nhưng mà mấy anh giúp em làm 3 team là kẻ thù đi, nó cứ là bạn thì sao mà chơi?

    Tham gia : 2012-05-03
    Bài gửi : 81
    Uy tín : 3
    Coins : 166
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    avatar

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    lẹ dùm em với

    Tham gia : 2011-12-06
    Bài gửi : 4961
    Uy tín : 5250
    Coins : 4916
    Biệt Danh : lForeverlAlonel
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    Thợ Săn Quỷ

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    rebellion wrote:em sữa dc r nhưng mà mấy anh giúp em làm 3 team là kẻ thù đi, nó cứ là bạn thì sao mà chơi?

    Scenario => Player Properties => muốn thằng nào là máy thì chọn computer

    Tham gia : 2012-05-03
    Bài gửi : 81
    Uy tín : 3
    Coins : 166
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    avatar

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    cái dó thì làm r nhưng start map thì ceep bên ra đều là đồng minh thì sao ma chơi zz

    Tham gia : 2011-12-06
    Bài gửi : 4961
    Uy tín : 5250
    Coins : 4916
    Biệt Danh : lForeverlAlonel
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    Thợ Săn Quỷ

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    rebellion wrote:cái dó thì làm r nhưng start map thì ceep bên ra đều là đồng minh thì sao ma chơi zz


    Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees

    Ko biết đọc chữ?

    Tham gia : 2012-05-03
    Bài gửi : 81
    Uy tín : 3
    Coins : 166
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    avatar

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    ý em nói là 2 phe đánh nhau , lính do player 5 dk
    và player 10 Dk
    2 bên đánh nhau, em hỏi làm sao cho 12345 là 1 team và 678910 là 1 team nữa

    Tham gia : 2012-01-16
    Bài gửi : 2501
    Uy tín : 512
    Coins : 3511
    Biệt Danh : ..Have Some Tea ?..
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    Nyuu

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    rebellion wrote:ý em nói là 2 phe đánh nhau , lính do player 5 dk
    và player 10 Dk
    2 bên đánh nhau, em hỏi làm sao cho 12345 là 1 team và 678910 là 1 team nữa

    Trong đó có chữ ADD FORCE

    FORCE ở đây là TEAM

    Tạo thêm 1 FORCE rồi kéo player enemy xuống.

    Tham gia : 2012-05-03
    Bài gửi : 81
    Uy tín : 3
    Coins : 166
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    avatar

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    k dc ah ơi , tạo 3 force thì force 1 va` 2 là đồng minh cùng đánh force 3 nhưng em muốn nó đánh nhau zz , mấy cái ô trong cái add force em đều k tích

    Tham gia : 2012-05-07
    Bài gửi : 489
    Uy tín : 120
    Coins : 2797
    Biệt Danh : kiet789
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    kietcuabe01

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    3 force gồm những player nào ?

    Tham gia : 2011-12-06
    Bài gửi : 4961
    Uy tín : 5250
    Coins : 4916
    Biệt Danh : lForeverlAlonel
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    Thợ Săn Quỷ

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    rebellion wrote:k dc ah ơi , tạo 3 force thì force 1 va` 2 là đồng minh cùng đánh force 3 nhưng em muốn nó đánh nhau zz , mấy cái ô trong cái add force em đều k tích


    Thế thì add thêm force rồi kéo team 3 vào một force, team 2 vào một force, tương tự
    Nói thật nhé: "Chịu suy nghĩ chút đi"
    Có 2 force rồi giờ tạo thêm một force cũng hỏi I don't know

    Tham gia : 2012-01-16
    Bài gửi : 2501
    Uy tín : 512
    Coins : 3511
    Biệt Danh : ..Have Some Tea ?..
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    Nyuu

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    rebellion wrote:k dc ah ơi , tạo 3 force thì force 1 va` 2 là đồng minh cùng đánh force 3 nhưng em muốn nó đánh nhau zz , mấy cái ô trong cái add force em đều k tích

    Kéo 3 force enemy player như nhau thui bạn 0.o..khác force sẽ đánh nhau, còn muốn mỗi người mỗi phe thì phải đụng đến GUI/JASS

    Vì bạn mới tập WE nên GUI nhé

    Mẫu nếu bạn thích làm

    Event - Time Es = 0
    Condition -
    Action - Player - Treat [Player] To [Player] With [Enemy]

    Tham gia : 2012-05-03
    Bài gửi : 81
    Uy tín : 3
    Coins : 166
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    avatar

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    map nè, mấy anh chĩnh dùm em đi làm sao 3 force đều đánh nhau ấy
    http://www.epicwar.com/maps/215141/

    Tham gia : 2012-05-03
    Bài gửi : 81
    Uy tín : 3
    Coins : 166
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    avatar

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    sao k ai giup em vay

    Tham gia : 2012-07-22
    Bài gửi : 205
    Uy tín : 47
    Coins : 523
    Biệt Danh : OMG_Wicked.sick
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    fantom2409

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    hí hí hỏi tất tần tật về scope

    Tham gia : 2012-05-03
    Bài gửi : 81
    Uy tín : 3
    Coins : 166
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    avatar

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    mấy anh chỉ em làm vài trigger đi:
    khi 1 hero đánh chết 1 hero hoặc 1 ceep của team khác thì hero đó sẽ dc 1 lượng exp = 2% số máu của thằng bị giết
    và 3 cái nữa cũng giống cái kia nhưng thay vì nhận exp thì nhận Int , str ,agi

    Tham gia : 2012-07-15
    Bài gửi : 174
    Uy tín : 25
    Coins : 408
    Biệt Danh : ChonTanh
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    dackro123

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    spell em mới làm, có ji sai mong các pro khách phục
    Code:
    Clap Kizaru
        Events
            Unit - A unit Starts the effect of an ability
        Conditions
            (Ability being cast) Equal to Light Dome
        Actions
            Set Unitt_Skill[2] = (Casting unit)
            Set Pointt_Skill[3] = (Target point of ability being cast)
            Set Dmgg_Skill[2] = ((Real((Level of Light Dome  for Unitt_Skill[1]))) x (Real((Agility of Unitt_Skill[1] (Include bonuses)))))
            Set Groupp_Skill[2] = (Units within 800.00 of Pointt_Skill[3] matching ((((Matching unit) belongs to an enemy of Player 10 (Light Blue)) Equal to True) and (((Matching unit) is dead) Equal to False)))
            For each (Integer A) from 1 to 3, do (Actions)
                Loop - Actions
                    Unit - Pause Unitt_Skill[2]
                    Animation - Change Unitt_Skill[2]'s animation speed to 100.00% of its original speed
                    Special Effect - Create a special effect at (Position of Unitt_Skill[2]) using ManaBurst.mdx
                    Special Effect - Destroy (Last created special effect)
                    Special Effect - Create a special effect attached to the weapon of Unitt_Skill[2] using Abilities\Weapons\ZigguratMissile\ZihhuratMissile.mdl
                    Unit - Add Crow Form to Unitt_Skill[2]
                    Wait 0.01 seconds
                    Unit - Remove Crow Form from Unitt_Skill[2]
                    Wait 0.01 seconds
                    Animation - Play Unitt_Skill[2]'s Spell animation
                    Wait 0.01 seconds
                    Animation - Play Unitt_Skill[2]'s Spell animation
                    Animation - Change Unitt_Skill[2] flying height to 600.00 at 900.00
                    Unit - Create 1 Explosion Dummy 1 for Player 10 (Light Blue) at (Position of Unitt_Skill[2]) facing 270.00 degrees
                    Unit - Add Light Dome  to (Last created unit)
                    Wait 0.01 seconds
                    Unit - Remove (Last created unit) from the game
                    Animation - Change Unitt_Skill[2] flying height to 0.00 at 700.00
                    Animation - Play Unitt_Skill[2]'s stand animation
                    Wait 0.01 seconds
                    Animation - Play Unitt_Skill[2]'s Spell animation
                    Wait 0.01 seconds
                    Animation - Play Unitt_Skill[2]'s Spell animation
                    Wait 0.01 seconds
                    Special Effect - Destroy (Last created special effect)
                    Unit Group - Pick every unit in Groupp_Skill[2] and do (Actions)
                        Loop - Actions
                            Unit - Cause Unitt_Skill[1] to damage (Picked unit), dealing Dmgg_Skill[1] damage of attack type Chaos and damage type Lightning
                            Unit - Create 1 Dummy 1 for (Owner of Unitt_Skill[2]) at (Position of Unitt_Skill[2]) facing Default building facing degrees
                            Wait 0.10 seconds
                            Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                            Unit - Add Light Dome  to (Last created unit)
                            Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
                            Special Effect - Create a special effect at (Position of Unitt_Skill[2]) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                            Unit - Unpause Unitt_Skill[2]
                            Unit - Remove (Last created unit) from the game
                            Special Effect - Destroy (Last created special effect)
                            Custom script:  call RemoveLocation(udg_Pointt_Skill[2])
                            Custom script:  call DestroyGroup(udg_Groupp_Skill[2])
    hình ảnh sau khi cast nó bị đứng im ko ra skill để mà chới tiếp đợi 5 phút rùi
    [img]Topic hỏi đáp về cách tạo Warcraft III - Page 41 14701234 [/img]

    Tham gia : 2012-05-20
    Bài gửi : 415
    Uy tín : 72
    Coins : 942
    Biệt Danh : 19101994
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    19101994

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    scope: http://www.wc3c.net/vexorian/jasshelpermanual.html công dụng cũng tựa tựa (gần giống chứ ko phải y chang) như library nhưng dc cái gọi hàm = string khá tiện lợi và có vẻ xài tốt hơn library nên rất nhiều ng` ưa xài. để biết thêm chi tiết liên hệ web trên rolling on the floor

    Tham gia : 2012-05-03
    Bài gửi : 81
    Uy tín : 3
    Coins : 166
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    avatar

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    mấy anh ơi Xem dùm em đoạn Jass Em vừa làm có bị lỗi gì k
    Code:
    globals
            private group enumGroup = CreateGroup()
           
            private Event onStaminaChange
        endglobals
       
        private keyword Stamina
        private keyword add
        private keyword remove
        private keyword added
       
        struct StaminaUnits extends array
            readonly boolean added
            readonly thistype next
            readonly thistype prev
           
            method add takes nothing returns nothing
                if (added) then
                    return
                endif
               
                set added = true
                set prev = thistype(0).prev
                set next = 0
                set thistype(0).prev.next = this
                set thistype(0).prev = this
            endmethod
           
            method remove takes nothing returns nothing
                if (not added) then
                    return
                endif
               
                set added = false
           
                set prev.next = next
                set next.prev = prev
            endmethod
        endstruct
       
        private struct StationaryList extends array
            readonly boolean added
            readonly thistype next
            readonly thistype prev
           
            method add takes nothing returns nothing
                if (added or IsUnitNativelyMovingById(this)) then
                    return
                endif
               
                set added = true
                set prev = thistype(0).prev
                set next = 0
                set thistype(0).prev.next = this
                set thistype(0).prev = this
               
                call StaminaUnits(this).add()
            endmethod
           
            method remove takes nothing returns nothing
                if (not added) then
                    return
                endif
               
                set added = false
           
                set prev.next = next
                set next.prev = prev
               
                call StaminaUnits(this).remove()
            endmethod
        endstruct
       
        private struct MovementList extends array
            readonly boolean added
            readonly thistype next
            readonly thistype prev
           
            method add takes nothing returns nothing
                if (added or not IsUnitNativelyMovingById(this)) then
                    return
                endif
               
                set added = true
                set prev = thistype(0).prev
                set next = 0
                set thistype(0).prev.next = this
                set thistype(0).prev = this
               
                call StaminaUnits(this).add()
            endmethod
           
            method remove takes nothing returns nothing
                if (not added) then
                    return
                endif
               
                set added = false
               
                set prev.next = next
                set next.prev = prev
               
                call StaminaUnits(this).remove()
            endmethod
        endstruct
       
        private struct Stamina extends array
            private real valueT
            private real regenT
            private real costT
            private real maxT
           
            method operator value takes nothing returns real
                return valueT
            endmethod
           
            method operator value= takes real v returns nothing
                if (v > maxT) then
                    set valueT = maxT
                    return
                endif
               
                if (0 > v) then
                    set valueT = 0
                    return
                endif
               
                set valueT = v
            endmethod
           
            method operator regen takes nothing returns real
                return regenT
            endmethod
            method operator regen= takes real v returns nothing
                set regenT = v
               
                if (0 == v or 0 == maxT) then
                    call StationaryList(this).remove()
                else
                    call StationaryList(this).add()
                endif
            endmethod
           
            method operator cost takes nothing returns real
                return costT
            endmethod
            method operator cost= takes real v returns nothing
                set costT = v
               
                if (0 == v or 0 == maxT) then
                    call MovementList(this).remove()
                else
                    call MovementList(this).add()
                endif
            endmethod
           
            method operator max takes nothing returns real
                return maxT
            endmethod
            method operator max= takes real v returns nothing
                set maxT = v
               
                if (0 == v) then
                    call MovementList(this).remove()
                    call StationaryList(this).remove()
                else
                    call MovementList(this).add()
                    call StationaryList(this).add()
                endif
            endmethod
        endstruct
       
        private struct StaminaType extends array
            private static Table regenT
            private static Table costT
            private static Table maxT
           
            private static method onInit takes nothing returns nothing
                set regenT = Table.create()
                set costT = Table.create()
                set maxT = Table.create()
            endmethod
           
            method operator regen takes nothing returns real
                return regenT.real[this]
            endmethod
            method operator regen= takes real new returns nothing
                local unit u
                local real old = regen
                local Stamina stamina
               
                set regenT.real[this] = new
               
                call GroupEnumUnitsOfType(enumGroup, GetObjectName(this), null)
                loop
                    set u = FirstOfGroup(enumGroup)
                    exitwhen null == u
                   
                    call GroupRemoveUnit(enumGroup, u)
                   
                    set stamina = GetUnitUserData(u)
                   
                    set stamina.regen = stamina.regen + new - old
                endloop
            endmethod
           
            method operator cost takes nothing returns real
                return costT.real[this]
            endmethod
            method operator cost= takes real new returns nothing
                local unit u
                local real old = cost
                local Stamina stamina
               
                set costT.real[this] = new
               
                call GroupEnumUnitsOfType(enumGroup, GetObjectName(this), null)
                loop
                    set u = FirstOfGroup(enumGroup)
                    exitwhen null == u
                   
                    call GroupRemoveUnit(enumGroup, u)
                   
                    set stamina = GetUnitUserData(u)
                   
                    set stamina.cost = stamina.cost + new - old
                endloop
            endmethod
           
            method operator max takes nothing returns real
                return maxT.real[this]
            endmethod
            method operator max= takes real new returns nothing
                local unit u
                local real old = max
                local Stamina stamina
               
                set maxT.real[this] = new
               
                call GroupEnumUnitsOfType(enumGroup, GetObjectName(this), null)
                loop
                    set u = FirstOfGroup(enumGroup)
                    exitwhen null == u
                   
                    call GroupRemoveUnit(enumGroup, u)
                   
                    set stamina = GetUnitUserData(u)
                   
                    set stamina.max = stamina.max + new - old
                endloop
            endmethod
        endstruct
       
        private struct StaminaTypePlayer extends array
            private Table regenT
            private Table costT
            private Table maxT
           
            private static method onInit takes nothing returns nothing
                local thistype this = 15
               
                loop
                    set regenT = Table.create()
                    set costT = Table.create()
                    set maxT = Table.create()
               
                    exitwhen 0 == this
                    set this = this - 1
                endloop
            endmethod
           
            method getRegen takes integer unitTypeId returns real
                return regenT.real[unitTypeId]
            endmethod
            method setRegen takes integer unitTypeId, real new returns nothing
                local unit u
                local real old = getRegen(unitTypeId)
                local Stamina stamina
               
                set regenT.real[unitTypeId] = new
               
                call GroupEnumUnitsOfPlayer(enumGroup, Player(this), null)
                loop
                    set u = FirstOfGroup(enumGroup)
                    exitwhen null == u
                   
                    call GroupRemoveUnit(enumGroup, u)
                   
                    if (GetUnitTypeId(u) == unitTypeId) then
                        set stamina = GetUnitUserData(u)
                       
                        set stamina.regen = stamina.regen + new - old
                    endif
                endloop
            endmethod
           
            method getCost takes integer unitTypeId returns real
                return costT.real[unitTypeId]
            endmethod
            method setCost takes integer unitTypeId, real new returns nothing
                local unit u
                local real old = getCost(unitTypeId)
                local Stamina stamina
               
                set costT.real[unitTypeId] = new
               
                call GroupEnumUnitsOfPlayer(enumGroup, Player(this), null)
                loop
                    set u = FirstOfGroup(enumGroup)
                    exitwhen null == u
                   
                    call GroupRemoveUnit(enumGroup, u)
                   
                    if (GetUnitTypeId(u) == unitTypeId) then
                        set stamina = GetUnitUserData(u)
                       
                        set stamina.cost = stamina.cost + new - old
                    endif
                endloop
            endmethod
           
            method getMax takes integer unitTypeId returns real
                return maxT.real[unitTypeId]
            endmethod
            method setMax takes integer unitTypeId, real new returns nothing
                local unit u
                local real old = getMax(unitTypeId)
                local Stamina stamina
               
                set maxT.real[unitTypeId] = new
               
                call GroupEnumUnitsOfPlayer(enumGroup, Player(this), null)
                loop
                    set u = FirstOfGroup(enumGroup)
                    exitwhen null == u
                   
                    call GroupRemoveUnit(enumGroup, u)
                   
                    if (GetUnitTypeId(u) == unitTypeId) then
                        set stamina = GetUnitUserData(u)
                       
                        set stamina.max = stamina.max + new - old
                    endif
                endloop
            endmethod
        endstruct
       
        private struct Core extends array
            private static method onUnitStationary takes nothing returns boolean
                local Stamina stamina = GetMovingUnitById()
               
                call MovementList(stamina).remove()
                if (0 != stamina.regen and 0 != stamina.max) then
                    call StationaryList(stamina).add()
                endif
               
                return false
            endmethod
           
            private static method onUnitMove takes nothing returns boolean
                local Stamina stamina = GetMovingUnitById()
               
                call StationaryList(stamina).remove()
                if (0 != stamina.cost and 0 != stamina.max) then
                    call MovementList(stamina).add()
                endif
               
                return false
            endmethod
           
            private static method onUnitActive takes nothing returns boolean
                local Stamina stamina = GetUnitTypeId(GetUnitById(GetMovingUnitById()))
               
                if (0 != stamina.regen and 0 != stamina.max) then
                    call StationaryList(stamina).add()
                endif
               
                if (0 != stamina.cost and 0 != stamina.max) then
                    call MovementList(stamina).add()
                endif
               
                return false
            endmethod
           
            private static method onUnitInactive takes nothing returns boolean
                local Stamina stamina = GetUnitTypeId(GetUnitById(GetMovingUnitById()))
               
                call MovementList(stamina).remove()
                call StationaryList(stamina).remove()
               
                return false
            endmethod
       
            private static method onIndex takes nothing returns boolean
                local StaminaTypePlayer owningPlayer = GetPlayerId(GetOwningPlayer(GetIndexedUnit()))
                local Stamina stamina = GetUnitUserData(GetIndexedUnit())
                local StaminaType staminaType = GetUnitTypeId(GetIndexedUnit())
               
                set stamina.cost = staminaType.cost + owningPlayer.getCost(staminaType)
                set stamina.regen = staminaType.regen + owningPlayer.getRegen(staminaType)
                set stamina.max = staminaType.max + owningPlayer.getMax(staminaType)
           
                return false
            endmethod
       
            private static method onInit takes nothing returns nothing
                call StationaryUnits.event.register(Condition(function thistype.onUnitStationary))
                call NativelyMovingUnits.event.register(Condition(function thistype.onUnitMove))
                call MovementTracker.eventIndex.register(Condition(function thistype.onUnitActive))
                call MovementTracker.eventDeindex.register(Condition(function thistype.onUnitInactive))
               
                call RegisterUnitIndexEvent(Condition(function thistype.onIndex), UnitIndexer.INDEX)
               
                set onStaminaChange = Event.create()
            endmethod
        endstruct
       
        private struct StaminaLoss extends array
            implement CT32
                local MovementList moving = MovementList(0).next
                local StationaryList stationary = StationaryList(0).next
                local Stamina stamina
               
                loop
                    exitwhen 0 == moving
                   
                    set stamina = moving
                   
                    if (0 < stamina.value) then
                        set stamina.value = stamina.value - stamina.cost*.03125
                    endif
                   
                    set moving = moving.next
                endloop
               
                loop
                    exitwhen 0 == stationary
                   
                    set stamina = stationary
                   
                    if (stamina.value < stamina.max) then
                        set stamina.value = stamina.value + stamina.regen*.03125
                    endif
                   
                    set stationary = stationary.next
                endloop
            implement CT32End
           
            private static method onInit takes nothing returns nothing
                call StaminaLoss.start()
            endmethod
        endstruct
       
        function SetUnitStaminaById takes UnitIndex index, real value returns nothing
            set Stamina(index).value = value
        endfunction
        function SetUnitStaminaRegenById takes UnitIndex index, real value returns nothing
            set Stamina(index).regen = value
        endfunction
        function SetUnitStaminaCostById takes UnitIndex index, real value returns nothing
            set Stamina(index).cost = value
        endfunction
        function SetUnitStaminaMaxById takes UnitIndex index, real value returns nothing
            set Stamina(index).max = value
        endfunction
       
        function GetUnitStaminaById takes UnitIndex index returns real
            return Stamina(index).value
        endfunction
        function GetUnitStaminaRegenById takes UnitIndex index returns real
            return Stamina(index).regen
        endfunction
        function GetUnitStaminaCostById takes UnitIndex index returns real
            return Stamina(index).cost
        endfunction
        function GetUnitStaminaMaxById takes UnitIndex index returns real
            return Stamina(index).max
        endfunction
       
        function SetUnitTypeStaminaRegen takes integer unitTypeId, real value returns nothing
            set StaminaType(unitTypeId).regen = value
        endfunction
        function SetUnitTypeStaminaCost takes integer unitTypeId, real value returns nothing
            set StaminaType(unitTypeId).cost = value
        endfunction
        function SetUnitTypeStaminaMax takes integer unitTypeId, real value returns nothing
            set StaminaType(unitTypeId).max = value
        endfunction
       
        function GetUnitTypeStaminaRegen takes integer unitTypeId returns real
            return StaminaType(unitTypeId).regen
        endfunction
        function GetUnitTypeStaminaCost takes integer unitTypeId returns real
            return StaminaType(unitTypeId).cost
        endfunction
        function GetUnitTypeStaminaMax takes integer unitTypeId returns real
            return StaminaType(unitTypeId).max
        endfunction
       
        function SetUnitTypeStaminaRegenForPlayer takes integer unitTypeId, integer playerId, real value returns nothing
            call StaminaTypePlayer(playerId).setRegen(unitTypeId, value)
        endfunction
        function SetUnitTypeStaminaCostForPlayer takes integer unitTypeId, integer playerId, real value returns nothing
            call StaminaTypePlayer(playerId).setCost(unitTypeId, value)
        endfunction
        function SetUnitTypeStaminaMaxForPlayer takes integer unitTypeId, integer playerId, real value returns nothing
            call StaminaTypePlayer(playerId).setMax(unitTypeId, value)
        endfunction
       
        function GetUnitTypeStaminaRegenForPlayer takes integer unitTypeId, integer playerId returns real
            return StaminaTypePlayer(playerId).getRegen(unitTypeId)
        endfunction
        function GetUnitTypeStaminaCostForPlayer takes integer unitTypeId, integer playerId returns real
            return StaminaTypePlayer(playerId).getCost(unitTypeId)
        endfunction
        function GetUnitTypeStaminaMaxForPlayer takes integer unitTypeId, integer playerId returns real
            return StaminaTypePlayer(playerId).getMax(unitTypeId)
        endfunction
    endlibrary

    Tham gia : 2012-05-20
    Bài gửi : 415
    Uy tín : 72
    Coins : 942
    Biệt Danh : 19101994
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    19101994

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    dài kinh... và nhìn rất bá đạo nên xin miễn cmt, đề nghị chuyển qua gamevn :- cho mấy cụ siêng năng thích làm việc coi
    rolling on the floor rolling on the floor

    Tham gia : 2012-05-03
    Bài gửi : 81
    Uy tín : 3
    Coins : 166
    Bài viết đã tạo Kết bạn ChặnXem nội dụng của người này trong mục
    avatar

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    K phãi em muốn hỏi mấy anh test thử xem skill đó có lỗi gì khi play game k a`

    Re: Topic hỏi đáp về cách tạo Warcraft III Topic hỏi đáp về cách tạo Warcraft III - Page 41 Empty

    Hướng dẫn tạo map

    Go to page : Previous  1 ... 22 ... 40, 41, 42 ... 47 ... 54  Next

    Permissions in this forum:
    You cannot reply to topics in this forum