|
困扰好多天了。。。左看右看似乎都没问题,难道不是这里的问题??
[codes=jass]
function U7V takes nothing returns nothing
local integer BEV=GL[194]
//BEV值是调节刷怪强度的,越大刷越多
local location LAV=GetRectCenter(MO)
//LAV是刷怪点
if(BEV<15)then
call CreateNUnitsAtLoc(2,'n00A',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(2.)
call CreateNUnitsAtLoc(4,'n038',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(3.)
call CreateNUnitsAtLoc(2,'n01T',Player(11),LAV,bj_UNIT_FACING)
else
if(BEV<30)then
call CreateNUnitsAtLoc(2,'n01T',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(2.)
call CreateNUnitsAtLoc(3,'n00A',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(2.)
call CreateNUnitsAtLoc(2,'n00C',Player(11),LAV,bj_UNIT_FACING)
else
if(BEV<45)then
call CreateNUnitsAtLoc(1,'n00E',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(2.)
call CreateNUnitsAtLoc(3,'n00F',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(3.)
call CreateNUnitsAtLoc(2,'n00G',Player(11),LAV,bj_UNIT_FACING)
else
if(BEV<60)then
call CreateNUnitsAtLoc(2,'n00E',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(2.)
call CreateNUnitsAtLoc(2,'n00F',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(3.)
call CreateNUnitsAtLoc(3,'n00G',Player(11),LAV,bj_UNIT_FACING)
else
if(BEV<75)then
call CreateNUnitsAtLoc(3,'n00O',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(2.)
call CreateNUnitsAtLoc(2,'n00F',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(3.)
call CreateNUnitsAtLoc(3,'n00G',Player(11),LAV,bj_UNIT_FACING)
else
if(BEV<90)then
call CreateNUnitsAtLoc(3,'n00O',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(2.)
call CreateNUnitsAtLoc(1,'n039',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(3.)
call CreateNUnitsAtLoc(2,'n00R',Player(11),LAV,bj_UNIT_FACING)
else
if(BEV<'i')then
call CreateNUnitsAtLoc(2,'n00Q',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(2.)
call CreateNUnitsAtLoc(1,'n039',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(3.)
call CreateNUnitsAtLoc(2,'n00P',Player(11),LAV,bj_UNIT_FACING)
else
if(BEV<'x')then
call CreateNUnitsAtLoc(3,'n00Q',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(2.)
call CreateNUnitsAtLoc(2,'n039',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(3.)
call CreateNUnitsAtLoc(2,'n00P',Player(11),LAV,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(2,'n00S',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(2.)
call CreateNUnitsAtLoc(2,'n00Q',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(2.)
call CreateNUnitsAtLoc(2,'n00R',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(3.)
call CreateNUnitsAtLoc(2,'n039',Player(11),LAV,bj_UNIT_FACING)
call TriggerSleepAction(3.)
call CreateNUnitsAtLoc(2,'n00P',Player(11),LAV,bj_UNIT_FACING)
endif
endif
endif
endif
endif
endif
endif
endif
call RemoveLocation(LAV)
set LAV=null
//清除点LAV,释放内存
endfunction
function U9V takes nothing returns nothing
local integer BEV=0
//BEV值控制刷怪强度
local integer tp=0
//在线人数
local integer p=0
//只是个开关变量
local integer WVV=0
local real U5V=.0
local location LAV=GetRectCenter(MO)
//LAV为刷怪点
loop
exitwhen(p>7)
if(GetPlayerController(Player(p))==MAP_CONTROL_USER)then
if(GetPlayerSlotState(Player(p))==PLAYER_SLOT_STATE_PLAYING)then
set BEV=GetHeroLevel(DL[p])
set tp=tp+1
endif
endif
set p=p+1
endloop
//上面的循环动作是根据在线玩家等级来调节刷怪的强度
set WVV=(BEV/ 4)+BEV
set GL[194]=(WVV/ tp)
call DestroyTimerDialog(KL[8])
//KL[8]是刷怪的计时器
call QuestMessageBJ(bj_FORCE_ALL_PLAYERS,1,"开始刷怪了!")
call PingMinimapLocForForce(bj_FORCE_ALL_PLAYERS,LAV,15.)
//下面这句只是友军防守的
call ForGroup(TL,function U8V)
//下面开始刷怪
call U7V()
call U7V()
call U7V()
set p=0
loop
exitwhen(p>3)
if(GetPlayerController(Player(p))==MAP_CONTROL_USER)then
if(GetPlayerSlotState(Player(p))==PLAYER_SLOT_STATE_PLAYING)then
set GL[194]=GetHeroLevel(DL[p])
call U7V()
endif
endif
set p=p+1
endloop
//这个是刷BOSS
set FM=CreateUnit(Player(11),'E003',7392.,14432.,bj_UNIT_FACING)
call SetHeroLevelBJ(FM,WVV,false)
set p=4
loop
exitwhen(p>7)
if(GetPlayerController(Player(p))==MAP_CONTROL_USER)then
if(GetPlayerSlotState(Player(p))==PLAYER_SLOT_STATE_PLAYING)then
set GL[194]=GetHeroLevel(DL[p])
call U7V()
endif
endif
set p=p+1
endloop
//销毁原来的刷怪计时器
call DestroyTimerDialog(KL[8])
//动态调节刷怪等待时间
set U5V=I2R(GetRandomInt(599+((BEV/ tp)*3),1200))
//开始新的刷怪计时
call TimerStart(NM,U5V,false,null)
set KL[8]=CreateTimerDialog(NM)
call TimerDialogSetTitle(KL[8],"下一次袭击")
call TimerDialogDisplay(KL[8],true)
call RemoveLocation(LAV)
set LAV=null
endfunction[/codes] |
|