Item Type condition

sionts

New Member
Reaction score
0
If i had Item_Type_Bow[(Integer A)] Equal to Tome of Experience
as a condition would "[(integer A)]" be all the items in the "Item type array"
 
i have 4 bows in a item type array

"set item_Type_Bow[1] = 1bow"
"set item_Type_Bow[2] = 2bow"
"set item_Type_Bow[3] = 3bow"
"set item_Type_Bow[4] = 4bow"

And certain hero types can use these items and these items cannot be manipulated.
 
i dont even get half of the triggers.

So how does this trigger, make certain heroes restricted from certain items?
Code:
Events
    Unit - A unit Acquires an item
Conditions
    ((Triggering unit) is A sapper) Equal to False
    Or - Any (Conditions) are true
        Conditions
            (Item-type of (Item being manipulated)) Equal to |cff007FFFMarkings of the Vampire|r
Actions
    Set TempUnit = (Triggering unit)
    Set TempItem = (Item being manipulated)
    Item - Set life of TempItem to 99999.00
    Player - Add (Integer((Current life of TempItem))) to TempPlayer Current gold
    Hero - Drop TempItem from TempUnit
    Item - Remove TempItem
    Game - Display to (Player group((Owner of (Triggering unit)))) for AAAADisplayTime seconds the text: |cff999999Only Warr...

It doesn't have any variables other then "tempunit, tempitem and Templayer."

It does't have anything like. "set warrior = (unit type array)" and there isn't any variables that resemble it.

If someone does get it please explain.
 
> It does't have anything like. "set warrior = (unit type array)"

Well, but it has a test that says "the unit that got this can not have the unit classification 'Sapper'".


Now, why it sets the item's life to some number, adds the life to the player's gold, then drops and removes the item... dunno.

Would be enough to simply add the gold and remove the item.

The "Or - multiple" condition isn't needed either, there's only one item type of interest here.


Event:
- A unit acquires an item
Conditions:
- Unit-type of (Hero manipulating item) equal to "some Hero type"
- Item-type of (Item being manipulated) equal to "item this type of Hero can not have"
Actions:
- Player - Add X to Owner of (Hero manipulating item) current Gold
- Item - Remove (Item being manipulated)
- Game - Display: "Sorry, you can't have this"


To restrict several Hero types from several item-types, use "better" conditions:

Or - Multiple conditions
- Item-type of (Item being manipulated) equal to Item1
- Item-type of (Item being manipulated) equal to Item2
- Item-type of (Item being manipulated) equal to Item3
- ...
Or - Multiple conditions
- Unit-type of (Hero manipulating item) equal to HeroType1
- Unit-type of (Hero manipulating item) equal to HeroType2
- Unit-type of (Hero manipulating item) equal to HeroType3
- ...

If any of those Heroes tries to get any of those items, they will be removed.
Or whatever you want to happen there.

And, a simple way to get the gold cost of an item is to set the hitpoints of the items to their gold cost.
Then you can simply add "Integer(Life of (Item being manipulated))" back to the player.
 
Would i need to create a new trigger to restrict heroes for having the same item? or is tehr a way to add this to the same trigger
 
just curious.

Code:
Conditions
    Or - Any (Conditions) are true
        Conditions
            (Unit-type of (Hero manipulating item)) Not equal to Paladin
            (Unit-type of (Hero manipulating item)) Not equal to Halarks
            (Unit-type of (Hero manipulating item)) Not equal to Arthas
            (Unit-type of (Hero manipulating item)) Not equal to Admiral Proudmoore
            (Unit-type of (Hero manipulating item)) Not equal to Warrior
            (Unit-type of (Hero manipulating item)) Not equal to Dark Knight
    Or - Any (Conditions) are true
        Conditions
            (Item-type of (Item being manipulated)) Equal to Reaver's Shield
            (Item-type of (Item being manipulated)) Equal to Thorium Disc
            (Item-type of (Item being manipulated)) Equal to Arcanite Disc
            (Item-type of (Item being manipulated)) Equal to Arcanite Shield

Having 2 "Or - any(conidtion) are true"
will work? like if the hero was not "any of those heroes AND he bought any of those shields" the shield would drop.
 
> Having 2 "Or - any (conditions) are true" will work?

Why not?

If at least one condition inside the "or" is true, the entire "or" is true.
The result of both "or"s is used to check the entire "conditions" block.

So, the actions will only run if at least one condition is true in both blocks.

And, no, just having one "or" block returning true is not enough.

Or, with your example, if that Paladin would get a Cheese, which isn't in the list of items, nothing will happen.
 
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

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top