Help with items

ReDruMMurDeR

Member
Reaction score
0
Um i wud like to know how to add a level restriction on a item ive browsed the forum here and i cudnt find anything for it cud someone help me with it thanks :D
 

millzy

Ultra Cool Member
Reaction score
44
Um i wud like to know how to add a level restriction on a item ive browsed the forum here and i cudnt find anything for it cud someone help me with it thanks :D

i dunno what ur asking but is it if the hero is over x level it cont hold the item???

if so here
Trigger:
  • item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of (Triggering unit)) Greater than or equal to 5
        • Then - Actions
          • Item - Remove (Item being manipulated)
          • Item - x at (pos or your hero)
        • Else - Actions


and yes this leaks
 

millzy

Ultra Cool Member
Reaction score
44
Like ur level 10 and the item REQUIRES level 20 to use

use the trigger i gave add a condition that item being manipulated is = to your item. then change the condition Level of (Triggering unit)) Less than or equal to 20
 

Inflicted

Currently inactive
Reaction score
63
unit acquires an item
item type is ##
set Temp_Hero to hero manipulating item
set Temp_Item to item being manipulated
set Temp_Level to (Level of hero manipulating item)
if (Temp_Level is less than 20)
-drop Temp_Item --- this will drop the item
(-or
remove Temp_Item
player - give owner of Temp_Hero +## gold --- this will sell the item, use if from a shop
)
set Temp_Hero to No unit
set Temp_Level to 0
 

Inflicted

Currently inactive
Reaction score
63
basicly i gota add a trigger for every item?

well if you want them to have different levels, yes.

if they all have the same restriction then just add a few OR options in the conditions.

eg.

OR - Multiple Conditions
(item type is A)
(item type is B)
(item type is C)

etc.
 

feelingparty

New Member
Reaction score
3
You can use the item's level as a restriction. This way you don't have to do a condition for each item. In addition you can add a massage like "Must be X level to carry this item." Here are the triggers:
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item level of (Item being manipulated)) Greater than (Hero level of (Hero manipulating item))
    • Actions
      • Hero - Drop (Item being manipulated) from (Hero manipulating item)
      • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: (Must be level + ((String((Item level of (Item being manipulated)))) + to carry this item))


Hope this helps.
 

sentrywiz

New Member
Reaction score
25
You can use the item's level as a restriction. This way you don't have to do a condition for each item. In addition you can add a massage like "Must be X level to carry this item." Here are the triggers:
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item level of (Item being manipulated)) Greater than (Hero level of (Hero manipulating item))
    • Actions
      • Hero - Drop (Item being manipulated) from (Hero manipulating item)
      • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: (Must be level + ((String((Item level of (Item being manipulated)))) + to carry this item))


Hope this helps.

Good idea. However notice that you will have to manually set each item's level in object editor when you create it.
 

Inflicted

Currently inactive
Reaction score
63
well not necessarily.

all depends on his usage and variation in the levels.

if he all items requiring lvl 20, then my method would be easier.
 

sentrywiz

New Member
Reaction score
25
well not necessarily.

all depends on his usage and variation in the levels.

if he all items requiring lvl 20, then my method would be easier.

But he has to set the items to level 1-whatever level he wants. He cannot just have all items level 0 and hope the system feelingparty made to work. this is all for his system, not yours. It may be easier for yours, but that is entirely different system
 

Laiev

Hey Listen!!
Reaction score
188
i dunno what ur asking but is it if the hero is over x level it cont hold the item???

if so here
Trigger:
  • item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of (Triggering unit)) Greater than or equal to 5
        • Then - Actions
          • Item - Remove (Item being manipulated)
          • Item - x at (pos or your hero)
        • Else - Actions


and yes this leaks

wheres?
 

X-maul

AKA: Demtrod
Reaction score
201
Havent taken my time to read the while thread, but I got a system which works:
Code:
Spell Book Of Fire Level 2
    Events
        Unit - A unit Acquires an item
    Conditions
        (Hero level of Hero[(Player number of (Owner of (Triggering unit)))]) Less than 4
        (Item-type of (Item being manipulated)) Equal to Spell Book Of Fire - Level 2
    Actions
        Set ItemPoint = (Position of (Item being manipulated))
        Set ItemLevelRequire_PlayerGroup = (Player group((Owner of (Hero manipulating item))))
        Item - Move (Item being manipulated) to ItemPoint
        Game - Display to HeroRevive_PlayerGroup the text: (You Are Not High Enough Level To Pick Up  + (|cffFF0202 + ((Name of (Item being manipulated)) + |r)))
        Custom script:   call RemoveLocation(udg_ItemPoint)
        Custom script:   call DestroyForce(udg_ItemLevelRequire_PlayerGroup)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top