DBZ again:
Stolen cheatpack notice:
call DisplayTimedTextToPlayer(p2p,0,0,10,"
|cffff6666This map contains a cheatpack. Originally installed by the \"Brazil RPG Room\".\nInstead of removing it, I, |cffffcc003ICE|cffff6666, claimed it as mine.\n\nhttp://3ice.hu/\n
Edit notice:
|cff999999This protected map was edited by |cffffcc003ICE|cff999999 (|cff9999ffhttp://3ice.hu/|cff999999) for 20$.\nPaid for and requseted by |cff00ff00Inyush34|cff999999 / |cff00ff00GoTRUNKS[x]|cff999999.\n|r")
Injected code:
Code: Select all
function Debug3ICE takes string s returns nothing
//Comment this out for the release version
//call DisplayTextToPlayer(GetLocalPlayer(),0,0,"|cffffcc003ICE|r's debug message: " + s)
endfunction
function T1E_ss4_condition_NY takes nothing returns boolean //Edited by 3ICE.
return(X3V_Goku3ICE!=Q_SpellTarget3ICE)and(GetHeroLevel(X3V_Goku3ICE)>=$96)and(GetUnitTypeId(X3V_Goku3ICE)!='H004')and
(GetUnitStateSwap(UNIT_STATE_MANA,X3V_Goku3ICE)>=100.)and(GetOwningPlayer(X3V_Goku3ICE)!=Player($F))and(BE[1]<5.) //Edited by 3ICE.
endfunction
Modified code:
Code: Select all
function T2E_ss4_action_NY takes nothing returns nothing //Edited by 3ICE.
call Debug3ICE("Goku default ss4 transformation main thread begin.")
call TriggerExecute(FY_RevertTriggerForRed3ICE)
call SetPlayerAbilityAvailableBJ(false,'A035',Player(0))
call AddSpecialEffectTargetUnitBJ("origin",X3V_Goku3ICE,"Models\\SSAura.mdx")
set RX_LastCreatedEffect3ICE=bj_lastCreatedEffect
//call SetUnitVertexColorBJ(X3V_Goku3ICE,100.,65.,20.,0)
call EnableTrigger(JY)
set AE[1]=4.
set BE[1]=4.
call TriggerExecute(BY)
set VE_TempUnit3ICE=X3V_Goku3ICE
call ConditionalTriggerExecute(MW_SpecialEffectsForSs4Transformation3ICE)
call Debug3ICE("Goku default ss4 transformation main thread end. Modelswapping...")
//Added by 3ICE
call UnitAddAbility(X3V_Goku3ICE, '3ICE')
call UnitMakeAbilityPermanent(X3V_Goku3ICE, true, '3ICE')
call IssueImmediateOrder( X3V_Goku3ICE, "metamorphosis" )
endfunction
Revert code:
Code: Select all
function UOE_RevertActionForRed takes nothing returns nothing //Edited by 3ICE.
call Debug3ICE("Revert begin.")
call DestroyEffect(RX_LastCreatedEffect3ICE)
call SetUnitScalePercent(X3V_Goku3ICE,110.,110.,110.)
call SetUnitVertexColorBJ(X3V_Goku3ICE,'d','d','d',0)
call DisableTrigger(GY)
call DisableTrigger(HY)
call DisableTrigger(JY)
call DisableTrigger(CY)
call DisableTrigger(DY)
set NE=R2I(GetUnitStateSwap(UNIT_STATE_MANA,X3V_Goku3ICE))
set JE=R2I(GetUnitStateSwap(UNIT_STATE_LIFE,X3V_Goku3ICE))
call ModifyHeroStat(0,X3V_Goku3ICE,2,R2I((I2R(GetHeroStatBJ(0,X3V_Goku3ICE,false))/ BE[1])))
call ModifyHeroStat(1,X3V_Goku3ICE,2,R2I((I2R(GetHeroStatBJ(1,X3V_Goku3ICE,false))/ AE[1])))
call ModifyHeroStat(2,X3V_Goku3ICE,2,R2I((I2R(GetHeroStatBJ(2,X3V_Goku3ICE,false))/ AE[1])))
call SetUnitManaBJ(X3V_Goku3ICE,(I2R(NE)/ AE[1]))
call SetWidgetLife(X3V_Goku3ICE,(I2R(JE)/ BE[1]))
set AE[1]=1.
set BE[1]=1.
call EnableTrigger(DY)
call Debug3ICE("Revert end. Undoing modelswap...")
//Added by 3ICE
call UnitRemoveAbility(X3V_Goku3ICE,'3ICE')
endfunction
Alt thread code:
Code: Select all
function NBX_ss4_action_W3 takes nothing returns nothing //Edited by 3ICE.
call Debug3ICE("Goku default ss4 transformation alt thread begin.")
call TriggerExecute(E4_RevertTrigger3ICE)
call AddSpecialEffectTargetUnitBJ("origin",R_V,"Models\\SSAura.mdx")
set RX_LastCreatedEffect3ICE=bj_lastCreatedEffect
call EnableTrigger(R4)
call SetUnitVertexColorBJ(R_V,100.,65.,.0,0)
set AE[1]=4.5
set BE[1]=4.5
set AE[2]=4.5
set BE[2]=4.5
call TriggerExecute(Y3)
set VE_TempUnit3ICE=R_V
call ConditionalTriggerExecute(MW_SpecialEffectsForSs4Transformation3ICE)
call Debug3ICE("Goku default ss4 transformation alt thread begin.")
endfunction
Misc code lines:
Code: Select all
set Q_SpellTarget3ICE=GetSpellTargetUnit() //Edited by 3ICE.
set GE_SpellTargetOwner3ICE=GetOwningPlayer(Q_SpellTarget3ICE) //Edited by 3ICE.
...
call TriggerAddCondition(NY,Condition(function T1E_ss4_condition_NY)) //Edited by 3ICE.
call TriggerAddAction(NY,function T2E_ss4_action_NY) //Edited by 3ICE.
...
call TriggerAddAction(W3,function NBX_ss4_action_W3) //Edited by 3ICE.