#(JustinS) Compact flagging
26 messages · Page 1 of 1 (latest)
(JustinS) Compact flagging
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
Using foreach loops wont work I think because each variable has their own unique value
!c definemap
queue
definemap [<name>] [<key>:<value> ...]
Creates a MapTag definition with key/value pairs constructed from the input arguments.
Creates a MapTag definition with key/value pairs constructed from the input arguments.
!l definitions
Did you mean to search for data actions?
!l data
!g definitions
View the guide page 'Short Term Memory: Definitions' at: https://guide.denizenscript.com/guides/basics/definitions.html
Create a definition out of your script and create a map to apply once
what
I know how dictionaries work, or in this case called definemaps, but I have no idea what you mean
For the exact question of shortening up your script, you could do something like....
- definemap myCoolName key:value another_key:another_value etc:etc
- flag <FlaggableObject> flagname:<[myCoolName]>
However - flagging <item[some_item]> then moving on doesn't really make sense. The item object would be created, flagged, then never be used anywhere (each of your flag lines is currently getting a new ItemTag reference, not a single one).
If you want to apply some flags by default to all of your item_force_push items when they're created it's best to include that in the item script itself. Otherwise just need more details on the outcome you're looking for.
yeah my bad Im not supposed to write that 'item'' there. I needed to flag the item script
not the item
No worries - in that case yea just the - definemap should get you there in few lines. I did just realize you're using submaps in your original question though... However the same concept applies. Feel free to ask if you're still stuck anywhere.
In that case I meant you can do
- define SCRIPT <script[item_force_heal]>
- flag <[SCRIPT]> your:flag
Then you can repeat the <[SCRIPT]> def as much as you need
Thanks guys