• 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.

Autocast-on-self potion?

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
I've been trying for hours to make a potion that cast on self automatically, without having to select target. (Potion item is based on Rejuvenation hability, since i need it to heal over time)...

I'm sure some people around know how to do this :)

I really think that the issue is around Rejuvenation skill... I must fin the way to make it autocast...
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
like this
  • auto cast potion
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to (Item-type of Your_item)
    • Actions
      • Unit - Create 1 (Unit-type of Dummy_unit) for Neutral Passive at (Position of (Casting unit)) facing Default building facing degrees
      • Unit - Order Dummy_unit to Night Elf Druid Of The Claw - Rejuvenation (Casting unit)
Unit > issue targeting a unit

change the "attack to "night elf druid of the claw - rejuvenation"

make sure the dummy unit got the ability

to make the dummy unit, open object editor make a custom unit and change the
Art - Model File

check the custom and type .mdl

your done
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
like this
  • auto cast potion
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to (Item-type of Your_item)
    • Actions
      • Unit - Order Dummy_unit to Night Elf Druid Of The Claw - Rejuvenation (Casting unit)
Unit > issue targeting a unit

change the "attack to "night elf druid of the claw - rejuvenation"

make sure the dummy unit got the ability

Is not autocast when picked, but when used. I want to have the item on the inventory, but not having to click the portrait to cast on self.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
this then?
  • auto cast potion
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item carried by Your_unit of type (Item-type of Your_item))) Equal to (Item-type of Your_item)
    • Actions
      • Unit - Create 1 (Unit-type of Dummy_unit) for Neutral Passive at (Position of (Casting unit)) facing Default building facing degrees
      • Unit - Order Dummy_unit to Night Elf Druid Of The Claw - Rejuvenation (Casting unit)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Omg, this is so frustrating...

Dark Grom, I can't do that. You trigger says "Unit ACQUIRES an item", should be "Unit USES and item"
Besides, the Orders are fixed, and none of them work for what I want.
I'm sure there must be a way to do it, maybe making potions based on runes, wich are autoused when picked, item would just be a dummy one.

I'll try and report
 
@Darkgrom Omg why you still use the same event?

  • auto cast potion
    • Events
      • Unit - A unit Uses An Item
    • Conditions
      • (Item type of (Item being manipulated)) Equal to YOURpotion
    • Actions
      • Set p = (Position of (Triggering unit))
      • Unit - Create 1 dummmy for (Triggering player) at p facing Default building facing degrees
      • Unit - Order (Last created unit) to Night Elf Druid Of The Claw - Rejuvenation (Triggering unit)
      • Unit - Add 1.00 expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_p)
@Spartipilo If you really want a test map.. feel free to ask.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Spinnaker... i'll tell you exactly what a I want.

Items:
- Health Potion (1) (Buff with same icon than the item icon)
- Health Potion (2) (Buff with same icon than the item icon)
- Health Potion (3) (Buff with same icon than the item icon)
- Health Potion (4) (Buff with same icon than the item icon)
- Health Potion (5) (Buff with same icon than the item icon)

Properties:
- Stackable up to 12 per item-slot.
- Splitable by half
- Stack WITHOUT displaying/sound: Inventory is full.
- Set automatically on owner when clicking on them, not having to select target.
- In a different Group than Mana potions (So both can be used simultaneously)

Conditions:
- If Health Potion (x) is used during Health Potion (x) Buff -> Restar Buff Timer / Or / Reset Health Potion Effect / Or / You get de idea.

POTION PRIORITY:
- If Health Potion (2, 3, 4, 5) is used during Health Potion (1) Buff -> Remove Health Potion (1) Buff/effect, and add Health Potion (2, 3, 4, 5) Buff/Effect.

- If Health Potion (3, 4, 5) is used during Health Potion (1, 2) Buff -> Remove Health Potion (1, 2) Buff/effect, and add Health Potion (3, 4, 5) Buff/Effect

- If Health Potion (4, 5) is used during Health Potion (1, 2, 3) Buff -> Remove Health Potion (1, 2, 3) Buff/effect, and add Health Potion (4, 5) Buff/Effect

- If Health Potion (5) is used during Health Potion (1, 2, 3, 4) Buff -> Remove Health Potion (1, 2, 3, 4) Buff/effect, and add Health Potion (5) Buff/Effect..

- If a lower lvl potion is used during a higher lvl potion, nothing happens. Item charges aren't reduced, and Would be awesome to display: "You are already under higher lvl potions effects" or something.

- Same for mana potions..
-----------------------------

The way I THINK it can be done:

1- Create Health Potions (1, 2, 3, 4, 5) items, based on some cast-when-click / charge use item.
2- Create Health Potions (1, 2, 3, 4, 5) abilities, based on some Health-over-time / not-damage-disabled ability.
3. Create Buff Icon (With same icon than Health Potion)

-------------- Stack trigger --------------

  • Item stack
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Purchasable
      • (Item being manipulated) Not equal to (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated)))
    • Actions
      • Item - Set charges remaining in (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) to ((Charges remaining in (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated)))) + (Charges remaining in (Item being manipulated)))
      • Item - Remove (Item being manipulated)
I still have to add the Stock Limit there, and I don't know how.

-------------- Buff substitution trigger --------------

  • Buff Substitution
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Unit is under Health Potion (1) Buff AND item being used is Health Potion (2)
    • Actions
      • Remove Health Potion (1) Buff, Add Health Potion (2) Ability/Buff/Effect (I don't know wich)
Same for all other potions. I don't know if this is made as generic, maybe using variables, i don't know, but I have no problem having it this noobish way :)

-------------- Split/half trigger --------------

  • I have no idea
-------------- No sound/display trigger --------------

  • I have no idea
-------------- Different group than mana potions --------------

  • I have no idea
-------------- This ---------------
- If Health Potion (x) is used during Health Potion (x) Buff -> Restar Buff Timer / Or / Reset Health Potion Effect / Or / You get de idea.

I think this is already default on warcraft.

---------------

Did i explain myself? :ogre_icwydt: This is what i've been trying to do since yesterday
 
Last edited:
Level 20
Joined
Jul 14, 2011
Messages
3,213
(Right now i'm working with mana potions... i'll justo "copy/modify" when this works).

Phase 1 SOLVED
I managed to make the five different Autocast-on-click mana potions (Based on Item Generic Rejuvenation Ability, and creating specific buff for each one)

Phase 2 [PARTIALLY-SOLVED]
I created one rune for each mana potion level (since they're pickable despite full inventory), and triggered it to create a mana potion (binded mana potion lvl, obviously), and give it to triggerint unit.

BUT, if the inventory is full, it just creates a Mana Potion a (Triggering Unit) position (with no Inventory is Full message display/sound), AND, if I pick that potion with Full Inventory, then it displays the Full Inventory Message/Sound. Having one free slot in the inventory makes the item stack appropiately.

This is the trigger for create/stack the rune-potions.
  • Potion Rune Get
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Rune of Mana
        • Then - Actions
          • Hero - Create Mana potion (1) and give it to (Triggering unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-class of (Item being manipulated)) Equal to Purchasable
              • (Item being manipulated) Not equal to (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated)))
            • Then - Actions
              • Item - Set charges remaining in (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) to ((Charges remaining in (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated)))) + (Charges remaining in (Item being manipulated)))
              • Item - Remove (Item being manipulated)
            • Else - Actions
              • Do nothing
If someone can help me on setting the Stock-Limit i would appreciate it.
I'll work on the rest of stuff and see if i can handle them.
 
You can either use items that have the field "Automatically used when acquired" ticked or you can detect when a unit sells an item.
  • Tr
  • Events
    • Unit - A unit sells an item (from shop)
  • Conditions
  • Actions
    • Custom script: local integer i = 0
    • For each (Integer A) from 1 to 6, do (Actions)
      • Loop - Actions
        • If (All conditoions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Item carried by (Buying unit) in slot (IntegerA)) Not Equal to No item //Item comparison
          • Then - Actions
            • Custom script: set i = i + 1
          • Else - Actions
    • Custom script: if i == 6 then
    • Set Unit = (Buying unit)
    • Set Item = (Sold item)
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • (Unit has an item of type (Item-type of Item)) Equal to True //Boolean comparison
      • Then - Actions
        • Item - Set charges remaining in (Item carried by Unit of type (Item-type of Item) to ((Charges remaining in (Item carried by Unit of type (Item-type of Item) + (Charges remaining in Item)))
        • Item - Set life of Item to 0.00
        • Item - Remove Item
      • Else - Actions
    • Custom script: endif
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Great! i understood none of it xD... Sorry, i'm not a variable a custom script friend xD Finally, I just used the Easy Item Stack 'n Split v2.7.4 - GUI by Dangerb0y... but i still have to make the item buff override manually, i guess...?

Could you (Pharaoh) explain that trigger you posted? i'd like to undertand it :)
 
Status
Not open for further replies.
Top