Tom_Kazansky
<b><font color="RoyalBlue"><font face="Lucida Cons
- 28/12/06
- 3,454
- 462
- Thread starter
- #901
852274 là order id của ability Item Illusion, custom ability lấy gốc từ ability này thì rõ ràng vẫn dùng 852274
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.
YAN[asian];18603602 nói:Cho hỏi cái dòng này :
Chỗ "852274" là gì? Chỉ đoán nó là skill Item Illusions mặc định của war? Giờ nếu có custom Item Illusions thì phải sửa kiểu j?Mã:Custom script: call IssueTargetOrderById(GetLastCreatedUnit() , 852274 , GetTriggerUnit())


"region đó" là region nào vậy bạn ?ai chỉ giúp với , khi mình nhập một đoạn chat nào đó ( thi du nhu -move) thì sẽ move hero của mình tới region đó , ai chỉ giúp với !!!
Events
Player - Player 1 (Red) types a chat message containing -move as An exact match
Player - Player 2 (Blue) types a chat message containing -move as An exact match
Player - Player 3 (Teal) types a chat message containing -move as An exact match
Player - Player 4 (Purple) types a chat message containing -move as An exact match
Conditions
Actions
Set TempGroup = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
Unit Group - Pick every unit in TempGroup and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to (Center of <Region001>)
Custom script: call DestroyGroup(udg_TempGroup)
Dưới đây là 1 mẫu tham khảo, nhận exp khi giết địch lẫn nhặt item.Bà con có ai biết làm trigger hiện kinh nghiệm nhận được khi giết địch không?
ko hiểu sao minh làm spell deal dam bằng trigger mà vẫn bị nhận dam phản từ spell "gai" của bọ hung dù là loại dam gì đi chăng nữa ( thường thì mình để dam spell type normal ) , có ai bị như vậy ko :( , giải thik hộ mình vs
ps: các spell dùng spell có sẵn , hoặc dummy cast spell có sẵn thì ko sao , chỉ dam = trigger thôi :(
function UnitDamageTargetBJ takes unit whichUnit, unit target, real amount, attacktype whichAttack, damagetype whichDamage returns boolean
return UnitDamageTarget(whichUnit, target, amount, [B][COLOR="Red"]true, false[/COLOR][/B], whichAttack, whichDamage, WEAPON_TYPE_WHOKNOWS)
endfunction
native UnitDamageTarget takes unit whichUnit, widget target, real amount, [COLOR="Red"][B]boolean attack, boolean ranged[/B][/COLOR], attacktype attackType, damagetype damageType, weapontype weaponType returns boolean
)Custom Script: call UnitDamageTarget( udg_SourceUnit, udg_TargetUnit, udg_DamageDeal, false, true, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, null )
native UnitMakeAbilityPermanent takes unit whichUnit, boolean permanent, integer abilityId returns boolean
Anh Tom cho em hỏi là h dưới bất kứ 1 custom spell nào thì ghi dòng này ở dưới cùng hay ở đâu hả anh , nói thật là chưa gặp vấn đề này bao giờ :(Mã:Custom Script: call UnitDamageTarget( udg_SourceUnit, udg_TargetUnit, udg_DamageDeal, false, true, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, null )
>Tại sao 1 unit có skill spell book và skill biến hình, khi biến hình xong quay trở về trạng thái cũ, thì phép trong spell book mất sạch? Khắc phục điều này bằng cách nào?
Mã:native UnitMakeAbilityPermanent takes unit whichUnit, boolean permanent, integer abilityId returns boolean
Custom Script: call UnitMakeAbilityPermanent( udg_Unit, true, udg_AbilityId )
AbilityId = raw id của ability trong spellbook
[/B]
dùng Breath of Frost nếu ko muốn có điều kiện trên
Anh Tom cho em hỏi là h dưới bất kứ 1 custom spell nào thì ghi dòng này ở dưới cùng hay ở đâu hả anh , nói thật là chưa gặp vấn đề này bao giờ :(
Set SourceUnit = <unit gây dmg>
Set TargetUnit = <unit nhận dmg>
Set DamageDeal = <lượng dmg>
Custom Script: call UnitDamageTarget( udg_SourceUnit, udg_TargetUnit, udg_DamageDeal, false, true, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, null )
YAN[asian];18613362 nói:Cái này lạ quá, mới gặp lần đầu. Có thể hướng dẫn cụ thể hơn 1 chút ko? Nếu là GUI thì làm kiểu gì, khi nào, set biến kiểu gì?
Set TempUnit = <unit cần ability "permanent", ko mất khi transform>
Set AbilityId = Acid Bomb <một ability trong spellbook>
Custom Script: call UnitMakeAbilityPermanent( udg_TempUnit, true, udg_AbilityId )
Cho em hỏi thêm là h mình muốn deal dam vào 1 group thì làm thế nào , thường thì em pick group đó và deal dam vào Picked unitthay Unit - Damage Target bằng dòng đó
[/LIST]Mã:Set SourceUnit = <unit gây dmg> Set TargetUnit = <unit nhận dmg> Set DamageDeal = <lượng dmg> Custom Script: call UnitDamageTarget( udg_SourceUnit, udg_TargetUnit, udg_DamageDeal, false, true, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, null )

ai chỉ giúp với , khi mình nhập một đoạn chat nào đó ( thi du nhu -move) thì sẽ move hero của mình tới region đó , ai chỉ giúp với !!!
repeat lần thứ 2 , ai giúp ngoc với , đang cần gấp cho thằng em !!!

"region đó" là region nào vậy bạn ?
[spoil][/spoil]Mã:Events Player - Player 1 (Red) types a chat message containing -move as An exact match Player - Player 2 (Blue) types a chat message containing -move as An exact match Player - Player 3 (Teal) types a chat message containing -move as An exact match Player - Player 4 (Purple) types a chat message containing -move as An exact match Conditions Actions Set TempGroup = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) Unit Group - Pick every unit in TempGroup and do (Actions) Loop - Actions Unit - Move (Picked unit) instantly to (Center of <Region001>) Custom script: call DestroyGroup(udg_TempGroup)
Dưới đây là 1 mẫu tham khảo, nhận exp khi giết địch lẫn nhặt item.
YAN[asian];18615370 nói:Cho hỏi add locust cho unit bằng trigger như nào nhỉ? (lâu ko dùng quên mất =.=!)
chỗ ap thì mình hỉu còn chỗ ar, rp thì mình chịu @@. Sky cho mình cái demo đi, đọc k hủ rì hết @@
YAN[asian];18617567 nói:Đọc kĩ hộ mình chút >_<! Để phải post đến post thứ 3 vì mỗi cái tí ti này =_=!
Quote lần 1, Sky or someone giúp với @@
Events: Time - Elapse 0.00 seconds of game time
Condition
Actions:
set unittype[1] = Warlock
set unittype[2] = Magical
set unittype[3] = Shaolin
set unittype[4] = EmeiSword
// cho hàm này, mình có 4 hero nào đó cần cho random chả hạng!
Events: Player 1 chat message "-ar" as a matched string
Conditions:
Actions:
local integer i=1
loop
exitwhen (i==10)// có 10 em chơi
if Player control of (Player(i)) equal to User and slot user jj đó của (player(i)) equal to Is playing then
loop
set tempType = unittype[Random number from 1 to 4]
exitwhen (tempType not equal to no unit-type)
endloop
set tempUnit = Unit - Create tempType for Player(i) at Chỗ nào đó facing chỗ đó đó
sau cho gọi hàm kêu tên tempUnit cho em nào đó!Và nhớ chỉ số i có thể thay bằng Integer A gì đó, nhưng sử dụng i cho chắc ăn, bởi nó sẽ chạy ổn định khi mỗi lần ngắt quãng ở mỗi lượt lặp lại, tránh lag!
endif
set i=i+1
endloop
local integer k=1
loop
exitwhen (k==4)
if tempUnit equal to unittype[k] then set unittype[k]=no unit-type
set k=k+1
endloop