找回密码
 点一下
查看: 1636|回复: 5

帮帮忙看看 不知错在哪....

[复制链接]
发表于 2010-11-24 22:57:32 | 显示全部楼层 |阅读模式
function Wrath2
问题?
function WrathB takes nothing returns boolean
    return GetSpellAbilityId() == 'A01C'
endfunction
 
function Wrath2 takes nothing returns nothing
    local timer t=GetExpiredTimer()
    local integer ss=GetHandleId(t)
    local unit tru=LoadUnitHandle(udg_GC,ss,1)
    local unit u
    local real x1=LoadReal(udg_GC,ss,1)
    local real y1=LoadReal(udg_GC,ss,2)
    local location l=Location(x1,y1)
    local integer i=LoadInteger(udg_GC,ss,1)
&#160;&#160;&#160; if i < 11 then
&#160;&#160;&#160;&#160;&#160;&#160;&#160; set i = ( i + 1 )
&#160;&#160;&#160;&#160;&#160;&#160;&#160; call DestroyEffect( AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Taunt\\TauntCaster.mdl", tru, "chest") )
&#160;&#160;&#160;&#160;&#160;&#160;&#160; call SetUnitFlyHeight( tru, ( GetUnitFlyHeight(tru) + 200.00 ), 0.00 )
&#160;&#160;&#160; else
&#160;&#160;&#160;&#160;&#160;&#160;&#160; if i == 11 then
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set i = ( i + 1 )
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call SetUnitPositionLoc( tru, l )
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call DestroyEffect( AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Taunt\\TauntCaster.mdl", tru, "chest") )
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call SetUnitFlyHeight( tru, ( GetUnitFlyHeight(tru) - 200.00 ), 0.00 )
&#160;&#160;&#160;&#160;&#160;&#160;&#160; else
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if i == 22 then
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set i = 0
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call PauseUnit( tru, false )
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call SetUnitInvulnerable( tru, false )
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call UnitRemoveAbility( tru, 'A002' )
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call CreateNUnitsAtLoc( 1, 'h00F', GetOwningPlayer(tru), l, bj_UNIT_FACING )
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set bj_forLoopAIndex = 1
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set bj_forLoopAIndexEnd = 10
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; loop
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set u = CreateUnitAtLoc(GetOwningPlayer(tru), 'h00E', l, GetRandomReal(1.00, 360.00))
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call SetUnitFlyHeight( u, ( 100.00 * I2R(bj_forLoopAIndex) ), 0.00 )
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set u = CreateUnitAtLoc(GetOwningPlayer(tru), 'h009', l, GetRandomReal(1.00, 360.00))
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call SetUnitFlyHeight( u, ( 100.00 * I2R(bj_forLoopAIndex) ), 0.00 )
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set bj_forLoopAIndex = bj_forLoopAIndex + 1
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; endloop
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call UnitRemoveAbility( tru, 'A00O' )
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call RemoveLocation( l )
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call PauseTimer(t)
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call FlushChildHashtable(udg_GC,ss)
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call DestroyTimer(t)
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set i = ( i + 1 )
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call DestroyEffect( AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Taunt\\TauntCaster.mdl", tru, "chest") )
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call SetUnitFlyHeight( tru, ( GetUnitFlyHeight(tru) - 200.00 ), 0.00 )
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; endif
&#160;&#160;&#160;&#160;&#160;&#160;&#160; endif
&#160;&#160;&#160; endif
&#160;&#160;&#160; call SaveInteger(udg_GC,ss,1,i)
&#160;&#160;&#160; set t=null
&#160;&#160;&#160; set l=null
&#160;&#160;&#160; set tru=null
&#160;&#160;&#160; set u=null
endfunction

function WrathA takes nothing returns nothing
&#160;&#160;&#160; local integer flynum=1
&#160;&#160;&#160; local real x=GetLocationX(GetSpellTargetLoc())
&#160;&#160;&#160; local real y=GetLocationY(GetSpellTargetLoc())
&#160;&#160;&#160; local timer t=GetExpiredTimer()
&#160;&#160;&#160; local integer ss=GetHandleId(t)
&#160;&#160;&#160; call PauseUnit( GetTriggerUnit(), true )
&#160;&#160;&#160; call UnitAddAbility( GetTriggerUnit(), 'A002' )
&#160;&#160;&#160; call SetUnitInvulnerable( GetTriggerUnit(), true )
&#160;&#160;&#160; call UnitAddAbility( GetTriggerUnit(), 'A00O' )
&#160;&#160;&#160; call SaveUnitHandle(udg_GC,ss,1,GetTriggerUnit())
&#160;&#160;&#160; call SaveReal(udg_GC,ss,1,x)
&#160;&#160;&#160; call SaveReal(udg_GC,ss,1,y)
&#160;&#160;&#160; call SaveInteger(udg_GC,ss,1,flynum)
&#160;&#160;&#160; call TimerStart(t,0.10,true,function Wrath2)
&#160;&#160;&#160; set t=null
endfunction

//===========================================================================
function InitTrig_Wrath takes nothing returns nothing
&#160;&#160;&#160; set gg_trg_Wrath = CreateTrigger(&#160; )
&#160;&#160;&#160; call TriggerRegisterAnyUnitEventBJ( gg_trg_Wrath, EVENT_PLAYER_UNIT_SPELL_EFFECT )
&#160;&#160;&#160; call TriggerAddCondition( gg_trg_Wrath, Condition( function WrathB ) )
&#160;&#160;&#160; call TriggerAddAction( gg_trg_Wrath, function WrathA )
endfunction
发表于 2010-11-25 01:12:54 | 显示全部楼层
call SaveReal(udg_GC,ss,1,x)
call SaveReal(udg_GC,ss,1,y)
同一个格子同类型覆盖   
HashTable的每个格子可以储存的内容有:
一个integer、一个real、一个boolean、一个string、一个handle
x坐标Real被覆盖
call SaveReal(udg_GC,ss,2,y)
回复

使用道具 举报

 楼主| 发表于 2010-11-25 01:21:02 | 显示全部楼层
还是不行.......




地图中有 J版 和 T版 的&#160;
123.w3x (28 KB, 下载次数: 9)
回复

使用道具 举报

发表于 2010-11-25 02:20:16 | 显示全部楼层
function WrathA takes nothing returns nothing
    local integer flynum=1
    local real x=GetLocationX(GetSpellTargetLoc())
    local real y=GetLocationY(GetSpellTargetLoc())
    local timer t=GetExpiredTimer()没创建计时器......
CreateTimer()

123.w3x

28 KB, 下载次数: 10

回复

使用道具 举报

 楼主| 发表于 2010-11-25 17:13:29 | 显示全部楼层
哈哈
真是太意
十分感谢
回复

使用道具 举报

发表于 2010-11-25 23:56:23 | 显示全部楼层
这个 按下 ESC键 太给力了   这都帮忙   我为了一个钩子技能  自己检查了整整1天才搞定   让人检查  不好意思

毕竟编辑习惯不同
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-5-3 12:14 , Processed in 0.079120 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表