Here:
function Mj takes nothing returns boolean return GetUnitTypeId(GetDyingUnit())=='n00L' endfunction
function IsHero takes nothing returns boolean return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)!=null) endfunction
function MJ takes nothing returns nothing local location Mk=GetRectCenter(udg_RoshanSpawn) local real Hp set udg_integer30=udg_integer30+1 set udg_unit01=CreateUnitAtLoc(Player(12),'n00L',Mk,bj_UNIT_FACING) call RemoveLocation(Mk) if udg_integer30>1 then call UnitRemoveAbility(udg_unit01,'A0K2') call UnitAddAbility(udg_unit01,'A0Q6') call UnitAddItem(udg_unit01,CreateItem('shea',0,0)) endif call UnitAddItem(udg_unit01,CreateItem('I01H',0,0)) call SetPlayerTechResearched(GetOwningPlayer(udg_unit01),'R00F',udg_integer30) set Hp=iH(175+50*udg_integer30,300) call SetUnitScale(udg_unit01,.01*Hp,.01*Hp,.01*Hp) endfunction
function MK takes nothing returns nothing local timer t=CreateTimer() call TimerStart(t,600,false,function MJ) if(hC(GetOwningPlayer(GetKillingUnit())))then call iQ(bj_FORCE_ALL_PLAYERS,10.,"Roshan has been slain by the |c00ff0000Sentinel|r! Each Sentinel player receives 200 bonus gold.") call AdjustPlayerStateBJ(200,udg_SentinelPlayers[1],PLAYER_STATE_RESOURCE_GOLD) call AdjustPlayerStateBJ(200,udg_SentinelPlayers[2],PLAYER_STATE_RESOURCE_GOLD) call AdjustPlayerStateBJ(200,udg_SentinelPlayers[3],PLAYER_STATE_RESOURCE_GOLD) call AdjustPlayerStateBJ(200,udg_SentinelPlayers[4],PLAYER_STATE_RESOURCE_GOLD) call AdjustPlayerStateBJ(200,udg_SentinelPlayers[5],PLAYER_STATE_RESOURCE_GOLD) endif if(hD(GetOwningPlayer(GetKillingUnit())))then call iQ(bj_FORCE_ALL_PLAYERS,10.,"Roshan has been slain by the |c00004000Scourge|r! Each Scourge player receives 200 bonus gold.") call AdjustPlayerStateBJ(200,udg_ScourgePlayers[1],PLAYER_STATE_RESOURCE_GOLD) call AdjustPlayerStateBJ(200,udg_ScourgePlayers[2],PLAYER_STATE_RESOURCE_GOLD) call AdjustPlayerStateBJ(200,udg_ScourgePlayers[3],PLAYER_STATE_RESOURCE_GOLD) call AdjustPlayerStateBJ(200,udg_ScourgePlayers[4],PLAYER_STATE_RESOURCE_GOLD) call AdjustPlayerStateBJ(200,udg_ScourgePlayers[5],PLAYER_STATE_RESOURCE_GOLD) endif endfunction
If you need help understanding it, either PM me or post back in here.
_________________ You know why the Yankees always win, Frank? 'Cause they have Mickey Mantle? No, it's 'cause the other teams can't stop staring at those damn pinstripes.
|