wc3edit.net

United Warcraft 3 map hacking!
It is currently April 19th, 2024, 7:34 am

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: How to change damage?
PostPosted: November 10th, 2012, 1:24 am 
Offline
Forum Spammer

Joined: August 18th, 2012, 2:32 am
Posts: 551
the title explained what i want

Spoiler:
Code:
function NT takes unit fG,real Zq,real vQ returns integer
  local timer z=(ch(0))
  local integer kf=og()
  local group g=WG()
  local unit v
  call GroupEnumUnitsInRect(g,bj_mapInitialPlayableArea,null)
  loop
    set v=FirstOfGroup(g)
    exitwhen v==null
    if IsUnitType(v,UNIT_TYPE_STRUCTURE)==false then
      set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(v),'h002',GetUnitX(v),GetUnitY(v),bj_UNIT_FACING)
      call UnitAddAbility(bj_lastCreatedUnit,'A06F')
      call IssueTargetOrderById(bj_lastCreatedUnit,852075,v)
      call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',.5)
    endif
    call GroupRemoveUnit(g,v)
  endloop
  call yG(g)
  set IN[kf]=fG
  set dN[kf]=Zq
  set DN[kf]=vQ
  set fN[kf]=WG()
  set CN[kf]=mG(GetUnitX(IN[kf]),GetUnitY(IN[kf]),dN[kf],DN[kf])
  call UnitAddAbility(IN[kf],'Amrf')
  call UnitRemoveAbility(IN[kf],'Amrf')
  call SetUnitFlyHeight(IN[kf],550,0)
  set BN[kf]=MG(GetUnitX(IN[kf]),GetUnitY(IN[kf]),dN[kf],DN[kf])/ 20
  set cN[kf]=32
  set GN[hN[kf]+1]=AddSpecialEffectTarget("war3mapImported\\SolarBlast2.mdx",IN[kf],"hand right")
  set GN[hN[kf]+2]=AddSpecialEffectTarget("war3mapImported\\SolarBlast2.mdx",IN[kf],"hand left")
  call PauseUnit(IN[kf],true)
  call SetUnitInvulnerable(IN[kf],true)
  call SetUnitAnimation(IN[kf],"spell three")
  call TriggerSleepAction(3.5)
  if MG(GetUnitX(IN[kf]),GetUnitY(IN[kf]),dN[kf],DN[kf])<=300 then
    set NN[kf]=CreateUnit(GetOwningPlayer(IN[kf]),'h04N',GetUnitX(IN[kf]),GetUnitY(IN[kf]),CN[kf])
  elseif MG(GetUnitX(IN[kf]),GetUnitY(IN[kf]),dN[kf],DN[kf])<=400 then
    set NN[kf]=CreateUnit(GetOwningPlayer(IN[kf]),'h04R',GetUnitX(IN[kf]),GetUnitY(IN[kf]),CN[kf])
  elseif MG(GetUnitX(IN[kf]),GetUnitY(IN[kf]),dN[kf],DN[kf])<=500 then
    set NN[kf]=CreateUnit(GetOwningPlayer(IN[kf]),'h04K',GetUnitX(IN[kf]),GetUnitY(IN[kf]),CN[kf])
  elseif MG(GetUnitX(IN[kf]),GetUnitY(IN[kf]),dN[kf],DN[kf])<=600 then
    set NN[kf]=CreateUnit(GetOwningPlayer(IN[kf]),'h04Q',GetUnitX(IN[kf]),GetUnitY(IN[kf]),CN[kf])
  elseif MG(GetUnitX(IN[kf]),GetUnitY(IN[kf]),dN[kf],DN[kf])<=700 then
    set NN[kf]=CreateUnit(GetOwningPlayer(IN[kf]),'h04L',GetUnitX(IN[kf]),GetUnitY(IN[kf]),CN[kf])
  elseif MG(GetUnitX(IN[kf]),GetUnitY(IN[kf]),dN[kf],DN[kf])<=800 then
    set NN[kf]=CreateUnit(GetOwningPlayer(IN[kf]),'h04P',GetUnitX(IN[kf]),GetUnitY(IN[kf]),CN[kf])
  elseif MG(GetUnitX(IN[kf]),GetUnitY(IN[kf]),dN[kf],DN[kf])<=900 then
    set NN[kf]=CreateUnit(GetOwningPlayer(IN[kf]),'h04M',GetUnitX(IN[kf]),GetUnitY(IN[kf]),CN[kf])
  elseif MG(GetUnitX(IN[kf]),GetUnitY(IN[kf]),dN[kf],DN[kf])<=1000 then
    set NN[kf]=CreateUnit(GetOwningPlayer(IN[kf]),'h04O',GetUnitX(IN[kf]),GetUnitY(IN[kf]),CN[kf])
  endif
  set AN[kf]=CreateUnit(GetOwningPlayer(IN[kf]),'h002',(((GetUnitX(IN[kf]))*1.)+((200)*1.)*Cos(((CN[kf])*1.)*bj_DEGTORAD)),(((GetUnitY(IN[kf]))*1.)+((200)*1.)*Sin(((CN[kf])*1.)*bj_DEGTORAD)),0)
  call SetUnitFlyHeight(AN[kf],650,0)
  call SetUnitScale(AN[kf],1,1,1)
  call SetUnitTimeScale(IN[kf],0)
  call SaveInteger(J,0,GetHandleId((z)),(kf))
  call TimerStart(z,.02,true,function AT)
  return kf
endfunction


Top
 Profile  
 
PostPosted: November 10th, 2012, 2:38 pm 
Offline
Forum Staff

Joined: November 3rd, 2010, 10:48 am
Posts: 1850
Location: Singapore
Title: Best Player
I'm just going to reply according to title. Add a jjcp, type -str/-agi/-int 9999999 and there you go, your damage. ;)

_________________
Request a map? Follow the rulesHERE
Request templateHERE
Please, do not PM me.
On the side note, I'm still playing vampirism speed on malaysia room, occasionally in Garena. Bcuz too lazy to find out where else I can play them.


Top
 Profile  
 
PostPosted: November 10th, 2012, 2:51 pm 
Offline
Forum Spammer

Joined: August 18th, 2012, 2:32 am
Posts: 551
who told you that i wanted to add CP?


Top
 Profile  
 
PostPosted: November 10th, 2012, 3:17 pm 
Offline
Old Wrinkly Member
User avatar

Joined: September 15th, 2010, 5:09 am
Posts: 287
Title: Legenda
call UnitDamageTargetBJ..


Top
 Profile  
 
PostPosted: November 10th, 2012, 4:03 pm 
Offline
Old Wrinkly Member
User avatar

Joined: April 19th, 2010, 1:48 pm
Posts: 238
Location: In The World
function AT
post this function or *.j file
i can't read this function

_________________
Image


Top
 Profile  
 
PostPosted: November 10th, 2012, 4:09 pm 
Offline
Forum Spammer

Joined: August 18th, 2012, 2:32 am
Posts: 551
i shall post the war3map.j actually i posted at your tool topic but nevermind i upload again

i would like to ask what is the current time at your place?


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: November 10th, 2012, 4:27 pm 
Offline
Old Wrinkly Member
User avatar

Joined: April 19th, 2010, 1:48 pm
Posts: 238
Location: In The World
follow red color
Spoiler:
function Gh takes unit c,unit t,real r returns nothing
local unit d
local real hh=r
if GetUnitAbilityLevel(t,'A02M')>=1 then
set hh=hh-(hh*(GetUnitAbilityLevel(t,'A02M')*.05))
endif
if GetUnitAbilityLevel(t,'A06O')>=1 then
set hh=hh-(hh*(GetUnitAbilityLevel(t,'A06O')*.05))
endif
set d=CreateUnit(GetOwningPlayer(c),'h02X',GetUnitX(t),GetUnitY(t),bj_UNIT_FACING)
call UnitDamageTarget(d,t,r,true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
call RemoveUnit(d)
set d=null
endfunction
function Hh takes unit c,unit t,real r returns nothing
local unit d
local real hh=r
if hh>=50 and UnitHasItemOfTypeBJ(t,'I00R') and GetRandomReal(1,100)<=5 then
set d=CreateUnit(GetOwningPlayer(t),'h00F',GetUnitX(c),GetUnitY(c),bj_UNIT_FACING)
call UnitDamageTarget(d,c,hh,true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
call RemoveUnit(d)
else
if UnitHasItemOfTypeBJ(t,'I028') then
set hh=hh-(hh*.05)
endif
if UnitHasItemOfTypeBJ(t,'I029') then
set hh=hh-(hh*.1)
endif
if UnitHasItemOfTypeBJ(t,'I02A') then
set hh=hh-(hh*.15)
endif
if UnitHasItemOfTypeBJ(t,'I02B') then
set hh=hh-(hh*.2)
endif
if UnitHasItemOfTypeBJ(t,'I02C') then
set hh=hh-(hh*.25)
endif
if GetUnitAbilityLevel(t,'B00D')>=1 then
set hh=hh-(hh*(GetUnitAbilityLevel(t,'A02O')*.05))
endif
if GetUnitAbilityLevel(t,'B006')>=1 then
set hh=hh-(hh*(GetUnitAbilityLevel(t,'A011')*.03))
endif
if GetUnitTypeId(t)=='H02I' then
set hh=hh-(hh*(GetUnitAbilityLevel(t,'A02Z')*.05))
endif
if GetUnitAbilityLevel(t,'B00Z')>=1 then
set hh=0
endif
set d=CreateUnit(GetOwningPlayer(c),'h00F',GetUnitX(t),GetUnitY(t),bj_UNIT_FACING)
call UnitDamageTarget(d,t,hh,true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
call RemoveUnit(d)
endif
set d=null
endfunction
function jh takes unit c,unit t,real r returns nothing
local unit d
local real hh=r
local texttag tt
if hh>=50 and UnitHasItemOfTypeBJ(t,'I00R') and GetRandomReal(1,100)<=5 then
set d=CreateUnit(GetOwningPlayer(t),'h02W',GetUnitX(c),GetUnitY(c),bj_UNIT_FACING)
call UnitDamageTarget(d,c,hh,true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
call RemoveUnit(d)
elseif GetUnitAbilityLevel(t,'A067')>=1 and GetRandomReal(1,100)<=5 then
call SetWidgetLife(t,GetWidgetLife(t)+hh)
set tt=CreateTextTag()
call SetTextTagText(tt,I2S(R2I(hh)),.025)
call SetTextTagPos(tt,GetUnitX(t),GetUnitY(t),0)
call SetTextTagColor(tt,100,255,100,255)
call SetTextTagVelocity(tt,0,.07)
call SetTextTagPermanent(tt,false)
call SetTextTagLifespan(tt,1.5)
else
if UnitHasItemOfTypeBJ(t,'I024') then
set hh=hh-(hh*.05)
endif
if UnitHasItemOfTypeBJ(t,'I025') then
set hh=hh-(hh*.1)
endif
if UnitHasItemOfTypeBJ(t,'I026') then
set hh=hh-(hh*.15)
endif
if UnitHasItemOfTypeBJ(t,'I027') then
set hh=hh-(hh*.2)
endif
if UnitHasItemOfTypeBJ(t,'I02C') then
set hh=hh-(hh*.25)
endif
if GetUnitAbilityLevel(t,'A02M')>=1 then
set hh=hh-(hh*(GetUnitAbilityLevel(t,'A02M')*.02))
endif
if GetUnitAbilityLevel(t,'A06O')>=1 then
set hh=hh-(hh*(GetUnitAbilityLevel(t,'A06O')*.02))
endif
if GetUnitAbilityLevel(t,'A067')>=1 then
set hh=hh-(hh*(GetUnitAbilityLevel(t,'A067')*.03))
endif
if GetUnitAbilityLevel(t,'B006')>=1 then
set hh=hh-(hh*(GetUnitAbilityLevel(t,'A011')*.03))
endif
if GetUnitAbilityLevel(t,'B00J')>=1 then
set hh=hh-(hh*(GetUnitAbilityLevel(t,'A02W')*.03))
endif
if GetUnitTypeId(t)=='H02I' then
set hh=hh-(hh*(GetUnitAbilityLevel(t,'A02Z')*.05))
endif
if GetUnitAbilityLevel(t,'B00Z')>=1 then
set hh=0
endif
set d=CreateUnit(GetOwningPlayer(c),'h02W',GetUnitX(t),GetUnitY(t),bj_UNIT_FACING)
call UnitDamageTarget(d,t,hh,true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_MAGIC,null)
call RemoveUnit(d)
endif
set d=null
set tt=null
endfunction

_________________
Image


Top
 Profile  
 
PostPosted: November 11th, 2012, 4:20 am 
Offline
Forum Spammer

Joined: August 18th, 2012, 2:32 am
Posts: 551
i still don't understand, would you please do it for me? the ability is damage enemy per second for 7 second, 400 damage each second, i wanted to change it to 200+(GetHeroAgi,c,true*2), where c=GetTriggerUnit, i think


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], ThunderWary and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)