• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Convert GUI to Jass (MUI)

Status
Not open for further replies.
Hi! Can some1 convert this GUI into Jass MUI? I would be really pleased!

  • Crucio
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Crucio
    • Actions
      • Wait until (((Target unit of ability being cast) has buff Crucio ) Equal to True), checking every 0.10 seconds
      • Set Target_Crucio = (Target unit of ability being cast)
      • Unit - Add Cargo Hold (Orc Burrow) to Target_Crucio
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Target_Crucio is dead) Equal to True
        • Then - Actions
          • Unit - Remove Cargo Hold (Orc Burrow) from Target_Crucio
        • Else - Actions
      • Wait 10.00 seconds
      • Unit - Remove Cargo Hold (Orc Burrow) from Target_Crucio
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
JASS:
function CrucioID takes nothing returns integer
   return 'A000' // Change to our ability id!!
endfunction
function OrcBurrowID takes nothing returns integer
   return 'A001' // Change to Orc Burrow ID!!
endfunction
function CrucioBUFF takes nothing returns integer
   return 'B000' // Change to your BUFF ID!!
endfunction
function CRUCIO takes nothing returns nothing
   local unit t = GetSpellTargetUnit()
   local unit c = GetSpellAbilityUnit()
   local real r = 0.00
   loop
      exitwhen GetUnitAbilityLevel(t, CrucioBUFF()) > 0
      call PolledWait(0.25)
   endloop
   call UnitAddAbility(t, OrcBurrowID())
   loop
      exitwhen r >= 10.00 or GetUnitState(t, UNIT_STATE_LIFE) <= 0
      call PolledWait(0.25)
      set r = r + 0.25
   endif
   call UnitRemoveAbility(t, OrcBurrowID())
   set t = null
   set u = null
endfunction
function INIT takes nothing returns nothing
   local trigger t = CreateTrigger()
   local integer i = 0
   call TriggerAddAction(t, function CRUCIO)
   loop
      call TriggerRegisterPlayerUnitEvent(t, Player(i), EVENT_UNIT_SPELL_EFFECT, Condition(function CrucioID))
      set i = i + 1
   endloop
endfunction
this should work, i think,, just edit the ID things,, no vJass, so easily implentable

EDITED, now it removes the ability as soon as it is dead or time is up,,
Though you should do something else than PolledWait, since it leaks!,, but TriggerSleepAction sucks,,
 
Last edited:
Status
Not open for further replies.
Top