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"
 

sionts

New Member
Reaction score
0
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.
 

sionts

New Member
Reaction score
0
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.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> 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.
 

sionts

New Member
Reaction score
0
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
 

sionts

New Member
Reaction score
0
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.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> 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.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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