hacker_tinhyeu
Youtube Master Race
- 27/2/08
- 84
- 0
Mã:
(Item-type of (Item being manipulated)) Equal to {[B]Item name[/B]}
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.
(Item-type of (Item being manipulated)) Equal to {[B]Item name[/B]}

Events
Player - Player 1 (Red) types a chat message containing -random as An exact match
Player - Player 2 (Blue) types a chat message containing -random as An exact match
Player - Player 3 (Teal) types a chat message containing -random as An exact match
Player - Player 4 (Purple) types a chat message containing -random as An exact match
Player - Player 5 (Yellow) types a chat message containing -random as An exact match
Player - Player 6 (Orange) types a chat message containing -random as An exact match
Conditions
(Number of units in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))) Equal to 0
Actions
Set Random_Hero = (Random integer number between 1 and Random_Count)
Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
Game - Display to (All players) the text: (A player has randomed + (Name of (Last created unit)))
Selection - Select (Last created unit) for (Owner of (Last created unit))
Player - Add -425 to (Triggering player) Current gold
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Make (Unit-type of (Last created unit)) Unavailable for training/construction by (Picked player)
Set Random_Data[Random_Hero] = Random_Count
Set Random_Count = (Random_Count - 1)
đã thử lại set truớc mà vẫn vậy bạn thử tét hộ mình xemMã:Điều thứ 2 Code: Events Player - Player 1 (Red) types a chat message containing -rg as An exact match Conditions Actions Game - Display to (All players) the text: Lenh -rg da duoc ki... Trigger - Turn off Tao NV sau 10s <gen> For each (Integer A) from 1 to 10, do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Player((Integer A))) slot status) Equal to Is playing Then - Actions Set Random_Hero = (Random integer number between 1 and Random_Count) Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees Selection - Select (Last created unit) for (Owner of (Last created unit)) Game - Display to (All players) the text: (Co nguoi da chon + (Name of (Last created unit))) Set Random_Data[Random_Hero] = Random_Count Set Random_Count = (Random_Count - 1) Else - Actions Do nothing Trigger - Turn off (This trigger)Sao lại dùng rồi mới đặt
.
___________Auto Merge________________
.
mình đã thử rồi mà sao vẫn ko đc
Mã:StackChargedItem Events Unit - A unit Acquires an item Conditions And - All (Conditions) are true Conditions (Item-type of TempItem2) Equal to (Item-type of TempItem) TempItem2 Not equal to TempItem (Charges remaining in (Item being manipulated)) Greater than 0 Actions Set TempUnit2 = (Hero manipulating item) Set TempItem = (Item being manipulated) For each (Integer A) from 1 to 6, do (Actions) Loop - Actions Set TempItem2 = (Item carried by TempUnit in slot (Integer A)) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions And - All (Conditions) are true Conditions Then - Actions Item - Set charges remaining in TempItem2 to ((Charges remaining in TempItem2) + (Charges remaining in TempItem)) Item - Remove TempItem Skip remaining actions Else - Actions
StackChargedItem
Events
Unit - A unit Acquires an item
Conditions
And - All (Conditions) are true
Conditions
(Item-type of TempItem2) Equal to (Item-type of TempItem)
TempItem2 Not equal to TempItem
(Charges remaining in (Item being manipulated)) Greater than 0
Actions
Set TempUnit2 = (Hero manipulating item)
Set TempItem = (Item being manipulated)
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Set TempItem2 = (Item carried by TempUnit in slot (Integer A))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
[SIZE="4"][B]Conditions[/B][/SIZE]
Then - Actions
Item - Set charges remaining in TempItem2 to ((Charges remaining in TempItem2) + (Charges remaining in TempItem))
Item - Remove TempItem
Skip remaining actions
Else - Actions

lệnh random cho hero tavern nè , nhớ post rồi mà ta
Mã:Events Player - Player 1 (Red) types a chat message containing -random as An exact match Player - Player 2 (Blue) types a chat message containing -random as An exact match Player - Player 3 (Teal) types a chat message containing -random as An exact match Player - Player 4 (Purple) types a chat message containing -random as An exact match Player - Player 5 (Yellow) types a chat message containing -random as An exact match Player - Player 6 (Orange) types a chat message containing -random as An exact match Conditions (Number of units in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))) Equal to 0 Actions Set Random_Hero = (Random integer number between 1 and Random_Count) Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees Game - Display to (All players) the text: (A player has randomed + (Name of (Last created unit))) Selection - Select (Last created unit) for (Owner of (Last created unit)) Player - Add -425 to (Triggering player) Current gold Player Group - Pick every player in (All players) and do (Actions) Loop - Actions Player - Make (Unit-type of (Last created unit)) Unavailable for training/construction by (Picked player) Set Random_Data[Random_Hero] = Random_Count Set Random_Count = (Random_Count - 1)
mình tạo ra nhiều loại kiếm khác nhau mà cái này chỉ có đồ giống hệt nhau mới Drop thôi thì phảiMã:(Item-type of (Item being manipulated)) Equal to {[B]Item name[/B]}

StackChargedItem
Events
Unit - A unit Acquires an item
Conditions
(Charges remaining in (Item being manipulated)) Greater than 0
Actions
Set TempUnit2 = (Hero manipulating item)
Set TempItem = (Item being manipulated)
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Set TempItem2 = (Item carried by TempUnit in slot (Integer A))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
TempItem2 Not equal to TempItem
(Item-type of TempItem2) Equal to (Item-type of TempItem)
Then - Actions
Item - Set charges remaining in TempItem2 to ((Charges remaining in TempItem2) + (Charges remaining in TempItem))
Item - Remove TempItem
Skip remaining actions
Else - Actions
như cậy đúng chưa nhưng mà vẫn không đc hixhixMã:StackChargedItem Events Unit - A unit Acquires an item Conditions (Charges remaining in (Item being manipulated)) Greater than 0 Actions[B] Set TempUnit2 = (Hero manipulating item)[/B] Set TempItem = (Item being manipulated) For each (Integer A) from 1 to 6, do (Actions) Loop - Actions Set TempItem2 = (Item carried by [B]TempUnit[/B] in slot (Integer A)) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions And - All (Conditions) are true Conditions TempItem2 Not equal to TempItem (Item-type of TempItem2) Equal to (Item-type of TempItem) Then - Actions Item - Set charges remaining in TempItem2 to ((Charges remaining in TempItem2) + (Charges remaining in TempItem)) Item - Remove TempItem Skip remaining actions Else - Actions
?Cam 1 vk
Events
Unit - A unit Acquires an item
Conditions
Or - Any (Conditions) are true
Conditions
(Item-class of (Item being manipulated)) Equal to Permanent
(Item-class of (Item being manipulated)) Equal to Artifact
(Item-class of (Item being manipulated)) Equal to Purchasable
(Item-class of (Item being manipulated)) Equal to Miscellaneous
(Item-class of (Item being manipulated)) Equal to Campaign
(Item-class of (Item being manipulated)) Equal to Powerup
Actions
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (Item-class of (Item being manipulated))
(Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
Then - Actions
Hero - Drop (Item being manipulated) from (Hero manipulating item)
Game - Display to (All players) the text: (Name of (Rally-Point of (Triggering unit) as a destructible))
Else - Actions
lenh rg
Events
Player - Player 1 (Red) types a chat message containing -rg as An exact match
Player - Player 6 (Orange) types a chat message containing -rg as An exact match
Conditions
Actions
Game - Display to (All players) the text: Lenh -rg da duoc ki...
Trigger - Turn off Tao NV sau 10s <gen>
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player((Integer A))) slot status) Equal to Is playing
Then - Actions
Set Random_Data[Random_Hero] = Random_Count
Set Random_Hero = (Random integer number between 1 and Random_Count)
Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
Selection - Select (Last created unit) for (Owner of (Last created unit))
Game - Display to (All players) the text: (Co nguoi da chon duoc + (Name of (Last created unit)))
Set Random_Count = (Random_Count - 1)
Else - Actions
Do nothing
Trigger - Turn off (This trigger)
Còn về Neutral Creep: tôi có 3 Region để spawn, cứ 60s, kiểm tra unit trong các region này (tất nhiên owner là Neutral Hostile) nếu ko có unit nào thì spawn random số lượng và unit type (NeutralSpawn[0 -> 9] <- unit type nhá). Nhg thế này thì "random" quá, chuẩn hơn, bạn nên có 1 sự sắp xếp unit sẽ spawn ra, tạm gọi là unit-pool.
Ví dụ:
unit-pool 1 là 2 NeutralSpawn[0] và 1 NeutralSpawn[1]
unit-pool 2 là 3 NeutralSpawn[1]
unit-pool 3 là 2 NeutralSpawn[2] và 1 NeutralSpawn[3]
...
Khi spawn, tức là số unit trong region đó = 0 thì random 1 integer, integer này là bao nhiêu thì tiến hanh spawn theo cái pool mà bạn đã xác định sẵn ở trên.
ông Tom chỉ phần Spaw này khó hiểu quá (có lẽ tại mình ngu)Mã:Còn về Neutral Creep: tôi có 3 Region để spawn, cứ 60s, kiểm tra unit trong các region này (tất nhiên owner là Neutral Hostile) nếu ko có unit nào thì spawn random số lượng và unit type (NeutralSpawn[0 -> 9] <- unit type nhá). Nhg thế này thì "random" quá, chuẩn hơn, bạn nên có 1 sự sắp xếp unit sẽ spawn ra, tạm gọi là unit-pool. Ví dụ: unit-pool 1 là 2 NeutralSpawn[0] và 1 NeutralSpawn[1] unit-pool 2 là 3 NeutralSpawn[1] unit-pool 3 là 2 NeutralSpawn[2] và 1 NeutralSpawn[3] ... Khi spawn, tức là số unit trong region đó = 0 thì random 1 integer, integer này là bao nhiêu thì tiến hanh spawn theo cái pool mà bạn đã xác định sẵn ở trên.
ai có thể huớng dẫn bằng trigger hay demo đuợc không
..Cận rồi à đi đo kính đi 
-Icon bình thường: ReplaceableTextures\CommandButtons\BTNtên.BLP
-Icon disable: ReplaceableTextures\CommandButtonsDisabled\DISBTNtên.BLP
UnitSpawn Demo to đùng ở phía dưới mà không tháy à..Cận rồi à đi đo kính đi
![]()
cái này Spaw random mà mình muốn hỏi Spaw mỗi region là 1 loại quái thôi
)hjx làm thế này không đc thì làm sao chỉ mình với trong mục Miscellaneous mình có 23 món khác nhau riêng phần này bị à Item trong mục khác thì chỉ cầm đc 1Mã:Cam 1 vk Events Unit - A unit Acquires an item Conditions Or - Any (Conditions) are true Conditions (Item-class of (Item being manipulated)) Equal to Permanent (Item-class of (Item being manipulated)) Equal to Artifact (Item-class of (Item being manipulated)) Equal to Purchasable (Item-class of (Item being manipulated)) Equal to Miscellaneous (Item-class of (Item being manipulated)) Equal to Campaign (Item-class of (Item being manipulated)) Equal to Powerup Actions For each (Integer A) from 1 to 10, do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (Item-class of (Item being manipulated)) (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated) Then - Actions Hero - Drop (Item being manipulated) from (Hero manipulating item) Game - Display to (All players) the text: (Name of (Rally-Point of (Triggering unit) as a destructible)) Else - Actions
Mã:lenh rg Events Player - Player 1 (Red) types a chat message containing -rg as An exact match Player - Player 6 (Orange) types a chat message containing -rg as An exact match Conditions Actions Game - Display to (All players) the text: Lenh -rg da duoc ki... Trigger - Turn off Tao NV sau 10s <gen> For each (Integer A) from 1 to 10, do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Player((Integer A))) slot status) Equal to Is playing Then - Actions Set Random_Data[Random_Hero] = Random_Count Set Random_Hero = (Random integer number between 1 and Random_Count) Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees Selection - Select (Last created unit) for (Owner of (Last created unit)) Game - Display to (All players) the text: (Co nguoi da chon duoc + (Name of (Last created unit))) Set Random_Count = (Random_Count - 1) Else - Actions Do nothing Trigger - Turn off (This trigger)




@GW :ý của bạn ấy là đòi demo map cơ
@Hacker : demo map move hero vào 1 vùng và move ra theo timer
tiện làm cái % rớt random item theo type unit
lưu ý : array tớ để = 2 tương ứng cậu làm cái cái timer cùng lúc như thế đc , còn muốn 3 cái hay 4 cái thì để array tương ứng , 100 cũng đc nhg lag map tớ hok chịu trách nhiệm :)
@Tom : anh tung cái nài vào post tổng hợp hướng dẫn hộ e nhé :)
ps : sặc hok upload đc file![]()
.Cam 1 vk
Events
Unit - A unit Acquires an item
Conditions
Or - Any (Conditions) are true
Conditions
(Item-class of (Item being manipulated)) Equal to Permanent
(Item-class of (Item being manipulated)) Equal to Artifact
(Item-class of (Item being manipulated)) Equal to Purchasable
(Item-class of (Item being manipulated)) Equal to Miscellaneous
(Item-class of (Item being manipulated)) Equal to Campaign
(Item-class of (Item being manipulated)) Equal to Powerup
Actions
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (Item-class of (Item being manipulated))
(Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
Then - Actions
Hero - Drop (Item being manipulated) from (Hero manipulating item)
Game - Display to (All players) the text: (Name of (Rally-Point of (Triggering unit) as a destructible))
Else - Actions
For each (Integer A) from 1 to 10, do (Actions)
.