Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Xem cái này.
nền ? đất có gì khác nhau ??cảm ơn bạn, mình làm theo bài viết bên đó nhưng nó chỉ giúp mình sử dụng nhiều loại nền thôi, mình muốn sử dụng được cả nhiều loại đất cơ, bạn có thể chỉ mình được không

Helpcho hỏi đoan code là là ntn vậycông dụng ntn
NeutralAttackAIMã://TESH.scrollpos=-1 //TESH.alwaysfold=0 function IsUnitNearUnit takes unit u1,unit u2 returns boolean local real x1=GetUnitX(u1) local real y1=GetUnitY(u1) local real x2=GetUnitX(u2) local real y2=GetUnitY(u2) local real distance=SquareRoot((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) local real MaxDistance=1200.//____________ __________, // __ _______ _______ _____ "______" ___ ____ _________ _____ return distance<=MaxDistance endfunction function IsUnitInHome takes unit u returns boolean local real x=GetUnitX(u) local real y=GetUnitY(u) local real tx=LoadReal(udg_ah,GetHandleId(u),StringHash("HomeX")) local real ty=LoadReal(udg_ah,GetHandleId(u),StringHash("HomeY")) local real distance=SquareRoot((tx - x) * (tx - x) + (ty - y) * (ty - y)) local real MaxDistance=1200.//____________ __________, // __ _______ _______ _____ "______" ___ __ ___ _____ ______ ______ return distance<MaxDistance endfunction function GetAggreUnit takes unit u,unit target,group gn returns unit local unit f local group g=CreateGroup() local real agre local real agre2 call GroupAddGroup(gn,g) loop set f=FirstOfGroup(g) exitwhen f==null set agre=LoadReal(udg_ah,GetHandleId(u),GetHandleId(f)) set agre2=LoadReal(udg_ah,GetHandleId(u),GetHandleId(target)) if agre>agre2 and IsUnitVisible(f,Player(PLAYER_NEUTRAL_PASSIVE)) and IsUnitNearUnit(f,u) and not IsUnitType(f,UNIT_TYPE_DEAD) and GetUnitState(f,UNIT_STATE_LIFE)>0.405 then set target=f endif call DisplayTextToForce( GetPlayersAll(), GetUnitName(f)+ " agre is "+R2S(agre)) call GroupRemoveUnit(g,f) endloop call DestroyGroup(g) set g=null set f=null return target endfunction function Trig_AttackTaken_Conditions takes nothing returns boolean return GetOwningPlayer(GetTriggerUnit()) == Player(PLAYER_NEUTRAL_PASSIVE) endfunction function GoHome_Remove takes nothing returns nothing local timer t=GetExpiredTimer() local integer id=GetHandleId(t) local unit u=LoadUnitHandle(udg_ah,id,0) local real x=GetUnitX(u) local real y=GetUnitY(u) local real tx=LoadReal(udg_ah,GetHandleId(u),StringHash("HomeX")) local real ty=LoadReal(udg_ah,GetHandleId(u),StringHash("HomeY")) local real distance=SquareRoot((tx - x) * (tx - x) + (ty - y) * (ty - y)) local trigger trg=LoadTriggerHandle(udg_ah,GetHandleId(u),StringHash("DamageTakenTrigger")) local real HomeDistance=100.//__________,_______ __ _______ _ ________ _______,_______ // _____ ______ ___ _ ________ ______ if distance<=HomeDistance then call EnableTrigger(trg) call PauseTimer(t) call DestroyTimer(t) call FlushChildHashtable(udg_ah,id) endif set u=null set t=null set trg=null endfunction function Agre_Remove takes nothing returns nothing local timer t=GetExpiredTimer() local integer id=GetHandleId(t) local integer i1=LoadInteger(udg_ah,id,0) local unit Attacker=LoadUnitHandle(udg_ah,id,1) local real Damage=LoadReal(udg_ah,id,2) local real DamageTaken=LoadReal(udg_ah,i1,GetHandleId(Attacker))-Damage local group DamageGroup=LoadGroupHandle(udg_ah,i1,StringHash("DamagedNeutralGroup")) if DamageTaken==0. then call GroupRemoveUnit(DamageGroup,Attacker) call SaveGroupHandle(udg_ah,i1,StringHash("DamagedNeutralGroup"),DamageGroup) endif call SaveReal(udg_ah,i1,GetHandleId(Attacker),DamageTaken) call PauseTimer(t) call DestroyTimer(t) call FlushChildHashtable(udg_ah,id) set DamageGroup=null set t=null set Attacker=null endfunction function Trig_DamageTaken_Conditions takes nothing returns boolean local trigger DamageCheck=GetTriggeringTrigger() local unit Damaged=LoadUnitHandle(udg_ah,GetHandleId(DamageCheck),0) local integer DamagedId=GetHandleId(Damaged) local unit Attacker=GetEventDamageSource() local integer AttackerId=GetHandleId(Attacker) local real Damage=GetEventDamage() local group DamagedNeutralGroup=LoadGroupHandle(udg_ah,DamagedId,StringHash("DamagedNeutralGroup")) local unit Target local real DamageTaken=LoadReal(udg_ah,DamagedId,AttackerId)+Damage local timer AgreRemoveTimer=CreateTimer() local integer Timerid=GetHandleId(AgreRemoveTimer) local timer GoHomeTimer local integer GoHomeTimerId local real AggreRemove=10.//_____,_____ _______ __________ ________ ____ _____ ___________ call SaveReal(udg_ah,DamagedId,AttackerId,DamageTaken) call DisplayTextToForce( GetPlayersAll(), "Damage is taken by "+GetUnitName(Attacker)+" is "+R2S(Damage)) call SaveInteger(udg_ah,Timerid,0,DamagedId) call SaveUnitHandle(udg_ah,Timerid,1,Attacker) call SaveReal(udg_ah,Timerid,2,Damage) call SaveReal(udg_ah,Timerid,3,0.) call TimerStart(AgreRemoveTimer,AggreRemove,false,function Agre_Remove) if GetUnitState(Damaged,UNIT_STATE_LIFE)<0.405 and IsUnitType(Damaged,UNIT_TYPE_DEAD) or Damage>GetUnitState(Damaged,UNIT_STATE_LIFE) then call TriggerClearConditions(DamageCheck) call DestroyTrigger(DamageCheck) call FlushChildHashtable(udg_ah,DamagedId) call FlushChildHashtable(udg_ah,GetHandleId(DamageCheck)) endif set Target=GetAggreUnit(Damaged,Attacker,DamagedNeutralGroup) if IsUnitInHome(Damaged) then if Target!=null then call IssueTargetOrder(Damaged,"attack",Target) call DisplayTextToForce( GetPlayersAll(), "Go to attack a "+GetUnitName(Target)) elseif Target==null then call IssuePointOrder(Damaged,"move",LoadReal(udg_ah,DamagedId,StringHash("HomeX")),LoadReal(udg_ah,DamagedId,StringHash("HomeY"))) call DisplayTextToForce( GetPlayersAll(), "Go home ") call DisableTrigger(DamageCheck) set GoHomeTimer=CreateTimer() set GoHomeTimerId=GetHandleId(GoHomeTimer) call SaveUnitHandle(udg_ah,GoHomeTimerId,0,Damaged) call TimerStart(GoHomeTimer,0.5,true,function GoHome_Remove) endif elseif not IsUnitInHome(Damaged) then call IssuePointOrder(Damaged,"move",LoadReal(udg_ah,DamagedId,StringHash("HomeX")),LoadReal(udg_ah,DamagedId,StringHash("HomeY"))) call DisplayTextToForce( GetPlayersAll(), "Go home ") call DisableTrigger(DamageCheck) set GoHomeTimer=CreateTimer() set GoHomeTimerId=GetHandleId(GoHomeTimer) call SaveUnitHandle(udg_ah,GoHomeTimerId,0,Damaged) call TimerStart(GoHomeTimer,0.5,true,function GoHome_Remove) endif set GoHomeTimer=null set AgreRemoveTimer=null set Damaged=null set Attacker=null set DamagedNeutralGroup=null set DamageCheck=null return true endfunction function Trig_AttackTaken_Actions takes nothing returns nothing local unit Damaged=GetTriggerUnit() local integer DamagedId=GetHandleId(Damaged) local unit Attacker=GetAttacker() local group DamagedNeutralGroup=LoadGroupHandle(udg_ah,DamagedId,StringHash("DamagedNeutralGroup")) local trigger DamageCheck local real DamagedX=GetUnitX(Damaged) local real DamagedY=GetUnitY(Damaged) local real PeriodicAttack=1.//______,_____ _______ _______ _____ ________ // ____ ___ _____,_____ ___ _______,_____ _______ ________ ____ if HaveSavedHandle(udg_ah,DamagedId,StringHash("DamagedNeutralGroup")) and not IsUnitInGroup(Attacker,DamagedNeutralGroup) then call GroupAddUnit(DamagedNeutralGroup,Attacker) call SaveGroupHandle(udg_ah,DamagedId,StringHash("DamagedNeutralGroup"),DamagedNeutralGroup) elseif not HaveSavedHandle(udg_ah,DamagedId,StringHash("DamagedNeutralGroup")) then set DamagedNeutralGroup=CreateGroup() call GroupAddUnit(DamagedNeutralGroup,Attacker) call SaveGroupHandle(udg_ah,DamagedId,StringHash("DamagedNeutralGroup"),DamagedNeutralGroup) call DisplayTextToForce( GetPlayersAll(), "DamageGroup Is Create") if not HaveSavedHandle(udg_ah,DamagedId,StringHash("DamageTakenTrigger")) then set DamageCheck=CreateTrigger() call TriggerRegisterUnitEvent( DamageCheck, Damaged, EVENT_UNIT_DAMAGED ) call TriggerRegisterTimerEvent(DamageCheck, PeriodicAttack, true) call TriggerAddCondition( DamageCheck, Condition( function Trig_DamageTaken_Conditions ) ) call SaveTriggerHandle(udg_ah,DamagedId,StringHash("DamageTakenTrigger"),DamageCheck) call SaveUnitHandle(udg_ah,GetHandleId(DamageCheck),0,Damaged) endif call SaveReal(udg_ah,DamagedId,StringHash("HomeX"),DamagedX) call SaveReal(udg_ah,DamagedId,StringHash("HomeY"),DamagedY) endif set Damaged=null set Attacker=null set DamagedNeutralGroup=null set DamageCheck=null endfunction //=========================================================================== function InitTrig_AttackTaken takes nothing returns nothing set gg_trg_AttackTaken = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_AttackTaken, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_AttackTaken, Condition( function Trig_AttackTaken_Conditions ) ) call TriggerAddAction( gg_trg_AttackTaken, function Trig_AttackTaken_Actions ) endfunction

làm thử rồi.. không có cách nàoMọi người cho hỏi, cái abilities Volcano của con Firelord, lúc ra skill thì có nguyên quả núi lửa, không biết có cách nào làm mất quả núi lửa này đc ko ?

mấy anh ơi!!! có ai biết làm cho 1 skill trông mờ đi k0. lam unit mờ di thì em biết nhưng làm skill mờ đi thì em chịu. skill mờ di tức là trông nó trong suốt ấy. vẫn ra skill nhưng có thể nhìn qua được ấy.
Hide
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to [Demon Hunter] Evasion
Actions
Set EvasionUnit[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
Set Evasion[(Player number of (Owner of (Triggering unit)))] = True
Set EvasionInt[(Player number of (Owner of (Triggering unit)))] = (Level of [Demon Hunter] Evasion for (Triggering unit))
Trigger - Run Hide effect <gen> (checking conditions)
Trigger - Turn on Hide effect <gen>
Hide effect
Events
Time - Every 0.20 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
Evasion[(Integer A)] Equal to True
Then - Actions
Animation - Change EvasionUnit[(Integer A)]'s vertex coloring to (100.00%, 100.00%, 100.00%) with (9.00 x (Real(EvasionInt[(Integer A)])))% transparency
Else - Actions
Do nothing
Ai biết khi đánh vào một cái nhà thì số dmg của nó lên 1s là 1200 thì mình sẽ được 1200 Gold (Giống troll & Elves ý )
?????
UnitTakeDamageEvent
Events
Time - Elapsed game time is 0.00 seconds
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A structure) Equal to True)) and do (Actions)
Loop - Actions
Unit Group - Add (Picked unit) to TakeDamGroup
Trigger - Add to Action <gen> the event (Unit - (Picked unit) Takes damage)
Action
Events
Conditions
Actions
Set DamageSource = (Damage taken)
Game - Display to (All players) the text: (String(DamageSource))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DamageSource Greater than or equal to 1200.00
Then - Actions
Player - Add (Integer(DamageSource)) to (Owner of (Damage source)) Current gold
Else - Actions
nền ? đất có gì khác nhau ??
hay mún import thêm vào
Help![]()
hỏi lại , mình đã thử cách của bạn gì gì ở trên cũng ko được :(Cho mình hỏi làm sao để khi học skill Spiked Carapace của Crypt Lord nó ko còn mọc ra mấy cái gai nữa , mình đã thử để trống phần buff và thử thay bằng buff khác nhưng ko được.
không, ý mình là cái loại đất khi dùng increase one nâng nó lên á, thường thì world editor chỉ cho chọn 1 cái, 1 cái có 2 loại trong đó, nếu bạn biết map element TD thì nó giống như vậy, sử dụng cùng lúc 8 loại đất, ai chỉ mình đi
Cần giúp đỡ có ai giúp kiểm tra dùm mình đoạn code này với.. không hiểu sao nó không hoạt động chút nào.. Ai rành Jass giúp mình nha.
set temp = FirstOfGroup(g)
set hpHero = GetUnitLifePercent(x)
loop
exitwhen temp == null
set hpTarget= GetUnitLifePercent(temp)
if hpTarget < 50 then
call IssueTargetOrderBJ(x,"attack",temp)
call GroupRemoveUnit(g,temp)
set temp = FirstOfGroup(g)
endif
call GroupRemoveUnit(g,temp)
set temp = FirstOfGroup(g)
endloop
loop
set temp = FirstOfGroup(g)
exitwhen temp == null
set hpTarget= GetUnitLifePercent(temp)
if hpTarget < 50 then
call IssueTargetOrderBJ(x,"attack",temp)
exitwhen true
endif
call GroupRemoveUnit(g,temp)
endloop
call GroupClear(g)
set hpHero = GetUnitLifePercent(x)
không, ý mình là cái loại đất khi dùng increase one nâng nó lên á, thường thì world editor chỉ cho chọn 1 cái, 1 cái có 2 loại trong đó, nếu bạn biết map element TD thì nó giống như vậy, sử dụng cùng lúc 8 loại đất, ai chỉ mình đi

scope AttackAuto initializer Auto
private function Actions takes nothing returns nothing
local integer A =1
local real hpTarget
local real hpHero
local unit x
local unit temp
local location p
local location p2
local player h
local player r
local force f
local group g = CreateGroup()
loop
exitwhen A>12
// Vong lap dau tien dung de kiem tra xem xung quanh Hero co Unit nao co mau duoi 50% thi se xong vao danh con do
set x = udg_HERO[A]
set p2 = GetUnitLoc(x)
if (GetPlayerController(GetOwningPlayer(x)) == MAP_CONTROL_COMPUTER ) then
// Dieu kien kiem tra xem Player do co phai do Computer dieu khien hay khong.. neu dung thi moi cho phep RUN o duoi.
call GroupEnumUnitsInRangeOfLoc(g,p2,512,null)
loop
set temp = FirstOfGroup(g)
exitwhen temp == null
set hpTarget= GetUnitLifePercent(temp)
if hpTarget < 50 then
call IssueTargetOrderBJ(x,"attack",temp)
exitwhen true
endif
call GroupRemoveUnit(g,temp)
endloop
call GroupClear(g)
set hpHero = GetUnitLifePercent(x)
// Ket thuc vong lap cua Group g
// bat dau kiem tra Hp Hero.. neu duoi 20 % thi lenh cho no chay ve
if hpHero < 20 then
set p = GetPlayerStartLocationLoc(GetOwningPlayer(x))
call IssuePointOrderLoc(x,"move",p)
call RemoveLocation(p)
set p = null
else
if hpHero <7 then
set p = GetPlayerStartLocationLoc(GetOwningPlayer(x))
call IssuePointOrderLoc(x,"patrol",p)
call RemoveLocation(p)
set p = null
else
set h =GetOwningPlayer(x)
set f = GetPlayersEnemies(h)
set r = ForcePickRandomPlayer(f)
if (GetPlayerSlotState(r) == PLAYER_SLOT_STATE_PLAYING ) then
set p = GetPlayerStartLocationLoc(r)
call IssuePointOrderLoc(x,"attack",p)
call RemoveLocation(p)
set p = null
endif
endif
endif
endif
set A = A+1
set p2 = null
set x = null
set temp = null
set r = null
set h = null
set g = null
set f = null
call DestroyGroup(g)
call DestroyForce(f)
call RemoveLocation(p)
call RemoveLocation(p2)
endloop
set p2 = null
set x = null
set temp = null
set r = null
set h = null
set g = null
set f = null
call DestroyGroup(g)
call DestroyForce(f)
call RemoveLocation(p)
call RemoveLocation(p2)
endfunction
//===========================================================================
private function Auto takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( t, 2.00 )
call TriggerAddAction( t, function Actions )
set t = null
endfunction
endscope
if (GetPlayerController(GetOwningPlayer(x)) == MAP_CONTROL_COMPUTER ) then
if (GetPlayerSlotState(r) == PLAYER_SLOT_STATE_PLAYING ) then
Thanks, cái này khá hay. Mình sẽ tìm hiểu kỹ phần nàyĐây là cách sử lý của war3 cho DAMAGE_TYPE
Còn đầy là cho ATTACK_TYPE
Nói ngắn gọn như sau:
Lượng damage gây ra cho unit to hay nhỏ thì tùy thuộc vào attack type và armor
Còn damage type cho biết tính damage có qua phần tính giáp hay ko hay ăn thẳng vào máu
? : Làm sao mà khi vào game có bản tùy chọn tên là Chọn Hero xuất hiện : Chiến Binh,Phù Thủy,Lính Ngự Lâm,Trinh Sát,Ví dụ chọn Chiến Binh thì sẽ tạo ra 1 heros tên chiến binh cửa play đó ở 1 vùng nào đó.Dịch ra giùm cái phần trigger ấy luôn giùm mình nhá
Chiến Binh,Phù Thủy,Lính Ngự Lâm,Trinh Sát là những dòng chọn
---------- Post added at 22:26 ---------- Previous post was at 21:58 ----------
cho hỏi thêm cái này nữa : cho mình cái maps demon về trigger trên và 1 trigger về phần 1 heros lên 1 lv thì được skills, VD : hero chiến binh lên lv 2 có chiêu vật ngã
Doodads\Cinematic\EyeOfSargeras\EyeOfSargeras.mdlMọi ng` cho hỏi cái model doodad có sẵn của war 3 mà có dạng "đá rớt từ trên cao xuống. có 1 đám bụi mù mịt bay ra", không biết nó tên gì ? kiếm cả buổi trong doodadl model ko ra
P.S: Cái model mà khi con Shadowsong bị Illidan dụ vào trong cái hầm gì có con mắt xanh, xong cái phải chạy ra ngược lại ấy, ai chơi campain chắc biết
Khó quá hay sao mà không ai giúp thế?
Sẵn thêm cái này luôm : Làm sao tính thời gian 1 unit vào 1 vùng khoảng 30 giây sau thì unit đó được 1 Item
cho hỏi thêm cái này nữa : cho mình cái maps demon về trigger trên và 1 trigger về phần 1 heros lên 1 lv thì được skills, VD : hero chiến binh lên lv 2 có chiêu vật ngã
Events
Unit - A unit Gains a level
Conditions
Actions
Unit - Add [COLOR="#FF0000"]Ability [/COLOR]to (Leveling Hero)
hỏi lại , mình đã thử cách của bạn gì gì ở trên cũng ko được :(
hỏi thêm Sound set của con Grand Magus trong DotA là của unit nào vậy , hơn nữa mình thấy lạ là ko chọn được Sound của Medivh.
hỏi thêm Sound set của con Grand Magus trong DotA là của unit nào vậy , hơn nữa mình thấy lạ là ko chọn được Sound của Medivh.