Unique Items.

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

knightcyan
Newcomer
Posts: 9
Joined: May 19th, 2009, 8:29 pm

Unique Items.

Post by knightcyan »

I want to make it so if you have an item already in your inventory and you try to pickup the same item then it will not allow you to pick it up and drop the item you tried to pick up on the floor.
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Unique Items.

Post by Arabidnun »

Code: Select all

Untitled Trigger 001
    Events
        Unit - A unit Acquires an item
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Item-class of (Item being manipulated)) Equal to Campaign
                (Item-class of (Item being manipulated)) Equal to Artifact
                (Item-class of (Item being manipulated)) Equal to Charged
                (Item-class of (Item being manipulated)) Equal to Permanent
    Actions
        For each (Integer A) from 1 to 6, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (Item-class of (Item being manipulated))
                        (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
                    Then - Actions
                        Hero - Drop (Item being manipulated) from (Hero manipulating item)
                        Skip remaining actions
                    Else - Actions
This checks to see if the 4 types of class items (more could be used). All it does is check their inventory of hero that aquired the item for an item of the same type that is does not include the item he just picked up. Once it finds the item, it does the item you just picked up.