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

求解魔兽jassHelper的意思!!?????

[复制链接]
发表于 2011-7-9 09:20:44 | 显示全部楼层 |阅读模式
globals
    // User-defined
    effect array            udg_yiciyuan2
    group array             udg_danweizu
    unit array              udg_danwei
    force array             udg_wangjiazu
    texttag array           udg_wenzi
    real array              udg_kuandu
    location array          udg_mvbiao
    unit array              udg_danwei1
    unit array              udg_danwei2
    dialog                  udg_duihua                 = null
    button array            udg_duihuabutten

    // Generated
    rect                    gg_rct________000          = null
    rect                    gg_rct________001          = null
    sound                   gg_snd_BoatMissileHit      = null
    sound                   gg_snd_RainOfFireLoop1     = null
    sound                   gg_snd_InnerFireBirth      = null
    sound                   gg_snd_ThunderBoltMissileDeath = null
    trigger                 gg_trg_kaishi              = null
    trigger                 gg_trg_yiciyuan            = null
    trigger                 gg_trg_yiciyuan1           = null
    trigger                 gg_trg_Esc                 = null
    trigger                 gg_trg_duihua              = null
    trigger                 gg_trg_houxu               = null
    trigger                 gg_trg_siwang              = null
    trigger                 gg_trg_shangchu            = null
    unit                    gg_unit_H002_0001          = null

endglobals
//===========================================================================
//
// 甯濈殗鐏??闃礒X1
//
//   Warcraft III map script
//   Generated by the Warcraft III World Editor
//   Date: Sat Jul 09 09:14:38 2011
//   Map Author: 甯濈殗榫?
//
//===========================================================================

//***************************************************************************
//*
//*  Global Variables
//*
//***************************************************************************


function InitGlobals takes nothing returns nothing
    local integer i = 0
    set i = 0
    loop
        exitwhen (i > 1)
        set udg_danweizu = CreateGroup()
        set i = i + 1
    endloop

    set i = 0
    loop
        exitwhen (i > 1)
        set udg_wangjiazu = CreateForce()
        set i = i + 1
    endloop

    set i = 0
    loop
        exitwhen (i > 1)
        set udg_kuandu = 0
        set i = i + 1
    endloop

    set udg_duihua = DialogCreate()
endfunction

//***************************************************************************
//*
//*  Sounds
//*
//***************************************************************************

function InitSounds takes nothing returns nothing
    set gg_snd_BoatMissileHit = CreateSound( "Abilities\\Weapons\\BoatMissile\\BoatMissileHit.wav", false, true, true, 10, 10, "MissilesEAX" )
    call SetSoundParamsFromLabel( gg_snd_BoatMissileHit, "BoatMissileHit" )
    call SetSoundDuration( gg_snd_BoatMissileHit, 1173 )
    set gg_snd_RainOfFireLoop1 = CreateSound( "Abilities\\Spells\\Demon\\RainOfFire\\RainOfFireLoop1.wav", false, true, true, 10, 10, "SpellsEAX" )
    call SetSoundParamsFromLabel( gg_snd_RainOfFireLoop1, "RainOfFireLoop" )
    call SetSoundDuration( gg_snd_RainOfFireLoop1, 4000 )
    set gg_snd_InnerFireBirth = CreateSound( "Abilities\\Spells\\Human\\InnerFire\\InnerFireBirth.wav", false, true, true, 10, 10, "SpellsEAX" )
    call SetSoundParamsFromLabel( gg_snd_InnerFireBirth, "InnerFire" )
    call SetSoundDuration( gg_snd_InnerFireBirth, 2096 )
    set gg_snd_ThunderBoltMissileDeath = CreateSound( "Abilities\\Spells\\Human\\StormBolt\\ThunderBoltMissileDeath.wav", false, true, true, 10, 10, "SpellsEAX" )
    call SetSoundParamsFromLabel( gg_snd_ThunderBoltMissileDeath, "StormBolt" )
    call SetSoundDuration( gg_snd_ThunderBoltMissileDeath, 2236 )
endfunction

//***************************************************************************
//*
//*  Unit Creation
//*
//***************************************************************************

//===========================================================================
function CreateUnitsForPlayer0 takes nothing returns nothing
    local player p = Player(0)
    local unit u
    local integer unitID
    local trigger t
    local real life

    set gg_unit_H002_0001 = CreateUnit( p, 'H002', 213.9, -512.9, 0.000 )
endfunction

//===========================================================================
function CreateUnitsForPlayer1 takes nothing returns nothing
    local player p = Player(1)
    local unit u
    local integer unitID
    local trigger t
    local real life

    set u = CreateUnit( p, 'hpea', 1412.5, -162.3, 171.765 )
    set u = CreateUnit( p, 'hpea', 1423.8, -259.7, 250.902 )
    set u = CreateUnit( p, 'hpea', 1454.0, -336.2, 12.953 )
    set u = CreateUnit( p, 'hpea', 1463.5, -390.4, 319.833 )
    set u = CreateUnit( p, 'hpea', 1216.4, -490.1, 347.497 )
    set u = CreateUnit( p, 'hpea', 1287.2, -486.5, 252.616 )
    set u = CreateUnit( p, 'hpea', 1365.8, -482.9, 219.920 )
    set u = CreateUnit( p, 'hpea', 1467.4, -479.3, 288.773 )
    set u = CreateUnit( p, 'hpea', 1515.6, -479.3, 25.094 )
    set u = CreateUnit( p, 'hpea', 1574.7, -472.1, 67.612 )
    set u = CreateUnit( p, 'hpea', 1612.9, -472.1, 8.339 )
    set u = CreateUnit( p, 'hpea', 1663.7, -472.1, 45.177 )
    set u = CreateUnit( p, 'hpea', 1297.4, -607.4, 358.978 )
    set u = CreateUnit( p, 'hpea', 1327.1, -669.2, 28.027 )
    set u = CreateUnit( p, 'hpea', 1622.8, -536.0, 61.855 )
    set u = CreateUnit( p, 'hpea', 1509.0, -637.0, 55.505 )
    set u = CreateUnit( p, 'hpea', 1475.5, -662.8, 83.037 )
    set u = CreateUnit( p, 'hpea', 1449.8, -688.3, 106.999 )
    set u = CreateUnit( p, 'hpea', 1166.2, -725.6, 123.084 )
    set u = CreateUnit( p, 'hpea', 1069.3, -832.1, 170.963 )
    set u = CreateUnit( p, 'hpea', 1035.6, -866.0, 273.304 )
    set u = CreateUnit( p, 'hpea', 1020.3, -899.0, 37.607 )
    set u = CreateUnit( p, 'hpea', 1122.5, -806.2, 195.607 )
    set u = CreateUnit( p, 'hpea', 1289.4, -770.9, 275.150 )
    set u = CreateUnit( p, 'hpea', 1387.1, -753.0, 176.402 )
    set u = CreateUnit( p, 'hpea', 1482.2, -753.0, 29.576 )
    set u = CreateUnit( p, 'hpea', 1551.8, -753.0, 291.773 )
    set u = CreateUnit( p, 'hpea', 1598.6, -749.9, 78.610 )
    set u = CreateUnit( p, 'hpea', 1642.7, -749.9, 171.963 )
    set u = CreateUnit( p, 'hpea', 1689.1, -749.9, 186.290 )
    set u = CreateUnit( p, 'hpea', 1701.8, -800.4, 156.527 )
    set u = CreateUnit( p, 'hpea', 1696.6, -832.1, 325.535 )
    set u = CreateUnit( p, 'hpea', 1179.1, -904.4, 78.027 )
    set u = CreateUnit( p, 'hpea', 1179.2, -1016.3, 18.897 )
    set u = CreateUnit( p, 'hpea', 1176.1, -1067.7, 259.846 )
    set u = CreateUnit( p, 'hpea', 1167.1, -1119.4, 159.955 )
    set u = CreateUnit( p, 'hpea', 1185.1, -871.5, 304.056 )
    set u = CreateUnit( p, 'hpea', 1284.9, -890.8, 236.938 )
    set u = CreateUnit( p, 'hpea', 1433.8, -909.9, 242.355 )
    set u = CreateUnit( p, 'hpea', 1482.3, -907.2, 206.494 )
    set u = CreateUnit( p, 'hpea', 1548.2, -907.2, 47.254 )
    set u = CreateUnit( p, 'hpea', 1583.4, -907.2, 278.765 )
    set u = CreateUnit( p, 'hpea', 1574.1, -980.9, 132.565 )
    set u = CreateUnit( p, 'hpea', 1566.2, -1043.4, 118.568 )
    set u = CreateUnit( p, 'hpea', 1554.6, -1103.2, 327.688 )
    set u = CreateUnit( p, 'hpea', 1416.4, -803.3, 344.377 )
    set u = CreateUnit( p, 'hpea', 1407.8, -939.2, 249.529 )
    set u = CreateUnit( p, 'hpea', 1399.7, -1033.6, 43.848 )
    set u = CreateUnit( p, 'hpea', 1394.6, -1114.8, 354.770 )
    set u = CreateUnit( p, 'hpea', 1391.5, -1164.7, 221.645 )
    set u = CreateUnit( p, 'hpea', 1388.7, -1208.4, 55.768 )
    set u = CreateUnit( p, 'hpea', 1385.2, -1265.1, 170.348 )
    set u = CreateUnit( p, 'hpea', 1382.0, -1315.3, 19.479 )
    set u = CreateUnit( p, 'hpea', 1303.7, -843.5, 161.075 )
    set u = CreateUnit( p, 'hpea', 1317.9, -896.3, 264.877 )
    set u = CreateUnit( p, 'hpea', 1379.2, -904.4, 243.596 )
    set u = CreateUnit( p, 'hpea', 1208.3, -728.6, 151.594 )
    set u = CreateUnit( p, 'hpea', 1252.8, -728.6, 214.976 )
    set u = CreateUnit( p, 'hpea', 1287.8, -728.6, 89.926 )
endfunction

//===========================================================================
function CreatePlayerBuildings takes nothing returns nothing
endfunction

//===========================================================================
function CreatePlayerUnits takes nothing returns nothing
    call CreateUnitsForPlayer0(  )
    call CreateUnitsForPlayer1(  )
endfunction

//===========================================================================
function CreateAllUnits takes nothing returns nothing
    call CreatePlayerBuildings(  )
    call CreatePlayerUnits(  )
endfunction

//***************************************************************************
//*
//*  Regions
//*
//***************************************************************************

function CreateRegions takes nothing returns nothing
    local weathereffect we

    set gg_rct________000 = Rect( 608.0, -1664.0, 2144.0, 320.0 )
    set gg_rct________001 = Rect( 192.0, -544.0, 256.0, -480.0 )
endfunction

//***************************************************************************
//*
//*  Triggers
//*
//***************************************************************************

//===========================================================================
// Trigger: kaishi
//===========================================================================
function Trig_kaishi_Actions takes nothing returns nothing
    call DialogSetMessage( udg_duihua, "TRIGSTR_024" )
    call DialogAddButtonBJ( udg_duihua, "TRIGSTR_025" )
    set udg_duihuabutten[1] = GetLastCreatedButtonBJ()
    call DialogAddButtonBJ( udg_duihua, "TRIGSTR_026" )
    set udg_duihuabutten[2] = GetLastCreatedButtonBJ()
    call DialogAddButtonBJ( udg_duihua, "TRIGSTR_027" )
    set udg_duihuabutten[3] = GetLastCreatedButtonBJ()
    call DialogAddButtonBJ( udg_duihua, "TRIGSTR_028" )
    set udg_duihuabutten[4] = GetLastCreatedButtonBJ()
    call DialogAddQuitButton( udg_duihua, 閿欒?, "TRIGSTR_052", 512 )
    set udg_duihuabutten[7] = GetLastCreatedButtonBJ()
    call DialogAddButtonBJ( udg_duihua, "TRIGSTR_058" )
    call CreateFogModifierRectBJ( true, Player(0), FOG_OF_WAR_VISIBLE, GetPlayableMapRect() )
    call EnableTrigger( gg_trg_Esc )
    call PanCameraToTimedLocForPlayer( Player(0), GetUnitLoc(gg_unit_H002_0001), 0.10 )
    call CreateTextTagLocBJ( "TRIGSTR_041", GetUnitLoc(gg_unit_H002_0001), 50.00, 20.00, 100, 100, 100, 0.00 )
    set udg_wenzi[3] = GetLastCreatedTextTag()
    call SetTextTagVelocityBJ( udg_wenzi[3], 30.00, 90 )
    call SetTextTagPermanent( udg_wenzi[3], false )
    call SetTextTagLifespan( udg_wenzi[3], 7.00 )
    call SelectUnitAddForPlayer( gg_unit_H002_0001, Player(0) )
    call SelectHeroSkill( gg_unit_H002_0001, 'A000' )
    call DisplayTimedTextToForce( GetPlayersAll(), 60.00, "TRIGSTR_049" )
endfunction

//===========================================================================
function InitTrig_kaishi takes nothing returns nothing
    set gg_trg_kaishi = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_kaishi, 0.00 )
    call TriggerAddAction( gg_trg_kaishi, function Trig_kaishi_Actions )
endfunction

//===========================================================================
// Trigger: yiciyuan
//===========================================================================
function Trig_yiciyuan_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A000' ) ) then
        return false
    endif
    return true
endfunction

function Trig_yiciyuan_Func006A takes nothing returns nothing
    call GroupAddUnitSimple( GetEnumUnit(), udg_danweizu[1] )
endfunction

function Trig_yiciyuan_Func035Func001C takes nothing returns boolean
    if ( not ( GetOwningPlayer(GetEnumUnit()) == GetLocalPlayer() ) ) then
        return false
    endif
    return true
endfunction

function Trig_yiciyuan_Func035A takes nothing returns nothing
    if ( Trig_yiciyuan_Func035Func001C() ) then
        call GroupRemoveUnitSimple( GetEnumUnit(), udg_danweizu[1] )
    else
        call RemoveGuardPosition( GetEnumUnit() )
        call SetUnitInvulnerable( GetEnumUnit(), true )
        call SetUnitMoveSpeed( GetEnumUnit(), 500.00 )
        call SetUnitFacingToFaceLocTimed( GetEnumUnit(), GetSpellTargetLoc(), 0.10 )
        call CreateTextTagUnitBJ( "TRIGSTR_062", GetEnumUnit(), 10.00, 13.00, 100, 100, 100, 0 )
        set udg_wenzi[1] = GetLastCreatedTextTag()
        call SetTextTagVelocityBJ( udg_wenzi[1], 2.00, 90 )
        call SetTextTagPermanent( udg_wenzi[1], false )
        call SetTextTagLifespan( udg_wenzi[1], 2.50 )
    endif
endfunction

function Trig_yiciyuan_Actions takes nothing returns nothing
    call SetUserControlForceOff( GetPlayersAllies(GetOwningPlayer(GetSpellAbilityUnit())) )
    call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetSpellAbilityUnit()), GetUnitLoc(GetSpellAbilityUnit()), 0.10 )
    set udg_mvbiao[2] = GetSpellTargetLoc()
    set udg_mvbiao[1] = GetUnitLoc(GetSpellAbilityUnit())
    call SetUnitInvulnerable( GetSpellAbilityUnit(), true )
    call ForGroupBJ( GetUnitsInRangeOfLocAll(800.00, udg_mvbiao[2]), function Trig_yiciyuan_Func006A )
    call DisableTrigger( gg_trg_Esc )
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 10
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        call CreateNUnitsAtLoc( 1, 'h003', Player(0), udg_mvbiao[1], bj_UNIT_FACING )
        set udg_danwei[GetForLoopIndexA()] = GetLastCreatedUnit()
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
    call AddSpecialEffectTargetUnitBJ( "overhead", GetSpellAbilityUnit(), "Abilities\\Spells\\Other\\HowlOfTerror\\HowlTarget.mdl" )
    set udg_yiciyuan2[1] = GetLastCreatedEffectBJ()
    call TriggerSleepAction( 0.50 )
    call AddSpecialEffectTargetUnitBJ( "overhead", GetSpellAbilityUnit(), "Abilities\\Spells\\Other\\HowlOfTerror\\HowlTarget.mdl" )
    set udg_yiciyuan2[2] = GetLastCreatedEffectBJ()
    call TriggerSleepAction( 2.00 )
    call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetSpellAbilityUnit()), udg_mvbiao[2], 0.50 )
    call TriggerSleepAction( 0.50 )
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 10
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        call RemoveUnit( udg_danwei[GetForLoopIndexA()] )
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
    call DestroyEffect( udg_yiciyuan2[1] )
    call DestroyEffect( udg_yiciyuan2[2] )
    call PlaySoundAtPointBJ( gg_snd_ThunderBoltMissileDeath, 100, udg_mvbiao[2], 400.00 )
    call CreateNUnitsAtLoc( 1, 'h000', Player(0), udg_mvbiao[2], bj_UNIT_FACING )
    set udg_danwei[1] = GetLastCreatedUnit()
    call CreateNUnitsAtLoc( 1, 'h001', Player(0), udg_mvbiao[2], bj_UNIT_FACING )
    set udg_danwei[2] = GetLastCreatedUnit()
    call AddSpecialEffectLocBJ( udg_mvbiao[2], "Abilities\\Spells\\Other\\Drain\\ManaDrainCaster.mdl" )
    set udg_yiciyuan2[3] = GetLastCreatedEffectBJ()
    call TriggerSleepAction( 0.50 )
    call CreateNUnitsAtLoc( 1, 'h001', Player(0), udg_mvbiao[2], bj_UNIT_FACING )
    set udg_danwei[3] = GetLastCreatedUnit()
    call TriggerSleepAction( 0.50 )
    call SetUserControlForceOn( GetPlayersAllies(GetOwningPlayer(GetSpellAbilityUnit())) )
    call RemoveUnit( udg_danwei[1] )
    call CameraSetEQNoiseForPlayer( GetOwningPlayer(GetTriggerUnit()), 3 )
    call ForGroupBJ( udg_danweizu[1], function Trig_yiciyuan_Func035A )
    call TriggerSleepAction( 1.00 )
    call SetUnitScalePercent( udg_danwei[3], 200.00, 200.00, 100 )
    call TriggerSleepAction( 0.50 )
    call CreateTextTagLocBJ( "TRIGSTR_063", udg_mvbiao[2], 50.00, 20.00, 100, 100, 100, 0.00 )
    set udg_wenzi[2] = GetLastCreatedTextTag()
    call SetTextTagVelocityBJ( udg_wenzi[2], 100.00, 90 )
    call SetTextTagPermanent( udg_wenzi[2], false )
    call SetTextTagLifespan( udg_wenzi[2], 1.50 )
    call SetUnitScalePercent( udg_danwei[3], 300.00, 300.00, 100 )
    call TriggerSleepAction( 0.50 )
    call SetUnitScalePercent( udg_danwei[3], 700.00, 700.00, 400.00 )
    call CameraClearNoiseForPlayer( GetTriggerPlayer() )
    call SetUnitInvulnerable( GetSpellAbilityUnit(), false )
    call ConditionalTriggerExecute( gg_trg_yiciyuan1 )
endfunction

//===========================================================================
function InitTrig_yiciyuan takes nothing returns nothing
    set gg_trg_yiciyuan = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_yiciyuan, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
    call TriggerAddCondition( gg_trg_yiciyuan, Condition( function Trig_yiciyuan_Conditions ) )
    call TriggerAddAction( gg_trg_yiciyuan, function Trig_yiciyuan_Actions )
endfunction

//===========================================================================
// Trigger: yiciyuan1
//===========================================================================
function Trig_yiciyuan1_Func001A takes nothing returns nothing
    call SetUnitPathing( GetEnumUnit(), false )
    call IssuePointOrderLoc( GetEnumUnit(), "move", GetRandomLocInRect(GetPlayableMapRect()) )
endfunction

function Trig_yiciyuan1_Func003A takes nothing returns nothing
    call SetUnitPathing( GetEnumUnit(), true )
    call SetUnitPositionLoc( GetEnumUnit(), udg_mvbiao[2] )
endfunction

function Trig_yiciyuan1_Func006A takes nothing returns nothing
    call SetUnitPathing( GetEnumUnit(), false )
    call SetUnitMoveSpeed( GetEnumUnit(), 50.00 )
    call IssuePointOrderLoc( GetEnumUnit(), "move", GetRandomLocInRect(GetPlayableMapRect()) )
endfunction

function Trig_yiciyuan1_Func014A takes nothing returns nothing
    call SetForceAllianceStateBJ( GetForceOfPlayer(GetOwningPlayer(GetEnumUnit())), GetForceOfPlayer(GetOwningPlayer(GetSpellAbilityUnit())), bj_ALLIANCE_ALLIED )
    call SetUnitPositionLoc( GetEnumUnit(), PolarProjectionBJ(udg_mvbiao[2], 50.00, 90.00) )
endfunction

function Trig_yiciyuan1_Func015Func014Func002C takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetEnumUnit()) != 'h003' ) ) then
        return false
    endif
    return true
endfunction

function Trig_yiciyuan1_Func015Func014A takes nothing returns nothing
    set udg_danweizu[2] = GetLastCreatedGroup()
    if ( Trig_yiciyuan1_Func015Func014Func002C() ) then
        call GroupRemoveUnitSimple( GetEnumUnit(), udg_danweizu[2] )
    else
        call RemoveUnit( GetEnumUnit() )
        call GroupRemoveUnitSimple( GetEnumUnit(), udg_danweizu[2] )
    endif
endfunction

function Trig_yiciyuan1_Func027A takes nothing returns nothing
    call ShowUnitHide( GetEnumUnit() )
    call SetForceAllianceStateBJ( GetForceOfPlayer(GetOwningPlayer(GetEnumUnit())), GetForceOfPlayer(GetOwningPlayer(GetSpellAbilityUnit())), bj_ALLIANCE_UNALLIED )
endfunction

function Trig_yiciyuan1_Func041A takes nothing returns nothing
    call GroupRemoveUnitSimple( GetDyingUnit(), udg_danweizu[1] )
    call SetUnitTimeScalePercent( GetEnumUnit(), 100 )
    call SetUnitInvulnerable( GetEnumUnit(), false )
    call SetUnitPathing( GetEnumUnit(), true )
    call ShowUnitShow( GetEnumUnit() )
    call ResetUnitAnimation( GetEnumUnit() )
    call SetUnitScalePercent( GetEnumUnit(), 50.00, 50.00, 100.00 )
    call UnitDamageTargetBJ( GetSpellAbilityUnit(), GetEnumUnit(), I2R(GetRandomInt(795, 850)), ATTACK_TYPE_CHAOS, DAMAGE_TYPE_DIVINE )
endfunction

function Trig_yiciyuan1_Actions takes nothing returns nothing
    call ForGroupBJ( udg_danweizu[1], function Trig_yiciyuan1_Func001A )
    call TriggerSleepAction( 1.00 )
    call ForGroupBJ( udg_danweizu[1], function Trig_yiciyuan1_Func003A )
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 8
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        call PlaySoundAtPointBJ( gg_snd_InnerFireBirth, 100, udg_mvbiao[2], ( 400.00 + 1 ) )
        call CreateNUnitsAtLoc( 1, 'h004', Player(0), udg_mvbiao[2], bj_UNIT_FACING )
        set udg_danwei[( GetForLoopIndexA() + 20 )] = GetLastCreatedUnit()
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
    call PlaySoundAtPointBJ( gg_snd_InnerFireBirth, 100, udg_mvbiao[2], ( 400.00 + 1 ) )
    call ForGroupBJ( udg_danweizu[1], function Trig_yiciyuan1_Func006A )
    call TriggerSleepAction( 0.50 )
    call CreateTextTagLocBJ( "TRIGSTR_064", GetUnitLoc(gg_unit_H002_0001), 50.00, 20.00, 100, 100, 100, 0.00 )
    set udg_wenzi[4] = GetLastCreatedTextTag()
    call SetTextTagVelocityBJ( udg_wenzi[4], 30.00, 90 )
    call SetTextTagPermanent( udg_wenzi[4], false )
    call SetTextTagLifespan( udg_wenzi[4], 2.50 )
    call TriggerSleepAction( 2.50 )
    call ForGroupBJ( udg_danweizu[1], function Trig_yiciyuan1_Func014A )
    set bj_forLoopBIndex = 1
    set bj_forLoopBIndexEnd = 20
    loop
        exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
        call PlaySoundAtPointBJ( gg_snd_RainOfFireLoop1, 100, udg_mvbiao[2], 400.00 )
        call SetUnitAnimation( GroupPickRandomUnit(udg_danweizu[1]), "death" )
        call SetUnitAnimation( GroupPickRandomUnit(udg_danweizu[1]), "death" )
        call AddSpecialEffectLocBJ( udg_mvbiao[2], "Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl" )
        set udg_yiciyuan2[10] = GetLastCreatedEffectBJ()
        call CreateNUnitsAtLoc( 1, 'h005', Player(0), udg_mvbiao[2], GetRandomReal(0.00, 360.00) )
        set udg_danwei1[( GetForLoopIndexA() + 10 )] = GetLastCreatedUnit()
        call SetUnitScalePercent( udg_danwei1[( GetForLoopIndexA() + 10 )], 300.00, 300.00, 200.00 )
        call CreateNUnitsAtLoc( 6, 'h003', Player(0), udg_mvbiao[2], bj_UNIT_FACING )
        call TriggerSleepAction( 0.10 )
        call DestroyEffect( udg_yiciyuan2[10] )
        call RemoveUnit( udg_danwei1[( GetForLoopIndexA() + 10 )] )
        call PlaySoundAtPointBJ( gg_snd_RainOfFireLoop1, 100, udg_mvbiao[2], 400.00 )
        call ForGroupBJ( GetUnitsInRangeOfLocAll(800.00, udg_mvbiao[2]), function Trig_yiciyuan1_Func015Func014A )
        set bj_forLoopBIndex = bj_forLoopBIndex + 1
    endloop
    call CinematicFilterGenericBJ( 0.50, BLEND_MODE_BLEND, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 0.00, 0.00, 100, 100, 0, 0, 100.00, 75.00 )
    call CreateNUnitsAtLoc( 1, 'h000', Player(0), udg_mvbiao[2], bj_UNIT_FACING )
    set udg_danwei[4] = GetLastCreatedUnit()
    call CreateNUnitsAtLoc( 1, 'h000', Player(0), udg_mvbiao[2], bj_UNIT_FACING )
    set udg_danwei[5] = GetLastCreatedUnit()
    call CreateNUnitsAtLoc( 1, 'h000', Player(0), udg_mvbiao[2], bj_UNIT_FACING )
    set udg_danwei[6] = GetLastCreatedUnit()
    call PolledWait( 1.00 )
    call RemoveUnit( udg_danwei[4] )
    call RemoveUnit( udg_danwei[5] )
    call RemoveUnit( udg_danwei[6] )
    call ForGroupBJ( udg_danweizu[1], function Trig_yiciyuan1_Func027A )
    call DisplayCineFilter( false )
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 30
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        call RemoveUnit( udg_danwei[GetForLoopIndexA()] )
        call RemoveUnit( udg_danwei1[GetForLoopIndexA()] )
        call DestroyEffect( udg_yiciyuan2[GetForLoopIndexA()] )
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
    call AddSpecialEffectLocBJ( udg_mvbiao[2], "Abilities\\Spells\\Other\\HowlOfTerror\\HowlTarget.mdl" )
    set udg_yiciyuan2[11] = GetLastCreatedEffectBJ()
    call TriggerSleepAction( 0.50 )
    call AddSpecialEffectLocBJ( udg_mvbiao[2], "Abilities\\Spells\\Other\\HowlOfTerror\\HowlTarget.mdl" )
    set udg_yiciyuan2[12] = GetLastCreatedEffectBJ()
    call TriggerSleepAction( 3.00 )
    set bj_forLoopBIndex = 1
    set bj_forLoopBIndexEnd = 10
    loop
        exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
        call PlaySoundAtPointBJ( gg_snd_BoatMissileHit, 100, udg_mvbiao[2], 400.00 )
        call TriggerSleepAction( 0.02 )
        call CreateNUnitsAtLoc( 1, 'h006', Player(0), udg_mvbiao[2], bj_UNIT_FACING )
        set udg_danwei[GetForLoopIndexB()] = GetLastCreatedUnit()
        set bj_forLoopBIndex = bj_forLoopBIndex + 1
    endloop
    call AddSpecialEffectLocBJ( udg_mvbiao[2], "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl" )
    set udg_yiciyuan2[13] = GetLastCreatedEffectBJ()
    call DestroyEffect( udg_yiciyuan2[11] )
    call DestroyEffect( udg_yiciyuan2[12] )
    call ForGroupBJ( udg_danweizu[1], function Trig_yiciyuan1_Func041A )
    call DestroyEffect( udg_yiciyuan2[13] )
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 10
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        call RemoveUnit( udg_danwei[GetForLoopIndexA()] )
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
    call ConditionalTriggerExecute( gg_trg_houxu )
    call EnableTrigger( gg_trg_Esc )
endfunction

//===========================================================================
function InitTrig_yiciyuan1 takes nothing returns nothing
    set gg_trg_yiciyuan1 = CreateTrigger(  )
    call DisableTrigger( gg_trg_yiciyuan1 )
    call TriggerAddAction( gg_trg_yiciyuan1, function Trig_yiciyuan1_Actions )
endfunction

//===========================================================================
// Trigger: Esc
//===========================================================================
function Trig_Esc_Actions takes nothing returns nothing
    call DialogDisplayBJ( true, udg_duihua, Player(0) )
endfunction

//===========================================================================
function InitTrig_Esc takes nothing returns nothing
    set gg_trg_Esc = CreateTrigger(  )
    call DisableTrigger( gg_trg_Esc )
    call TriggerRegisterPlayerEventEndCinematic( gg_trg_Esc, Player(0) )
    call TriggerAddAction( gg_trg_Esc, function Trig_Esc_Actions )
endfunction

//===========================================================================
// Trigger: duihua
//===========================================================================
function Trig_duihua_Func001Func001A takes nothing returns nothing
    call RemoveUnit( GetEnumUnit() )
    call GroupClear( GetLastCreatedGroup() )
endfunction

function Trig_duihua_Func001Func002Func001Func001Func003C takes nothing returns boolean
    if ( not ( GetClickedButtonBJ() == udg_duihuabutten[5] ) ) then
        return false
    endif
    return true
endfunction

function Trig_duihua_Func001Func002Func001Func001C takes nothing returns boolean
    if ( not ( GetClickedButtonBJ() == udg_duihuabutten[4] ) ) then
        return false
    endif
    return true
endfunction

function Trig_duihua_Func001Func002Func001C takes nothing returns boolean
    if ( not ( GetClickedButtonBJ() == udg_duihuabutten[3] ) ) then
        return false
    endif
    return true
endfunction

function Trig_duihua_Func001Func002C takes nothing returns boolean
    if ( not ( GetClickedButtonBJ() == udg_duihuabutten[2] ) ) then
        return false
    endif
    return true
endfunction

function Trig_duihua_Func001C takes nothing returns boolean
    if ( not ( GetClickedButtonBJ() == udg_duihuabutten[1] ) ) then
        return false
    endif
    return true
endfunction

function Trig_duihua_Actions takes nothing returns nothing
    if ( Trig_duihua_Func001C() ) then
        call ForGroupBJ( GetUnitsInRectOfPlayer(GetPlayableMapRect(), Player(1)), function Trig_duihua_Func001Func001A )
        call CreateNUnitsAtLoc( 30, 'hkni', Player(1), GetRandomLocInRect(gg_rct________000), bj_UNIT_FACING )
    else
        if ( Trig_duihua_Func001Func002C() ) then
            call SetUnitLifePercentBJ( gg_unit_H002_0001, 100 )
        else
            if ( Trig_duihua_Func001Func002Func001C() ) then
                call SetUnitManaPercentBJ( gg_unit_H002_0001, 100 )
            else
                if ( Trig_duihua_Func001Func002Func001Func001C() ) then
                    set udg_duihuabutten[5] = udg_duihuabutten[4]
                    set udg_duihuabutten[4] = udg_duihuabutten[6]
                    call UnitAddItemByIdSwapped( 'I000', gg_unit_H002_0001 )
                else
                    if ( Trig_duihua_Func001Func002Func001Func001Func003C() ) then
                        call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_065" )
                    else
                        call DoNothing(  )
                    endif
                endif
            endif
        endif
    endif
endfunction

//===========================================================================
function InitTrig_duihua takes nothing returns nothing
    set gg_trg_duihua = CreateTrigger(  )
    call TriggerRegisterDialogEventBJ( gg_trg_duihua, udg_duihua )
    call TriggerAddAction( gg_trg_duihua, function Trig_duihua_Actions )
endfunction

//===========================================================================
// Trigger: houxu
//===========================================================================
function Trig_houxu_Func002A takes nothing returns nothing
    call SetUnitScalePercent( GetEnumUnit(), 100, 100, 100 )
    call GroupClear( udg_danweizu[1] )
endfunction

function Trig_houxu_Actions takes nothing returns nothing
    call TriggerSleepAction( 5.00 )
    call ForGroupBJ( udg_danweizu[1], function Trig_houxu_Func002A )
endfunction

//===========================================================================
function InitTrig_houxu takes nothing returns nothing
    set gg_trg_houxu = CreateTrigger(  )
    call DisableTrigger( gg_trg_houxu )
    call TriggerAddAction( gg_trg_houxu, function Trig_houxu_Actions )
endfunction

//===========================================================================
// Trigger: siwang
//===========================================================================
function Trig_siwang_Func002Func002C takes nothing returns boolean
    if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == false ) ) then
        return false
    endif
    return true
endfunction

function Trig_siwang_Func002C takes nothing returns boolean
    if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
        return false
    endif
    return true
endfunction

function Trig_siwang_Actions takes nothing returns nothing
    if ( Trig_siwang_Func002C() ) then
        call PanCameraToTimedLocForPlayer( Player(0), GetRectCenter(gg_rct________001), 3.00 )
        call ReviveHeroLoc( gg_unit_H002_0001, GetRectCenter(gg_rct________001), false )
    else
        if ( Trig_siwang_Func002Func002C() ) then
            call TriggerSleepAction( 5.00 )
            call CreateNUnitsAtLoc( 1, 'hkni', Player(1), GetUnitLoc(GetDyingUnit()), bj_UNIT_FACING )
        else
            call DoNothing(  )
        endif
    endif
endfunction

//===========================================================================
function InitTrig_siwang takes nothing returns nothing
    set gg_trg_siwang = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_siwang, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddAction( gg_trg_siwang, function Trig_siwang_Actions )
endfunction

//===========================================================================
// Trigger: shangchu
//===========================================================================
function Trig_shangchu_Conditions takes nothing returns boolean
    if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == false ) ) then
        return false
    endif
    return true
endfunction

function Trig_shangchu_Actions takes nothing returns nothing
    call TriggerSleepAction( 5.50 )
    call RemoveUnit( GetDyingUnit() )
endfunction

//===========================================================================
function InitTrig_shangchu takes nothing returns nothing
    set gg_trg_shangchu = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_shangchu, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( gg_trg_shangchu, Condition( function Trig_shangchu_Conditions ) )
    call TriggerAddAction( gg_trg_shangchu, function Trig_shangchu_Actions )
endfunction

//===========================================================================
function InitCustomTriggers takes nothing returns nothing
    call InitTrig_kaishi(  )
    call InitTrig_yiciyuan(  )
    call InitTrig_yiciyuan1(  )
    call InitTrig_Esc(  )
    call InitTrig_duihua(  )
    call InitTrig_houxu(  )
    call InitTrig_siwang(  )
    call InitTrig_shangchu(  )
endfunction

//***************************************************************************
//*
//*  Players
//*
//***************************************************************************

function InitCustomPlayerSlots takes nothing returns nothing

    // Player 0
    call SetPlayerStartLocation( Player(0), 0 )
    call SetPlayerColor( Player(0), ConvertPlayerColor(0) )
    call SetPlayerRacePreference( Player(0), RACE_PREF_HUMAN )
    call SetPlayerRaceSelectable( Player(0), true )
    call SetPlayerController( Player(0), MAP_CONTROL_USER )

    // Player 1
    call SetPlayerStartLocation( Player(1), 1 )
    call SetPlayerColor( Player(1), ConvertPlayerColor(1) )
    call SetPlayerRacePreference( Player(1), RACE_PREF_ORC )
    call SetPlayerRaceSelectable( Player(1), true )
    call SetPlayerController( Player(1), MAP_CONTROL_COMPUTER )

endfunction

function InitCustomTeams takes nothing returns nothing
    // Force: TRIGSTR_002
    call SetPlayerTeam( Player(0), 0 )

    // Force: TRIGSTR_030
    call SetPlayerTeam( Player(1), 1 )

endfunction

//***************************************************************************
//*
//*  Main Initialization
//*
//***************************************************************************

//===========================================================================
function main takes nothing returns nothing
    local weathereffect we
    call SetCameraBounds( -3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), -3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) )
    call SetDayNightModels( "Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl" )
    set we = AddWeatherEffect( Rect(-4096.0,-4096.0,4096.0,4096.0), 'LRma' )
    call EnableWeatherEffect( we, true )
    call NewSoundEnvironment( "Default" )
    call SetAmbientDaySound( "LordaeronSummerDay" )
    call SetAmbientNightSound( "LordaeronSummerNight" )
    call SetMapMusic( "Music", true, 0 )
    call InitSounds(  )
    call CreateRegions(  )
    call CreateAllUnits(  )
    call InitBlizzard(  )

//! initstructs

//! initdatastructs
    call InitGlobals(  )
    call InitCustomTriggers(  )

endfunction

//***************************************************************************
//*
//*  Map Configuration
//*
//***************************************************************************

function config takes nothing returns nothing
    call SetMapName( "TRIGSTR_053" )
    call SetMapDescription( "TRIGSTR_055" )
    call SetPlayers( 2 )
    call SetTeams( 2 )
    call SetGamePlacement( MAP_PLACEMENT_USE_MAP_SETTINGS )

    call DefineStartLocation( 0, -448.0, 384.0 )
    call DefineStartLocation( 1, -2432.0, -2560.0 )

    // Player setup
    call InitCustomPlayerSlots(  )
    call InitCustomTeams(  )
endfunction



Line:232
 楼主| 发表于 2011-7-9 09:23:00 | 显示全部楼层
太长了额,我在做技能演示图啊,原本好端端的,改了一下一些东西,去测试,他就出现这些了额,呜呜~~~~~~~~~~~~~~~~~(>_<)~~~~ [s:202]
回复

使用道具 举报

 楼主| 发表于 2011-7-9 09:28:07 | 显示全部楼层
等待中~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
回复

使用道具 举报

 楼主| 发表于 2011-7-9 09:29:29 | 显示全部楼层
2天后偶来收货看有没有人回答我的问题啊!!!!!!!!!! [s:189]
回复

使用道具 举报

发表于 2011-7-9 15:42:47 | 显示全部楼层
这是测试的地图的脚本文件……不是错误代码
回复

使用道具 举报

 楼主| 发表于 2012-6-24 14:54:45 | 显示全部楼层
= =
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-2 10:30 , Processed in 0.060305 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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