Set item bonuses.

Aphurea

New Member
Reaction score
3
I have been looking for a good few hours now for a way to create set items and do their bonuses, I have done most of it the one problem is making it so you can have any mix of items for the set items. Saying I have 4 items in the set and you only need 2 for it, is there any JASS code that would allow me to make it that it only requires 2 items from an array? Or even a GUI way of doing this.
Will +rep if you are a big help.
 
Code:
Events: Unit acquires an item
Conditions: Whatever
Actions: For each Integer A from 1 to 4, do Actions:
                     If: Unit has item of type (MySuperItem[Integer A] equal to True
                     Then: Set (ItemBeingCombined) equal to (Random item held by (Triggering unit) of type (MySuperItem[Integer A]
                     Else: (Skip remaining actions)
            For each Integer B from 1 to 4, do Actions:
                     If: Unit has item of type (MySuperItem[Integer B] equal to True
                     Then: Set (ItemBeingCombined2) equal to (Random item held by (Triggering unit) of type (MySuperItem[Integer B]
                     Else: (Skip remaining actions)
                     If: (ItemBeingCombined) not equal to (ItemBeingCombined2)
                     Then: Remove item of type (MySuperItem[Integer A]) from (Triggering unit)
                              Remove item of type (MySuperItem[Integer B]) from (Triggering unit)
                              Create item of type (YourAdCouldBeHere) for (Triggering unit)

Untested, but I think it would work.
 
I don't want the items to be mixed. What I plan on doing is when you have 2 items from the same set you get a passive buff, the two items will still take two slots (so people must make choices about their items). But +rep anyway for the help.
 
Sorry about double post but I have tried to work it out. So far I have created
Code:
Arcanite Set 2 Items
    Events
        Unit - A unit Acquires an item
    Conditions
    Actions
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Hero manipulating item) has an item of type ArcaniteSet[(Integer A)]) Equal to True
                    Then - Actions
                        Set ArcaniteSet2Item1 = (Item carried by (Hero manipulating item) of type ArcaniteSet[(Integer A)])
                    Else - Actions
                        Skip remaining actions
        For each (Integer B) from 1 to 4, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Hero manipulating item) has an item of type ArcaniteSet[(Integer B)]) Equal to True
                    Then - Actions
                        Set ArcaniteSet2Item2 = (Item carried by (Hero manipulating item) of type ArcaniteSet[(Integer B)])
                    Else - Actions
                        Skip remaining actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ArcaniteSet2Item1 Not equal to ArcaniteSet2Item2
            Then - Actions
                Unit - Add Arcanite Set (2)  to (Hero manipulating item)
            Else - Actions
                Do nothing

It doesn't work but I am curious if anyone can decipher a reason why? Or even a better way of doing it.

One problem I think is in there is:

Code:
 For each (Integer B) from 1 to 4, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Hero manipulating item) has an item of type ArcaniteSet[(Integer B)]) Equal to True
                    Then - Actions
                        Set ArcaniteSet2Item2 = (Item carried by (Hero manipulating item) of type ArcaniteSet[(Integer B)])
                    Else - Actions
                        Skip remaining actions

Of course it is going to find an item, it's going to find the same item that Part one found. So I think that should be noted.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top