med_ved | Дата: Среда, 04 Апреля 2012, 14:59:11 | Сообщение # 1 |
6 уровень
Группа: Проверенные
Сообщений: 205
Награды: 0
Репутация: 79
Блокировки:
| Пишет ошибка, карта не загружается подскажите где исправить. Code function Trig_HolyBall_Conditions takes nothing returns boolean return GetSpellAbilityId()==HolyBallId() endfunction
function IIHolyBall takes real hp,unit u,unit d returns nothing local integer rand=GetRandomInt(0,100) local group g=CreateGroup() local group gr=CreateGroup() local unit ru local unit e call GroupEnumUnitsInRange(g,GetWidgetX(u),GetWidgetY(u),300.,null) loop set e=FirstOfGroup(g) exitwhen e==null if IsUnitType(e,UNIT_TYPE_STRUCTURE)==false and GetWidgetLife(e)>0. and e!=u then call GroupAddUnit(gr,e) endif call GroupRemoveUnit(g,e) endloop set ru=GroupPickRandomUnit(gr) if hp>=95. then if rand<=30 and ru!=null then call IssueTargetOrder(d,"creepthunderbolt",ru) elseif rand>30 and GetUnitAbilityLevel(u,HolyBallBuffId())==0 or ru==null then call IssueTargetOrder(d,"innerfire",u) endif elseif hp>=85. then if rand<=50 and ru!=null then call IssueTargetOrder(d,"creepthunderbolt",u) elseif rand>50 and rand<=85 and GetUnitAbilityLevel(u,HolyBallBuffId())==0 or ru==null then call IssueTargetOrder(d,"innerfire",u) elseif rand>85 call IssueTargetOrder(d,"holybolt",u) endif elseif hp>=75. then if rand<=50 and ru!=null then call IssueTargetOrder(d,"creepthunderbolt",u) elseif rand>50 and rand<=75 and GetUnitAbilityLevel(u,HolyBallBuffId())==0 or ru==null then call IssueTargetOrder(d,"innerfire",u) elseif rand>75 call IssueTargetOrder(d,"holybolt",u) endif elseif hp>=65. then if rand<=50 and ru!=null then call IssueTargetOrder(d,"creepthunderbolt",u) elseif rand>50 and rand<=65 and GetUnitAbilityLevel(u,HolyBallBuffId())==0 or ru==null then call IssueTargetOrder(d,"innerfire",u) elseif rand>65 call IssueTargetOrder(d,"holybolt",u) endif elseif hp>=55. then if rand<=50 and ru!=null then call IssueTargetOrder(d,"creepthunderbolt",u) elseif rand>50 and rand<=55 and GetUnitAbilityLevel(u,HolyBallBuffId())==0 or ru==null then call IssueTargetOrder(d,"innerfire",u) elseif rand>55 call IssueTargetOrder(d,"holybolt",u) endif elseif hp>=45. then if rand<=40 and ru!=null then call IssueTargetOrder(d,"creepthunderbolt",u) elseif rand>40 and rand<=55 and GetUnitAbilityLevel(u,HolyBallBuffId())==0 or ru==null then call IssueTargetOrder(d,"innerfire",u) elseif rand>55 call IssueTargetOrder(d,"holybolt",u) endif elseif hp>=35. then if rand<=40 and ru!=null then call IssueTargetOrder(d,"creepthunderbolt",u) elseif rand>40 and rand<=50 and GetUnitAbilityLevel(u,HolyBallBuffId())==0 or ru==null then call IssueTargetOrder(d,"innerfire",u) elseif rand>50 call IssueTargetOrder(d,"holybolt",u) endif elseif hp>=25. then if rand<=40 and ru!=null then call IssueTargetOrder(d,"creepthunderbolt",u) elseif rand>40 and rand<=50 and GetUnitAbilityLevel(u,HolyBallBuffId())==0 or ru==null then call IssueTargetOrder(d,"innerfire",u) elseif rand>50 call IssueTargetOrder(d,"holybolt",u) endif elseif hp>=15. then if rand<=40 and ru!=null then call IssueTargetOrder(d,"creepthunderbolt",u) elseif rand>40 and rand<=45 and GetUnitAbilityLevel(u,HolyBallBuffId())==0 or ru==null then call IssueTargetOrder(d,"innerfire",u) elseif rand>45 call IssueTargetOrder(d,"holybolt",u) endif endif call DestroyGroup(g) call DestroyGroup(gr) set ru=null set e=null set g=null set gr=null endfunction
function PositionHolyBall takes nothing returns nothing local timer t=GetExpiredTimer() local integer id=GetHandleId(t) local unit u=LoadUnitHandle(udg_H,id,1) local unit d=LoadUnitHandle(udg_H,id,2) if GetWidgetLife(d)>0. and GetWidgetLife(u)>0. and IsUnitHidden(u)==false then call SetUnitX(d,GetWidgetX(u)-40.*Cos(GetUnitFacing(u)*bj_DEGTORAD)) call SetUnitY(d,GetWidgetY(u)-40.*Sin(GetUnitFacing(u)*bj_DEGTORAD)) if GetUnitState(d,UNIT_STATE_MANA)>=1. then call IIHolyBall(GetWidgetLife(u)/GetUnitState(u,UNIT_STATE_MAX_LIFE)*100.,u,d) endif else call RemoveUnit(d) call PauseTimer(t) call DestroyTimer(t) call FlushChildHashtable(udg_H,id) endif set t=null set u=null set d=null endfunction
function Trig_HolyBall_Actions takes nothing returns nothing local timer t=CreateTimer() local integer id=GetHandleId(t) local unit u=GetTriggerUnit() local unit d=CreateUnit(GetOwningPlayer(u),HolyBallDummyId(),GetWidgetX(u),GetWidgetY(u),0.) call UnitApplyTimedLife(d,'BTLF',HolyBallTimeLife()+HolyBallTimeLifePerLvl()*GetUnitAbilityLevel(u,HolyBallId())) call SaveUnitHandle(udg_H,id,1,u) call SaveUnitHandle(udg_H,id,2,d) call TimerStart(t,.04,true,function PositionHolyBall) set t=null set u=null set d=null endfunction Добавлено (04 Апрель 2012, 14:59:11) --------------------------------------------- Пишет то что выделено жёлтым не прально! почему? elseif hp>=85. then if rand<=50 and ru!=null then call IssueTargetOrder(d,"creepthunderbolt",u) elseif rand>50 and rand<=85 and GetUnitAbilityLevel(u,HolyBallBuffId())==0 or ru==null then call IssueTargetOrder(d,"innerfire",u) elseif rand>85 call IssueTargetOrder(d,"holybolt",u) endif
Сообщение отредактировал med_ved - Среда, 04 Апреля 2012, 14:51:59 |
|
|
|
med_ved | Дата: Среда, 04 Апреля 2012, 15:17:05 | Сообщение # 3 |
6 уровень
Группа: Проверенные
Сообщений: 205
Награды: 0
Репутация: 79
Блокировки:
| О ну ты ваще молорик спасибо огромное 2 часа тупил))))))
|
|
|
|