~GaLs~
† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
- Reaction score
- 180
Spell Pack 1.3
JESP
Aim
Aim the target for a certain of time, damage indicating in the left side of the screen.
After that, shoots a laser to the target dealing random damage between 100-1000.
Features:
-Jass Coded
-Contain Custom Model
-Leakless ( i think so :O )
-Lagless
-Mui ? This need to be decided by Dax..i dont know
Comment
This version added a small floating text indicating how much damage is dealt.
Reflective Counter
Features:
-Jass Coded
-Leakless
-Lagless
-Mui
This hero has chances to counter when being attacked.
Rock Bounce
Features:
-Jass Coded
-Leakless
-Lagless
-Mui (It is MUI if i am not mistaken)
A magical rock is thrown.
Level 1 - 100 damages and bounces 3 times.
Level 2 - 200 damages and bounces 4 times.
Level 3 - 300 damages and bounces 5 times.
Download it here:
View attachment Spell Pack 1.3.w3x
Was too free lately, so i merged all spell made my me into a spell pack.
This spell pack include another spell name Cloud Thunder.
But it lags like hell when casted, i won't be submiting it until the lag is fixed.
JESP
Aim
Aim the target for a certain of time, damage indicating in the left side of the screen.
After that, shoots a laser to the target dealing random damage between 100-1000.
Features:
-Jass Coded
-Contain Custom Model
-Leakless ( i think so :O )
-Lagless
-Mui ? This need to be decided by Dax..i dont know
JASS:
scope Aim
// Aim by Kentchow74+1 / ~GaLs~
// Special thanks to KaTTaNa's Local Handle Variable System
//
// Implementation
// 1. Copy the Aim spell from object editor to your map
// 2. Press Ctrl+D and check the rawcode of the spell...The first four number.
// 3. Replace it in the constant function ARawC
// 4. Copy the code from this map's header to your map header
// 5. Copy this whole trigger to your map
// 6. Replacing the value of the constant function to what you need.
// 7. Copy the 4 items from import manager to your map
// 8. Get NewGen World Editor from <a href="http://wc3campaigns.net/showthread.php?t=90999" target="_blank" class="link link--external" rel="nofollow ugc noopener">http://wc3campaigns.net/showthread.php?t=90999</a>
// 9. I appologize that i lost track of the maker of the model, but i do get it from hiveworkshop.com and wc3campaigns.net
//========================
//== Constant Functions ==
//========================
constant function Aim_RawCode takes nothing returns integer
return 039;A006039; // the raw code if Aim
endfunction
constant function Aim_Duration takes real LevelOfAbility returns real
return (LevelOfAbility)+4
endfunction
constant function Aim_LaserEffect takes nothing returns string
return "LasercannonfinalRED.mdx"
endfunction
constant function Aim_FlareEffect takes nothing returns string
return "Abilities\\Spells\\Human\\Flare\\FlareCaster.mdl"
endfunction
constant function Aim_DelayBeforeDamageDealt takes nothing returns real
return 1.4
endfunction
constant function Aim_CheckingInterval takes nothing returns real
return .5
endfunction
//========================
//== End ==
//========================
//============================
//== Main Functions ==
//============================
private function CreateTT takes real damage, unit WhichUnit, real lifespan returns texttag
local texttag tt = CreateTextTag()
call SetTextTagText(tt,I2S(R2I(damage))+" !",12 * 0.023 / 10)
call SetTextTagVelocityBJ(tt, 64,90)
call SetTextTagPos(tt, GetUnitX(WhichUnit),GetUnitY(WhichUnit),100)
call SetTextTagPermanent(tt,false)
call SetTextTagFadepoint(tt,2)
call SetTextTagColor(tt,255,0,0,100)
call SetTextTagLifespan(tt,lifespan)
return tt
endfunction
private function T2Act takes nothing returns nothing
local texttag casttag //= CreateTextTag()
local texttag trgtag
local timer t2 = GetExpiredTimer()
local unit caster = GetHandleUnit(t2,"caster")
local unit target = GetHandleUnit(t2,"target")
local real dmg = GetHandleReal(t2,"dmg")
call UnitDamageTarget(caster, target, dmg, true, false, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
set casttag = CreateTT(dmg,caster,1.3)
set trgtag = CreateTT(dmg,target,1.3)
call PauseTimer(t2)
call FlushHandleLocals(t2)
call DestroyTimer(t2)
set t2 = null
set caster = null
set target = null
set casttag = null
set trgtag = null
endfunction
private function AimCountAct takes nothing returns nothing
local effect array laser
local timer t = GetExpiredTimer()
local timer t2
local real Time = GetHandleReal(t,"time")
local real dmg = I2R(GetHandleInt(t,"dmg"))
local unit caster = GetHandleUnit(t,"caster")
local unit target = GetHandleUnit(t,"target")
if (OrderId2StringBJ(GetUnitCurrentOrder(caster)) == "channel") then
if Time >= Aim_CheckingInterval() then
call SetHandleInt(t,"dmg",R2I(dmg)+GetRandomInt(1,100))
call SetHandleReal(t,"time",Time-Aim_CheckingInterval())
elseif Time<= Aim_CheckingInterval() then
set t2 = CreateTimer()
call PauseTimer(t)
set laser[1] = AddSpecialEffectTarget(Aim_LaserEffect(), target, "origin")
set laser[2] = AddSpecialEffectTarget(Aim_FlareEffect(),caster,"origin")
call SetHandleHandle(t2,"caster",caster)
call SetHandleHandle(t2,"target",target)
call SetHandleReal(t2,"dmg",dmg)
call TimerStart(t2,Aim_DelayBeforeDamageDealt(),false,function T2Act)
call FlushHandleLocals(t)
call DestroyTimer(t)
call DestroyEffect(laser[1])
call DestroyEffect(laser[2])
set laser[1] = null
set laser[2] = null
set t = null
set t2 = null
set caster = null
set target = null
return
endif
elseif (OrderId2StringBJ(GetUnitCurrentOrder(caster)) != "channel") then
set t2 = CreateTimer()
call PauseTimer(t)
set laser[1] = AddSpecialEffectTarget(Aim_LaserEffect(), target, "origin")
set laser[2] = AddSpecialEffectTarget(Aim_FlareEffect(),caster,"origin")
call SetHandleHandle(t2,"caster",caster)
call SetHandleHandle(t2,"target",target)
call SetHandleReal(t2,"dmg",dmg)
call TimerStart(t2,Aim_DelayBeforeDamageDealt(),false,function T2Act)
call FlushHandleLocals(t)
call DestroyTimer(t)
call DestroyEffect(laser[1])
call DestroyEffect(laser[2])
set laser[1] = null
set laser[2] = null
set t = null
set t2= null
set caster = null
set target = null
endif
endfunction
private function AimSetCond takes nothing returns boolean
return GetSpellAbilityId() == Aim_RawCode()
endfunction
private function AimSetAct takes nothing returns nothing
local integer dmg = 0
local unit caster = GetSpellAbilityUnit()
local unit target = GetSpellTargetUnit()
local timer t = CreateTimer()
local integer LvlOfSpell = GetUnitAbilityLevel(caster,Aim_RawCode())
local real Time = Aim_Duration(I2R(LvlOfSpell))
call SetHandleReal(t,"time",Time)
call SetHandleInt(t,"dmg",dmg)
call SetHandleHandle(t,"caster",caster)
call SetHandleHandle(t,"target",target)
call TimerStart(t,Aim_CheckingInterval(),true,function AimCountAct)
set caster = null
set target = null
set t = null
endfunction
//============================
//== End ==
//============================
//===========================================================================
function InitTrig_Aim takes nothing returns nothing
set gg_trg_Aim = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(gg_trg_Aim, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Aim, Condition(function AimSetCond))
call TriggerAddAction( gg_trg_Aim, function AimSetAct )
endfunction
endscope
Comment
This version added a small floating text indicating how much damage is dealt.
Reflective Counter
Features:
-Jass Coded
-Leakless
-Lagless
-Mui
This hero has chances to counter when being attacked.
JASS:
scope ReflectiveCounterA
//===========================================================
// Reflective Counter by Kentchow74+1 / ~GaLs~
// Special thanks to KaTTaNa's Local Handle Variable System
//
// Implement Level : Moderate
// Required Tool : Jass NewGen WorldEditor from <a href="http://www.wc3campaigns.net" target="_blank" class="link link--external" rel="nofollow ugc noopener">www.wc3campaigns.net</a>
//
// Implementation Instruction
// 1. This spell requires quite knowledge about WorldEditor, if there are question 'bout this spell, you
// are welcomed to pm me at TheHelper or send me email.
// 2. Make a copy of the unit you want to add this spell to (Copy and Paste at Object Editor) and copy
// the Reflective Counter spell from Object Editor to your map.(Including 1 buff)
// 3. Remove all ability from the dummy you just made.
// 4. Set the following setting to "true" from the unit's object editing options:
// -> Stat - Hero - Hide Hero Death Message
// -> Stat - Hero - Hide Hero Interface Icon
// -> Stat - Hero - Hide Hero Minimap Display
// 5. Set "Text - Name - Editor Suffix" to "[ReflectiveCounter]" without quotes.
// 6. Copy the trigger to your map.
// 7. Change all the costant function's number to suit your map's abilities' raw code.
// --> To check a the raw code, open the object editor and press CTRL + D and vice versa.
// Then, pick the first 4 number from your abilities name. Ex: 'A000' for abilities
// 8. You may modify the values in Constant Functions referring to the comment i gave.
//
// IMPORTANT NOTES !!
// 1. Create a new trigger for each unit that contains the ability (Reflective Counter)
// 2. Only 1 trigger works per unit.
// 3. After you have Create a new trigger(Make a new copy of this trigger) for a unit, modify every constant function to fit your perpose.
// 4. Everytime you create a new trigger, change the line in the most top (scope ReflectiveCounterA) to "scope ReflectiveCounterB", if it is your third trigger,change it to "scope ReflectiveCounterC" and so on.
// 5. The purpose of 4th step is to prevent crash between trigger, you could change the "ReflectiveCounterA" to anything you want but just do not touch the "scope ".
//
// --Warning --
// Edit the main engine on your own risk
//
// My email: <a href="mailto:[email protected]">[email protected]</a>
//===========================================================
//===========================================
//== Constant Functions ==
//===========================================
private constant function RC_RawCode takes nothing returns integer
return 039;A003039; //Rawcode of Reflective Counter [Spell]
endfunction
private constant function RC_HeroRawCode takes nothing returns integer
return 039;H000039; //Rawcode of the Main Hero [Unit]
endfunction
private constant function RC_heroID takes nothing returns integer
return 039;H003039; //Rawcode of the dummy you created earlier [Unit]
endfunction
private constant function RC_CounterPercent takes integer lvl returns integer
return lvl*20 //Percentage to trigger Reflective Counter [Level of Ability x 20]
endfunction
//===========================================
//== End ==
//===========================================
//===============================================
//== Reflective Counter Main Engine ==
//===============================================
private function RCScond takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(), RC_RawCode())>0 ==true and GetUnitTypeId(GetTriggerUnit())==RC_HeroRawCode()
endfunction
private function Trig_ReflectiveCounterSet_Actions takes nothing returns nothing
local integer start = 1
local integer end = 6
local unit created
local location trgloc = GetUnitLoc(GetAttacker())
local location cre8loc = PolarProjectionBJ(trgloc, 150, GetUnitFacing(GetTriggerUnit()))
if GetRandomInt(0, 100) <= RC_CounterPercent(GetUnitAbilityLevel(GetTriggerUnit(), RC_RawCode())) then
set created = CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()), RC_heroID() , cre8loc,GetUnitFacing(GetAttacker()))
call SetHeroLevel(created, GetHeroLevel(GetTriggerUnit()), false)
loop
exitwhen start > end
call UnitAddItem(created, UnitItemInSlot(GetTriggerUnit(), start))
set start = start +1
endloop
call SelectUnit(created, false)
call SetUnitVertexColor(created, 255,255,255,50)
call IssueTargetOrder(created, "attack", GetAttacker())
call UnitApplyTimedLife(created, 039;BTLF039;, 1.00)
call UnitAddAbility(created, 039;Aloc039;)
endif
call RemoveLocation(trgloc)
call RemoveLocation(cre8loc)
set created = null
set trgloc = null
set cre8loc = null
endfunction
//===============================================
//== End ==
//===============================================
//=====================================================
//== Remv Trigger Functions ==
//=====================================================
private function RemvCond takes nothing returns boolean
return GetUnitTypeId(GetDyingUnit())==RC_heroID()
endfunction
private function RemvAct takes nothing returns nothing
call RemoveUnit(GetDyingUnit())
endfunction
//=====================================================
//== End ==
//=====================================================
//===========================================================================
//== Initialization ==
//===========================================================================
function InitTrig_RC takes nothing returns nothing
local trigger Remv = CreateTrigger()
set gg_trg_RC = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(gg_trg_RC, EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_RC, Condition(function RCScond))
call TriggerAddAction( gg_trg_RC, function Trig_ReflectiveCounterSet_Actions )
call TriggerRegisterAnyUnitEventBJ(Remv,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(Remv,Condition(function RemvCond))
call TriggerAddAction(Remv,function RemvAct)
set Remv = null
endfunction
//===========================================================================
//== End ==
//===========================================================================
endscope
Rock Bounce
Features:
-Jass Coded
-Leakless
-Lagless
-Mui (It is MUI if i am not mistaken)
A magical rock is thrown.
Level 1 - 100 damages and bounces 3 times.
Level 2 - 200 damages and bounces 4 times.
Level 3 - 300 damages and bounces 5 times.
JASS:
scope StormBounce
//===========================================================
// Reflective Counter by Kentchow74+1 / ~GaLs~
// Special thanks to KaTTaNa's Local Handle Variable System
//
// Implement Level : Easy
// Requires : Jass NewGen WorldEditor from <a href="http://www.wc3campaigns.net" target="_blank" class="link link--external" rel="nofollow ugc noopener">www.wc3campaigns.net</a>
// : Local Handle Vars System from the map header
//
// Implementation Instruction
// 1. Items needed to be copied to your map
// >> Unit <<
// - A dummy unit named Dummy Stormer
//
// >> Abilities <<
// - Rock Bounce [T]
// - Rock Bounce [T] dummy
// 2. Replace the values in Constant Functions to suit your map.
// 3. Any problem are welcomed to email me.
//
// --Warning --
// Edit the main engine on your own risk
//
// My email: <a href="mailto:[email protected]">[email protected]</a>
//===========================================================
//===========================================
//== Constant Functions ==
//===========================================
constant function RB_RawCode takes nothing returns integer
return 039;A004039; //Rawcode of RockBounce
endfunction
constant function RB_RawCodeDummy takes nothing returns integer
return 039;A005039; //Rawcode of RockBounce Dummy
endfunction
constant function RB_DummtStormerRawCode takes nothing returns integer
return 039;h004039; //Rawcode of DummyStormer
endfunction
constant function RB_BounceInterval takes nothing returns real
return .65 //interval before the second bounce
endfunction
constant function RB_GetBounceTimes takes integer Lvl returns integer
return Lvl+1 //how many time to bounce
endfunction
constant function RB_Range takes nothing returns real
return 750.00 //bounce in what RB_Range
endfunction
//===========================================
//== End ==
//===========================================
//================================================================
//== Rock Bounce Main Engine ==
//================================================================
function SurroundCond takes nothing returns boolean
return GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)!= true
endfunction
function tAct takes nothing returns nothing
local timer t = GetExpiredTimer()
local integer BounceTime = GetHandleInt(t,"bouncetime")
local boolean NoAlly = false
local integer Lvl = GetHandleInt(t,"lvl")
local unit target = GetHandleUnit(t,"target")
local unit target2 = null
local unit caster = GetHandleUnit(t,"caster")
local unit randomU
local unit dummy
local group Surround = CreateGroup()
local group Randomed
if BounceTime >0 then
call GroupEnumUnitsInRange(Surround,GetUnitX(target),GetUnitY(target),RB_Range(),Condition(function SurroundCond))
if CountUnitsInGroup(Surround)>=2 then
loop
exitwhen NoAlly == true
if CountUnitsInGroup(Surround)>=1 then
set Randomed = GetRandomSubGroup(1,Surround)
set randomU = FirstOfGroup(Randomed)
if IsUnitAlly(randomU,GetOwningPlayer(caster)) == false and randomU != target then
set NoAlly = true
call DestroyGroup(Randomed)
set target2 = randomU
elseif IsUnitAlly(randomU,GetOwningPlayer(caster)) == true or randomU == target then
call GroupRemoveUnit(Surround,randomU)
call DestroyGroup(Randomed)
endif
elseif CountUnitsInGroup(Surround)<1 then
set NoAlly = true
endif
endloop
if target2 != null then
set dummy = CreateUnit(GetOwningPlayer(caster),RB_DummtStormerRawCode(),GetUnitX(target),GetUnitY(target),270)
call UnitApplyTimedLife(dummy,039;BTLF039;,1.2)
call UnitAddAbility(dummy,RB_RawCodeDummy())
call SetUnitAbilityLevel(dummy,RB_RawCodeDummy(),Lvl)
call IssueTargetOrder(dummy,"thunderbolt",target2)
call SetHandleHandle(t,"target",target2)
endif
endif
call SetHandleInt(t,"bouncetime",BounceTime-1)
elseif BounceTime<= 0 then
call PauseTimer(t)
call FlushHandleLocals(t)
call DestroyTimer(t)
endif
call DestroyGroup(Surround)
set t = null
set target = null
set randomU = null
set dummy = null
set caster = null
set Surround = null
set Randomed = null
set target2 = null
endfunction
function SBCond takes nothing returns boolean
return GetSpellAbilityId() == RB_RawCode()
endfunction
function Trig_Storm_Bounce_Actions takes nothing returns nothing
local timer t = CreateTimer()
local unit caster = GetSpellAbilityUnit()
local unit target = GetSpellTargetUnit()
local integer Lvl = GetUnitAbilityLevel(caster,RB_RawCode())
local integer BounceTime = RB_GetBounceTimes(Lvl)
call SetHandleHandle(t,"target",target)
call SetHandleHandle(t,"caster",caster)
call SetHandleInt(t,"bouncetime",BounceTime)
call SetHandleInt(t,"lvl",Lvl)
call TimerStart(t,RB_BounceInterval(),true,function tAct)
set t = null
set caster = null
set target = null
endfunction
//================================================================
//== End ==
//================================================================
//===========================================================================
function InitTrig_RB takes nothing returns nothing
set gg_trg_RB = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(gg_trg_RB, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_RB, Condition(function SBCond))
call TriggerAddAction( gg_trg_RB, function Trig_Storm_Bounce_Actions )
endfunction
endscope
Download it here:
View attachment Spell Pack 1.3.w3x
Was too free lately, so i merged all spell made my me into a spell pack.
This spell pack include another spell name Cloud Thunder.
But it lags like hell when casted, i won't be submiting it until the lag is fixed.