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.
Refine Materials

Events


Unit - A unit Begins casting an ability

Conditions


(Unit-type of (Casting unit)) Equal to Refinery


(Ability being cast) Equal to Refine

Actions


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



If - Conditions




((Owner of (Casting unit)) Current lumber) Greater than or equal to 100




(Mana of (Casting unit)) Greater than or equal to 10.00



Then - Actions




Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) - 10.00)




Player - Set (Owner of (Casting unit)) Current gold to (((Owner of (Casting unit)) Current gold) + 90)




Player - Set (Owner of (Casting unit)) Current lumber to (((Owner of (Casting unit)) Current lumber) - 100)



Else - Actions




Unit - Order (Triggering unit) to Stop
call SetUnitPositionLoc(GetSpellAbilityUnit(),GetUnitLoc(GetSpellAbilityUnit()))
call IssueImmediateOrder( yourunithere, "stop" )
Unit - Pause (Triggering unit)
Unit - Order (Triggering unit) to Stop
Unit - Unpause (Triggering unit)
Custom script: call SetUnitPosition(GetTriggerUnit(), GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()))
It works. Dont whine it does not, it does. It is the same as Cokemonkey11 said, only without leaks,,
Custom script: call SetUnitPosition(GetTriggerUnit(), GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()))
Thanks for the help guys, but none of them worked. I'm probably doing something wrong.
Refine Materials

Events


Unit - A unit Begins casting an ability

Conditions


(Unit-type of (Casting unit)) Equal to Refinery


(Ability being cast) Equal to Refine

Actions


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



If - Conditions




((Owner of (Casting unit)) Current lumber) Greater than or equal to 100




(Mana of (Casting unit)) Greater than or equal to 10.00



Then - Actions




Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) - 10.00)




Player - Set (Owner of (Casting unit)) Current gold to (((Owner of (Casting unit)) Current gold) + 90)




Player - Set (Owner of (Casting unit)) Current lumber to (((Owner of (Casting unit)) Current lumber) - 100)



Else - Actions




Custom script: call SetUnitPosition(GetTriggerUnit(), GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()))
Refine Materials

Events


Unit - A unit Begins casting an ability

Conditions


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


(Ability being cast) Equal to Refine

Actions


Set Caster = (Triggering unit)


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



If - Conditions




((Owner of Caster) Current lumber) Greater than or equal to 100




(Mana of Caster) Greater than or equal to 10.00



Then - Actions




Unit - Set mana of Caster to ((Mana of Caster) - 10.00)




Player - Set (Owner of Caster) Current gold to (((Owner of Caster) Current gold) + 90)




Player - Set (Owner of Caster) Current lumber to (((Owner of Caster) Current lumber) - 100)



Else - Actions




Countdown Timer - Start Timer as a One-shot timer that will expire in 0.00 seconds
Stop

Events


Time - Timer expires

Conditions

Actions


Unit - Order Caster to Stop