instant to point

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

JustANewbie
Forum Spammer
Posts: 510
Joined: August 18th, 2012, 2:32 am

instant to point

Post by JustANewbie »

this spell is instant spell, i changed the ability "A098" to point target, do i need to change the trigger too? please help, i don't know how to do it
Spoiler:

Code: Select all

function eEv takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H02N')or(GetUnitTypeId(GetTriggerUnit())=='H02O')
endfunction
function eXv takes nothing returns boolean
return(GetSpellAbilityId()=='A098')and(GetPlayerState(GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_FOOD_USED)==100)and(Dr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]==1)and(eEv())
endfunction
function eOv takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function eAv takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])))
endfunction
function eNv takes nothing returns boolean
return GetBooleanAnd(eOv(),eAv())
endfunction
function ebv takes nothing returns nothing
call SetUnitInvulnerable(GetEnumUnit(),true)
call PauseUnit(GetEnumUnit(),true)
endfunction
function eBv takes nothing returns boolean
return(IsUnitGroupEmptyBJ(Mr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]))
endfunction
function ecv takes nothing returns boolean
return(IsUnitDeadBJ(Pr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]))
endfunction
function eCv takes nothing returns nothing
call SetUnitInvulnerable(GetEnumUnit(),false)
call PauseUnit(GetEnumUnit(),false)
endfunction
function edv takes nothing returns nothing
set hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=GetTriggerUnit()
call SetPlayerStateBJ(GetOwningPlayer(hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]),PLAYER_STATE_RESOURCE_FOOD_USED,0)
set jr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=GetUnitLoc(GetTriggerUnit())
call SetUnitInvulnerable(hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],true)
call PauseUnit(hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],true)
set Mr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=tF(700.,jr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],Condition(function eNv))
call ForGroupBJ(Mr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],function ebv)  
set kr[1]=jF(jr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],600.,90.)
set kr[2]=jF(jr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],600.,160.)
set kr[3]=jF(jr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],600.,235.)
set kr[4]=jF(jr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],600.,305.)
set kr[5]=jF(jr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],600.,20.)
call AddLightningLoc("DRAM",kr[1],kr[3])
set Kr[1]=bj_lastCreatedLightning
call AddLightningLoc("DRAM",kr[5],kr[3])
set Kr[2]=bj_lastCreatedLightning
call AddLightningLoc("DRAM",kr[5],kr[2])
set Kr[3]=bj_lastCreatedLightning
call AddLightningLoc("DRAM",kr[2],kr[4])
set Kr[4]=bj_lastCreatedLightning
call AddLightningLoc("DRAM",kr[4],kr[1])
set Kr[5]=bj_lastCreatedLightning
call AddLightningLoc("DRAM",kr[1],kr[3])
set Kr[6]=bj_lastCreatedLightning
call AddLightningLoc("DRAM",kr[5],kr[3])
set Kr[7]=bj_lastCreatedLightning
call AddLightningLoc("DRAM",kr[5],kr[2])
set Kr[8]=bj_lastCreatedLightning
call AddLightningLoc("DRAM",kr[2],kr[4])
set Kr[9]=bj_lastCreatedLightning
call AddLightningLoc("DRAM",kr[4],kr[1])
set Kr[10]=bj_lastCreatedLightning
call GF(.5)
call AddSpecialEffectLocBJ(jr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],"Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call CreateTextTagUnitBJ("LIMIT BREAK!!!",hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],0,15.,100,.0,.0,0)
set lr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedTextTag
call GF(1.5)
set ka=1
loop
exitwhen ka>10
call DestroyLightning(Kr[ka])
set ka=ka+1
endloop
call DestroyTextTag(lr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call GF(.2)
call CreateTextTagUnitBJ("SPEED FREAK!!!",hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],0,15.,100,.0,.0,0)
call SetTextTagVelocityBJ(bj_lastCreatedTextTag,64,90)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagFadepointBJ(bj_lastCreatedTextTag,1.5)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,3.)
call PlaySoundBJ(LI)
call GF(1.)
set Xn=1
loop
exitwhen Xn>18
if(eBv())then
call SetUnitPositionLoc(hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],jr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call PauseUnit(hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],false)
call SetUnitInvulnerable(hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],false)
call IssueImmediateOrderById(hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],851972)
call ResetUnitAnimation(hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call RemoveLocation(jr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call DestroyGroup(Mr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
return
endif
set Pr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=GroupPickRandomUnit(Mr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
set tr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=GetOwningPlayer(Pr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
set pr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=GetUnitLoc(Pr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call SetUnitPositionLoc(hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],pr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call SetUnitAnimation(hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],"attack")
call SetUnitInvulnerable(Pr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],false)
call AddSpecialEffectLocBJ(GetUnitLoc(Pr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]),"Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call UnitDamageTargetBJ(hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],Pr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],5000.,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_ENHANCED)
if(ecv())then
call GroupRemoveUnit(Mr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],Pr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
else
call SetUnitInvulnerable(Pr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],true)
endif
call RemoveLocation(pr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
set Xn=Xn+1
endloop
call ForGroupBJ(Mr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],function eCv)
call SetUnitPositionLoc(hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],jr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call PauseUnit(hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],false)
call SetUnitInvulnerable(hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],false)
call IssueImmediateOrderById(hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],851972)
call ResetUnitAnimation(hr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call RemoveLocation(jr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call DestroyGroup(Mr[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
thank you for helping....