WordEditor
C O N T R A
- 8/9/08
- 1,509
- 53
Cho mình hỏi khi sử dụng trigger move caster, phải chỉnh wait làm sao để thằng cast vào đúng điểm bị cast thì mới turn off trigger? :hug: (chỉnh distance thì có lúc chưa tới, lúc thì bay qua luôn
)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.
Cho mình hỏi khi sử dụng trigger move caster, phải chỉnh wait làm sao để thằng cast vào đúng điểm bị cast thì mới turn off trigger? :hug: (chỉnh distance thì có lúc chưa tới, lúc thì bay qua luôn
)Câu này dễ để tui trả lời cho:cool:Cho hỏi nè :
- làm sao tạo 1 even mà ghi mình ghi 1 đoạn mã thì even đó bắt đầu sảy ra . Làm đi làm lại mà vẫn sai .::(
- Đổi tên map sao nhỉ mình không biết :'> .
- làm sao khi mình ghi 1 đoạn chat VD : -rd thì tất cả người chơi random hero.


thì sao làm hoài như mấy bạn trước chỉ mà không được . chỉ giúp luôn nha .làm sao để khi hero chết làm 1 bảng mã đếm time cho hero đó hồi sinh .



Ừ cảm ơn làm được rồi
Thế còn cái vụ
làm sao để khi hero chết làm 1 bảng mã đếm time cho hero đó hồi sinh .
thì sao làm hoài như mấy bạn trước chỉ mà không được . chỉ giúp luôn nha .
- Sao mình làm nó tự động ra creep đánh thành như dday thì nó ra được nhưng mà tạo theo creep được tao trong vùng đó đánh thành kia thì cả creep mình khi vào đó cũng chạy vèo về đánh nhà là sao ::(
hiểu roài thanks
nhưng em muốn hero này chơi spell theo kiểu attack slam này nè
spell đó khi cast theo kiểu attack slam thì unit trượt tới thằng bị cast giống như cast shock wave vậy đó
)scope StompOfBeast
//***************************************************
globals
private constant integer AbilityID = 'A000'
private constant attacktype AttackType = ATTACK_TYPE_CHAOS
private constant damagetype DamageType = DAMAGE_TYPE_UNIVERSAL
private constant real VSRatio = 0.10
private constant real BonusRatio = 0.10
private constant real dt = 0.10
private constant string ET = "|cffffcc00Stomp of the Beast acquired total "
private constant string CT = "|cffffcc00Stomp of the Beast's level has increased"
private constant string SFX = "Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl"
private string color = "|cffff00ff"
private integer EXP = 0
private unit caster
private unit target
private player p
private real dam
private real VSdam
private real Bonusdam
private unit u
endglobals
//****************************************************
private function condition takes nothing returns boolean
return GetSpellAbilityId() == AbilityID
endfunction
private function Check takes nothing returns boolean
return not IsUnitAlly(GetFilterUnit(), GetOwningPlayer(u)) and GetWidgetLife(GetFilterUnit())>0.405 and GetUnitTypeId(GetFilterUnit()) != 'H007'
endfunction
private struct Data
unit caster
integer DIST
real ANG
location loc
static method create takes unit c, integer i, real r, location l returns Data
local Data D = Data.allocate()
set D.caster = c
set D.DIST = i
set D.ANG = r
set D.loc = l
return D
endmethod
endstruct
private function callback takes nothing returns nothing
local timer t = GetExpiredTimer()
local Data D = GetCSData(t)
local real X
local real Y
local group g = CreateGroup()
local unit enum
set u = D.caster
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 4
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set X = GetLocationX(D.loc) + D.DIST * Cos(D.ANG + ( 90.00 * I2R(GetForLoopIndexA())) * bj_DEGTORAD)
set Y = GetLocationY(D.loc) + D.DIST * Sin(D.ANG + ( 90.00 * I2R(GetForLoopIndexA())) * bj_DEGTORAD)
call DestroyEffect(AddSpecialEffect(SFX,X,Y))
set bj_forLoopAIndex = bj_forLoopAIndex + 1
call GroupEnumUnitsInRange(g, X, Y, 100, Condition(function Check))
loop
set enum = FirstOfGroup(g)
exitwhen enum == null
call GroupRemoveUnit(g,enum)
if IsUnitInGroup(enum, udg_Group_Water) then
call UnitDamageTarget(D.caster, enum, (dam+Bonusdam+VSdam), false, false, AttackType, DamageType, null)
if GetWidgetLife(enum) <= 0.405 and GetUnitAbilityLevel(D.caster, AbilityID) < 10 then
set EXP=EXP+1
if udg_Bo_TextOff ==false then
call DisplayTimedTextToForce( GetForceOfPlayer(GetOwningPlayer(D.caster)), 4.00, ET+I2S(EXP)+" SP")
endif
if EXP ==4 or EXP ==8 or EXP ==12 or EXP ==50 or EXP ==66 or EXP ==84 or EXP ==104 or EXP ==126 or EXP ==150 or EXP ==200 then
call DisplayTimedTextToForce( GetForceOfPlayer(GetOwningPlayer(D.caster)), 4.00, CT)
call IncUnitAbilityLevel(D.caster, AbilityID)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl", D.caster, "origin"))
endif
endif
else
call UnitDamageTarget(D.caster, enum, (dam+Bonusdam), false, false, AttackType, DamageType, null)
call DisplayTimedTextToForce( GetForceOfPlayer(GetOwningPlayer(D.caster)), 4.00, ET+I2S(R2I(dam))+" damage")
if GetWidgetLife(enum) <= 0.405 and GetUnitAbilityLevel(D.caster, AbilityID) < 10 then
set EXP=EXP+1
if udg_Bo_TextOff ==false then
call DisplayTimedTextToForce( GetForceOfPlayer(GetOwningPlayer(D.caster)), 4.00, ET+I2S(EXP)+" SP")
endif
if EXP ==4 or EXP ==8 or EXP ==12 or EXP ==50 or EXP ==66 or EXP ==84 or EXP ==104 or EXP ==126 or EXP ==150 or EXP ==200 then
call DisplayTimedTextToForce( GetForceOfPlayer(GetOwningPlayer(D.caster)), 4.00, CT)
call IncUnitAbilityLevel(D.caster, AbilityID)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl", D.caster, "origin"))
endif
endif
endif
endloop
endloop
set D.DIST = (D.DIST + 50)
if D.DIST == 425 then
call DestroyGroup(g)
call RemoveLocation(D.loc)
set D.loc = null
call D.destroy()
call ReleaseTimer(t)
endif
set t = null
set g=null
set enum=null
endfunction
private function action takes nothing returns nothing
//Variables
local Data D = Data.create(GetTriggerUnit(), 25, GetUnitFacing(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()))
local timer t = NewTimer()
local integer lvl = GetUnitAbilityLevel(D.caster, AbilityID)
// Damage
set dam = ((60.00*I2R(lvl))+(2.00*I2R(GetHeroInt(D.caster, true))))/3
set VSdam = dam*VSRatio
if IsUnitInGroup(D.caster, udg_Group_Water) == true then
set Bonusdam = BonusRatio*dam
call TextTag_Unit(D.caster, "+"+I2S(R2I(Bonusdam)), color)
else
set Bonusdam = 0.00
endif
call SetCSData(t, D)
call TimerStart(t,0.10,true,function callback)
set t = null
endfunction
public function InitTrig takes nothing returns nothing
local trigger Trig = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(Trig, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(Trig, Condition(function condition))
call TriggerAddAction(Trig, function action)
call Preload("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl")
set Trig = null
endfunction
endscope
có ai biết down warcraft 3 viewer ở đâu không, hồi trước nó nằm trong tools for map maker, mà giờ tìm không thấy![]()

), và cả... leak nữa.call DisplayTimedTextToForce( [B]GetForceOfPlayer(GetOwningPlayer(D.caster))[/B], 4.00, CT)
.