Azlier
Old World Ghost
- Reaction score
- 461
This detects when you turn on or off autocast. You know, by right clicking the ability icon. Yep.
Two functions available to you:
Requires Event (but of course).
There are no configurables.
How to quickly fix an unresponsive autocast order:
Two functions available to you:
JASS:
Requires Event (but of course).
There are no configurables.
JASS:
library AutocastOrderEvent requires Event
globals
private constant integer OFFSET = 0xD0000
private integer array Data
private Event On
private Event Off
private integer i
endglobals
function TriggerRegisterAutocastOnEvent takes trigger whichTrigger returns nothing
call On.register(whichTrigger)
endfunction
function TriggerRegisterAutocastOffEvent takes trigger whichTrigger returns nothing
call Off.register(whichTrigger)
endfunction
private function Fire takes nothing returns boolean
set i = Data[GetIssuedOrderId() - OFFSET]
if i == 1 then
call On.fire()
elseif i == 2 then
call Off.fire()
endif
return false
endfunction
private function RegisterOrder takes integer i returns nothing
set Data<i> = 1
set Data[i + 1] = 2
endfunction
private struct Hack extends array
static method onInit takes nothing returns nothing
local trigger t = CreateTrigger()
local integer i = 15
loop
call TriggerRegisterPlayerUnitEvent(t, Player(i), EVENT_PLAYER_UNIT_ISSUED_ORDER, null)
exitwhen i == 0
set i = i - 1
endloop
call TriggerAddCondition(t, Condition(function Fire))
set On = Event.create()
set Off = Event.create()
//Register all autocast orders. Oh God.
call RegisterOrder(0x060) //Heal
call RegisterOrder(0x063) //Inner Fire
call RegisterOrder(0x06C) //Slow
call RegisterOrder(0x204) //Spell Steal
call RegisterOrder(0x086) //Bloodlust
call RegisterOrder(0x0F4) //Web
call RegisterOrder(0x0DF) //Curse
call RegisterOrder(0x0E6) //Raise Dead
call RegisterOrder(0x242) //Essence of Blight
call RegisterOrder(0x245) //Spirit Touch
call RegisterOrder(0x1EA) //Frost Armor
call RegisterOrder(0x0B6) //Faerie Fire
call RegisterOrder(0x0A5) //Abolish Magic
call RegisterOrder(0x0CE) //Searing Arrows
call RegisterOrder(0x114) //Cold Arrows
call RegisterOrder(0x27A) //Parasite
call RegisterOrder(0x039) //Repair
call RegisterOrder(0x0EB) //Restore
call RegisterOrder(0x0C2) //Renew
call RegisterOrder(0x0BE) //Recharge
call RegisterOrder(0x248) //Carrion Beetles
call RegisterOrder(0x262) //Black Arrow
call RegisterOrder(0x23C) //Orb of Annihilation
call RegisterOrder(0x053) //Get Corpse
call RegisterOrder(0x049) //Kaboom!
call RegisterOrder(0x11F) //Poison Arrows
call RegisterOrder(0x2BF) //Incinerate Arrows...?
endmethod
endstruct
endlibrary</i>
How to quickly fix an unresponsive autocast order:
1. Import the PrintOrders library into your map, and start then map.
2. Right-click the ability with the unresponsive Autocast order.
3. Some information should be printed on screen when you right-clicked the ability.
4. There should be a hexadecimal number that starts with 0xD0. Copy that number.
5. Paste the name of the unresponsive autocast order in this thread, and paste the number with it.
2. Right-click the ability with the unresponsive Autocast order.
3. Some information should be printed on screen when you right-clicked the ability.
4. There should be a hexadecimal number that starts with 0xD0. Copy that number.
5. Paste the name of the unresponsive autocast order in this thread, and paste the number with it.