Log in

View Full Version : Lich Variables



Althrel
10-26-2015, 04:32 PM
This is probably (hopefully) simple, but I'm hoping someone can point me in the right direction. I've recently stopped using Stormfront (now using Avalon and it doesn't seem to have anything like this built in), and am trying to recreate a setup I had there, but use Lich to do it instead.

Basically I had some short simple scripts that changed Stormfront variables, then in macros I referenced the variables rather than the actual items. So for example if F1 took my broadsword from my sheath, after running .dagger then F1 would take my dagger from my boots. Is there a comparable way to achieve this just using Lich? If the macros would need to be short Lich scripts that's no big deal.

SashaFierce
10-26-2015, 04:34 PM
sav = Settings['sav'] || String.new

sav = "box"

Tillmen
10-26-2015, 09:04 PM
Lich can't interface with Stormfront variables, but you can use Lich variables. You can set the variables with something like:
;vars set weapon=dagger
or use ;vars setup
or you could have a Lich script or alias set the variable for you if you'll be changing them often and want to type less.

Then, set your macros to either start a Lich script or an in-line script. So, F1 might be ";getweapon" and then the getweapon script would have something like:
fput "get my #{Vars.weapon}"

or just make the F1 macro something like:
;eq fput "get my #{Vars.weapon}"

;e and ;eq are built in commands that take whatever comes after them and turns them into a temporary script. The q in ;eq stands for quiet, and it's the same as ;e except it doesn't have the script active and exited messages.

Althrel
10-26-2015, 10:19 PM
Thanks for the responses, I was able to get things working even better than before!