I am wondering what is the lifespan of an ash script. Does the ash file get parsed every time it is run within a session or is it cached somewhere for when the script is called again?
Why I am asking:
I have this relay script (relay_Hobo_Loot.ash) that checks inventory for various items and displays if an item is present.
Say I run the script, see my results and then receive a piece of loot. Running the script again shows that the loot is missing. The loot will only pop up on refreshing session or exiting and opening mafia. I had something similar happening in relay_Hardcore_Deeds on some conditions (trying to use more spleen items than owned makes the spleen item disappear from the script, yet it remains in the inventory )
Whacking cli_execute("refresh inv"); at the beginning of the script seemes to solve this (but it does take ages).
This makes me think that since the script gets out of sync with mafia, there is some cached version of the script or something that doesn't update the inventory in some conditions. Correct me if I am wrong.
The actual question: Is it possible (provided above is correct) to unload a script, or force it to reload at every startup? If all my assumptions are wrong, any idea why this is happening?
Why I am asking:
I have this relay script (relay_Hobo_Loot.ash) that checks inventory for various items and displays if an item is present.
Say I run the script, see my results and then receive a piece of loot. Running the script again shows that the loot is missing. The loot will only pop up on refreshing session or exiting and opening mafia. I had something similar happening in relay_Hardcore_Deeds on some conditions (trying to use more spleen items than owned makes the spleen item disappear from the script, yet it remains in the inventory )
Whacking cli_execute("refresh inv"); at the beginning of the script seemes to solve this (but it does take ages).
This makes me think that since the script gets out of sync with mafia, there is some cached version of the script or something that doesn't update the inventory in some conditions. Correct me if I am wrong.
The actual question: Is it possible (provided above is correct) to unload a script, or force it to reload at every startup? If all my assumptions are wrong, any idea why this is happening?