Topic hỏi đáp về cách làm map | version 9

Status
Không mở trả lời sau này.
Bạn thử downloadcái này về rồi cài đặt. Sau đó, download bộ công cụ
này về cài xem có chạy được không. Nếu không được nữa thì mình pótay.

Không được bạn ui cái NET đó máy tui có rùi cài vô nó bảo đã cài đặt không cần cài lại, còn XDP cũng đã cài rùi, dù sao cũng thanks
 
bạn xem thử có cài phần mềm diệt virut hk, nếu có thì tắt đi, sau đó rs lại máy vào mở lại JNP thử
 
Không mình đã tắt hết chương trình diệt virus rùi vả lại mình bảo là atl+ctrl+del trong Processes thì nó vẫn chạy mà chứ đâu có bị chương trình virus chặn ko cho chạy đâu, chỉ có điều chẳng hiểu sao bên ngoài nó chả hiện cái gì ra làm mình cũng chả biết rằng nó bị cái gì
 
Ai cho mình xin strigger win của map loại hero defense với? Mình vẫn chưa biết lúc nào thì thắng.
 
Ai cho mình xin strigger win của map loại hero defense với? Mình vẫn chưa biết lúc nào thì thắng.

Chọn dòng Unit - Specific Unit Event trong GUI, nếu là Win thì chọn unit die là nhà chính của enemy hay con boss cuối của nó, Action là Game - Victory nếu là đánh team thì Loop cho nhìu Player đồng đội cùng win

Lose thì chọn unit die là thứ mà mình cần bảo vệ, Action là Game - Defeat đánh team thì cho Loop vào cho đồng đội cùng thua

Đơn giản là vậy còn màu mè thêm thì tùy bạn
 
19101994[K]uro;18402844 nói:
Hình như bạn không đọc kĩ faustviii mình có đk % hồi sinh kìa:
(Random integer number between 1 and 100) Less than or equal to Phan_tram_hoi_sinh

sao ko ném lên phần condition đầu tiên !??Khác gì nhau đâu
ném lên tiết kiệm hơn bao nhiêu !?
 
Giúp em spell này: khi active thì unit nhận damage = 0 của các unit hay hero tay dài khi Atk Thanks nhìu
 
ai chỉ mình làm lệnh 0ms như dota với và -as là attack speed hiện attack speed
 
bạn chỉ nên làm MS thôi, as là phải tính toán, dựa vào agi, attack speed base trong Object editor và không tính được item :))

Còn về MS thì đây
Bao nhiu người chơi thêm bấy nhiu cái event :)
Mã:
Movespeed Command
    Events
        Player - Player 1 (Red) types a chat message containing -ms as An exact match
        Player - Player 2 (Blue) types a chat message containing -ms as An exact match
        Player - Player 3 (Teal) types a chat message containing -ms as An exact match
        Player - Player 4 (Purple) types a chat message containing -ms as An exact match
        Player - Player 5 (Yellow) types a chat message containing -ms as An exact match
        Player - Player 6 (Orange) types a chat message containing -ms as An exact match
    Conditions
    Actions
        Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
            Loop - Actions
                Game - Display to (All players controlled by a ((Triggering player) controller) player) for 30.00 seconds the text: (((Proper name of (Picked unit)) +  ms = ) + (String((Current movement speed of (Picked unit)))))
 
Chỉnh sửa cuối:
Cho mình hỏi: làm sao để mình đánh thằng lính thì sau khi đánh chết nó là mình được gold và wood?
 
Giết lính đc gold:
Mã:
Gold
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Player - Turn Gives bounty On for (Picked player)
Muốn đc nhiêu vàng thì F6 vào phần thông tin của từng con unit mà đặt tiền, tìm đến 3 dòng Start - Bonuty Awarded, ví dụ muốn giết con đó đc 50 vàng, thì chỉnh 3 dòng như sau (50-0-0) 3 dòng theo thứ tự từ trên xuống.
2 dòng còn lại, là để tiền ở chế độ random, mà công thức tính randon tiền như thế nào tui cũng chịu :|
Giết lính đc gỗ:
Mã:
Lumber
    Events
        Unit - A unit Dies
    Conditions
    Actions
        Player - Add 1 to (Owner of (Killing unit)) Current lumber
Muốn đc nhiêu gỗ thì sửa số 1 thành số mình thix.
 
Chỉnh sửa cuối:
giết lính được gỗ sao phải dùng trigger trong khi có: Stats - Lumber Bounty Awarded ?

chỉnh base, dice, side thì: xem trong này
 
Mã:
library AttributeSystem initializer Init_AttributeSystem needs CSSafety

//***************************************************************************
//*                                                                         *
//* Attribute System v4                                                     *
//* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯               **URL in the works                    *
//* Requires:                                                               *
//* ¯¯¯¯¯¯¯¯¯                                                               *
//*                                                                         *
//* - A vJASS Preprocessor                                                  *
//* - CSSafety library                                                      *
//*                                                                         *
//* - The custom items and abilities found in this map                      *
//* - Updated rawcodes for the aforementioned objects                       * 
//*                                                                         *
//***************************************************************************


globals  
//Config. Options\\     
    // Attribute(Attribute System) ability rawcode
    private constant integer AS_Abil = 'A00i'
    // Blank item rawcode 
    private constant integer AS_Blank = 'I000'
    // Cancel item rawcode
    private constant integer AS_Cancel = 'I001'
    // Number of stat points remaining item rawcode
    private constant integer AS_Att = 'I005'
    // Increment Strength item rawcode
    private constant integer AS_Str = 'I004'
    // Increment Agility item rawcode
    private constant integer AS_Agi = 'I002'
    // Increment Intelligence item rawcode
    private constant integer AS_Int = 'I003'   

//Do not touch past here unless you pain for death!!\\
    private item array AS_I0
    private item array AS_I1
    private item array AS_I2
    private item array AS_I3
    private item array AS_I4
    private item array AS_I5
    private item array AS_IAtt0
    private item array AS_IAtt1
    private item array AS_IAtt2
    private item array AS_IAtt3
    private item array AS_IAtt4
    private item array AS_IAtt5
    
    private integer array AS_PointsPerLevel
    private integer array AS_LastLevel
    private integer array AS_Points
    private boolean array AS_Enabled    
    private boolean array AS_On
    
    private unit AS_Hero
endglobals


//**Library of functions**\\

//Enable system for hero
function AS_Enable takes unit u, integer i returns nothing
    local integer id = GetPlayerId(GetOwningPlayer(u))
    
    if AS_Enabled[id] then
        call BJDebugMsg("Error: "+GetPlayerName(GetOwningPlayer(u))+" already has the system running.")
        return
    endif
    
    set AS_I0[id] = CreateItem(AS_Str,0,0)
    call SetItemVisible(AS_I0[id],false)
    
    set AS_I1[id] = CreateItem(AS_Att,0,0)
    call SetItemVisible(AS_I1[id],false)
    
    set AS_I2[id] = CreateItem(AS_Agi,0,0)
    call SetItemVisible(AS_I2[id],false)
    
    set AS_I3[id] = CreateItem(AS_Blank,0,0)
    call SetItemVisible(AS_I3[id],false)
    
    set AS_I4[id] = CreateItem(AS_Int,0,0)
    call SetItemVisible(AS_I4[id],false)
    
    set AS_I5[id] = CreateItem(AS_Cancel,0,0)
    call SetItemVisible(AS_I5[id],false)
    call SetItemDroppable(AS_I5[id],false)
    
    set AS_LastLevel[id] = GetHeroLevel(u)
    set AS_Enabled[id] = true
    set AS_PointsPerLevel[id] = i
endfunction

//When the hero levels up
private function AS_Level takes unit u returns nothing
    local integer points
    local integer id = GetPlayerId(GetOwningPlayer(u))
    
    if AS_Enabled[id]==true then
        set points = ((GetHeroLevel(u)-AS_LastLevel[id])*AS_PointsPerLevel[id])+AS_Points[id]
        set AS_LastLevel[id] = GetHeroLevel(u)
        if GetUnitAbilityLevel(u,AS_Abil)<1 and AS_On[id]==false then
            call UnitAddAbility(u,AS_Abil) 
            call UnitMakeAbilityPermanent(u,true,AS_Abil)
        endif
        if AS_On[id]==true then
            call SetItemCharges(AS_I1[id],points)
        endif
        set AS_Points[id] = points
        call IssueImmediateOrder(u,"replenishon") 
    endif  
endfunction

//Swap the inventory
private function AS_SwapInv takes unit u, integer whichway returns nothing
    local integer id = GetPlayerId(GetOwningPlayer(u))
    local item it
    
    if whichway==1 then
        set AS_IAtt0[id] = UnitRemoveItemFromSlot(u,0)
        call SetItemVisible(AS_IAtt0[id],false)
        call SetItemVisible(AS_I0[id],true)
        call UnitAddItem(u,AS_I0[id])
        
        set AS_IAtt1[id] = UnitRemoveItemFromSlot(u,1)
        call SetItemVisible(AS_IAtt1[id],false)
        call SetItemCharges(AS_I1[id],AS_Points[id])
        call SetItemVisible(AS_I1[id],true)
        call UnitAddItem(u,AS_I1[id])
        
        set AS_IAtt2[id] = UnitRemoveItemFromSlot(u,2)
        call SetItemVisible(AS_IAtt2[id],false)
        call SetItemVisible(AS_I2[id],true)
        call UnitAddItem(u,AS_I2[id])
        
        set AS_IAtt3[id] = UnitRemoveItemFromSlot(u,3)
        call SetItemVisible(AS_IAtt3[id],false)
        call SetItemVisible(AS_I3[id],true)
        call UnitAddItem(u,AS_I3[id])
        
        set AS_IAtt4[id] = UnitRemoveItemFromSlot(u,4)
        call SetItemVisible(AS_IAtt4[id],false)
        call SetItemVisible(AS_I4[id],true)
        call UnitAddItem(u,AS_I4[id])
        
        set AS_IAtt5[id] = UnitRemoveItemFromSlot(u,5)
        call SetItemVisible(AS_IAtt5[id],false)
        call SetItemVisible(AS_I5[id],true)
        call UnitAddItem(u,AS_I5[id])
        
        set AS_On[id] = true
    else
        set it = UnitRemoveItemFromSlot(u,0)
        call SetItemVisible(it,false)
        call SetItemVisible(AS_IAtt0[id],true)
        call UnitAddItem(u,AS_IAtt0[id])
        
        set it = UnitRemoveItemFromSlot(u,1)
        call SetItemVisible(it,false)
        call SetItemVisible(AS_IAtt1[id],true)
        call UnitAddItem(u,AS_IAtt1[id])
        
        set it = UnitRemoveItemFromSlot(u,2)
        call SetItemVisible(it,false)
        call SetItemVisible(AS_IAtt2[id],true)
        call UnitAddItem(u,AS_IAtt2[id])
        
        set it = UnitRemoveItemFromSlot(u,3)
        call SetItemVisible(it,false)
        call SetItemVisible(AS_IAtt3[id],true)
        call UnitAddItem(u,AS_IAtt3[id])
        
        set it = UnitRemoveItemFromSlot(u,4)
        call SetItemVisible(it,false)
        call SetItemVisible(AS_IAtt4[id],true)
        call UnitAddItem(u,AS_IAtt4[id])
        
        set it = UnitRemoveItemFromSlot(u,5)
        call SetItemVisible(it,false)
        call SetItemVisible(AS_IAtt5[id],true)
        call UnitAddItem(u,AS_IAtt5[id])
        
        set AS_On[id] = false
    endif    
    
    set it = null
endfunction

//Returns what slot the item is in
private function AS_GetItemSlot takes unit hero, item it returns integer
    local integer i = 0
	
    loop
        exitwhen i==6
        if UnitItemInSlot(hero,i)==it then
            return i
        endif
        set i = i + 1
    endloop
	
    return -1
endfunction

//**Working Functions**\\

//Add attribute option when the hero levels
private function AS_level_Actions takes nothing returns nothing
    call AS_Level(GetTriggerUnit())
endfunction

//Swap inventory for the hero when needed
private function AS_TRO_Child takes nothing returns nothing
    call IssueImmediateOrder(AS_Hero,"replenishon")
    call IssueImmediateOrder(AS_Hero,"replenishlifeoff")
    
    call ReleaseTimer(GetExpiredTimer() )
endfunction
private function AS_TRO takes unit hero returns nothing
    set AS_Hero = hero
    call TimerStart(NewTimer(),0.,false,function AS_TRO_Child)
endfunction 
private function AS_inven_Actions takes nothing returns nothing
    local unit hero = GetTriggerUnit()
    local integer order = GetIssuedOrderId()
    local integer temp = 0
    
    if not IsUnitType(hero,UNIT_TYPE_HERO) then
        set hero = null
        return
    endif
    if order==OrderId("replenish") then
        call UnitRemoveAbility(hero,AS_Abil)
        call AS_SwapInv(hero,1)
    elseif order==OrderId("replenishoff") then
        call AS_TRO(hero)
    endif 
	
    set hero = null
endfunction

//Add attributes when selected
private function AS_att_Actions takes nothing returns nothing
    local unit hero = GetManipulatingUnit()
    local item used = GetManipulatedItem()
    local integer id = GetPlayerId(GetOwningPlayer(hero))
    local integer array temp
	
    if not AS_On[id] then
        set hero = null
        set used = null
        return
    endif
    set temp[0] = AS_GetItemSlot(hero,used)
    set temp[1] = AS_Points[id]-1
    if temp[0]!=5 or temp[1]<0 then
        call ModifyHeroStat( temp[0]/2,hero,bj_MODIFYMETHOD_ADD,1)
        set AS_Points[id] = temp[1]
        call SetItemCharges(AS_I1[id],temp[1])
        if temp[1]==0 then
            call AS_SwapInv(hero,0)
        endif
    elseif temp[1]>=0 then
        call AS_SwapInv(hero,0)
        call UnitAddAbility(hero,AS_Abil)
        call UnitMakeAbilityPermanent(hero,true,AS_Abil)
        call IssueImmediateOrder(hero,"replenishon")
    else
        call AS_SwapInv(hero,0)
    endif
	
    set hero = null
    set used = null
endfunction

//===========================================================================
private function Init_AttributeSystem takes nothing returns nothing
    local trigger level = CreateTrigger() 
    local trigger inven = CreateTrigger() 
    local trigger att = CreateTrigger()     
    
    call TriggerRegisterAnyUnitEventBJ(level, EVENT_PLAYER_HERO_LEVEL )
    call TriggerAddAction( level, function AS_level_Actions )
    
    call TriggerRegisterAnyUnitEventBJ( inven, EVENT_PLAYER_UNIT_ISSUED_ORDER )
    call TriggerRegisterAnyUnitEventBJ( inven, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
    call TriggerRegisterAnyUnitEventBJ( inven, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
    call TriggerAddAction( inven, function AS_inven_Actions )
    
    call TriggerRegisterAnyUnitEventBJ( att, EVENT_PLAYER_UNIT_USE_ITEM )
    call TriggerAddAction( att, function AS_att_Actions )
endfunction   

endlibrary
System Attribute v4 e tìm đc trên the helper, copied vào k có lỗi gì, đã chỉnh sửa rawcode đúng, nhưng sao khi vào test lại không đc :((. Ở map demo lên 1 cấp sẽ add AS_Abil vào cho người chơi, bấm vào sẽ hiện 1 Inv mới vào chứa các điểm Attribute, nhưng của e khi lên cấp chẳng có chuyện gì xảy ra, ai bjk sai chỗ nào giúp với :((. Nếu cần mình sẽ đưa map cho sửa
 
vấn đầ là trước khi dùng JNGP, mình để player 9 và 10 là cumputer binthu7o7nfg2. nhưng từ khi xài JNGP save map lại, vào game thì player 9 và player 10 Open.........
có ai bít tại sao k?
 
Cho mình hỏi:
1. Cái icon của mình tại sao khi vào game nó lại thành ô màu xanh nhưng khi đến gần lại hiện hình. Mình biết là lỗi ở cái DISBTN nhưng không biết sai ở đâu.
2. Cho mình xin cái strigger để tạo con boss 1 sau 1 khoảng thời gian từ khi bắt đầu game. Và sau khi boss 1 die thì sau 1 khoảng thời gian boss xuất hiện. ( region tự đặt)
3. Cho mình xin cái strigger, sao cho mình giết 1 đám quái thì sau 30 giây, đám quái đó lại xuất hiện tại đó.
Thanks.
 
Cho mình hỏi:
1. Cái icon của mình tại sao khi vào game nó lại thành ô màu xanh nhưng khi đến gần lại hiện hình. Mình biết là lỗi ở cái DISBTN nhưng không biết sai ở đâu.
2. Cho mình xin cái strigger để tạo con boss 1 sau 1 khoảng thời gian từ khi bắt đầu game. Và sau khi boss 1 die thì sau 1 khoảng thời gian boss xuất hiện. ( region tự đặt)
3. Cho mình xin cái strigger, sao cho mình giết 1 đám quái thì sau 30 giây, đám quái đó lại xuất hiện tại đó.
Thanks.

1.---> Đến gần cái gì?
2. Unit - Create Boss for Player Neutral Hostile at đâu đó facing 270.0
Trigger thứ hai là
Events:Unit - A Unit Dies
Conditions:Unit-types of (Dying Unit) equal to Boss
Actions:
Unit - Create Boss for Player neutral at Random points in region(đâu đó) facing 270
3.---> Dùng system!PM mình đưa(Y!H:[email protected])
 
-muốn ep đồ giống như máp công thanh chiến ấy ( nhấn vào item sau đó nhấn vao thứ cần ép )
 
1.---> Đến gần cái gì?
2. Unit - Create Boss for Player Neutral Hostile at đâu đó facing 270.0
Trigger thứ hai là
Events:Unit - A Unit Dies
Conditions:Unit-types of (Dying Unit) equal to Boss
Actions:
Unit - Create Boss for Player neutral at Random points in region(đâu đó) facing 270
3.---> Dùng system!PM mình đưa(Y!H:[email protected])

1. Đến cái nhà bán item mà mình thay đổi model ấy. Nói chung là bị lỗi ở DISBTN thì sửa như thế nào?
 
Status
Không mở trả lời sau này.
Back
Top