Farm Script help

Cool12309

Member
I'm making a farming script and I need to know if this is possible:

1) Get the turns of an effect received when using an item [EDIT: string_modifier(item, "Modifiers") works too.]

2) Getting the raw string of a modifier, that is, not evaluated [EDIT: string_modifier(effect, "Modifiers"). Thanks lost!]
For example, if there's an item that gives 2 +item for every hobo power you have, and you had 5, you'd receive 10 when grabbing the item modifier. What I'm asking for is a way to get the string that'd be stored in mafia's internal data, "[2*H]".



Edit: Okay, I have a new problem, using the Modifiers modifier above. Separate modifiers are split with commas, but some modifiers look something like [max(0,101-T)] which also contains a comma. I don't know how to get around this.
 
Last edited:
To get the duration of effect from an item you can also use
Code:
numeric_modifier(item, "Effect Duration")
Although I assume it's unreliable for items which grant multiple effects of different durations. Such as uuhm. I'm sure there's a couple.
 

lostcalpolydude

Developer
Staff member
Edit: Okay, I have a new problem, using the Modifiers modifier above. Separate modifiers are split with commas, but some modifiers look something like [max(0,101-T)] which also contains a comma. I don't know how to get around this.

There is always a space after commas that separate modifiers. There is never a space inside [] (including after commas) unless it's part of a location or zone name.
 
Top