Gold Return Trigger Doesn't Work

Kahiera

Active Member
Reaction score
9
Trigger:
  • ER
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 1
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 2
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 3
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 4
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 5
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 6
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 1
          • (Level of (Triggering unit)) Less than 8
        • Then - Actions
          • Player - Add -2 to (Owner of (Triggering unit)) Current gold
        • Else - 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 Entangling Roots 2
                  • (Level of (Triggering unit)) Less than 18
            • Then - Actions
              • Player - Add -22 to (Owner of (Triggering unit)) Current gold
            • Else - 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 Entangling Roots 3
                      • (Level of (Triggering unit)) Less than 28
                • Then - Actions
                  • Player - Add -54 to (Owner of (Triggering unit)) Current gold
                • Else - 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 Entangling Roots 4
                          • (Level of (Triggering unit)) Less than 36
                    • Then - Actions
                      • Player - Add -140 to (Owner of (Triggering unit)) Current gold
                    • Else - 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 Entangling Roots 5
                              • (Level of (Triggering unit)) Less than 48
                        • Then - Actions
                          • Player - Add -310 to (Owner of (Triggering unit)) Current gold
                        • Else - 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 Entangling Roots 6
                                  • (Level of (Triggering unit)) Less than 58
                            • Then - Actions
                              • Player - Add -350 to (Owner of (Triggering unit)) Current gold
                            • Else - Actions
what do i need to change to get it to work? the hero buying the item is level 1
 

Cookiemaster

New Member
Reaction score
36
First of all, remove all the "And all conditions are true" in there. It is automatically like that. You will only need to use that if you combine it with "Or" conditions and stuff like that.

Second, what do you want to actually achieve?
 

Kahiera

Active Member
Reaction score
9
ok i've tried separating the if-thens, and removing the "and all conditions are true"
still doesn't work
and as for what im trying to accomplish, i want it so that if my hero buys the item and is not the proper level, the item will be removed (different trigger that works) and will recieve a refund for the item
also i knoticed that i have negative values, although, when i fix them to be positive, and even doubled, the owner of the hero doesn't recieve a refund.

these are the 2 triggers that i currently have.
this one works
Trigger:
  • Entangling Roots
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 1
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 2
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 3
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 4
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 5
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 6
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 1
          • (Level of (Triggering unit)) Greater than or equal to 8
        • Then - Actions
          • Unit - Add EntanglingRoots to (Triggering unit)
          • Custom script: call UnitMakeAbilityPermanent(GetTriggerUnit(),true,'A00A')
          • Custom script: call UnitMakeAbilityPermanent(GetTriggerUnit(),true,'A009')
          • Hero - Drop (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) from (Triggering unit)
          • Item - Remove (Last dropped item)
          • Set EntanglingLevel[(Player number of (Owner of (Triggering unit)))] = (Level of Entangling Roots for (Triggering unit))
          • Neutral Building - Remove Entangling Roots 1 from Balance[(Player number of (Triggering player))]
          • Neutral Building - Add Entangling Roots 2 to Balance[(Player number of (Triggering player))] with 1 in stock and a max stock of 1
        • Else - 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 Entangling Roots 2
                  • (Level of (Triggering unit)) Greater than or equal to 18
            • Then - Actions
              • Unit - Set level of Entangling Roots for (Triggering unit) to ((Level of Entangling Roots for (Triggering unit)) + 1)
              • Hero - Drop (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) from (Triggering unit)
              • Item - Remove (Last dropped item)
              • Set EntanglingLevel[(Player number of (Owner of (Triggering unit)))] = (Level of Entangling Roots for (Triggering unit))
              • Neutral Building - Remove Entangling Roots 2 from Balance[(Player number of (Triggering player))]
              • Neutral Building - Add Entangling Roots 3 to Balance[(Player number of (Triggering player))] with 1 in stock and a max stock of 1
            • Else - 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 Entangling Roots 3
                      • (Level of (Triggering unit)) Greater than or equal to 28
                • Then - Actions
                  • Unit - Set level of Entangling Roots for (Triggering unit) to ((Level of Entangling Roots for (Triggering unit)) + 1)
                  • Hero - Drop (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) from (Triggering unit)
                  • Item - Remove (Last dropped item)
                  • Set EntanglingLevel[(Player number of (Owner of (Triggering unit)))] = (Level of Entangling Roots for (Triggering unit))
                  • Neutral Building - Remove Entangling Roots 3 from Balance[(Player number of (Triggering player))]
                  • Neutral Building - Add Entangling Roots 4 to Balance[(Player number of (Triggering player))] with 1 in stock and a max stock of 1
                • Else - 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 Entangling Roots 4
                          • (Level of (Triggering unit)) Greater than or equal to 36
                    • Then - Actions
                      • Unit - Set level of Entangling Roots for (Triggering unit) to ((Level of Entangling Roots for (Triggering unit)) + 1)
                      • Hero - Drop (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) from (Triggering unit)
                      • Item - Remove (Last dropped item)
                      • Set EntanglingLevel[(Player number of (Owner of (Triggering unit)))] = (Level of Entangling Roots for (Triggering unit))
                      • Neutral Building - Remove Entangling Roots 4 from (Selling unit)
                      • Neutral Building - Add Entangling Roots 5 to (Selling unit) with 1 in stock and a max stock of 1
                    • Else - 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 Entangling Roots 5
                              • (Level of (Triggering unit)) Greater than or equal to 48
                        • Then - Actions
                          • Unit - Set level of Entangling Roots for (Triggering unit) to ((Level of Entangling Roots for (Triggering unit)) + 1)
                          • Hero - Drop (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) from (Triggering unit)
                          • Item - Remove (Last dropped item)
                          • Set EntanglingLevel[(Player number of (Owner of (Triggering unit)))] = (Level of Entangling Roots for (Triggering unit))
                          • Neutral Building - Remove Entangling Roots 5 from (Selling unit)
                          • Neutral Building - Add Entangling Roots 6 to (Selling unit) with 1 in stock and a max stock of 1
                        • Else - 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 Entangling Roots 6
                                  • (Level of (Triggering unit)) Greater than or equal to 58
                            • Then - Actions
                              • Unit - Set level of Entangling Roots for (Triggering unit) to ((Level of Entangling Roots for (Triggering unit)) + 1)
                              • Hero - Drop (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) from (Triggering unit)
                              • Item - Remove (Last dropped item)
                              • Set EntanglingLevel[(Player number of (Owner of (Triggering unit)))] = (Level of Entangling Roots for (Triggering unit))
                              • Neutral Building - Remove Entangling Roots 6 from (Selling unit)
                            • Else - Actions
                              • EGUI - Simulate an error message for (Owner of (Triggering unit)) with the message Your hero is not yet at the correct level. You will recieve a refund for this item.
                              • Hero - Drop (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) from (Triggering unit)
                              • Item - Remove (Last dropped item)

and this one doesn't
Trigger:
  • ER
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 1
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 2
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 3
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 4
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 5
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 6
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 1
          • (Level of (Triggering unit)) Less than 8
        • Then - Actions
          • Player - Add 2 to (Owner of (Triggering unit)) Current gold
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 2
          • (Level of (Triggering unit)) Less than 18
        • Then - Actions
          • Player - Add 22 to (Owner of (Triggering unit)) Current gold
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 3
          • (Level of (Triggering unit)) Less than 28
        • Then - Actions
          • Player - Add 54 to (Owner of (Triggering unit)) Current gold
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 4
          • (Level of (Triggering unit)) Less than 36
        • Then - Actions
          • Player - Add 140 to (Owner of (Triggering unit)) Current gold
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 5
          • (Level of (Triggering unit)) Less than 48
        • Then - Actions
          • Player - Add 310 to (Owner of (Triggering unit)) Current gold
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 6
          • (Level of (Triggering unit)) Less than 58
        • Then - Actions
          • Player - Add 350 to (Owner of (Triggering unit)) Current gold
        • Else - Actions
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
> (Level of (Triggering unit)) Greater than or equal to 8

This passes for all levels from 8 on, including, for example, level 58.


The second "trigger" seems to work the other way around though:
> (Level of (Triggering unit)) Less than 8

Actually, all of those conditions there pass if you are, for example, level 1.



> and is not the proper level

Well, what is the correct level for a given item?
 

Kahiera

Active Member
Reaction score
9
the first trigger needs to know if the hero is at or above the proper level to purchase the item. that means if they're level 58 and they're buying the one that needs at least level 8 then they can get it. so that part is correct and it does work.
the other trigger is for when the hero is not yet at the level i want, so if the hero is below level 8 and tries to buy it, they recieve a refund for it. this is what isn't working. and the levels required are the ones listed in the first trigger. 8, 18, 28, 36, 48, 58
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    I ordered like five blocks for 15 dollars. They're just little aluminum blocks with holes drilled into them
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air

      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