- Joined
- Jun 30, 2006
- Messages
- 230
Edit: I have made some progress by pulling more out of the .j file, but some of it still doesn't make sense. Obviously the first function is just the H2I, but the others... None of the handle vars functions take three parameters. Any help?
I don't know if any of you remember that I made my own version of Blur from DotA, but it doesn't work correctly if your unit dies/casts a spell such as wind walk/etc. So I decided to take a look at the DotA spell. I've had to rename a lot of things so they are readable, but I am struggling to find out what a few of the custom functions are. I believe they are part of the Handle Vars system.
Oh, this isn't just renamed, btw, it also has a few useless BJ's replaced. Icefrog never does replace them. I also am going to assign global variables for the % for the alpha per level and get rid of some if then statements. I can do that myself, though. I really just need to know what those custom functions are.
Any ideas?
I don't know if any of you remember that I made my own version of Blur from DotA, but it doesn't work correctly if your unit dies/casts a spell such as wind walk/etc. So I decided to take a look at the DotA spell. I've had to rename a lot of things so they are readable, but I am struggling to find out what a few of the custom functions are. I believe they are part of the Handle Vars system.
JASS:
globals
gamecache MyCache = null
endglobals
function I01IIO takes handle h returns integer
return h
return 0
endfunction
function IIO1OO takes string I011IO,string IIOO1O returns unit
return GetStoredInteger(MyCache,I011IO,IIOO1O)
return null
endfunction
function I011OO takes handle h returns string
return I2S(I01IIO(h))
endfunction
function IIOOIO takes string I011IO,string IIOO1O,handle IIO0OO returns nothing
call StoreInteger(MyCache,I011IO,IIOO1O,I01IIO(IIO0OO))
endfunction
function Refresh takes nothing returns nothing
local unit u=IIO1OO(I011OO(GetTriggeringTrigger()),"PhantomAssassin")
local integer i=GetUnitAbilityLevel(u,'A001')
if(GetUnitState(u,UNIT_STATE_LIFE)>1)then
if(i==1.0)then
call SetUnitVertexColor(u,255,255,255,60)
endif
if(i==2.0)then
call SetUnitVertexColor(u,255,255,255,40)
endif
if(i==3.0)then
call SetUnitVertexColor(u,255,255,255,20)
endif
if(i==4.0)then
call SetUnitVertexColor(u,255,255,255,2)
endif
endif
endfunction
function Conditions takes nothing returns boolean
return GetLearnedSkill()==Blur[0] and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Actions takes nothing returns nothing
local integer i=GetUnitAbilityLevel(GetTriggerUnit(),'A001')
local trigger t
local unit u=GetTriggerUnit()
if(i==1.0)then
call SetUnitVertexColor(u,255,255,255,60)
set t=CreateTrigger()
call TriggerAddAction(t,function Refresh)
call TriggerRegisterTimerEventPeriodic(t,2)
call IIOOIO(I011OO(t),"PhantomAssassin",u)
endif
if(i==2.0)then
call SetUnitVertexColor(u,255,255,255,40)
endif
if(i==3.0)then
call SetUnitVertexColor(u,255,255,255,20)
endif
if(i==4.0)then
call SetUnitVertexColor(u,255,255,255,2)
endif
endfunction
function InitTrig_Blur takes nothing returns nothing
set gg_trg_Blur=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Blur,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_Blur,Condition(function Conditions))
call TriggerAddAction(gg_trg_Blur,function Actions)
endfunction
Any ideas?
Last edited: