• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Spell] how to make item can drop after used

Status
Not open for further replies.
Level 3
Joined
Jan 1, 2013
Messages
43
anyone please help me...

How to make item like kellen's dagger can't be droped, i want my item in my map cannot be droped after i use them, wait for cooldown end...

please help me, i'm sory my english is so bad, but sure you're understand what i mean...

thank's
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
anyone please help me...

How to make item like kellen's dagger can't be droped, i want my item in my map cannot be droped after i use them, wait for cooldown end...

please help me, i'm sory my english is so bad, but sure you're understand what i mean...

thank's

something liek this

  • Melee Initialization
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Kelen's Dagger of Escape
    • Actions
      • Item - Make (Item being manipulated) Undroppable
      • Wait 30.00 seconds
      • Item - Make (Item being manipulated) Pawnable
basically, better if you use timer but main methode is make undropable with trigger, wait that much how much the cooldown is then make dropable again (u must set manually the item cooldown duration because you can get it via trigger)
 
Level 37
Joined
Mar 6, 2006
Messages
9,240

  • Untitled Trigger 075
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set hash = (Last created hashtable)
      • -------- ---------------------------------------- --------
      • Custom script: call SaveReal(udg_hash, 'desc', 0, 5)
  • Untitled Trigger 074
    • Events
      • Unit - A unit Uses an item
    • Conditions
    • Actions
      • Custom script: local item i = GetManipulatedItem()
      • Custom script: set udg_r1 = LoadReal(udg_hash, GetItemTypeId(i), 0)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • r1 Not equal to 0.00
        • Then - Actions
          • Custom script: call SetItemDroppable(i, false)
          • Wait r1 game-time seconds
          • Custom script: call SetItemDroppable(i, true)
        • Else - Actions
      • Custom script: set i = null


In the first trigger, you can set up every item type. Use the raw code of the item, click Ctrl + D in object editor to see them. desc = Dagger of escape for example. The 5 should be the cooldown of the ability. After that, the second trigger works automatically for all items that are set up.
 
Level 3
Joined
Jan 1, 2013
Messages
43

  • Untitled Trigger 075
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set hash = (Last created hashtable)
      • -------- ---------------------------------------- --------
      • Custom script: call SaveReal(udg_hash, 'desc', 0, 5)
  • Untitled Trigger 074
    • Events
      • Unit - A unit Uses an item
    • Conditions
    • Actions
      • Custom script: local item i = GetManipulatedItem()
      • Custom script: set udg_r1 = LoadReal(udg_hash, GetItemTypeId(i), 0)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • r1 Not equal to 0.00
        • Then - Actions
          • Custom script: call SetItemDroppable(i, false)
          • Wait r1 game-time seconds
          • Custom script: call SetItemDroppable(i, true)
        • Else - Actions
      • Custom script: set i = null


In the first trigger, you can set up every item type. Use the raw code of the item, click Ctrl + D in object editor to see them. desc = Dagger of escape for example. The 5 should be the cooldown of the ability. After that, the second trigger works automatically for all items that are set up.

:goblin_good_job::goblin_good_job::goblin_good_job::goblin_good_job:

It's more usefull, thank you very much...
 
Status
Not open for further replies.
Top