Item requires a hero level

meehael

New Member
Reaction score
6
Hi all,

I've been doing some search on the forum, but I couldn't find anything like this. I'd like to make that items require a specific level of a hero to use it. For ex., Potion of Greater Healing requires the hero to be at least level 5 to be able to use it. Or Boots of Quel'Thalas (+6 Agility) requires level 5.

I solved the part where charged/usable items are involved (like potions - I just check for the ability being cast if it is equal to the item ability, check the level; if lvl<5 => stop the unit), but I cannot solve the part where items are permanent and give permanent bonus as long as they are in the inventory, like the Boots.

And I'd like not to drop the item if it doesn't meet the level requirements. Just be inactive. Any idea is welcome!

Thanks,
Regards!
 
L

Lord_Addy

Guest
item

hey you should donwload WE unlimiteda nd there in triggers you can change the units atributes like movement speed, attack damage, armor atd... you can changew all common atributes there and the trigger should look :

events
-a (hero1) acquires an item
condition
action
-if then else multiple functions
-conditions
-item being manipulated is equal to (itemXY)
-actions
-increase damage of (hero1) by 25
-increase armor of (hero1) by 5
-else actions
-do nothing


and a drop trigger should be this:


events
-(hero1) drops an item
-(hero1) sells an item
conditions
actions
-if then else multiple functions
-conditions
-item being manipulated is equal to (itemXY)
-actions
-decrease damage of (hero1) by 25
-decrease armor of (hero1) by 5
-else actions
do nothing



ok and thats all i think it could work
 

jonadrian619

-___-
Reaction score
240
You can create a 'dummy' item of the same permanent item (these items are the same as the items themselves, but have no stat bonuses whatsoever), do that it would be like inactive. When a Hero takes them when he's less than lvl. 5, then make a trigger that substitutes the item to the dummy item. But when the hero is lvl. 5 onwards, and when the dummy item is still in his inventory, then find a way to remove the dummy item he's holding and replace it with the original item.

This sounds difficult though, yet it is a good solution.

EDIT: Some1 posted already but I started typing at 5:29. Whether mine or his you can accept.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
well, i think you have got to create a dummy copy of each permanent item which does nothing, then check if when the hero aquires an item if he got the right level, if not replace the aquired item with the useless copy, when he drops the copy replace it again with the real item.

Code:
Acquire
    Events
        Unit - A unit Acquires an item
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        (Item-type of (Item being manipulated)) Equal to Power Sword +5
                        (Hero level of (Hero manipulating item)) Less than 7
            Then - Actions
                Item - Remove (Item being manipulated)
                Hero - Create Power Sword +5[COLOR="Red"](Dummy)[/COLOR] and give it to (Hero manipulating item)
                Quest - Display to (Player group((Owner of (Hero manipulating item)))) the Warning message: |cffff0000You got t...
            Else - Actions

Code:
Untitled Trigger 002
    Events
        Unit - A unit Loses 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 Power Sword [COLOR="Red"](dummy)[/COLOR] +5
            Then - Actions
                Set TempPoint = (Position of (Item being manipulated))
                Item - Remove (Item being manipulated)
                Item - Create Power Sword +5 at TempPoint
                Custom script: call RemoveLocation (udg_TempPoint)
            Else - Actions
 
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