0978788673
Youtube Master Race
- 10/1/12
- 47
- 37
K cho nó bất tử dc vì team địch phải giết nó mà 

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.

K cho nó bất tử dc vì team địch phải giết nó mà![]()
Tất cả unit thuộc 1 Player thì k dc giết con Ghost.
quote lần 1, bác nào giúp e cáiMã:library IceArrow initializer init requires xemissile, GroupUtils globals private constant integer SPELLID = 'A003' private constant real RADIUS = 750. private constant real OFFSET = 60. private constant real SPEED = 550. private constant real SCALE = 2. private constant real ARC = 0.25 private constant string MISSILE = "Abilities\\Weapons\\LichMissile\\LichMissile.mdl" private player TempPlayer endglobals private function Damage takes unit caster returns real return I2R(GetUnitAbilityLevel(caster, SPELLID))/2*I2R(GetHeroInt(caster, true)) endfunction struct IceArrow extends xemissile private unit u private integer level static method create takes unit u, integer level, real tx, real ty returns IceArrow local real x = GetUnitX(u) local real y = GetUnitY(u) local real z = GetUnitFlyHeight(u)+OFFSET local IceArrow this = IceArrow.allocate(x,y,z,tx,ty,0.0) set this.u = u set this.level = level set this.fxpath = MISSILE set this.scale = SCALE call this.launch(SPEED,ARC) return this endmethod static method targetEnum takes nothing returns boolean local boolean b=true local unit u = GetFilterUnit() set b=b and GetWidgetLife(u)>.405 set b=b and IsUnitType(u,UNIT_TYPE_STRUCTURE)==false set b=b and IsUnitEnemy(u,TempPlayer) set u = null return b endmethod static method Damage takes nothing returns nothing local group g = NewGroup() local unit u set TempPlayer = GetOwningPlayer(.u) call GroupEnumUnitsInArea(g,.x,.y,RADIUS, Condition(function thistype.targetEnum)) loop set u = FirstOfGroup(g) exitwhen u==null call UnitDamageTarget(.u,u,Damage(.u),true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS) call GroupRemoveUnit(g,u) set u=null endloop call ReleaseGroup(g) set TempPlayer = null set g = null set u = null endmethod endstruct private function Check takes nothing returns boolean return GetSpellAbilityId()==SPELLID endfunction private function Effect takes nothing returns nothing local real tx = GetSpellTargetX() local real ty = GetSpellTargetY() local unit u = GetTriggerUnit() local integer level = GetUnitAbilityLevel(u,SPELLID) local IceArrow fb = IceArrow.create(u,level,tx,ty) set u = null endfunction private function init takes nothing returns nothing local trigger t = CreateTrigger() call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(t, Condition(function Check)) call TriggerAddAction(t, function Effect) set t = null endfunction endlibrary
bác nào xem giúp e cái trigger này, lúc save nó báo lỗi:
Line 5993: Undeclared variable this
Line 5998: Too many arguments passed to function
Linh 5998: cannot convert nothing to real



Slide unit đi xa, đụng ai đầu tiên nổ, phá destruct trên đường bay....
Cho hỏi có cách nào lấy dc chỉ số Agi của Hero này để set cho hero khác k??
Cho mình xin cái trigger như thế với :)
Và có cách nào để kiểm tra thời gian sống của Unit (generic time) để cho vào so sánh k?? Vì map mình có phần kết hợp giữa 2 unit ấy mà, làm thế nào để lấy dc giá trị thời gian đó??
Hero - Set Agility of (Triggering unit) to (Agility of (Target unit of ability being cast) (Exclude bonuses)), the effect will be Permanent
Fire Bolt2
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Fire Bolt
(Random percentage) Less than or equal to 100.00
Actions
Set Temp_Point = (Position of (Casting unit))
Unit - Create 1 Base Dummy for (Owner of (Casting unit)) at Temp_Point facing Default building facing degrees
Unit - Add Fire Bolt <Unit> to (Last created unit)
Unit - Set level of Fire Bolt <Unit> for (Last created unit) to (Level of Fire Bolt for (Casting unit))
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Neutral - Firebolt (Target unit of ability being cast)
Unit - Reset ability cooldowns for (Casting unit)
Unit - Set mana of (Casting unit) to ((Percentage mana of (Casting unit)) + 20.00)%
Custom script: call RemoveLocation(udg_Temp_Point)
Bác nào xem hộ mình tại sao skill này ko hoạt động với, mặc dù đã set chance=100%
Thứ nhất, ko có Fire bolt <Unit> từ Dummy đánh ra
Thứ 2, mana ko thấy hồi phục
Thứ 3, reset cooldown chỉ có tác dụng với các skill còn lại.
Giả sử mình chỉ muốn rs cooldown cho skill này thôi thì thế nào ?
Mã:Fire Bolt2 Events Unit - A unit Begins casting an ability Conditions (Ability being cast) Equal to Fire Bolt (Random percentage) Less than or equal to 100.00 Actions Set Temp_Point = (Position of (Casting unit)) Unit - Create 1 Base Dummy for (Owner of (Casting unit)) at Temp_Point facing Default building facing degrees Unit - Add Fire Bolt <Unit> to (Last created unit) Unit - Set level of Fire Bolt <Unit> for (Last created unit) to (Level of Fire Bolt for (Casting unit)) Unit - Add a 1.00 second Generic expiration timer to (Last created unit) Unit - Order (Last created unit) to Neutral - Firebolt (Target unit of ability being cast) Unit - Reset ability cooldowns for (Casting unit) Unit - Set mana of (Casting unit) to ((Percentage mana of (Casting unit)) + 20.00)% Custom script: call RemoveLocation(udg_Temp_Point)
1.
2.Mã:Hero - Set Agility of (Triggering unit) to (Agility of (Target unit of ability being cast) (Exclude bonuses)), the effect will be Permanent
Mình thì mình ko biết nhưng mình nghĩ đến việc tạo biến real lưu lại thời gian đó rồi mỗi giây trừ đi,khi cần thì lấy biến real đó ra sử dụng thôi.
Ngày trước lão Evil Hunter làm cho cái spell, set chance bằng random percentage, thấy tiện nên dùng
Có vấn đề gì với nó hả ? Mình xài cho vài skill thấy bt mà bạn.
Tạo 1 cái vòng lặp rồi wait 1 second hả b????
Bạn thử thay event begin casting thành start spell effect xem,mình thì thực ra trước h chưa xài tới cái random percentage đó bao h
Tạo thế cũng được,giới hạn vòng lặp = thời gian time life của unit đó ko thì dùng timer hoặc every second
chỉ percent khác hơn random khó hơn random int thôi ?