Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Hmm I think there must be an easier way :/
There is the archer upgrade which gives them a better range isn't it?
Can't you base your item on that upgrade?
Convert to Ranged

Events


Unit - A unit Acquires an item

Conditions


((Triggering unit) has an item of type Bow) Equal to True


(Unit-type of (Triggering unit)) Equal to Paladin

Actions


Set Stats[1] = (Strength of (Hero manipulating item) (Exclude bonuses))


Set Stats[2] = (Agility of (Hero manipulating item) (Exclude bonuses))


Set Stats[3] = (Intelligence of (Hero manipulating item) (Exclude bonuses))


For each (Integer A) from 1 to 6, do (Actions)



Loop - Actions




Set Itemsdropped[(Integer A)] = (Item carried by (Hero manipulating item) in slot (Integer A))




Hero - Drop the item from slot (Integer A) of (Hero manipulating item)


Unit - Replace (Triggering unit) with a Paladin using The old unit's relative life and mana


Hero - Modify Strength of (Last replaced unit): Set to Stats[1]


Hero - Modify Agility of (Last replaced unit): Set to Stats[2]


Hero - Modify Intelligence of (Last replaced unit): Set to Stats[3]


For each (Integer A) from 1 to 6, do (Actions)



Loop - Actions




Hero - Give Itemsdropped[(Integer A)] to (Last replaced unit)


Set Stats[1] = 0


Set Stats[2] = 0


Set Stats[3] = 0
Convert to Melee

Events


Unit - A unit Loses an item

Conditions


(Item-type of (Last dropped item)) Equal to Bow


(Unit-type of (Triggering unit)) Equal to Paladin (ranged)

Actions


Set Stats[1] = (Strength of (Hero manipulating item) (Exclude bonuses))


Set Stats[2] = (Agility of (Hero manipulating item) (Exclude bonuses))


Set Stats[3] = (Intelligence of (Hero manipulating item) (Exclude bonuses))


For each (Integer A) from 1 to 6, do (Actions)



Loop - Actions




Set Itemsdropped[(Integer A)] = (Item carried by (Hero manipulating item) in slot (Integer A))




Hero - Drop the item from slot (Integer A) of (Hero manipulating item)


Unit - Replace (Triggering unit) with a Paladin using The old unit's relative life and mana


Hero - Modify Strength of (Last replaced unit): Set to Stats[1]


Hero - Modify Agility of (Last replaced unit): Set to Stats[2]


Hero - Modify Intelligence of (Last replaced unit): Set to Stats[3]


For each (Integer A) from 1 to 6, do (Actions)



Loop - Actions




Hero - Give Itemsdropped[(Integer A)] to (Last replaced unit)




Set Itemsdropped[(Integer A)] = No item


Set Stats[1] = 0


Set Stats[2] = 0


Set Stats[3] = 0
native GetHeroProperName takes unit whichHero returns string
local string s = GetHeroProperName(HeroUnit)
local string x
local unit g
loop
exitwhen x == s
set g = CreateUnit(Player(0),herorawcode,x_deadzone,y_deadzone,270)
set x = GetHeroProperName(g)
if x != s then
call RemoveUnit(g)
endif
endloop
set g = null
Wear a bow

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Become Ranged

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




Wealding_Bow[(Player number of (Owner of (Casting unit)))] Equal to False



Then - Actions




Game - Display to (All players) the text: true




Set Wealding_Bow[(Player number of (Owner of (Casting unit)))] = True




Set Wealding_Bow_Stats[0] = (Strength of (Casting unit) (Exclude bonuses))




Set Wealding_Bow_Stats[1] = (Agility of (Casting unit) (Exclude bonuses))




Set Wealding_Bow_Stats[2] = (Intelligence of (Casting unit) (Exclude bonuses))




For each (Integer A) from 1 to 6, do (Actions)





Loop - Actions






Set Wealding_Bow_Items[(Integer A)] = (Item carried by (Casting unit) in slot (Integer A))






Hero - Drop Wealding_Bow_Items[(Integer A)] from (Casting unit)




Unit - Replace (Casting unit) with a Villiager Bow using The old unit's relative life and mana




Hero - Modify Strength of (Casting unit): Set to Wealding_Bow_Stats[0]




Hero - Modify Agility of (Casting unit): Set to Wealding_Bow_Stats[1]




Hero - Modify Intelligence of (Casting unit): Set to Wealding_Bow_Stats[2]




For each (Integer A) from 1 to 6, do (Actions)





Loop - Actions






Hero - Give Wealding_Bow_Items[(Integer A)] to (Last replaced unit)




Set Wealding_Bow_Stats[0] = 0




Set Wealding_Bow_Stats[1] = 0




Set Wealding_Bow_Stats[2] = 0




Animation - Add the lumber animation tag to (Last replaced unit)



Else - Actions




Set Wealding_Bow[(Player number of (Owner of (Casting unit)))] = False




Game - Display to (All players) the text: false
